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
830pub mod case_iterator_ordinals {
831    pub const GET_NEXT: u64 = 0x7583f97b7486467c;
832}
833
834pub mod debug_data_iterator_ordinals {
835    pub const GET_NEXT: u64 = 0x9ef24c823f5ad60;
836    pub const GET_NEXT_COMPRESSED: u64 = 0x6765e9cb918301f4;
837}
838
839pub mod early_boot_profile_ordinals {
840    pub const REGISTER_WATCHER: u64 = 0x6bd6b03803b93715;
841}
842
843pub mod query_ordinals {
844    pub const ENUMERATE: u64 = 0x6cd89c1f2728d418;
845    pub const ENUMERATE_IN_REALM: u64 = 0x7f7f533194a51ec5;
846}
847
848pub mod run_builder_ordinals {
849    pub const ADD_SUITE: u64 = 0x71e7f9a06daac486;
850    pub const ADD_SUITE_IN_REALM: u64 = 0x4d10c582715a8683;
851    pub const WITH_SCHEDULING_OPTIONS: u64 = 0x55e73fdbeade0b0b;
852    pub const BUILD: u64 = 0x7879f2360ff1f160;
853}
854
855pub mod run_controller_ordinals {
856    pub const STOP: u64 = 0x24972633e2cf712d;
857    pub const KILL: u64 = 0x6e62104929fc55c5;
858    pub const GET_EVENTS: u64 = 0x273bbd98cfcea4ba;
859}
860
861pub mod suite_controller_ordinals {
862    pub const STOP: u64 = 0x4675fc6c8f404fef;
863    pub const KILL: u64 = 0x5f813fb72887fc17;
864    pub const WATCH_EVENTS: u64 = 0x5d1a75b1d06839b4;
865    pub const GET_EVENTS: u64 = 0x1f2ec93d2236d1db;
866}
867
868pub mod suite_runner_ordinals {
869    pub const RUN: u64 = 0x16f5ec6a46c223f0;
870}
871
872pub mod test_case_enumerator_ordinals {
873    pub const ENUMERATE: u64 = 0x24f8a91d96134492;
874}
875
876pub mod test_case_iterator_ordinals {
877    pub const GET_NEXT: u64 = 0x37abec519b2ac1be;
878}
879
880mod internal {
881    use super::*;
882    unsafe impl fidl::encoding::TypeMarker for CaseStatus {
883        type Owned = Self;
884
885        #[inline(always)]
886        fn inline_align(_context: fidl::encoding::Context) -> usize {
887            std::mem::align_of::<u32>()
888        }
889
890        #[inline(always)]
891        fn inline_size(_context: fidl::encoding::Context) -> usize {
892            std::mem::size_of::<u32>()
893        }
894
895        #[inline(always)]
896        fn encode_is_copy() -> bool {
897            false
898        }
899
900        #[inline(always)]
901        fn decode_is_copy() -> bool {
902            false
903        }
904    }
905
906    impl fidl::encoding::ValueTypeMarker for CaseStatus {
907        type Borrowed<'a> = Self;
908        #[inline(always)]
909        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
910            *value
911        }
912    }
913
914    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CaseStatus {
915        #[inline]
916        unsafe fn encode(
917            self,
918            encoder: &mut fidl::encoding::Encoder<'_, D>,
919            offset: usize,
920            _depth: fidl::encoding::Depth,
921        ) -> fidl::Result<()> {
922            encoder.debug_check_bounds::<Self>(offset);
923            encoder.write_num(self.into_primitive(), offset);
924            Ok(())
925        }
926    }
927
928    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStatus {
929        #[inline(always)]
930        fn new_empty() -> Self {
931            Self::unknown()
932        }
933
934        #[inline]
935        unsafe fn decode(
936            &mut self,
937            decoder: &mut fidl::encoding::Decoder<'_, D>,
938            offset: usize,
939            _depth: fidl::encoding::Depth,
940        ) -> fidl::Result<()> {
941            decoder.debug_check_bounds::<Self>(offset);
942            let prim = decoder.read_num::<u32>(offset);
943
944            *self = Self::from_primitive_allow_unknown(prim);
945            Ok(())
946        }
947    }
948    unsafe impl fidl::encoding::TypeMarker for LaunchError {
949        type Owned = Self;
950
951        #[inline(always)]
952        fn inline_align(_context: fidl::encoding::Context) -> usize {
953            std::mem::align_of::<u32>()
954        }
955
956        #[inline(always)]
957        fn inline_size(_context: fidl::encoding::Context) -> usize {
958            std::mem::size_of::<u32>()
959        }
960
961        #[inline(always)]
962        fn encode_is_copy() -> bool {
963            false
964        }
965
966        #[inline(always)]
967        fn decode_is_copy() -> bool {
968            false
969        }
970    }
971
972    impl fidl::encoding::ValueTypeMarker for LaunchError {
973        type Borrowed<'a> = Self;
974        #[inline(always)]
975        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
976            *value
977        }
978    }
979
980    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for LaunchError {
981        #[inline]
982        unsafe fn encode(
983            self,
984            encoder: &mut fidl::encoding::Encoder<'_, D>,
985            offset: usize,
986            _depth: fidl::encoding::Depth,
987        ) -> fidl::Result<()> {
988            encoder.debug_check_bounds::<Self>(offset);
989            encoder.write_num(self.into_primitive(), offset);
990            Ok(())
991        }
992    }
993
994    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LaunchError {
995        #[inline(always)]
996        fn new_empty() -> Self {
997            Self::unknown()
998        }
999
1000        #[inline]
1001        unsafe fn decode(
1002            &mut self,
1003            decoder: &mut fidl::encoding::Decoder<'_, D>,
1004            offset: usize,
1005            _depth: fidl::encoding::Depth,
1006        ) -> fidl::Result<()> {
1007            decoder.debug_check_bounds::<Self>(offset);
1008            let prim = decoder.read_num::<u32>(offset);
1009
1010            *self = Self::from_primitive_allow_unknown(prim);
1011            Ok(())
1012        }
1013    }
1014    unsafe impl fidl::encoding::TypeMarker for LogsIteratorOption {
1015        type Owned = Self;
1016
1017        #[inline(always)]
1018        fn inline_align(_context: fidl::encoding::Context) -> usize {
1019            std::mem::align_of::<u32>()
1020        }
1021
1022        #[inline(always)]
1023        fn inline_size(_context: fidl::encoding::Context) -> usize {
1024            std::mem::size_of::<u32>()
1025        }
1026
1027        #[inline(always)]
1028        fn encode_is_copy() -> bool {
1029            false
1030        }
1031
1032        #[inline(always)]
1033        fn decode_is_copy() -> bool {
1034            false
1035        }
1036    }
1037
1038    impl fidl::encoding::ValueTypeMarker for LogsIteratorOption {
1039        type Borrowed<'a> = Self;
1040        #[inline(always)]
1041        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1042            *value
1043        }
1044    }
1045
1046    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1047        for LogsIteratorOption
1048    {
1049        #[inline]
1050        unsafe fn encode(
1051            self,
1052            encoder: &mut fidl::encoding::Encoder<'_, D>,
1053            offset: usize,
1054            _depth: fidl::encoding::Depth,
1055        ) -> fidl::Result<()> {
1056            encoder.debug_check_bounds::<Self>(offset);
1057            encoder.write_num(self.into_primitive(), offset);
1058            Ok(())
1059        }
1060    }
1061
1062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorOption {
1063        #[inline(always)]
1064        fn new_empty() -> Self {
1065            Self::unknown()
1066        }
1067
1068        #[inline]
1069        unsafe fn decode(
1070            &mut self,
1071            decoder: &mut fidl::encoding::Decoder<'_, D>,
1072            offset: usize,
1073            _depth: fidl::encoding::Depth,
1074        ) -> fidl::Result<()> {
1075            decoder.debug_check_bounds::<Self>(offset);
1076            let prim = decoder.read_num::<u32>(offset);
1077
1078            *self = Self::from_primitive_allow_unknown(prim);
1079            Ok(())
1080        }
1081    }
1082    unsafe impl fidl::encoding::TypeMarker for LogsIteratorType {
1083        type Owned = Self;
1084
1085        #[inline(always)]
1086        fn inline_align(_context: fidl::encoding::Context) -> usize {
1087            std::mem::align_of::<u32>()
1088        }
1089
1090        #[inline(always)]
1091        fn inline_size(_context: fidl::encoding::Context) -> usize {
1092            std::mem::size_of::<u32>()
1093        }
1094
1095        #[inline(always)]
1096        fn encode_is_copy() -> bool {
1097            false
1098        }
1099
1100        #[inline(always)]
1101        fn decode_is_copy() -> bool {
1102            false
1103        }
1104    }
1105
1106    impl fidl::encoding::ValueTypeMarker for LogsIteratorType {
1107        type Borrowed<'a> = Self;
1108        #[inline(always)]
1109        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1110            *value
1111        }
1112    }
1113
1114    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
1115        for LogsIteratorType
1116    {
1117        #[inline]
1118        unsafe fn encode(
1119            self,
1120            encoder: &mut fidl::encoding::Encoder<'_, D>,
1121            offset: usize,
1122            _depth: fidl::encoding::Depth,
1123        ) -> fidl::Result<()> {
1124            encoder.debug_check_bounds::<Self>(offset);
1125            encoder.write_num(self.into_primitive(), offset);
1126            Ok(())
1127        }
1128    }
1129
1130    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorType {
1131        #[inline(always)]
1132        fn new_empty() -> Self {
1133            Self::unknown()
1134        }
1135
1136        #[inline]
1137        unsafe fn decode(
1138            &mut self,
1139            decoder: &mut fidl::encoding::Decoder<'_, D>,
1140            offset: usize,
1141            _depth: fidl::encoding::Depth,
1142        ) -> fidl::Result<()> {
1143            decoder.debug_check_bounds::<Self>(offset);
1144            let prim = decoder.read_num::<u32>(offset);
1145
1146            *self = Self::from_primitive_allow_unknown(prim);
1147            Ok(())
1148        }
1149    }
1150    unsafe impl fidl::encoding::TypeMarker for SuiteResult {
1151        type Owned = Self;
1152
1153        #[inline(always)]
1154        fn inline_align(_context: fidl::encoding::Context) -> usize {
1155            std::mem::align_of::<u32>()
1156        }
1157
1158        #[inline(always)]
1159        fn inline_size(_context: fidl::encoding::Context) -> usize {
1160            std::mem::size_of::<u32>()
1161        }
1162
1163        #[inline(always)]
1164        fn encode_is_copy() -> bool {
1165            false
1166        }
1167
1168        #[inline(always)]
1169        fn decode_is_copy() -> bool {
1170            false
1171        }
1172    }
1173
1174    impl fidl::encoding::ValueTypeMarker for SuiteResult {
1175        type Borrowed<'a> = Self;
1176        #[inline(always)]
1177        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1178            *value
1179        }
1180    }
1181
1182    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteResult {
1183        #[inline]
1184        unsafe fn encode(
1185            self,
1186            encoder: &mut fidl::encoding::Encoder<'_, D>,
1187            offset: usize,
1188            _depth: fidl::encoding::Depth,
1189        ) -> fidl::Result<()> {
1190            encoder.debug_check_bounds::<Self>(offset);
1191            encoder.write_num(self.into_primitive(), offset);
1192            Ok(())
1193        }
1194    }
1195
1196    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteResult {
1197        #[inline(always)]
1198        fn new_empty() -> Self {
1199            Self::unknown()
1200        }
1201
1202        #[inline]
1203        unsafe fn decode(
1204            &mut self,
1205            decoder: &mut fidl::encoding::Decoder<'_, D>,
1206            offset: usize,
1207            _depth: fidl::encoding::Depth,
1208        ) -> fidl::Result<()> {
1209            decoder.debug_check_bounds::<Self>(offset);
1210            let prim = decoder.read_num::<u32>(offset);
1211
1212            *self = Self::from_primitive_allow_unknown(prim);
1213            Ok(())
1214        }
1215    }
1216    unsafe impl fidl::encoding::TypeMarker for SuiteStatus {
1217        type Owned = Self;
1218
1219        #[inline(always)]
1220        fn inline_align(_context: fidl::encoding::Context) -> usize {
1221            std::mem::align_of::<u32>()
1222        }
1223
1224        #[inline(always)]
1225        fn inline_size(_context: fidl::encoding::Context) -> usize {
1226            std::mem::size_of::<u32>()
1227        }
1228
1229        #[inline(always)]
1230        fn encode_is_copy() -> bool {
1231            false
1232        }
1233
1234        #[inline(always)]
1235        fn decode_is_copy() -> bool {
1236            false
1237        }
1238    }
1239
1240    impl fidl::encoding::ValueTypeMarker for SuiteStatus {
1241        type Borrowed<'a> = Self;
1242        #[inline(always)]
1243        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1244            *value
1245        }
1246    }
1247
1248    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteStatus {
1249        #[inline]
1250        unsafe fn encode(
1251            self,
1252            encoder: &mut fidl::encoding::Encoder<'_, D>,
1253            offset: usize,
1254            _depth: fidl::encoding::Depth,
1255        ) -> fidl::Result<()> {
1256            encoder.debug_check_bounds::<Self>(offset);
1257            encoder.write_num(self.into_primitive(), offset);
1258            Ok(())
1259        }
1260    }
1261
1262    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStatus {
1263        #[inline(always)]
1264        fn new_empty() -> Self {
1265            Self::unknown()
1266        }
1267
1268        #[inline]
1269        unsafe fn decode(
1270            &mut self,
1271            decoder: &mut fidl::encoding::Decoder<'_, D>,
1272            offset: usize,
1273            _depth: fidl::encoding::Depth,
1274        ) -> fidl::Result<()> {
1275            decoder.debug_check_bounds::<Self>(offset);
1276            let prim = decoder.read_num::<u32>(offset);
1277
1278            *self = Self::from_primitive_allow_unknown(prim);
1279            Ok(())
1280        }
1281    }
1282    unsafe impl fidl::encoding::TypeMarker for TestCaseResult {
1283        type Owned = Self;
1284
1285        #[inline(always)]
1286        fn inline_align(_context: fidl::encoding::Context) -> usize {
1287            std::mem::align_of::<u32>()
1288        }
1289
1290        #[inline(always)]
1291        fn inline_size(_context: fidl::encoding::Context) -> usize {
1292            std::mem::size_of::<u32>()
1293        }
1294
1295        #[inline(always)]
1296        fn encode_is_copy() -> bool {
1297            false
1298        }
1299
1300        #[inline(always)]
1301        fn decode_is_copy() -> bool {
1302            false
1303        }
1304    }
1305
1306    impl fidl::encoding::ValueTypeMarker for TestCaseResult {
1307        type Borrowed<'a> = Self;
1308        #[inline(always)]
1309        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1310            *value
1311        }
1312    }
1313
1314    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TestCaseResult {
1315        #[inline]
1316        unsafe fn encode(
1317            self,
1318            encoder: &mut fidl::encoding::Encoder<'_, D>,
1319            offset: usize,
1320            _depth: fidl::encoding::Depth,
1321        ) -> fidl::Result<()> {
1322            encoder.debug_check_bounds::<Self>(offset);
1323            encoder.write_num(self.into_primitive(), offset);
1324            Ok(())
1325        }
1326    }
1327
1328    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCaseResult {
1329        #[inline(always)]
1330        fn new_empty() -> Self {
1331            Self::unknown()
1332        }
1333
1334        #[inline]
1335        unsafe fn decode(
1336            &mut self,
1337            decoder: &mut fidl::encoding::Decoder<'_, D>,
1338            offset: usize,
1339            _depth: fidl::encoding::Depth,
1340        ) -> fidl::Result<()> {
1341            decoder.debug_check_bounds::<Self>(offset);
1342            let prim = decoder.read_num::<u32>(offset);
1343
1344            *self = Self::from_primitive_allow_unknown(prim);
1345            Ok(())
1346        }
1347    }
1348
1349    impl fidl::encoding::ValueTypeMarker for CaseFinished {
1350        type Borrowed<'a> = &'a Self;
1351        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1352            value
1353        }
1354    }
1355
1356    unsafe impl fidl::encoding::TypeMarker for CaseFinished {
1357        type Owned = Self;
1358
1359        #[inline(always)]
1360        fn inline_align(_context: fidl::encoding::Context) -> usize {
1361            4
1362        }
1363
1364        #[inline(always)]
1365        fn inline_size(_context: fidl::encoding::Context) -> usize {
1366            4
1367        }
1368        #[inline(always)]
1369        fn encode_is_copy() -> bool {
1370            true
1371        }
1372
1373        #[inline(always)]
1374        fn decode_is_copy() -> bool {
1375            true
1376        }
1377    }
1378
1379    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFinished, D>
1380        for &CaseFinished
1381    {
1382        #[inline]
1383        unsafe fn encode(
1384            self,
1385            encoder: &mut fidl::encoding::Encoder<'_, D>,
1386            offset: usize,
1387            _depth: fidl::encoding::Depth,
1388        ) -> fidl::Result<()> {
1389            encoder.debug_check_bounds::<CaseFinished>(offset);
1390            unsafe {
1391                // Copy the object into the buffer.
1392                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1393                (buf_ptr as *mut CaseFinished)
1394                    .write_unaligned((self as *const CaseFinished).read());
1395                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1396                // done second because the memcpy will write garbage to these bytes.
1397            }
1398            Ok(())
1399        }
1400    }
1401    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1402        fidl::encoding::Encode<CaseFinished, D> for (T0,)
1403    {
1404        #[inline]
1405        unsafe fn encode(
1406            self,
1407            encoder: &mut fidl::encoding::Encoder<'_, D>,
1408            offset: usize,
1409            depth: fidl::encoding::Depth,
1410        ) -> fidl::Result<()> {
1411            encoder.debug_check_bounds::<CaseFinished>(offset);
1412            // Zero out padding regions. There's no need to apply masks
1413            // because the unmasked parts will be overwritten by fields.
1414            // Write the fields.
1415            self.0.encode(encoder, offset + 0, depth)?;
1416            Ok(())
1417        }
1418    }
1419
1420    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFinished {
1421        #[inline(always)]
1422        fn new_empty() -> Self {
1423            Self { identifier: fidl::new_empty!(u32, D) }
1424        }
1425
1426        #[inline]
1427        unsafe fn decode(
1428            &mut self,
1429            decoder: &mut fidl::encoding::Decoder<'_, D>,
1430            offset: usize,
1431            _depth: fidl::encoding::Depth,
1432        ) -> fidl::Result<()> {
1433            decoder.debug_check_bounds::<Self>(offset);
1434            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1435            // Verify that padding bytes are zero.
1436            // Copy from the buffer into the object.
1437            unsafe {
1438                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1439            }
1440            Ok(())
1441        }
1442    }
1443
1444    impl fidl::encoding::ValueTypeMarker for CaseFound {
1445        type Borrowed<'a> = &'a Self;
1446        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1447            value
1448        }
1449    }
1450
1451    unsafe impl fidl::encoding::TypeMarker for CaseFound {
1452        type Owned = Self;
1453
1454        #[inline(always)]
1455        fn inline_align(_context: fidl::encoding::Context) -> usize {
1456            8
1457        }
1458
1459        #[inline(always)]
1460        fn inline_size(_context: fidl::encoding::Context) -> usize {
1461            24
1462        }
1463    }
1464
1465    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFound, D>
1466        for &CaseFound
1467    {
1468        #[inline]
1469        unsafe fn encode(
1470            self,
1471            encoder: &mut fidl::encoding::Encoder<'_, D>,
1472            offset: usize,
1473            _depth: fidl::encoding::Depth,
1474        ) -> fidl::Result<()> {
1475            encoder.debug_check_bounds::<CaseFound>(offset);
1476            // Delegate to tuple encoding.
1477            fidl::encoding::Encode::<CaseFound, D>::encode(
1478                (
1479                    <fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_case_name),
1480                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
1481                ),
1482                encoder, offset, _depth
1483            )
1484        }
1485    }
1486    unsafe impl<
1487            D: fidl::encoding::ResourceDialect,
1488            T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2048>, D>,
1489            T1: fidl::encoding::Encode<u32, D>,
1490        > fidl::encoding::Encode<CaseFound, D> for (T0, T1)
1491    {
1492        #[inline]
1493        unsafe fn encode(
1494            self,
1495            encoder: &mut fidl::encoding::Encoder<'_, D>,
1496            offset: usize,
1497            depth: fidl::encoding::Depth,
1498        ) -> fidl::Result<()> {
1499            encoder.debug_check_bounds::<CaseFound>(offset);
1500            // Zero out padding regions. There's no need to apply masks
1501            // because the unmasked parts will be overwritten by fields.
1502            unsafe {
1503                let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
1504                (ptr as *mut u64).write_unaligned(0);
1505            }
1506            // Write the fields.
1507            self.0.encode(encoder, offset + 0, depth)?;
1508            self.1.encode(encoder, offset + 16, depth)?;
1509            Ok(())
1510        }
1511    }
1512
1513    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFound {
1514        #[inline(always)]
1515        fn new_empty() -> Self {
1516            Self {
1517                test_case_name: fidl::new_empty!(fidl::encoding::BoundedString<2048>, D),
1518                identifier: fidl::new_empty!(u32, D),
1519            }
1520        }
1521
1522        #[inline]
1523        unsafe fn decode(
1524            &mut self,
1525            decoder: &mut fidl::encoding::Decoder<'_, D>,
1526            offset: usize,
1527            _depth: fidl::encoding::Depth,
1528        ) -> fidl::Result<()> {
1529            decoder.debug_check_bounds::<Self>(offset);
1530            // Verify that padding bytes are zero.
1531            let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
1532            let padval = unsafe { (ptr as *const u64).read_unaligned() };
1533            let mask = 0xffffffff00000000u64;
1534            let maskedval = padval & mask;
1535            if maskedval != 0 {
1536                return Err(fidl::Error::NonZeroPadding {
1537                    padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
1538                });
1539            }
1540            fidl::decode!(
1541                fidl::encoding::BoundedString<2048>,
1542                D,
1543                &mut self.test_case_name,
1544                decoder,
1545                offset + 0,
1546                _depth
1547            )?;
1548            fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 16, _depth)?;
1549            Ok(())
1550        }
1551    }
1552
1553    impl fidl::encoding::ValueTypeMarker for CaseIteratorGetNextResponse {
1554        type Borrowed<'a> = &'a Self;
1555        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1556            value
1557        }
1558    }
1559
1560    unsafe impl fidl::encoding::TypeMarker for CaseIteratorGetNextResponse {
1561        type Owned = Self;
1562
1563        #[inline(always)]
1564        fn inline_align(_context: fidl::encoding::Context) -> usize {
1565            8
1566        }
1567
1568        #[inline(always)]
1569        fn inline_size(_context: fidl::encoding::Context) -> usize {
1570            16
1571        }
1572    }
1573
1574    unsafe impl<D: fidl::encoding::ResourceDialect>
1575        fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for &CaseIteratorGetNextResponse
1576    {
1577        #[inline]
1578        unsafe fn encode(
1579            self,
1580            encoder: &mut fidl::encoding::Encoder<'_, D>,
1581            offset: usize,
1582            _depth: fidl::encoding::Depth,
1583        ) -> fidl::Result<()> {
1584            encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
1585            // Delegate to tuple encoding.
1586            fidl::encoding::Encode::<CaseIteratorGetNextResponse, D>::encode(
1587                (
1588                    <fidl::encoding::UnboundedVector<Case> as fidl::encoding::ValueTypeMarker>::borrow(&self.cases),
1589                ),
1590                encoder, offset, _depth
1591            )
1592        }
1593    }
1594    unsafe impl<
1595            D: fidl::encoding::ResourceDialect,
1596            T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Case>, D>,
1597        > fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for (T0,)
1598    {
1599        #[inline]
1600        unsafe fn encode(
1601            self,
1602            encoder: &mut fidl::encoding::Encoder<'_, D>,
1603            offset: usize,
1604            depth: fidl::encoding::Depth,
1605        ) -> fidl::Result<()> {
1606            encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
1607            // Zero out padding regions. There's no need to apply masks
1608            // because the unmasked parts will be overwritten by fields.
1609            // Write the fields.
1610            self.0.encode(encoder, offset + 0, depth)?;
1611            Ok(())
1612        }
1613    }
1614
1615    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1616        for CaseIteratorGetNextResponse
1617    {
1618        #[inline(always)]
1619        fn new_empty() -> Self {
1620            Self { cases: fidl::new_empty!(fidl::encoding::UnboundedVector<Case>, D) }
1621        }
1622
1623        #[inline]
1624        unsafe fn decode(
1625            &mut self,
1626            decoder: &mut fidl::encoding::Decoder<'_, D>,
1627            offset: usize,
1628            _depth: fidl::encoding::Depth,
1629        ) -> fidl::Result<()> {
1630            decoder.debug_check_bounds::<Self>(offset);
1631            // Verify that padding bytes are zero.
1632            fidl::decode!(
1633                fidl::encoding::UnboundedVector<Case>,
1634                D,
1635                &mut self.cases,
1636                decoder,
1637                offset + 0,
1638                _depth
1639            )?;
1640            Ok(())
1641        }
1642    }
1643
1644    impl fidl::encoding::ValueTypeMarker for CaseStarted {
1645        type Borrowed<'a> = &'a Self;
1646        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1647            value
1648        }
1649    }
1650
1651    unsafe impl fidl::encoding::TypeMarker for CaseStarted {
1652        type Owned = Self;
1653
1654        #[inline(always)]
1655        fn inline_align(_context: fidl::encoding::Context) -> usize {
1656            4
1657        }
1658
1659        #[inline(always)]
1660        fn inline_size(_context: fidl::encoding::Context) -> usize {
1661            4
1662        }
1663        #[inline(always)]
1664        fn encode_is_copy() -> bool {
1665            true
1666        }
1667
1668        #[inline(always)]
1669        fn decode_is_copy() -> bool {
1670            true
1671        }
1672    }
1673
1674    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStarted, D>
1675        for &CaseStarted
1676    {
1677        #[inline]
1678        unsafe fn encode(
1679            self,
1680            encoder: &mut fidl::encoding::Encoder<'_, D>,
1681            offset: usize,
1682            _depth: fidl::encoding::Depth,
1683        ) -> fidl::Result<()> {
1684            encoder.debug_check_bounds::<CaseStarted>(offset);
1685            unsafe {
1686                // Copy the object into the buffer.
1687                let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
1688                (buf_ptr as *mut CaseStarted).write_unaligned((self as *const CaseStarted).read());
1689                // Zero out padding regions. Unlike `fidl_struct_impl_noncopy!`, this must be
1690                // done second because the memcpy will write garbage to these bytes.
1691            }
1692            Ok(())
1693        }
1694    }
1695    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
1696        fidl::encoding::Encode<CaseStarted, D> for (T0,)
1697    {
1698        #[inline]
1699        unsafe fn encode(
1700            self,
1701            encoder: &mut fidl::encoding::Encoder<'_, D>,
1702            offset: usize,
1703            depth: fidl::encoding::Depth,
1704        ) -> fidl::Result<()> {
1705            encoder.debug_check_bounds::<CaseStarted>(offset);
1706            // Zero out padding regions. There's no need to apply masks
1707            // because the unmasked parts will be overwritten by fields.
1708            // Write the fields.
1709            self.0.encode(encoder, offset + 0, depth)?;
1710            Ok(())
1711        }
1712    }
1713
1714    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStarted {
1715        #[inline(always)]
1716        fn new_empty() -> Self {
1717            Self { identifier: fidl::new_empty!(u32, D) }
1718        }
1719
1720        #[inline]
1721        unsafe fn decode(
1722            &mut self,
1723            decoder: &mut fidl::encoding::Decoder<'_, D>,
1724            offset: usize,
1725            _depth: fidl::encoding::Depth,
1726        ) -> fidl::Result<()> {
1727            decoder.debug_check_bounds::<Self>(offset);
1728            let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
1729            // Verify that padding bytes are zero.
1730            // Copy from the buffer into the object.
1731            unsafe {
1732                std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
1733            }
1734            Ok(())
1735        }
1736    }
1737
1738    impl fidl::encoding::ValueTypeMarker for CaseStopped {
1739        type Borrowed<'a> = &'a Self;
1740        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1741            value
1742        }
1743    }
1744
1745    unsafe impl fidl::encoding::TypeMarker for CaseStopped {
1746        type Owned = Self;
1747
1748        #[inline(always)]
1749        fn inline_align(_context: fidl::encoding::Context) -> usize {
1750            4
1751        }
1752
1753        #[inline(always)]
1754        fn inline_size(_context: fidl::encoding::Context) -> usize {
1755            8
1756        }
1757    }
1758
1759    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStopped, D>
1760        for &CaseStopped
1761    {
1762        #[inline]
1763        unsafe fn encode(
1764            self,
1765            encoder: &mut fidl::encoding::Encoder<'_, D>,
1766            offset: usize,
1767            _depth: fidl::encoding::Depth,
1768        ) -> fidl::Result<()> {
1769            encoder.debug_check_bounds::<CaseStopped>(offset);
1770            // Delegate to tuple encoding.
1771            fidl::encoding::Encode::<CaseStopped, D>::encode(
1772                (
1773                    <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
1774                    <CaseStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
1775                ),
1776                encoder,
1777                offset,
1778                _depth,
1779            )
1780        }
1781    }
1782    unsafe impl<
1783            D: fidl::encoding::ResourceDialect,
1784            T0: fidl::encoding::Encode<u32, D>,
1785            T1: fidl::encoding::Encode<CaseStatus, D>,
1786        > fidl::encoding::Encode<CaseStopped, D> for (T0, T1)
1787    {
1788        #[inline]
1789        unsafe fn encode(
1790            self,
1791            encoder: &mut fidl::encoding::Encoder<'_, D>,
1792            offset: usize,
1793            depth: fidl::encoding::Depth,
1794        ) -> fidl::Result<()> {
1795            encoder.debug_check_bounds::<CaseStopped>(offset);
1796            // Zero out padding regions. There's no need to apply masks
1797            // because the unmasked parts will be overwritten by fields.
1798            // Write the fields.
1799            self.0.encode(encoder, offset + 0, depth)?;
1800            self.1.encode(encoder, offset + 4, depth)?;
1801            Ok(())
1802        }
1803    }
1804
1805    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStopped {
1806        #[inline(always)]
1807        fn new_empty() -> Self {
1808            Self { identifier: fidl::new_empty!(u32, D), status: fidl::new_empty!(CaseStatus, D) }
1809        }
1810
1811        #[inline]
1812        unsafe fn decode(
1813            &mut self,
1814            decoder: &mut fidl::encoding::Decoder<'_, D>,
1815            offset: usize,
1816            _depth: fidl::encoding::Depth,
1817        ) -> fidl::Result<()> {
1818            decoder.debug_check_bounds::<Self>(offset);
1819            // Verify that padding bytes are zero.
1820            fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 0, _depth)?;
1821            fidl::decode!(CaseStatus, D, &mut self.status, decoder, offset + 4, _depth)?;
1822            Ok(())
1823        }
1824    }
1825
1826    impl fidl::encoding::ValueTypeMarker for RunBuilderWithSchedulingOptionsRequest {
1827        type Borrowed<'a> = &'a Self;
1828        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1829            value
1830        }
1831    }
1832
1833    unsafe impl fidl::encoding::TypeMarker for RunBuilderWithSchedulingOptionsRequest {
1834        type Owned = Self;
1835
1836        #[inline(always)]
1837        fn inline_align(_context: fidl::encoding::Context) -> usize {
1838            8
1839        }
1840
1841        #[inline(always)]
1842        fn inline_size(_context: fidl::encoding::Context) -> usize {
1843            16
1844        }
1845    }
1846
1847    unsafe impl<D: fidl::encoding::ResourceDialect>
1848        fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D>
1849        for &RunBuilderWithSchedulingOptionsRequest
1850    {
1851        #[inline]
1852        unsafe fn encode(
1853            self,
1854            encoder: &mut fidl::encoding::Encoder<'_, D>,
1855            offset: usize,
1856            _depth: fidl::encoding::Depth,
1857        ) -> fidl::Result<()> {
1858            encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
1859            // Delegate to tuple encoding.
1860            fidl::encoding::Encode::<RunBuilderWithSchedulingOptionsRequest, D>::encode(
1861                (<SchedulingOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
1862                encoder,
1863                offset,
1864                _depth,
1865            )
1866        }
1867    }
1868    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SchedulingOptions, D>>
1869        fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D> for (T0,)
1870    {
1871        #[inline]
1872        unsafe fn encode(
1873            self,
1874            encoder: &mut fidl::encoding::Encoder<'_, D>,
1875            offset: usize,
1876            depth: fidl::encoding::Depth,
1877        ) -> fidl::Result<()> {
1878            encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
1879            // Zero out padding regions. There's no need to apply masks
1880            // because the unmasked parts will be overwritten by fields.
1881            // Write the fields.
1882            self.0.encode(encoder, offset + 0, depth)?;
1883            Ok(())
1884        }
1885    }
1886
1887    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1888        for RunBuilderWithSchedulingOptionsRequest
1889    {
1890        #[inline(always)]
1891        fn new_empty() -> Self {
1892            Self { options: fidl::new_empty!(SchedulingOptions, D) }
1893        }
1894
1895        #[inline]
1896        unsafe fn decode(
1897            &mut self,
1898            decoder: &mut fidl::encoding::Decoder<'_, D>,
1899            offset: usize,
1900            _depth: fidl::encoding::Depth,
1901        ) -> fidl::Result<()> {
1902            decoder.debug_check_bounds::<Self>(offset);
1903            // Verify that padding bytes are zero.
1904            fidl::decode!(SchedulingOptions, D, &mut self.options, decoder, offset + 0, _depth)?;
1905            Ok(())
1906        }
1907    }
1908
1909    impl fidl::encoding::ValueTypeMarker for RunStarted {
1910        type Borrowed<'a> = &'a Self;
1911        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1912            value
1913        }
1914    }
1915
1916    unsafe impl fidl::encoding::TypeMarker for RunStarted {
1917        type Owned = Self;
1918
1919        #[inline(always)]
1920        fn inline_align(_context: fidl::encoding::Context) -> usize {
1921            1
1922        }
1923
1924        #[inline(always)]
1925        fn inline_size(_context: fidl::encoding::Context) -> usize {
1926            1
1927        }
1928    }
1929
1930    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStarted, D>
1931        for &RunStarted
1932    {
1933        #[inline]
1934        unsafe fn encode(
1935            self,
1936            encoder: &mut fidl::encoding::Encoder<'_, D>,
1937            offset: usize,
1938            _depth: fidl::encoding::Depth,
1939        ) -> fidl::Result<()> {
1940            encoder.debug_check_bounds::<RunStarted>(offset);
1941            encoder.write_num(0u8, offset);
1942            Ok(())
1943        }
1944    }
1945
1946    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStarted {
1947        #[inline(always)]
1948        fn new_empty() -> Self {
1949            Self
1950        }
1951
1952        #[inline]
1953        unsafe fn decode(
1954            &mut self,
1955            decoder: &mut fidl::encoding::Decoder<'_, D>,
1956            offset: usize,
1957            _depth: fidl::encoding::Depth,
1958        ) -> fidl::Result<()> {
1959            decoder.debug_check_bounds::<Self>(offset);
1960            match decoder.read_num::<u8>(offset) {
1961                0 => Ok(()),
1962                _ => Err(fidl::Error::Invalid),
1963            }
1964        }
1965    }
1966
1967    impl fidl::encoding::ValueTypeMarker for RunStopped {
1968        type Borrowed<'a> = &'a Self;
1969        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1970            value
1971        }
1972    }
1973
1974    unsafe impl fidl::encoding::TypeMarker for RunStopped {
1975        type Owned = Self;
1976
1977        #[inline(always)]
1978        fn inline_align(_context: fidl::encoding::Context) -> usize {
1979            1
1980        }
1981
1982        #[inline(always)]
1983        fn inline_size(_context: fidl::encoding::Context) -> usize {
1984            1
1985        }
1986    }
1987
1988    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStopped, D>
1989        for &RunStopped
1990    {
1991        #[inline]
1992        unsafe fn encode(
1993            self,
1994            encoder: &mut fidl::encoding::Encoder<'_, D>,
1995            offset: usize,
1996            _depth: fidl::encoding::Depth,
1997        ) -> fidl::Result<()> {
1998            encoder.debug_check_bounds::<RunStopped>(offset);
1999            encoder.write_num(0u8, offset);
2000            Ok(())
2001        }
2002    }
2003
2004    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStopped {
2005        #[inline(always)]
2006        fn new_empty() -> Self {
2007            Self
2008        }
2009
2010        #[inline]
2011        unsafe fn decode(
2012            &mut self,
2013            decoder: &mut fidl::encoding::Decoder<'_, D>,
2014            offset: usize,
2015            _depth: fidl::encoding::Depth,
2016        ) -> fidl::Result<()> {
2017            decoder.debug_check_bounds::<Self>(offset);
2018            match decoder.read_num::<u8>(offset) {
2019                0 => Ok(()),
2020                _ => Err(fidl::Error::Invalid),
2021            }
2022        }
2023    }
2024
2025    impl fidl::encoding::ValueTypeMarker for SuiteStarted {
2026        type Borrowed<'a> = &'a Self;
2027        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2028            value
2029        }
2030    }
2031
2032    unsafe impl fidl::encoding::TypeMarker for SuiteStarted {
2033        type Owned = Self;
2034
2035        #[inline(always)]
2036        fn inline_align(_context: fidl::encoding::Context) -> usize {
2037            1
2038        }
2039
2040        #[inline(always)]
2041        fn inline_size(_context: fidl::encoding::Context) -> usize {
2042            1
2043        }
2044    }
2045
2046    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStarted, D>
2047        for &SuiteStarted
2048    {
2049        #[inline]
2050        unsafe fn encode(
2051            self,
2052            encoder: &mut fidl::encoding::Encoder<'_, D>,
2053            offset: usize,
2054            _depth: fidl::encoding::Depth,
2055        ) -> fidl::Result<()> {
2056            encoder.debug_check_bounds::<SuiteStarted>(offset);
2057            encoder.write_num(0u8, offset);
2058            Ok(())
2059        }
2060    }
2061
2062    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStarted {
2063        #[inline(always)]
2064        fn new_empty() -> Self {
2065            Self
2066        }
2067
2068        #[inline]
2069        unsafe fn decode(
2070            &mut self,
2071            decoder: &mut fidl::encoding::Decoder<'_, D>,
2072            offset: usize,
2073            _depth: fidl::encoding::Depth,
2074        ) -> fidl::Result<()> {
2075            decoder.debug_check_bounds::<Self>(offset);
2076            match decoder.read_num::<u8>(offset) {
2077                0 => Ok(()),
2078                _ => Err(fidl::Error::Invalid),
2079            }
2080        }
2081    }
2082
2083    impl fidl::encoding::ValueTypeMarker for SuiteStopped {
2084        type Borrowed<'a> = &'a Self;
2085        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2086            value
2087        }
2088    }
2089
2090    unsafe impl fidl::encoding::TypeMarker for SuiteStopped {
2091        type Owned = Self;
2092
2093        #[inline(always)]
2094        fn inline_align(_context: fidl::encoding::Context) -> usize {
2095            4
2096        }
2097
2098        #[inline(always)]
2099        fn inline_size(_context: fidl::encoding::Context) -> usize {
2100            4
2101        }
2102    }
2103
2104    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStopped, D>
2105        for &SuiteStopped
2106    {
2107        #[inline]
2108        unsafe fn encode(
2109            self,
2110            encoder: &mut fidl::encoding::Encoder<'_, D>,
2111            offset: usize,
2112            _depth: fidl::encoding::Depth,
2113        ) -> fidl::Result<()> {
2114            encoder.debug_check_bounds::<SuiteStopped>(offset);
2115            // Delegate to tuple encoding.
2116            fidl::encoding::Encode::<SuiteStopped, D>::encode(
2117                (<SuiteStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
2118                encoder,
2119                offset,
2120                _depth,
2121            )
2122        }
2123    }
2124    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SuiteStatus, D>>
2125        fidl::encoding::Encode<SuiteStopped, D> for (T0,)
2126    {
2127        #[inline]
2128        unsafe fn encode(
2129            self,
2130            encoder: &mut fidl::encoding::Encoder<'_, D>,
2131            offset: usize,
2132            depth: fidl::encoding::Depth,
2133        ) -> fidl::Result<()> {
2134            encoder.debug_check_bounds::<SuiteStopped>(offset);
2135            // Zero out padding regions. There's no need to apply masks
2136            // because the unmasked parts will be overwritten by fields.
2137            // Write the fields.
2138            self.0.encode(encoder, offset + 0, depth)?;
2139            Ok(())
2140        }
2141    }
2142
2143    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStopped {
2144        #[inline(always)]
2145        fn new_empty() -> Self {
2146            Self { status: fidl::new_empty!(SuiteStatus, D) }
2147        }
2148
2149        #[inline]
2150        unsafe fn decode(
2151            &mut self,
2152            decoder: &mut fidl::encoding::Decoder<'_, D>,
2153            offset: usize,
2154            _depth: fidl::encoding::Depth,
2155        ) -> fidl::Result<()> {
2156            decoder.debug_check_bounds::<Self>(offset);
2157            // Verify that padding bytes are zero.
2158            fidl::decode!(SuiteStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
2159            Ok(())
2160        }
2161    }
2162
2163    impl fidl::encoding::ValueTypeMarker for TestCaseIteratorGetNextResponse {
2164        type Borrowed<'a> = &'a Self;
2165        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2166            value
2167        }
2168    }
2169
2170    unsafe impl fidl::encoding::TypeMarker for TestCaseIteratorGetNextResponse {
2171        type Owned = Self;
2172
2173        #[inline(always)]
2174        fn inline_align(_context: fidl::encoding::Context) -> usize {
2175            8
2176        }
2177
2178        #[inline(always)]
2179        fn inline_size(_context: fidl::encoding::Context) -> usize {
2180            16
2181        }
2182    }
2183
2184    unsafe impl<D: fidl::encoding::ResourceDialect>
2185        fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D>
2186        for &TestCaseIteratorGetNextResponse
2187    {
2188        #[inline]
2189        unsafe fn encode(
2190            self,
2191            encoder: &mut fidl::encoding::Encoder<'_, D>,
2192            offset: usize,
2193            _depth: fidl::encoding::Depth,
2194        ) -> fidl::Result<()> {
2195            encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2196            // Delegate to tuple encoding.
2197            fidl::encoding::Encode::<TestCaseIteratorGetNextResponse, D>::encode(
2198                (
2199                    <fidl::encoding::Vector<TestCase, 1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_cases),
2200                ),
2201                encoder, offset, _depth
2202            )
2203        }
2204    }
2205    unsafe impl<
2206            D: fidl::encoding::ResourceDialect,
2207            T0: fidl::encoding::Encode<fidl::encoding::Vector<TestCase, 1024>, D>,
2208        > fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D> for (T0,)
2209    {
2210        #[inline]
2211        unsafe fn encode(
2212            self,
2213            encoder: &mut fidl::encoding::Encoder<'_, D>,
2214            offset: usize,
2215            depth: fidl::encoding::Depth,
2216        ) -> fidl::Result<()> {
2217            encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2218            // Zero out padding regions. There's no need to apply masks
2219            // because the unmasked parts will be overwritten by fields.
2220            // Write the fields.
2221            self.0.encode(encoder, offset + 0, depth)?;
2222            Ok(())
2223        }
2224    }
2225
2226    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2227        for TestCaseIteratorGetNextResponse
2228    {
2229        #[inline(always)]
2230        fn new_empty() -> Self {
2231            Self { test_cases: fidl::new_empty!(fidl::encoding::Vector<TestCase, 1024>, D) }
2232        }
2233
2234        #[inline]
2235        unsafe fn decode(
2236            &mut self,
2237            decoder: &mut fidl::encoding::Decoder<'_, D>,
2238            offset: usize,
2239            _depth: fidl::encoding::Depth,
2240        ) -> fidl::Result<()> {
2241            decoder.debug_check_bounds::<Self>(offset);
2242            // Verify that padding bytes are zero.
2243            fidl::decode!(fidl::encoding::Vector<TestCase, 1024>, D, &mut self.test_cases, decoder, offset + 0, _depth)?;
2244            Ok(())
2245        }
2246    }
2247
2248    impl Case {
2249        #[inline(always)]
2250        fn max_ordinal_present(&self) -> u64 {
2251            if let Some(_) = self.name {
2252                return 1;
2253            }
2254            0
2255        }
2256    }
2257
2258    impl fidl::encoding::ValueTypeMarker for Case {
2259        type Borrowed<'a> = &'a Self;
2260        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2261            value
2262        }
2263    }
2264
2265    unsafe impl fidl::encoding::TypeMarker for Case {
2266        type Owned = Self;
2267
2268        #[inline(always)]
2269        fn inline_align(_context: fidl::encoding::Context) -> usize {
2270            8
2271        }
2272
2273        #[inline(always)]
2274        fn inline_size(_context: fidl::encoding::Context) -> usize {
2275            16
2276        }
2277    }
2278
2279    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Case, D> for &Case {
2280        unsafe fn encode(
2281            self,
2282            encoder: &mut fidl::encoding::Encoder<'_, D>,
2283            offset: usize,
2284            mut depth: fidl::encoding::Depth,
2285        ) -> fidl::Result<()> {
2286            encoder.debug_check_bounds::<Case>(offset);
2287            // Vector header
2288            let max_ordinal: u64 = self.max_ordinal_present();
2289            encoder.write_num(max_ordinal, offset);
2290            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2291            // Calling encoder.out_of_line_offset(0) is not allowed.
2292            if max_ordinal == 0 {
2293                return Ok(());
2294            }
2295            depth.increment()?;
2296            let envelope_size = 8;
2297            let bytes_len = max_ordinal as usize * envelope_size;
2298            #[allow(unused_variables)]
2299            let offset = encoder.out_of_line_offset(bytes_len);
2300            let mut _prev_end_offset: usize = 0;
2301            if 1 > max_ordinal {
2302                return Ok(());
2303            }
2304
2305            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2306            // are envelope_size bytes.
2307            let cur_offset: usize = (1 - 1) * envelope_size;
2308
2309            // Zero reserved fields.
2310            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2311
2312            // Safety:
2313            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2314            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2315            //   envelope_size bytes, there is always sufficient room.
2316            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
2317            self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
2318            encoder, offset + cur_offset, depth
2319        )?;
2320
2321            _prev_end_offset = cur_offset + envelope_size;
2322
2323            Ok(())
2324        }
2325    }
2326
2327    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Case {
2328        #[inline(always)]
2329        fn new_empty() -> Self {
2330            Self::default()
2331        }
2332
2333        unsafe fn decode(
2334            &mut self,
2335            decoder: &mut fidl::encoding::Decoder<'_, D>,
2336            offset: usize,
2337            mut depth: fidl::encoding::Depth,
2338        ) -> fidl::Result<()> {
2339            decoder.debug_check_bounds::<Self>(offset);
2340            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2341                None => return Err(fidl::Error::NotNullable),
2342                Some(len) => len,
2343            };
2344            // Calling decoder.out_of_line_offset(0) is not allowed.
2345            if len == 0 {
2346                return Ok(());
2347            };
2348            depth.increment()?;
2349            let envelope_size = 8;
2350            let bytes_len = len * envelope_size;
2351            let offset = decoder.out_of_line_offset(bytes_len)?;
2352            // Decode the envelope for each type.
2353            let mut _next_ordinal_to_read = 0;
2354            let mut next_offset = offset;
2355            let end_offset = offset + bytes_len;
2356            _next_ordinal_to_read += 1;
2357            if next_offset >= end_offset {
2358                return Ok(());
2359            }
2360
2361            // Decode unknown envelopes for gaps in ordinals.
2362            while _next_ordinal_to_read < 1 {
2363                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2364                _next_ordinal_to_read += 1;
2365                next_offset += envelope_size;
2366            }
2367
2368            let next_out_of_line = decoder.next_out_of_line();
2369            let handles_before = decoder.remaining_handles();
2370            if let Some((inlined, num_bytes, num_handles)) =
2371                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2372            {
2373                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2374                if inlined != (member_inline_size <= 4) {
2375                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2376                }
2377                let inner_offset;
2378                let mut inner_depth = depth.clone();
2379                if inlined {
2380                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2381                    inner_offset = next_offset;
2382                } else {
2383                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2384                    inner_depth.increment()?;
2385                }
2386                let val_ref = self.name.get_or_insert_with(|| {
2387                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
2388                });
2389                fidl::decode!(
2390                    fidl::encoding::BoundedString<2048>,
2391                    D,
2392                    val_ref,
2393                    decoder,
2394                    inner_offset,
2395                    inner_depth
2396                )?;
2397                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2398                {
2399                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2400                }
2401                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2402                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2403                }
2404            }
2405
2406            next_offset += envelope_size;
2407
2408            // Decode the remaining unknown envelopes.
2409            while next_offset < end_offset {
2410                _next_ordinal_to_read += 1;
2411                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2412                next_offset += envelope_size;
2413            }
2414
2415            Ok(())
2416        }
2417    }
2418
2419    impl RunOptions {
2420        #[inline(always)]
2421        fn max_ordinal_present(&self) -> u64 {
2422            if let Some(_) = self.no_exception_channel {
2423                return 9;
2424            }
2425            if let Some(_) = self.break_on_failure {
2426                return 8;
2427            }
2428            if let Some(_) = self.log_interest {
2429                return 7;
2430            }
2431            if let Some(_) = self.log_iterator {
2432                return 6;
2433            }
2434            if let Some(_) = self.case_filters_to_run {
2435                return 5;
2436            }
2437            if let Some(_) = self.timeout {
2438                return 4;
2439            }
2440            if let Some(_) = self.arguments {
2441                return 3;
2442            }
2443            if let Some(_) = self.parallel {
2444                return 2;
2445            }
2446            if let Some(_) = self.run_disabled_tests {
2447                return 1;
2448            }
2449            0
2450        }
2451    }
2452
2453    impl fidl::encoding::ValueTypeMarker for RunOptions {
2454        type Borrowed<'a> = &'a Self;
2455        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2456            value
2457        }
2458    }
2459
2460    unsafe impl fidl::encoding::TypeMarker for RunOptions {
2461        type Owned = Self;
2462
2463        #[inline(always)]
2464        fn inline_align(_context: fidl::encoding::Context) -> usize {
2465            8
2466        }
2467
2468        #[inline(always)]
2469        fn inline_size(_context: fidl::encoding::Context) -> usize {
2470            16
2471        }
2472    }
2473
2474    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunOptions, D>
2475        for &RunOptions
2476    {
2477        unsafe fn encode(
2478            self,
2479            encoder: &mut fidl::encoding::Encoder<'_, D>,
2480            offset: usize,
2481            mut depth: fidl::encoding::Depth,
2482        ) -> fidl::Result<()> {
2483            encoder.debug_check_bounds::<RunOptions>(offset);
2484            // Vector header
2485            let max_ordinal: u64 = self.max_ordinal_present();
2486            encoder.write_num(max_ordinal, offset);
2487            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2488            // Calling encoder.out_of_line_offset(0) is not allowed.
2489            if max_ordinal == 0 {
2490                return Ok(());
2491            }
2492            depth.increment()?;
2493            let envelope_size = 8;
2494            let bytes_len = max_ordinal as usize * envelope_size;
2495            #[allow(unused_variables)]
2496            let offset = encoder.out_of_line_offset(bytes_len);
2497            let mut _prev_end_offset: usize = 0;
2498            if 1 > max_ordinal {
2499                return Ok(());
2500            }
2501
2502            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2503            // are envelope_size bytes.
2504            let cur_offset: usize = (1 - 1) * envelope_size;
2505
2506            // Zero reserved fields.
2507            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2508
2509            // Safety:
2510            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2511            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2512            //   envelope_size bytes, there is always sufficient room.
2513            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2514                self.run_disabled_tests
2515                    .as_ref()
2516                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2517                encoder,
2518                offset + cur_offset,
2519                depth,
2520            )?;
2521
2522            _prev_end_offset = cur_offset + envelope_size;
2523            if 2 > max_ordinal {
2524                return Ok(());
2525            }
2526
2527            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2528            // are envelope_size bytes.
2529            let cur_offset: usize = (2 - 1) * envelope_size;
2530
2531            // Zero reserved fields.
2532            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2533
2534            // Safety:
2535            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2536            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2537            //   envelope_size bytes, there is always sufficient room.
2538            fidl::encoding::encode_in_envelope_optional::<u16, D>(
2539                self.parallel.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
2540                encoder,
2541                offset + cur_offset,
2542                depth,
2543            )?;
2544
2545            _prev_end_offset = cur_offset + envelope_size;
2546            if 3 > max_ordinal {
2547                return Ok(());
2548            }
2549
2550            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2551            // are envelope_size bytes.
2552            let cur_offset: usize = (3 - 1) * envelope_size;
2553
2554            // Zero reserved fields.
2555            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2556
2557            // Safety:
2558            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2559            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2560            //   envelope_size bytes, there is always sufficient room.
2561            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2562            self.arguments.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2563            encoder, offset + cur_offset, depth
2564        )?;
2565
2566            _prev_end_offset = cur_offset + envelope_size;
2567            if 4 > max_ordinal {
2568                return Ok(());
2569            }
2570
2571            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2572            // are envelope_size bytes.
2573            let cur_offset: usize = (4 - 1) * envelope_size;
2574
2575            // Zero reserved fields.
2576            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2577
2578            // Safety:
2579            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2580            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2581            //   envelope_size bytes, there is always sufficient room.
2582            fidl::encoding::encode_in_envelope_optional::<i64, D>(
2583                self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2584                encoder,
2585                offset + cur_offset,
2586                depth,
2587            )?;
2588
2589            _prev_end_offset = cur_offset + envelope_size;
2590            if 5 > max_ordinal {
2591                return Ok(());
2592            }
2593
2594            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2595            // are envelope_size bytes.
2596            let cur_offset: usize = (5 - 1) * envelope_size;
2597
2598            // Zero reserved fields.
2599            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2600
2601            // Safety:
2602            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2603            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2604            //   envelope_size bytes, there is always sufficient room.
2605            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2606            self.case_filters_to_run.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2607            encoder, offset + cur_offset, depth
2608        )?;
2609
2610            _prev_end_offset = cur_offset + envelope_size;
2611            if 6 > max_ordinal {
2612                return Ok(());
2613            }
2614
2615            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2616            // are envelope_size bytes.
2617            let cur_offset: usize = (6 - 1) * envelope_size;
2618
2619            // Zero reserved fields.
2620            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2621
2622            // Safety:
2623            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2624            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2625            //   envelope_size bytes, there is always sufficient room.
2626            fidl::encoding::encode_in_envelope_optional::<LogsIteratorOption, D>(
2627                self.log_iterator
2628                    .as_ref()
2629                    .map(<LogsIteratorOption as fidl::encoding::ValueTypeMarker>::borrow),
2630                encoder,
2631                offset + cur_offset,
2632                depth,
2633            )?;
2634
2635            _prev_end_offset = cur_offset + envelope_size;
2636            if 7 > max_ordinal {
2637                return Ok(());
2638            }
2639
2640            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2641            // are envelope_size bytes.
2642            let cur_offset: usize = (7 - 1) * envelope_size;
2643
2644            // Zero reserved fields.
2645            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2646
2647            // Safety:
2648            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2649            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2650            //   envelope_size bytes, there is always sufficient room.
2651            fidl::encoding::encode_in_envelope_optional::<
2652                fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>,
2653                D,
2654            >(
2655                self.log_interest.as_ref().map(
2656                    <fidl::encoding::Vector<
2657                        fidl_fuchsia_diagnostics__common::LogInterestSelector,
2658                        64,
2659                    > as fidl::encoding::ValueTypeMarker>::borrow,
2660                ),
2661                encoder,
2662                offset + cur_offset,
2663                depth,
2664            )?;
2665
2666            _prev_end_offset = cur_offset + envelope_size;
2667            if 8 > max_ordinal {
2668                return Ok(());
2669            }
2670
2671            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2672            // are envelope_size bytes.
2673            let cur_offset: usize = (8 - 1) * envelope_size;
2674
2675            // Zero reserved fields.
2676            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2677
2678            // Safety:
2679            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2680            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2681            //   envelope_size bytes, there is always sufficient room.
2682            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2683                self.break_on_failure
2684                    .as_ref()
2685                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2686                encoder,
2687                offset + cur_offset,
2688                depth,
2689            )?;
2690
2691            _prev_end_offset = cur_offset + envelope_size;
2692            if 9 > max_ordinal {
2693                return Ok(());
2694            }
2695
2696            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2697            // are envelope_size bytes.
2698            let cur_offset: usize = (9 - 1) * envelope_size;
2699
2700            // Zero reserved fields.
2701            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2702
2703            // Safety:
2704            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2705            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2706            //   envelope_size bytes, there is always sufficient room.
2707            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2708                self.no_exception_channel
2709                    .as_ref()
2710                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2711                encoder,
2712                offset + cur_offset,
2713                depth,
2714            )?;
2715
2716            _prev_end_offset = cur_offset + envelope_size;
2717
2718            Ok(())
2719        }
2720    }
2721
2722    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunOptions {
2723        #[inline(always)]
2724        fn new_empty() -> Self {
2725            Self::default()
2726        }
2727
2728        unsafe fn decode(
2729            &mut self,
2730            decoder: &mut fidl::encoding::Decoder<'_, D>,
2731            offset: usize,
2732            mut depth: fidl::encoding::Depth,
2733        ) -> fidl::Result<()> {
2734            decoder.debug_check_bounds::<Self>(offset);
2735            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2736                None => return Err(fidl::Error::NotNullable),
2737                Some(len) => len,
2738            };
2739            // Calling decoder.out_of_line_offset(0) is not allowed.
2740            if len == 0 {
2741                return Ok(());
2742            };
2743            depth.increment()?;
2744            let envelope_size = 8;
2745            let bytes_len = len * envelope_size;
2746            let offset = decoder.out_of_line_offset(bytes_len)?;
2747            // Decode the envelope for each type.
2748            let mut _next_ordinal_to_read = 0;
2749            let mut next_offset = offset;
2750            let end_offset = offset + bytes_len;
2751            _next_ordinal_to_read += 1;
2752            if next_offset >= end_offset {
2753                return Ok(());
2754            }
2755
2756            // Decode unknown envelopes for gaps in ordinals.
2757            while _next_ordinal_to_read < 1 {
2758                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2759                _next_ordinal_to_read += 1;
2760                next_offset += envelope_size;
2761            }
2762
2763            let next_out_of_line = decoder.next_out_of_line();
2764            let handles_before = decoder.remaining_handles();
2765            if let Some((inlined, num_bytes, num_handles)) =
2766                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2767            {
2768                let member_inline_size =
2769                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2770                if inlined != (member_inline_size <= 4) {
2771                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2772                }
2773                let inner_offset;
2774                let mut inner_depth = depth.clone();
2775                if inlined {
2776                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2777                    inner_offset = next_offset;
2778                } else {
2779                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2780                    inner_depth.increment()?;
2781                }
2782                let val_ref =
2783                    self.run_disabled_tests.get_or_insert_with(|| fidl::new_empty!(bool, D));
2784                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2785                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2786                {
2787                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2788                }
2789                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2790                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2791                }
2792            }
2793
2794            next_offset += envelope_size;
2795            _next_ordinal_to_read += 1;
2796            if next_offset >= end_offset {
2797                return Ok(());
2798            }
2799
2800            // Decode unknown envelopes for gaps in ordinals.
2801            while _next_ordinal_to_read < 2 {
2802                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2803                _next_ordinal_to_read += 1;
2804                next_offset += envelope_size;
2805            }
2806
2807            let next_out_of_line = decoder.next_out_of_line();
2808            let handles_before = decoder.remaining_handles();
2809            if let Some((inlined, num_bytes, num_handles)) =
2810                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2811            {
2812                let member_inline_size =
2813                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2814                if inlined != (member_inline_size <= 4) {
2815                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2816                }
2817                let inner_offset;
2818                let mut inner_depth = depth.clone();
2819                if inlined {
2820                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2821                    inner_offset = next_offset;
2822                } else {
2823                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2824                    inner_depth.increment()?;
2825                }
2826                let val_ref = self.parallel.get_or_insert_with(|| fidl::new_empty!(u16, D));
2827                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
2828                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2829                {
2830                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2831                }
2832                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2833                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2834                }
2835            }
2836
2837            next_offset += envelope_size;
2838            _next_ordinal_to_read += 1;
2839            if next_offset >= end_offset {
2840                return Ok(());
2841            }
2842
2843            // Decode unknown envelopes for gaps in ordinals.
2844            while _next_ordinal_to_read < 3 {
2845                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2846                _next_ordinal_to_read += 1;
2847                next_offset += envelope_size;
2848            }
2849
2850            let next_out_of_line = decoder.next_out_of_line();
2851            let handles_before = decoder.remaining_handles();
2852            if let Some((inlined, num_bytes, num_handles)) =
2853                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2854            {
2855                let member_inline_size = <fidl::encoding::UnboundedVector<
2856                    fidl::encoding::UnboundedString,
2857                > as fidl::encoding::TypeMarker>::inline_size(
2858                    decoder.context
2859                );
2860                if inlined != (member_inline_size <= 4) {
2861                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2862                }
2863                let inner_offset;
2864                let mut inner_depth = depth.clone();
2865                if inlined {
2866                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2867                    inner_offset = next_offset;
2868                } else {
2869                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2870                    inner_depth.increment()?;
2871                }
2872                let val_ref = self.arguments.get_or_insert_with(|| {
2873                    fidl::new_empty!(
2874                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2875                        D
2876                    )
2877                });
2878                fidl::decode!(
2879                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2880                    D,
2881                    val_ref,
2882                    decoder,
2883                    inner_offset,
2884                    inner_depth
2885                )?;
2886                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2887                {
2888                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2889                }
2890                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2891                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2892                }
2893            }
2894
2895            next_offset += envelope_size;
2896            _next_ordinal_to_read += 1;
2897            if next_offset >= end_offset {
2898                return Ok(());
2899            }
2900
2901            // Decode unknown envelopes for gaps in ordinals.
2902            while _next_ordinal_to_read < 4 {
2903                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2904                _next_ordinal_to_read += 1;
2905                next_offset += envelope_size;
2906            }
2907
2908            let next_out_of_line = decoder.next_out_of_line();
2909            let handles_before = decoder.remaining_handles();
2910            if let Some((inlined, num_bytes, num_handles)) =
2911                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2912            {
2913                let member_inline_size =
2914                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2915                if inlined != (member_inline_size <= 4) {
2916                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2917                }
2918                let inner_offset;
2919                let mut inner_depth = depth.clone();
2920                if inlined {
2921                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2922                    inner_offset = next_offset;
2923                } else {
2924                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2925                    inner_depth.increment()?;
2926                }
2927                let val_ref = self.timeout.get_or_insert_with(|| fidl::new_empty!(i64, D));
2928                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2929                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2930                {
2931                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2932                }
2933                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2934                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2935                }
2936            }
2937
2938            next_offset += envelope_size;
2939            _next_ordinal_to_read += 1;
2940            if next_offset >= end_offset {
2941                return Ok(());
2942            }
2943
2944            // Decode unknown envelopes for gaps in ordinals.
2945            while _next_ordinal_to_read < 5 {
2946                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2947                _next_ordinal_to_read += 1;
2948                next_offset += envelope_size;
2949            }
2950
2951            let next_out_of_line = decoder.next_out_of_line();
2952            let handles_before = decoder.remaining_handles();
2953            if let Some((inlined, num_bytes, num_handles)) =
2954                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2955            {
2956                let member_inline_size = <fidl::encoding::UnboundedVector<
2957                    fidl::encoding::UnboundedString,
2958                > as fidl::encoding::TypeMarker>::inline_size(
2959                    decoder.context
2960                );
2961                if inlined != (member_inline_size <= 4) {
2962                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2963                }
2964                let inner_offset;
2965                let mut inner_depth = depth.clone();
2966                if inlined {
2967                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2968                    inner_offset = next_offset;
2969                } else {
2970                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2971                    inner_depth.increment()?;
2972                }
2973                let val_ref = self.case_filters_to_run.get_or_insert_with(|| {
2974                    fidl::new_empty!(
2975                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2976                        D
2977                    )
2978                });
2979                fidl::decode!(
2980                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2981                    D,
2982                    val_ref,
2983                    decoder,
2984                    inner_offset,
2985                    inner_depth
2986                )?;
2987                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2988                {
2989                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2990                }
2991                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2992                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2993                }
2994            }
2995
2996            next_offset += envelope_size;
2997            _next_ordinal_to_read += 1;
2998            if next_offset >= end_offset {
2999                return Ok(());
3000            }
3001
3002            // Decode unknown envelopes for gaps in ordinals.
3003            while _next_ordinal_to_read < 6 {
3004                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3005                _next_ordinal_to_read += 1;
3006                next_offset += envelope_size;
3007            }
3008
3009            let next_out_of_line = decoder.next_out_of_line();
3010            let handles_before = decoder.remaining_handles();
3011            if let Some((inlined, num_bytes, num_handles)) =
3012                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3013            {
3014                let member_inline_size =
3015                    <LogsIteratorOption as fidl::encoding::TypeMarker>::inline_size(
3016                        decoder.context,
3017                    );
3018                if inlined != (member_inline_size <= 4) {
3019                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3020                }
3021                let inner_offset;
3022                let mut inner_depth = depth.clone();
3023                if inlined {
3024                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3025                    inner_offset = next_offset;
3026                } else {
3027                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3028                    inner_depth.increment()?;
3029                }
3030                let val_ref = self
3031                    .log_iterator
3032                    .get_or_insert_with(|| fidl::new_empty!(LogsIteratorOption, D));
3033                fidl::decode!(LogsIteratorOption, D, val_ref, decoder, inner_offset, inner_depth)?;
3034                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3035                {
3036                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3037                }
3038                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3039                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3040                }
3041            }
3042
3043            next_offset += envelope_size;
3044            _next_ordinal_to_read += 1;
3045            if next_offset >= end_offset {
3046                return Ok(());
3047            }
3048
3049            // Decode unknown envelopes for gaps in ordinals.
3050            while _next_ordinal_to_read < 7 {
3051                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3052                _next_ordinal_to_read += 1;
3053                next_offset += envelope_size;
3054            }
3055
3056            let next_out_of_line = decoder.next_out_of_line();
3057            let handles_before = decoder.remaining_handles();
3058            if let Some((inlined, num_bytes, num_handles)) =
3059                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3060            {
3061                let member_inline_size = <fidl::encoding::Vector<
3062                    fidl_fuchsia_diagnostics__common::LogInterestSelector,
3063                    64,
3064                > as fidl::encoding::TypeMarker>::inline_size(
3065                    decoder.context
3066                );
3067                if inlined != (member_inline_size <= 4) {
3068                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3069                }
3070                let inner_offset;
3071                let mut inner_depth = depth.clone();
3072                if inlined {
3073                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3074                    inner_offset = next_offset;
3075                } else {
3076                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3077                    inner_depth.increment()?;
3078                }
3079                let val_ref =
3080                self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D));
3081                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
3082                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3083                {
3084                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3085                }
3086                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3087                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3088                }
3089            }
3090
3091            next_offset += envelope_size;
3092            _next_ordinal_to_read += 1;
3093            if next_offset >= end_offset {
3094                return Ok(());
3095            }
3096
3097            // Decode unknown envelopes for gaps in ordinals.
3098            while _next_ordinal_to_read < 8 {
3099                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3100                _next_ordinal_to_read += 1;
3101                next_offset += envelope_size;
3102            }
3103
3104            let next_out_of_line = decoder.next_out_of_line();
3105            let handles_before = decoder.remaining_handles();
3106            if let Some((inlined, num_bytes, num_handles)) =
3107                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3108            {
3109                let member_inline_size =
3110                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3111                if inlined != (member_inline_size <= 4) {
3112                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3113                }
3114                let inner_offset;
3115                let mut inner_depth = depth.clone();
3116                if inlined {
3117                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3118                    inner_offset = next_offset;
3119                } else {
3120                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3121                    inner_depth.increment()?;
3122                }
3123                let val_ref =
3124                    self.break_on_failure.get_or_insert_with(|| fidl::new_empty!(bool, D));
3125                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3126                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3127                {
3128                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3129                }
3130                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3131                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3132                }
3133            }
3134
3135            next_offset += envelope_size;
3136            _next_ordinal_to_read += 1;
3137            if next_offset >= end_offset {
3138                return Ok(());
3139            }
3140
3141            // Decode unknown envelopes for gaps in ordinals.
3142            while _next_ordinal_to_read < 9 {
3143                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3144                _next_ordinal_to_read += 1;
3145                next_offset += envelope_size;
3146            }
3147
3148            let next_out_of_line = decoder.next_out_of_line();
3149            let handles_before = decoder.remaining_handles();
3150            if let Some((inlined, num_bytes, num_handles)) =
3151                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3152            {
3153                let member_inline_size =
3154                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3155                if inlined != (member_inline_size <= 4) {
3156                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3157                }
3158                let inner_offset;
3159                let mut inner_depth = depth.clone();
3160                if inlined {
3161                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3162                    inner_offset = next_offset;
3163                } else {
3164                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3165                    inner_depth.increment()?;
3166                }
3167                let val_ref =
3168                    self.no_exception_channel.get_or_insert_with(|| fidl::new_empty!(bool, D));
3169                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3170                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3171                {
3172                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3173                }
3174                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3175                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3176                }
3177            }
3178
3179            next_offset += envelope_size;
3180
3181            // Decode the remaining unknown envelopes.
3182            while next_offset < end_offset {
3183                _next_ordinal_to_read += 1;
3184                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3185                next_offset += envelope_size;
3186            }
3187
3188            Ok(())
3189        }
3190    }
3191
3192    impl SchedulingOptions {
3193        #[inline(always)]
3194        fn max_ordinal_present(&self) -> u64 {
3195            if let Some(_) = self.accumulate_debug_data {
3196                return 2;
3197            }
3198            if let Some(_) = self.max_parallel_suites {
3199                return 1;
3200            }
3201            0
3202        }
3203    }
3204
3205    impl fidl::encoding::ValueTypeMarker for SchedulingOptions {
3206        type Borrowed<'a> = &'a Self;
3207        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3208            value
3209        }
3210    }
3211
3212    unsafe impl fidl::encoding::TypeMarker for SchedulingOptions {
3213        type Owned = Self;
3214
3215        #[inline(always)]
3216        fn inline_align(_context: fidl::encoding::Context) -> usize {
3217            8
3218        }
3219
3220        #[inline(always)]
3221        fn inline_size(_context: fidl::encoding::Context) -> usize {
3222            16
3223        }
3224    }
3225
3226    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SchedulingOptions, D>
3227        for &SchedulingOptions
3228    {
3229        unsafe fn encode(
3230            self,
3231            encoder: &mut fidl::encoding::Encoder<'_, D>,
3232            offset: usize,
3233            mut depth: fidl::encoding::Depth,
3234        ) -> fidl::Result<()> {
3235            encoder.debug_check_bounds::<SchedulingOptions>(offset);
3236            // Vector header
3237            let max_ordinal: u64 = self.max_ordinal_present();
3238            encoder.write_num(max_ordinal, offset);
3239            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3240            // Calling encoder.out_of_line_offset(0) is not allowed.
3241            if max_ordinal == 0 {
3242                return Ok(());
3243            }
3244            depth.increment()?;
3245            let envelope_size = 8;
3246            let bytes_len = max_ordinal as usize * envelope_size;
3247            #[allow(unused_variables)]
3248            let offset = encoder.out_of_line_offset(bytes_len);
3249            let mut _prev_end_offset: usize = 0;
3250            if 1 > max_ordinal {
3251                return Ok(());
3252            }
3253
3254            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3255            // are envelope_size bytes.
3256            let cur_offset: usize = (1 - 1) * envelope_size;
3257
3258            // Zero reserved fields.
3259            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3260
3261            // Safety:
3262            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3263            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3264            //   envelope_size bytes, there is always sufficient room.
3265            fidl::encoding::encode_in_envelope_optional::<u16, D>(
3266                self.max_parallel_suites
3267                    .as_ref()
3268                    .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
3269                encoder,
3270                offset + cur_offset,
3271                depth,
3272            )?;
3273
3274            _prev_end_offset = cur_offset + envelope_size;
3275            if 2 > max_ordinal {
3276                return Ok(());
3277            }
3278
3279            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3280            // are envelope_size bytes.
3281            let cur_offset: usize = (2 - 1) * envelope_size;
3282
3283            // Zero reserved fields.
3284            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3285
3286            // Safety:
3287            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3288            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3289            //   envelope_size bytes, there is always sufficient room.
3290            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3291                self.accumulate_debug_data
3292                    .as_ref()
3293                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3294                encoder,
3295                offset + cur_offset,
3296                depth,
3297            )?;
3298
3299            _prev_end_offset = cur_offset + envelope_size;
3300
3301            Ok(())
3302        }
3303    }
3304
3305    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SchedulingOptions {
3306        #[inline(always)]
3307        fn new_empty() -> Self {
3308            Self::default()
3309        }
3310
3311        unsafe fn decode(
3312            &mut self,
3313            decoder: &mut fidl::encoding::Decoder<'_, D>,
3314            offset: usize,
3315            mut depth: fidl::encoding::Depth,
3316        ) -> fidl::Result<()> {
3317            decoder.debug_check_bounds::<Self>(offset);
3318            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3319                None => return Err(fidl::Error::NotNullable),
3320                Some(len) => len,
3321            };
3322            // Calling decoder.out_of_line_offset(0) is not allowed.
3323            if len == 0 {
3324                return Ok(());
3325            };
3326            depth.increment()?;
3327            let envelope_size = 8;
3328            let bytes_len = len * envelope_size;
3329            let offset = decoder.out_of_line_offset(bytes_len)?;
3330            // Decode the envelope for each type.
3331            let mut _next_ordinal_to_read = 0;
3332            let mut next_offset = offset;
3333            let end_offset = offset + bytes_len;
3334            _next_ordinal_to_read += 1;
3335            if next_offset >= end_offset {
3336                return Ok(());
3337            }
3338
3339            // Decode unknown envelopes for gaps in ordinals.
3340            while _next_ordinal_to_read < 1 {
3341                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3342                _next_ordinal_to_read += 1;
3343                next_offset += envelope_size;
3344            }
3345
3346            let next_out_of_line = decoder.next_out_of_line();
3347            let handles_before = decoder.remaining_handles();
3348            if let Some((inlined, num_bytes, num_handles)) =
3349                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3350            {
3351                let member_inline_size =
3352                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3353                if inlined != (member_inline_size <= 4) {
3354                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3355                }
3356                let inner_offset;
3357                let mut inner_depth = depth.clone();
3358                if inlined {
3359                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3360                    inner_offset = next_offset;
3361                } else {
3362                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3363                    inner_depth.increment()?;
3364                }
3365                let val_ref =
3366                    self.max_parallel_suites.get_or_insert_with(|| fidl::new_empty!(u16, D));
3367                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
3368                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3369                {
3370                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3371                }
3372                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3373                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3374                }
3375            }
3376
3377            next_offset += envelope_size;
3378            _next_ordinal_to_read += 1;
3379            if next_offset >= end_offset {
3380                return Ok(());
3381            }
3382
3383            // Decode unknown envelopes for gaps in ordinals.
3384            while _next_ordinal_to_read < 2 {
3385                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3386                _next_ordinal_to_read += 1;
3387                next_offset += envelope_size;
3388            }
3389
3390            let next_out_of_line = decoder.next_out_of_line();
3391            let handles_before = decoder.remaining_handles();
3392            if let Some((inlined, num_bytes, num_handles)) =
3393                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3394            {
3395                let member_inline_size =
3396                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3397                if inlined != (member_inline_size <= 4) {
3398                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3399                }
3400                let inner_offset;
3401                let mut inner_depth = depth.clone();
3402                if inlined {
3403                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3404                    inner_offset = next_offset;
3405                } else {
3406                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3407                    inner_depth.increment()?;
3408                }
3409                let val_ref =
3410                    self.accumulate_debug_data.get_or_insert_with(|| fidl::new_empty!(bool, D));
3411                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3412                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3413                {
3414                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3415                }
3416                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3417                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3418                }
3419            }
3420
3421            next_offset += envelope_size;
3422
3423            // Decode the remaining unknown envelopes.
3424            while next_offset < end_offset {
3425                _next_ordinal_to_read += 1;
3426                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3427                next_offset += envelope_size;
3428            }
3429
3430            Ok(())
3431        }
3432    }
3433
3434    impl SuiteStartedEventDetails {
3435        #[inline(always)]
3436        fn max_ordinal_present(&self) -> u64 {
3437            0
3438        }
3439    }
3440
3441    impl fidl::encoding::ValueTypeMarker for SuiteStartedEventDetails {
3442        type Borrowed<'a> = &'a Self;
3443        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3444            value
3445        }
3446    }
3447
3448    unsafe impl fidl::encoding::TypeMarker for SuiteStartedEventDetails {
3449        type Owned = Self;
3450
3451        #[inline(always)]
3452        fn inline_align(_context: fidl::encoding::Context) -> usize {
3453            8
3454        }
3455
3456        #[inline(always)]
3457        fn inline_size(_context: fidl::encoding::Context) -> usize {
3458            16
3459        }
3460    }
3461
3462    unsafe impl<D: fidl::encoding::ResourceDialect>
3463        fidl::encoding::Encode<SuiteStartedEventDetails, D> for &SuiteStartedEventDetails
3464    {
3465        unsafe fn encode(
3466            self,
3467            encoder: &mut fidl::encoding::Encoder<'_, D>,
3468            offset: usize,
3469            mut depth: fidl::encoding::Depth,
3470        ) -> fidl::Result<()> {
3471            encoder.debug_check_bounds::<SuiteStartedEventDetails>(offset);
3472            // Vector header
3473            let max_ordinal: u64 = self.max_ordinal_present();
3474            encoder.write_num(max_ordinal, offset);
3475            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3476            // Calling encoder.out_of_line_offset(0) is not allowed.
3477            if max_ordinal == 0 {
3478                return Ok(());
3479            }
3480            depth.increment()?;
3481            let envelope_size = 8;
3482            let bytes_len = max_ordinal as usize * envelope_size;
3483            #[allow(unused_variables)]
3484            let offset = encoder.out_of_line_offset(bytes_len);
3485            let mut _prev_end_offset: usize = 0;
3486
3487            Ok(())
3488        }
3489    }
3490
3491    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3492        for SuiteStartedEventDetails
3493    {
3494        #[inline(always)]
3495        fn new_empty() -> Self {
3496            Self::default()
3497        }
3498
3499        unsafe fn decode(
3500            &mut self,
3501            decoder: &mut fidl::encoding::Decoder<'_, D>,
3502            offset: usize,
3503            mut depth: fidl::encoding::Depth,
3504        ) -> fidl::Result<()> {
3505            decoder.debug_check_bounds::<Self>(offset);
3506            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3507                None => return Err(fidl::Error::NotNullable),
3508                Some(len) => len,
3509            };
3510            // Calling decoder.out_of_line_offset(0) is not allowed.
3511            if len == 0 {
3512                return Ok(());
3513            };
3514            depth.increment()?;
3515            let envelope_size = 8;
3516            let bytes_len = len * envelope_size;
3517            let offset = decoder.out_of_line_offset(bytes_len)?;
3518            // Decode the envelope for each type.
3519            let mut _next_ordinal_to_read = 0;
3520            let mut next_offset = offset;
3521            let end_offset = offset + bytes_len;
3522
3523            // Decode the remaining unknown envelopes.
3524            while next_offset < end_offset {
3525                _next_ordinal_to_read += 1;
3526                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3527                next_offset += envelope_size;
3528            }
3529
3530            Ok(())
3531        }
3532    }
3533
3534    impl SuiteStoppedEventDetails {
3535        #[inline(always)]
3536        fn max_ordinal_present(&self) -> u64 {
3537            if let Some(_) = self.result {
3538                return 1;
3539            }
3540            0
3541        }
3542    }
3543
3544    impl fidl::encoding::ValueTypeMarker for SuiteStoppedEventDetails {
3545        type Borrowed<'a> = &'a Self;
3546        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3547            value
3548        }
3549    }
3550
3551    unsafe impl fidl::encoding::TypeMarker for SuiteStoppedEventDetails {
3552        type Owned = Self;
3553
3554        #[inline(always)]
3555        fn inline_align(_context: fidl::encoding::Context) -> usize {
3556            8
3557        }
3558
3559        #[inline(always)]
3560        fn inline_size(_context: fidl::encoding::Context) -> usize {
3561            16
3562        }
3563    }
3564
3565    unsafe impl<D: fidl::encoding::ResourceDialect>
3566        fidl::encoding::Encode<SuiteStoppedEventDetails, D> for &SuiteStoppedEventDetails
3567    {
3568        unsafe fn encode(
3569            self,
3570            encoder: &mut fidl::encoding::Encoder<'_, D>,
3571            offset: usize,
3572            mut depth: fidl::encoding::Depth,
3573        ) -> fidl::Result<()> {
3574            encoder.debug_check_bounds::<SuiteStoppedEventDetails>(offset);
3575            // Vector header
3576            let max_ordinal: u64 = self.max_ordinal_present();
3577            encoder.write_num(max_ordinal, offset);
3578            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3579            // Calling encoder.out_of_line_offset(0) is not allowed.
3580            if max_ordinal == 0 {
3581                return Ok(());
3582            }
3583            depth.increment()?;
3584            let envelope_size = 8;
3585            let bytes_len = max_ordinal as usize * envelope_size;
3586            #[allow(unused_variables)]
3587            let offset = encoder.out_of_line_offset(bytes_len);
3588            let mut _prev_end_offset: usize = 0;
3589            if 1 > max_ordinal {
3590                return Ok(());
3591            }
3592
3593            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3594            // are envelope_size bytes.
3595            let cur_offset: usize = (1 - 1) * envelope_size;
3596
3597            // Zero reserved fields.
3598            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3599
3600            // Safety:
3601            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3602            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3603            //   envelope_size bytes, there is always sufficient room.
3604            fidl::encoding::encode_in_envelope_optional::<SuiteResult, D>(
3605                self.result.as_ref().map(<SuiteResult as fidl::encoding::ValueTypeMarker>::borrow),
3606                encoder,
3607                offset + cur_offset,
3608                depth,
3609            )?;
3610
3611            _prev_end_offset = cur_offset + envelope_size;
3612
3613            Ok(())
3614        }
3615    }
3616
3617    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3618        for SuiteStoppedEventDetails
3619    {
3620        #[inline(always)]
3621        fn new_empty() -> Self {
3622            Self::default()
3623        }
3624
3625        unsafe fn decode(
3626            &mut self,
3627            decoder: &mut fidl::encoding::Decoder<'_, D>,
3628            offset: usize,
3629            mut depth: fidl::encoding::Depth,
3630        ) -> fidl::Result<()> {
3631            decoder.debug_check_bounds::<Self>(offset);
3632            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3633                None => return Err(fidl::Error::NotNullable),
3634                Some(len) => len,
3635            };
3636            // Calling decoder.out_of_line_offset(0) is not allowed.
3637            if len == 0 {
3638                return Ok(());
3639            };
3640            depth.increment()?;
3641            let envelope_size = 8;
3642            let bytes_len = len * envelope_size;
3643            let offset = decoder.out_of_line_offset(bytes_len)?;
3644            // Decode the envelope for each type.
3645            let mut _next_ordinal_to_read = 0;
3646            let mut next_offset = offset;
3647            let end_offset = offset + bytes_len;
3648            _next_ordinal_to_read += 1;
3649            if next_offset >= end_offset {
3650                return Ok(());
3651            }
3652
3653            // Decode unknown envelopes for gaps in ordinals.
3654            while _next_ordinal_to_read < 1 {
3655                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3656                _next_ordinal_to_read += 1;
3657                next_offset += envelope_size;
3658            }
3659
3660            let next_out_of_line = decoder.next_out_of_line();
3661            let handles_before = decoder.remaining_handles();
3662            if let Some((inlined, num_bytes, num_handles)) =
3663                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3664            {
3665                let member_inline_size =
3666                    <SuiteResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3667                if inlined != (member_inline_size <= 4) {
3668                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3669                }
3670                let inner_offset;
3671                let mut inner_depth = depth.clone();
3672                if inlined {
3673                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3674                    inner_offset = next_offset;
3675                } else {
3676                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3677                    inner_depth.increment()?;
3678                }
3679                let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(SuiteResult, D));
3680                fidl::decode!(SuiteResult, D, val_ref, decoder, inner_offset, inner_depth)?;
3681                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3682                {
3683                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3684                }
3685                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3686                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3687                }
3688            }
3689
3690            next_offset += envelope_size;
3691
3692            // Decode the remaining unknown envelopes.
3693            while next_offset < end_offset {
3694                _next_ordinal_to_read += 1;
3695                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3696                next_offset += envelope_size;
3697            }
3698
3699            Ok(())
3700        }
3701    }
3702
3703    impl TestCase {
3704        #[inline(always)]
3705        fn max_ordinal_present(&self) -> u64 {
3706            if let Some(_) = self.name {
3707                return 1;
3708            }
3709            0
3710        }
3711    }
3712
3713    impl fidl::encoding::ValueTypeMarker for TestCase {
3714        type Borrowed<'a> = &'a Self;
3715        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3716            value
3717        }
3718    }
3719
3720    unsafe impl fidl::encoding::TypeMarker for TestCase {
3721        type Owned = Self;
3722
3723        #[inline(always)]
3724        fn inline_align(_context: fidl::encoding::Context) -> usize {
3725            8
3726        }
3727
3728        #[inline(always)]
3729        fn inline_size(_context: fidl::encoding::Context) -> usize {
3730            16
3731        }
3732    }
3733
3734    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestCase, D> for &TestCase {
3735        unsafe fn encode(
3736            self,
3737            encoder: &mut fidl::encoding::Encoder<'_, D>,
3738            offset: usize,
3739            mut depth: fidl::encoding::Depth,
3740        ) -> fidl::Result<()> {
3741            encoder.debug_check_bounds::<TestCase>(offset);
3742            // Vector header
3743            let max_ordinal: u64 = self.max_ordinal_present();
3744            encoder.write_num(max_ordinal, offset);
3745            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3746            // Calling encoder.out_of_line_offset(0) is not allowed.
3747            if max_ordinal == 0 {
3748                return Ok(());
3749            }
3750            depth.increment()?;
3751            let envelope_size = 8;
3752            let bytes_len = max_ordinal as usize * envelope_size;
3753            #[allow(unused_variables)]
3754            let offset = encoder.out_of_line_offset(bytes_len);
3755            let mut _prev_end_offset: usize = 0;
3756            if 1 > max_ordinal {
3757                return Ok(());
3758            }
3759
3760            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3761            // are envelope_size bytes.
3762            let cur_offset: usize = (1 - 1) * envelope_size;
3763
3764            // Zero reserved fields.
3765            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3766
3767            // Safety:
3768            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3769            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3770            //   envelope_size bytes, there is always sufficient room.
3771            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
3772            self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
3773            encoder, offset + cur_offset, depth
3774        )?;
3775
3776            _prev_end_offset = cur_offset + envelope_size;
3777
3778            Ok(())
3779        }
3780    }
3781
3782    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCase {
3783        #[inline(always)]
3784        fn new_empty() -> Self {
3785            Self::default()
3786        }
3787
3788        unsafe fn decode(
3789            &mut self,
3790            decoder: &mut fidl::encoding::Decoder<'_, D>,
3791            offset: usize,
3792            mut depth: fidl::encoding::Depth,
3793        ) -> fidl::Result<()> {
3794            decoder.debug_check_bounds::<Self>(offset);
3795            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3796                None => return Err(fidl::Error::NotNullable),
3797                Some(len) => len,
3798            };
3799            // Calling decoder.out_of_line_offset(0) is not allowed.
3800            if len == 0 {
3801                return Ok(());
3802            };
3803            depth.increment()?;
3804            let envelope_size = 8;
3805            let bytes_len = len * envelope_size;
3806            let offset = decoder.out_of_line_offset(bytes_len)?;
3807            // Decode the envelope for each type.
3808            let mut _next_ordinal_to_read = 0;
3809            let mut next_offset = offset;
3810            let end_offset = offset + bytes_len;
3811            _next_ordinal_to_read += 1;
3812            if next_offset >= end_offset {
3813                return Ok(());
3814            }
3815
3816            // Decode unknown envelopes for gaps in ordinals.
3817            while _next_ordinal_to_read < 1 {
3818                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3819                _next_ordinal_to_read += 1;
3820                next_offset += envelope_size;
3821            }
3822
3823            let next_out_of_line = decoder.next_out_of_line();
3824            let handles_before = decoder.remaining_handles();
3825            if let Some((inlined, num_bytes, num_handles)) =
3826                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3827            {
3828                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3829                if inlined != (member_inline_size <= 4) {
3830                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3831                }
3832                let inner_offset;
3833                let mut inner_depth = depth.clone();
3834                if inlined {
3835                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3836                    inner_offset = next_offset;
3837                } else {
3838                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3839                    inner_depth.increment()?;
3840                }
3841                let val_ref = self.name.get_or_insert_with(|| {
3842                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
3843                });
3844                fidl::decode!(
3845                    fidl::encoding::BoundedString<2048>,
3846                    D,
3847                    val_ref,
3848                    decoder,
3849                    inner_offset,
3850                    inner_depth
3851                )?;
3852                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3853                {
3854                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3855                }
3856                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3857                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3858                }
3859            }
3860
3861            next_offset += envelope_size;
3862
3863            // Decode the remaining unknown envelopes.
3864            while next_offset < end_offset {
3865                _next_ordinal_to_read += 1;
3866                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3867                next_offset += envelope_size;
3868            }
3869
3870            Ok(())
3871        }
3872    }
3873
3874    impl TestCaseFinishedEventDetails {
3875        #[inline(always)]
3876        fn max_ordinal_present(&self) -> u64 {
3877            if let Some(_) = self.test_case_id {
3878                return 1;
3879            }
3880            0
3881        }
3882    }
3883
3884    impl fidl::encoding::ValueTypeMarker for TestCaseFinishedEventDetails {
3885        type Borrowed<'a> = &'a Self;
3886        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3887            value
3888        }
3889    }
3890
3891    unsafe impl fidl::encoding::TypeMarker for TestCaseFinishedEventDetails {
3892        type Owned = Self;
3893
3894        #[inline(always)]
3895        fn inline_align(_context: fidl::encoding::Context) -> usize {
3896            8
3897        }
3898
3899        #[inline(always)]
3900        fn inline_size(_context: fidl::encoding::Context) -> usize {
3901            16
3902        }
3903    }
3904
3905    unsafe impl<D: fidl::encoding::ResourceDialect>
3906        fidl::encoding::Encode<TestCaseFinishedEventDetails, D> for &TestCaseFinishedEventDetails
3907    {
3908        unsafe fn encode(
3909            self,
3910            encoder: &mut fidl::encoding::Encoder<'_, D>,
3911            offset: usize,
3912            mut depth: fidl::encoding::Depth,
3913        ) -> fidl::Result<()> {
3914            encoder.debug_check_bounds::<TestCaseFinishedEventDetails>(offset);
3915            // Vector header
3916            let max_ordinal: u64 = self.max_ordinal_present();
3917            encoder.write_num(max_ordinal, offset);
3918            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3919            // Calling encoder.out_of_line_offset(0) is not allowed.
3920            if max_ordinal == 0 {
3921                return Ok(());
3922            }
3923            depth.increment()?;
3924            let envelope_size = 8;
3925            let bytes_len = max_ordinal as usize * envelope_size;
3926            #[allow(unused_variables)]
3927            let offset = encoder.out_of_line_offset(bytes_len);
3928            let mut _prev_end_offset: usize = 0;
3929            if 1 > max_ordinal {
3930                return Ok(());
3931            }
3932
3933            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3934            // are envelope_size bytes.
3935            let cur_offset: usize = (1 - 1) * envelope_size;
3936
3937            // Zero reserved fields.
3938            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3939
3940            // Safety:
3941            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3942            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3943            //   envelope_size bytes, there is always sufficient room.
3944            fidl::encoding::encode_in_envelope_optional::<u32, D>(
3945                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3946                encoder,
3947                offset + cur_offset,
3948                depth,
3949            )?;
3950
3951            _prev_end_offset = cur_offset + envelope_size;
3952
3953            Ok(())
3954        }
3955    }
3956
3957    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3958        for TestCaseFinishedEventDetails
3959    {
3960        #[inline(always)]
3961        fn new_empty() -> Self {
3962            Self::default()
3963        }
3964
3965        unsafe fn decode(
3966            &mut self,
3967            decoder: &mut fidl::encoding::Decoder<'_, D>,
3968            offset: usize,
3969            mut depth: fidl::encoding::Depth,
3970        ) -> fidl::Result<()> {
3971            decoder.debug_check_bounds::<Self>(offset);
3972            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3973                None => return Err(fidl::Error::NotNullable),
3974                Some(len) => len,
3975            };
3976            // Calling decoder.out_of_line_offset(0) is not allowed.
3977            if len == 0 {
3978                return Ok(());
3979            };
3980            depth.increment()?;
3981            let envelope_size = 8;
3982            let bytes_len = len * envelope_size;
3983            let offset = decoder.out_of_line_offset(bytes_len)?;
3984            // Decode the envelope for each type.
3985            let mut _next_ordinal_to_read = 0;
3986            let mut next_offset = offset;
3987            let end_offset = offset + bytes_len;
3988            _next_ordinal_to_read += 1;
3989            if next_offset >= end_offset {
3990                return Ok(());
3991            }
3992
3993            // Decode unknown envelopes for gaps in ordinals.
3994            while _next_ordinal_to_read < 1 {
3995                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3996                _next_ordinal_to_read += 1;
3997                next_offset += envelope_size;
3998            }
3999
4000            let next_out_of_line = decoder.next_out_of_line();
4001            let handles_before = decoder.remaining_handles();
4002            if let Some((inlined, num_bytes, num_handles)) =
4003                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4004            {
4005                let member_inline_size =
4006                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4007                if inlined != (member_inline_size <= 4) {
4008                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4009                }
4010                let inner_offset;
4011                let mut inner_depth = depth.clone();
4012                if inlined {
4013                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4014                    inner_offset = next_offset;
4015                } else {
4016                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4017                    inner_depth.increment()?;
4018                }
4019                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4020                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4021                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4022                {
4023                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4024                }
4025                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4026                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4027                }
4028            }
4029
4030            next_offset += envelope_size;
4031
4032            // Decode the remaining unknown envelopes.
4033            while next_offset < end_offset {
4034                _next_ordinal_to_read += 1;
4035                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4036                next_offset += envelope_size;
4037            }
4038
4039            Ok(())
4040        }
4041    }
4042
4043    impl TestCaseFoundEventDetails {
4044        #[inline(always)]
4045        fn max_ordinal_present(&self) -> u64 {
4046            if let Some(_) = self.test_case_id {
4047                return 2;
4048            }
4049            if let Some(_) = self.test_case_name {
4050                return 1;
4051            }
4052            0
4053        }
4054    }
4055
4056    impl fidl::encoding::ValueTypeMarker for TestCaseFoundEventDetails {
4057        type Borrowed<'a> = &'a Self;
4058        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4059            value
4060        }
4061    }
4062
4063    unsafe impl fidl::encoding::TypeMarker for TestCaseFoundEventDetails {
4064        type Owned = Self;
4065
4066        #[inline(always)]
4067        fn inline_align(_context: fidl::encoding::Context) -> usize {
4068            8
4069        }
4070
4071        #[inline(always)]
4072        fn inline_size(_context: fidl::encoding::Context) -> usize {
4073            16
4074        }
4075    }
4076
4077    unsafe impl<D: fidl::encoding::ResourceDialect>
4078        fidl::encoding::Encode<TestCaseFoundEventDetails, D> for &TestCaseFoundEventDetails
4079    {
4080        unsafe fn encode(
4081            self,
4082            encoder: &mut fidl::encoding::Encoder<'_, D>,
4083            offset: usize,
4084            mut depth: fidl::encoding::Depth,
4085        ) -> fidl::Result<()> {
4086            encoder.debug_check_bounds::<TestCaseFoundEventDetails>(offset);
4087            // Vector header
4088            let max_ordinal: u64 = self.max_ordinal_present();
4089            encoder.write_num(max_ordinal, offset);
4090            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4091            // Calling encoder.out_of_line_offset(0) is not allowed.
4092            if max_ordinal == 0 {
4093                return Ok(());
4094            }
4095            depth.increment()?;
4096            let envelope_size = 8;
4097            let bytes_len = max_ordinal as usize * envelope_size;
4098            #[allow(unused_variables)]
4099            let offset = encoder.out_of_line_offset(bytes_len);
4100            let mut _prev_end_offset: usize = 0;
4101            if 1 > max_ordinal {
4102                return Ok(());
4103            }
4104
4105            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4106            // are envelope_size bytes.
4107            let cur_offset: usize = (1 - 1) * envelope_size;
4108
4109            // Zero reserved fields.
4110            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4111
4112            // Safety:
4113            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4114            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4115            //   envelope_size bytes, there is always sufficient room.
4116            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
4117            self.test_case_name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
4118            encoder, offset + cur_offset, depth
4119        )?;
4120
4121            _prev_end_offset = cur_offset + envelope_size;
4122            if 2 > max_ordinal {
4123                return Ok(());
4124            }
4125
4126            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4127            // are envelope_size bytes.
4128            let cur_offset: usize = (2 - 1) * envelope_size;
4129
4130            // Zero reserved fields.
4131            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4132
4133            // Safety:
4134            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4135            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4136            //   envelope_size bytes, there is always sufficient room.
4137            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4138                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4139                encoder,
4140                offset + cur_offset,
4141                depth,
4142            )?;
4143
4144            _prev_end_offset = cur_offset + envelope_size;
4145
4146            Ok(())
4147        }
4148    }
4149
4150    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4151        for TestCaseFoundEventDetails
4152    {
4153        #[inline(always)]
4154        fn new_empty() -> Self {
4155            Self::default()
4156        }
4157
4158        unsafe fn decode(
4159            &mut self,
4160            decoder: &mut fidl::encoding::Decoder<'_, D>,
4161            offset: usize,
4162            mut depth: fidl::encoding::Depth,
4163        ) -> fidl::Result<()> {
4164            decoder.debug_check_bounds::<Self>(offset);
4165            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4166                None => return Err(fidl::Error::NotNullable),
4167                Some(len) => len,
4168            };
4169            // Calling decoder.out_of_line_offset(0) is not allowed.
4170            if len == 0 {
4171                return Ok(());
4172            };
4173            depth.increment()?;
4174            let envelope_size = 8;
4175            let bytes_len = len * envelope_size;
4176            let offset = decoder.out_of_line_offset(bytes_len)?;
4177            // Decode the envelope for each type.
4178            let mut _next_ordinal_to_read = 0;
4179            let mut next_offset = offset;
4180            let end_offset = offset + bytes_len;
4181            _next_ordinal_to_read += 1;
4182            if next_offset >= end_offset {
4183                return Ok(());
4184            }
4185
4186            // Decode unknown envelopes for gaps in ordinals.
4187            while _next_ordinal_to_read < 1 {
4188                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4189                _next_ordinal_to_read += 1;
4190                next_offset += envelope_size;
4191            }
4192
4193            let next_out_of_line = decoder.next_out_of_line();
4194            let handles_before = decoder.remaining_handles();
4195            if let Some((inlined, num_bytes, num_handles)) =
4196                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4197            {
4198                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4199                if inlined != (member_inline_size <= 4) {
4200                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4201                }
4202                let inner_offset;
4203                let mut inner_depth = depth.clone();
4204                if inlined {
4205                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4206                    inner_offset = next_offset;
4207                } else {
4208                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4209                    inner_depth.increment()?;
4210                }
4211                let val_ref = self.test_case_name.get_or_insert_with(|| {
4212                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
4213                });
4214                fidl::decode!(
4215                    fidl::encoding::BoundedString<2048>,
4216                    D,
4217                    val_ref,
4218                    decoder,
4219                    inner_offset,
4220                    inner_depth
4221                )?;
4222                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4223                {
4224                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4225                }
4226                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4227                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4228                }
4229            }
4230
4231            next_offset += envelope_size;
4232            _next_ordinal_to_read += 1;
4233            if next_offset >= end_offset {
4234                return Ok(());
4235            }
4236
4237            // Decode unknown envelopes for gaps in ordinals.
4238            while _next_ordinal_to_read < 2 {
4239                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4240                _next_ordinal_to_read += 1;
4241                next_offset += envelope_size;
4242            }
4243
4244            let next_out_of_line = decoder.next_out_of_line();
4245            let handles_before = decoder.remaining_handles();
4246            if let Some((inlined, num_bytes, num_handles)) =
4247                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4248            {
4249                let member_inline_size =
4250                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4251                if inlined != (member_inline_size <= 4) {
4252                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4253                }
4254                let inner_offset;
4255                let mut inner_depth = depth.clone();
4256                if inlined {
4257                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4258                    inner_offset = next_offset;
4259                } else {
4260                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4261                    inner_depth.increment()?;
4262                }
4263                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4264                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4265                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4266                {
4267                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4268                }
4269                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4270                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4271                }
4272            }
4273
4274            next_offset += envelope_size;
4275
4276            // Decode the remaining unknown envelopes.
4277            while next_offset < end_offset {
4278                _next_ordinal_to_read += 1;
4279                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4280                next_offset += envelope_size;
4281            }
4282
4283            Ok(())
4284        }
4285    }
4286
4287    impl TestCaseStartedEventDetails {
4288        #[inline(always)]
4289        fn max_ordinal_present(&self) -> u64 {
4290            if let Some(_) = self.test_case_id {
4291                return 1;
4292            }
4293            0
4294        }
4295    }
4296
4297    impl fidl::encoding::ValueTypeMarker for TestCaseStartedEventDetails {
4298        type Borrowed<'a> = &'a Self;
4299        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4300            value
4301        }
4302    }
4303
4304    unsafe impl fidl::encoding::TypeMarker for TestCaseStartedEventDetails {
4305        type Owned = Self;
4306
4307        #[inline(always)]
4308        fn inline_align(_context: fidl::encoding::Context) -> usize {
4309            8
4310        }
4311
4312        #[inline(always)]
4313        fn inline_size(_context: fidl::encoding::Context) -> usize {
4314            16
4315        }
4316    }
4317
4318    unsafe impl<D: fidl::encoding::ResourceDialect>
4319        fidl::encoding::Encode<TestCaseStartedEventDetails, D> for &TestCaseStartedEventDetails
4320    {
4321        unsafe fn encode(
4322            self,
4323            encoder: &mut fidl::encoding::Encoder<'_, D>,
4324            offset: usize,
4325            mut depth: fidl::encoding::Depth,
4326        ) -> fidl::Result<()> {
4327            encoder.debug_check_bounds::<TestCaseStartedEventDetails>(offset);
4328            // Vector header
4329            let max_ordinal: u64 = self.max_ordinal_present();
4330            encoder.write_num(max_ordinal, offset);
4331            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4332            // Calling encoder.out_of_line_offset(0) is not allowed.
4333            if max_ordinal == 0 {
4334                return Ok(());
4335            }
4336            depth.increment()?;
4337            let envelope_size = 8;
4338            let bytes_len = max_ordinal as usize * envelope_size;
4339            #[allow(unused_variables)]
4340            let offset = encoder.out_of_line_offset(bytes_len);
4341            let mut _prev_end_offset: usize = 0;
4342            if 1 > max_ordinal {
4343                return Ok(());
4344            }
4345
4346            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4347            // are envelope_size bytes.
4348            let cur_offset: usize = (1 - 1) * envelope_size;
4349
4350            // Zero reserved fields.
4351            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4352
4353            // Safety:
4354            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4355            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4356            //   envelope_size bytes, there is always sufficient room.
4357            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4358                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4359                encoder,
4360                offset + cur_offset,
4361                depth,
4362            )?;
4363
4364            _prev_end_offset = cur_offset + envelope_size;
4365
4366            Ok(())
4367        }
4368    }
4369
4370    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4371        for TestCaseStartedEventDetails
4372    {
4373        #[inline(always)]
4374        fn new_empty() -> Self {
4375            Self::default()
4376        }
4377
4378        unsafe fn decode(
4379            &mut self,
4380            decoder: &mut fidl::encoding::Decoder<'_, D>,
4381            offset: usize,
4382            mut depth: fidl::encoding::Depth,
4383        ) -> fidl::Result<()> {
4384            decoder.debug_check_bounds::<Self>(offset);
4385            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4386                None => return Err(fidl::Error::NotNullable),
4387                Some(len) => len,
4388            };
4389            // Calling decoder.out_of_line_offset(0) is not allowed.
4390            if len == 0 {
4391                return Ok(());
4392            };
4393            depth.increment()?;
4394            let envelope_size = 8;
4395            let bytes_len = len * envelope_size;
4396            let offset = decoder.out_of_line_offset(bytes_len)?;
4397            // Decode the envelope for each type.
4398            let mut _next_ordinal_to_read = 0;
4399            let mut next_offset = offset;
4400            let end_offset = offset + bytes_len;
4401            _next_ordinal_to_read += 1;
4402            if next_offset >= end_offset {
4403                return Ok(());
4404            }
4405
4406            // Decode unknown envelopes for gaps in ordinals.
4407            while _next_ordinal_to_read < 1 {
4408                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4409                _next_ordinal_to_read += 1;
4410                next_offset += envelope_size;
4411            }
4412
4413            let next_out_of_line = decoder.next_out_of_line();
4414            let handles_before = decoder.remaining_handles();
4415            if let Some((inlined, num_bytes, num_handles)) =
4416                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4417            {
4418                let member_inline_size =
4419                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4420                if inlined != (member_inline_size <= 4) {
4421                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4422                }
4423                let inner_offset;
4424                let mut inner_depth = depth.clone();
4425                if inlined {
4426                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4427                    inner_offset = next_offset;
4428                } else {
4429                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4430                    inner_depth.increment()?;
4431                }
4432                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4433                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4434                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4435                {
4436                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4437                }
4438                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4439                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4440                }
4441            }
4442
4443            next_offset += envelope_size;
4444
4445            // Decode the remaining unknown envelopes.
4446            while next_offset < end_offset {
4447                _next_ordinal_to_read += 1;
4448                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4449                next_offset += envelope_size;
4450            }
4451
4452            Ok(())
4453        }
4454    }
4455
4456    impl TestCaseStoppedEventDetails {
4457        #[inline(always)]
4458        fn max_ordinal_present(&self) -> u64 {
4459            if let Some(_) = self.result {
4460                return 2;
4461            }
4462            if let Some(_) = self.test_case_id {
4463                return 1;
4464            }
4465            0
4466        }
4467    }
4468
4469    impl fidl::encoding::ValueTypeMarker for TestCaseStoppedEventDetails {
4470        type Borrowed<'a> = &'a Self;
4471        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4472            value
4473        }
4474    }
4475
4476    unsafe impl fidl::encoding::TypeMarker for TestCaseStoppedEventDetails {
4477        type Owned = Self;
4478
4479        #[inline(always)]
4480        fn inline_align(_context: fidl::encoding::Context) -> usize {
4481            8
4482        }
4483
4484        #[inline(always)]
4485        fn inline_size(_context: fidl::encoding::Context) -> usize {
4486            16
4487        }
4488    }
4489
4490    unsafe impl<D: fidl::encoding::ResourceDialect>
4491        fidl::encoding::Encode<TestCaseStoppedEventDetails, D> for &TestCaseStoppedEventDetails
4492    {
4493        unsafe fn encode(
4494            self,
4495            encoder: &mut fidl::encoding::Encoder<'_, D>,
4496            offset: usize,
4497            mut depth: fidl::encoding::Depth,
4498        ) -> fidl::Result<()> {
4499            encoder.debug_check_bounds::<TestCaseStoppedEventDetails>(offset);
4500            // Vector header
4501            let max_ordinal: u64 = self.max_ordinal_present();
4502            encoder.write_num(max_ordinal, offset);
4503            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4504            // Calling encoder.out_of_line_offset(0) is not allowed.
4505            if max_ordinal == 0 {
4506                return Ok(());
4507            }
4508            depth.increment()?;
4509            let envelope_size = 8;
4510            let bytes_len = max_ordinal as usize * envelope_size;
4511            #[allow(unused_variables)]
4512            let offset = encoder.out_of_line_offset(bytes_len);
4513            let mut _prev_end_offset: usize = 0;
4514            if 1 > max_ordinal {
4515                return Ok(());
4516            }
4517
4518            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4519            // are envelope_size bytes.
4520            let cur_offset: usize = (1 - 1) * envelope_size;
4521
4522            // Zero reserved fields.
4523            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4524
4525            // Safety:
4526            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4527            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4528            //   envelope_size bytes, there is always sufficient room.
4529            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4530                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4531                encoder,
4532                offset + cur_offset,
4533                depth,
4534            )?;
4535
4536            _prev_end_offset = cur_offset + envelope_size;
4537            if 2 > max_ordinal {
4538                return Ok(());
4539            }
4540
4541            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4542            // are envelope_size bytes.
4543            let cur_offset: usize = (2 - 1) * envelope_size;
4544
4545            // Zero reserved fields.
4546            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4547
4548            // Safety:
4549            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4550            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4551            //   envelope_size bytes, there is always sufficient room.
4552            fidl::encoding::encode_in_envelope_optional::<TestCaseResult, D>(
4553                self.result
4554                    .as_ref()
4555                    .map(<TestCaseResult as fidl::encoding::ValueTypeMarker>::borrow),
4556                encoder,
4557                offset + cur_offset,
4558                depth,
4559            )?;
4560
4561            _prev_end_offset = cur_offset + envelope_size;
4562
4563            Ok(())
4564        }
4565    }
4566
4567    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4568        for TestCaseStoppedEventDetails
4569    {
4570        #[inline(always)]
4571        fn new_empty() -> Self {
4572            Self::default()
4573        }
4574
4575        unsafe fn decode(
4576            &mut self,
4577            decoder: &mut fidl::encoding::Decoder<'_, D>,
4578            offset: usize,
4579            mut depth: fidl::encoding::Depth,
4580        ) -> fidl::Result<()> {
4581            decoder.debug_check_bounds::<Self>(offset);
4582            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4583                None => return Err(fidl::Error::NotNullable),
4584                Some(len) => len,
4585            };
4586            // Calling decoder.out_of_line_offset(0) is not allowed.
4587            if len == 0 {
4588                return Ok(());
4589            };
4590            depth.increment()?;
4591            let envelope_size = 8;
4592            let bytes_len = len * envelope_size;
4593            let offset = decoder.out_of_line_offset(bytes_len)?;
4594            // Decode the envelope for each type.
4595            let mut _next_ordinal_to_read = 0;
4596            let mut next_offset = offset;
4597            let end_offset = offset + bytes_len;
4598            _next_ordinal_to_read += 1;
4599            if next_offset >= end_offset {
4600                return Ok(());
4601            }
4602
4603            // Decode unknown envelopes for gaps in ordinals.
4604            while _next_ordinal_to_read < 1 {
4605                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4606                _next_ordinal_to_read += 1;
4607                next_offset += envelope_size;
4608            }
4609
4610            let next_out_of_line = decoder.next_out_of_line();
4611            let handles_before = decoder.remaining_handles();
4612            if let Some((inlined, num_bytes, num_handles)) =
4613                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4614            {
4615                let member_inline_size =
4616                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4617                if inlined != (member_inline_size <= 4) {
4618                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4619                }
4620                let inner_offset;
4621                let mut inner_depth = depth.clone();
4622                if inlined {
4623                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4624                    inner_offset = next_offset;
4625                } else {
4626                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4627                    inner_depth.increment()?;
4628                }
4629                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4630                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4631                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4632                {
4633                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4634                }
4635                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4636                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4637                }
4638            }
4639
4640            next_offset += envelope_size;
4641            _next_ordinal_to_read += 1;
4642            if next_offset >= end_offset {
4643                return Ok(());
4644            }
4645
4646            // Decode unknown envelopes for gaps in ordinals.
4647            while _next_ordinal_to_read < 2 {
4648                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4649                _next_ordinal_to_read += 1;
4650                next_offset += envelope_size;
4651            }
4652
4653            let next_out_of_line = decoder.next_out_of_line();
4654            let handles_before = decoder.remaining_handles();
4655            if let Some((inlined, num_bytes, num_handles)) =
4656                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4657            {
4658                let member_inline_size =
4659                    <TestCaseResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4660                if inlined != (member_inline_size <= 4) {
4661                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4662                }
4663                let inner_offset;
4664                let mut inner_depth = depth.clone();
4665                if inlined {
4666                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4667                    inner_offset = next_offset;
4668                } else {
4669                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4670                    inner_depth.increment()?;
4671                }
4672                let val_ref =
4673                    self.result.get_or_insert_with(|| fidl::new_empty!(TestCaseResult, D));
4674                fidl::decode!(TestCaseResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4675                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4676                {
4677                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4678                }
4679                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4680                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4681                }
4682            }
4683
4684            next_offset += envelope_size;
4685
4686            // Decode the remaining unknown envelopes.
4687            while next_offset < end_offset {
4688                _next_ordinal_to_read += 1;
4689                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4690                next_offset += envelope_size;
4691            }
4692
4693            Ok(())
4694        }
4695    }
4696}