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 = 16384;
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<
1869        D: fidl::encoding::ResourceDialect,
1870        T0: fidl::encoding::Encode<SchedulingOptions, D>,
1871    > fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D> for (T0,)
1872    {
1873        #[inline]
1874        unsafe fn encode(
1875            self,
1876            encoder: &mut fidl::encoding::Encoder<'_, D>,
1877            offset: usize,
1878            depth: fidl::encoding::Depth,
1879        ) -> fidl::Result<()> {
1880            encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
1881            // Zero out padding regions. There's no need to apply masks
1882            // because the unmasked parts will be overwritten by fields.
1883            // Write the fields.
1884            self.0.encode(encoder, offset + 0, depth)?;
1885            Ok(())
1886        }
1887    }
1888
1889    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
1890        for RunBuilderWithSchedulingOptionsRequest
1891    {
1892        #[inline(always)]
1893        fn new_empty() -> Self {
1894            Self { options: fidl::new_empty!(SchedulingOptions, D) }
1895        }
1896
1897        #[inline]
1898        unsafe fn decode(
1899            &mut self,
1900            decoder: &mut fidl::encoding::Decoder<'_, D>,
1901            offset: usize,
1902            _depth: fidl::encoding::Depth,
1903        ) -> fidl::Result<()> {
1904            decoder.debug_check_bounds::<Self>(offset);
1905            // Verify that padding bytes are zero.
1906            fidl::decode!(SchedulingOptions, D, &mut self.options, decoder, offset + 0, _depth)?;
1907            Ok(())
1908        }
1909    }
1910
1911    impl fidl::encoding::ValueTypeMarker for RunStarted {
1912        type Borrowed<'a> = &'a Self;
1913        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1914            value
1915        }
1916    }
1917
1918    unsafe impl fidl::encoding::TypeMarker for RunStarted {
1919        type Owned = Self;
1920
1921        #[inline(always)]
1922        fn inline_align(_context: fidl::encoding::Context) -> usize {
1923            1
1924        }
1925
1926        #[inline(always)]
1927        fn inline_size(_context: fidl::encoding::Context) -> usize {
1928            1
1929        }
1930    }
1931
1932    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStarted, D>
1933        for &RunStarted
1934    {
1935        #[inline]
1936        unsafe fn encode(
1937            self,
1938            encoder: &mut fidl::encoding::Encoder<'_, D>,
1939            offset: usize,
1940            _depth: fidl::encoding::Depth,
1941        ) -> fidl::Result<()> {
1942            encoder.debug_check_bounds::<RunStarted>(offset);
1943            encoder.write_num(0u8, offset);
1944            Ok(())
1945        }
1946    }
1947
1948    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStarted {
1949        #[inline(always)]
1950        fn new_empty() -> Self {
1951            Self
1952        }
1953
1954        #[inline]
1955        unsafe fn decode(
1956            &mut self,
1957            decoder: &mut fidl::encoding::Decoder<'_, D>,
1958            offset: usize,
1959            _depth: fidl::encoding::Depth,
1960        ) -> fidl::Result<()> {
1961            decoder.debug_check_bounds::<Self>(offset);
1962            match decoder.read_num::<u8>(offset) {
1963                0 => Ok(()),
1964                _ => Err(fidl::Error::Invalid),
1965            }
1966        }
1967    }
1968
1969    impl fidl::encoding::ValueTypeMarker for RunStopped {
1970        type Borrowed<'a> = &'a Self;
1971        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
1972            value
1973        }
1974    }
1975
1976    unsafe impl fidl::encoding::TypeMarker for RunStopped {
1977        type Owned = Self;
1978
1979        #[inline(always)]
1980        fn inline_align(_context: fidl::encoding::Context) -> usize {
1981            1
1982        }
1983
1984        #[inline(always)]
1985        fn inline_size(_context: fidl::encoding::Context) -> usize {
1986            1
1987        }
1988    }
1989
1990    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStopped, D>
1991        for &RunStopped
1992    {
1993        #[inline]
1994        unsafe fn encode(
1995            self,
1996            encoder: &mut fidl::encoding::Encoder<'_, D>,
1997            offset: usize,
1998            _depth: fidl::encoding::Depth,
1999        ) -> fidl::Result<()> {
2000            encoder.debug_check_bounds::<RunStopped>(offset);
2001            encoder.write_num(0u8, offset);
2002            Ok(())
2003        }
2004    }
2005
2006    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStopped {
2007        #[inline(always)]
2008        fn new_empty() -> Self {
2009            Self
2010        }
2011
2012        #[inline]
2013        unsafe fn decode(
2014            &mut self,
2015            decoder: &mut fidl::encoding::Decoder<'_, D>,
2016            offset: usize,
2017            _depth: fidl::encoding::Depth,
2018        ) -> fidl::Result<()> {
2019            decoder.debug_check_bounds::<Self>(offset);
2020            match decoder.read_num::<u8>(offset) {
2021                0 => Ok(()),
2022                _ => Err(fidl::Error::Invalid),
2023            }
2024        }
2025    }
2026
2027    impl fidl::encoding::ValueTypeMarker for SuiteStarted {
2028        type Borrowed<'a> = &'a Self;
2029        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2030            value
2031        }
2032    }
2033
2034    unsafe impl fidl::encoding::TypeMarker for SuiteStarted {
2035        type Owned = Self;
2036
2037        #[inline(always)]
2038        fn inline_align(_context: fidl::encoding::Context) -> usize {
2039            1
2040        }
2041
2042        #[inline(always)]
2043        fn inline_size(_context: fidl::encoding::Context) -> usize {
2044            1
2045        }
2046    }
2047
2048    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStarted, D>
2049        for &SuiteStarted
2050    {
2051        #[inline]
2052        unsafe fn encode(
2053            self,
2054            encoder: &mut fidl::encoding::Encoder<'_, D>,
2055            offset: usize,
2056            _depth: fidl::encoding::Depth,
2057        ) -> fidl::Result<()> {
2058            encoder.debug_check_bounds::<SuiteStarted>(offset);
2059            encoder.write_num(0u8, offset);
2060            Ok(())
2061        }
2062    }
2063
2064    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStarted {
2065        #[inline(always)]
2066        fn new_empty() -> Self {
2067            Self
2068        }
2069
2070        #[inline]
2071        unsafe fn decode(
2072            &mut self,
2073            decoder: &mut fidl::encoding::Decoder<'_, D>,
2074            offset: usize,
2075            _depth: fidl::encoding::Depth,
2076        ) -> fidl::Result<()> {
2077            decoder.debug_check_bounds::<Self>(offset);
2078            match decoder.read_num::<u8>(offset) {
2079                0 => Ok(()),
2080                _ => Err(fidl::Error::Invalid),
2081            }
2082        }
2083    }
2084
2085    impl fidl::encoding::ValueTypeMarker for SuiteStopped {
2086        type Borrowed<'a> = &'a Self;
2087        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2088            value
2089        }
2090    }
2091
2092    unsafe impl fidl::encoding::TypeMarker for SuiteStopped {
2093        type Owned = Self;
2094
2095        #[inline(always)]
2096        fn inline_align(_context: fidl::encoding::Context) -> usize {
2097            4
2098        }
2099
2100        #[inline(always)]
2101        fn inline_size(_context: fidl::encoding::Context) -> usize {
2102            4
2103        }
2104    }
2105
2106    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStopped, D>
2107        for &SuiteStopped
2108    {
2109        #[inline]
2110        unsafe fn encode(
2111            self,
2112            encoder: &mut fidl::encoding::Encoder<'_, D>,
2113            offset: usize,
2114            _depth: fidl::encoding::Depth,
2115        ) -> fidl::Result<()> {
2116            encoder.debug_check_bounds::<SuiteStopped>(offset);
2117            // Delegate to tuple encoding.
2118            fidl::encoding::Encode::<SuiteStopped, D>::encode(
2119                (<SuiteStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
2120                encoder,
2121                offset,
2122                _depth,
2123            )
2124        }
2125    }
2126    unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SuiteStatus, D>>
2127        fidl::encoding::Encode<SuiteStopped, D> for (T0,)
2128    {
2129        #[inline]
2130        unsafe fn encode(
2131            self,
2132            encoder: &mut fidl::encoding::Encoder<'_, D>,
2133            offset: usize,
2134            depth: fidl::encoding::Depth,
2135        ) -> fidl::Result<()> {
2136            encoder.debug_check_bounds::<SuiteStopped>(offset);
2137            // Zero out padding regions. There's no need to apply masks
2138            // because the unmasked parts will be overwritten by fields.
2139            // Write the fields.
2140            self.0.encode(encoder, offset + 0, depth)?;
2141            Ok(())
2142        }
2143    }
2144
2145    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStopped {
2146        #[inline(always)]
2147        fn new_empty() -> Self {
2148            Self { status: fidl::new_empty!(SuiteStatus, D) }
2149        }
2150
2151        #[inline]
2152        unsafe fn decode(
2153            &mut self,
2154            decoder: &mut fidl::encoding::Decoder<'_, D>,
2155            offset: usize,
2156            _depth: fidl::encoding::Depth,
2157        ) -> fidl::Result<()> {
2158            decoder.debug_check_bounds::<Self>(offset);
2159            // Verify that padding bytes are zero.
2160            fidl::decode!(SuiteStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
2161            Ok(())
2162        }
2163    }
2164
2165    impl fidl::encoding::ValueTypeMarker for TestCaseIteratorGetNextResponse {
2166        type Borrowed<'a> = &'a Self;
2167        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2168            value
2169        }
2170    }
2171
2172    unsafe impl fidl::encoding::TypeMarker for TestCaseIteratorGetNextResponse {
2173        type Owned = Self;
2174
2175        #[inline(always)]
2176        fn inline_align(_context: fidl::encoding::Context) -> usize {
2177            8
2178        }
2179
2180        #[inline(always)]
2181        fn inline_size(_context: fidl::encoding::Context) -> usize {
2182            16
2183        }
2184    }
2185
2186    unsafe impl<D: fidl::encoding::ResourceDialect>
2187        fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D>
2188        for &TestCaseIteratorGetNextResponse
2189    {
2190        #[inline]
2191        unsafe fn encode(
2192            self,
2193            encoder: &mut fidl::encoding::Encoder<'_, D>,
2194            offset: usize,
2195            _depth: fidl::encoding::Depth,
2196        ) -> fidl::Result<()> {
2197            encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2198            // Delegate to tuple encoding.
2199            fidl::encoding::Encode::<TestCaseIteratorGetNextResponse, D>::encode(
2200                (
2201                    <fidl::encoding::Vector<TestCase, 1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_cases),
2202                ),
2203                encoder, offset, _depth
2204            )
2205        }
2206    }
2207    unsafe impl<
2208        D: fidl::encoding::ResourceDialect,
2209        T0: fidl::encoding::Encode<fidl::encoding::Vector<TestCase, 1024>, D>,
2210    > fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D> for (T0,)
2211    {
2212        #[inline]
2213        unsafe fn encode(
2214            self,
2215            encoder: &mut fidl::encoding::Encoder<'_, D>,
2216            offset: usize,
2217            depth: fidl::encoding::Depth,
2218        ) -> fidl::Result<()> {
2219            encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
2220            // Zero out padding regions. There's no need to apply masks
2221            // because the unmasked parts will be overwritten by fields.
2222            // Write the fields.
2223            self.0.encode(encoder, offset + 0, depth)?;
2224            Ok(())
2225        }
2226    }
2227
2228    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
2229        for TestCaseIteratorGetNextResponse
2230    {
2231        #[inline(always)]
2232        fn new_empty() -> Self {
2233            Self { test_cases: fidl::new_empty!(fidl::encoding::Vector<TestCase, 1024>, D) }
2234        }
2235
2236        #[inline]
2237        unsafe fn decode(
2238            &mut self,
2239            decoder: &mut fidl::encoding::Decoder<'_, D>,
2240            offset: usize,
2241            _depth: fidl::encoding::Depth,
2242        ) -> fidl::Result<()> {
2243            decoder.debug_check_bounds::<Self>(offset);
2244            // Verify that padding bytes are zero.
2245            fidl::decode!(fidl::encoding::Vector<TestCase, 1024>, D, &mut self.test_cases, decoder, offset + 0, _depth)?;
2246            Ok(())
2247        }
2248    }
2249
2250    impl Case {
2251        #[inline(always)]
2252        fn max_ordinal_present(&self) -> u64 {
2253            if let Some(_) = self.name {
2254                return 1;
2255            }
2256            0
2257        }
2258    }
2259
2260    impl fidl::encoding::ValueTypeMarker for Case {
2261        type Borrowed<'a> = &'a Self;
2262        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2263            value
2264        }
2265    }
2266
2267    unsafe impl fidl::encoding::TypeMarker for Case {
2268        type Owned = Self;
2269
2270        #[inline(always)]
2271        fn inline_align(_context: fidl::encoding::Context) -> usize {
2272            8
2273        }
2274
2275        #[inline(always)]
2276        fn inline_size(_context: fidl::encoding::Context) -> usize {
2277            16
2278        }
2279    }
2280
2281    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Case, D> for &Case {
2282        unsafe fn encode(
2283            self,
2284            encoder: &mut fidl::encoding::Encoder<'_, D>,
2285            offset: usize,
2286            mut depth: fidl::encoding::Depth,
2287        ) -> fidl::Result<()> {
2288            encoder.debug_check_bounds::<Case>(offset);
2289            // Vector header
2290            let max_ordinal: u64 = self.max_ordinal_present();
2291            encoder.write_num(max_ordinal, offset);
2292            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2293            // Calling encoder.out_of_line_offset(0) is not allowed.
2294            if max_ordinal == 0 {
2295                return Ok(());
2296            }
2297            depth.increment()?;
2298            let envelope_size = 8;
2299            let bytes_len = max_ordinal as usize * envelope_size;
2300            #[allow(unused_variables)]
2301            let offset = encoder.out_of_line_offset(bytes_len);
2302            let mut _prev_end_offset: usize = 0;
2303            if 1 > max_ordinal {
2304                return Ok(());
2305            }
2306
2307            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2308            // are envelope_size bytes.
2309            let cur_offset: usize = (1 - 1) * envelope_size;
2310
2311            // Zero reserved fields.
2312            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2313
2314            // Safety:
2315            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2316            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2317            //   envelope_size bytes, there is always sufficient room.
2318            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
2319            self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
2320            encoder, offset + cur_offset, depth
2321        )?;
2322
2323            _prev_end_offset = cur_offset + envelope_size;
2324
2325            Ok(())
2326        }
2327    }
2328
2329    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Case {
2330        #[inline(always)]
2331        fn new_empty() -> Self {
2332            Self::default()
2333        }
2334
2335        unsafe fn decode(
2336            &mut self,
2337            decoder: &mut fidl::encoding::Decoder<'_, D>,
2338            offset: usize,
2339            mut depth: fidl::encoding::Depth,
2340        ) -> fidl::Result<()> {
2341            decoder.debug_check_bounds::<Self>(offset);
2342            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2343                None => return Err(fidl::Error::NotNullable),
2344                Some(len) => len,
2345            };
2346            // Calling decoder.out_of_line_offset(0) is not allowed.
2347            if len == 0 {
2348                return Ok(());
2349            };
2350            depth.increment()?;
2351            let envelope_size = 8;
2352            let bytes_len = len * envelope_size;
2353            let offset = decoder.out_of_line_offset(bytes_len)?;
2354            // Decode the envelope for each type.
2355            let mut _next_ordinal_to_read = 0;
2356            let mut next_offset = offset;
2357            let end_offset = offset + bytes_len;
2358            _next_ordinal_to_read += 1;
2359            if next_offset >= end_offset {
2360                return Ok(());
2361            }
2362
2363            // Decode unknown envelopes for gaps in ordinals.
2364            while _next_ordinal_to_read < 1 {
2365                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2366                _next_ordinal_to_read += 1;
2367                next_offset += envelope_size;
2368            }
2369
2370            let next_out_of_line = decoder.next_out_of_line();
2371            let handles_before = decoder.remaining_handles();
2372            if let Some((inlined, num_bytes, num_handles)) =
2373                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2374            {
2375                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2376                if inlined != (member_inline_size <= 4) {
2377                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2378                }
2379                let inner_offset;
2380                let mut inner_depth = depth.clone();
2381                if inlined {
2382                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2383                    inner_offset = next_offset;
2384                } else {
2385                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2386                    inner_depth.increment()?;
2387                }
2388                let val_ref = self.name.get_or_insert_with(|| {
2389                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
2390                });
2391                fidl::decode!(
2392                    fidl::encoding::BoundedString<2048>,
2393                    D,
2394                    val_ref,
2395                    decoder,
2396                    inner_offset,
2397                    inner_depth
2398                )?;
2399                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2400                {
2401                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2402                }
2403                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2404                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2405                }
2406            }
2407
2408            next_offset += envelope_size;
2409
2410            // Decode the remaining unknown envelopes.
2411            while next_offset < end_offset {
2412                _next_ordinal_to_read += 1;
2413                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2414                next_offset += envelope_size;
2415            }
2416
2417            Ok(())
2418        }
2419    }
2420
2421    impl RunOptions {
2422        #[inline(always)]
2423        fn max_ordinal_present(&self) -> u64 {
2424            if let Some(_) = self.no_exception_channel {
2425                return 9;
2426            }
2427            if let Some(_) = self.break_on_failure {
2428                return 8;
2429            }
2430            if let Some(_) = self.log_interest {
2431                return 7;
2432            }
2433            if let Some(_) = self.log_iterator {
2434                return 6;
2435            }
2436            if let Some(_) = self.case_filters_to_run {
2437                return 5;
2438            }
2439            if let Some(_) = self.timeout {
2440                return 4;
2441            }
2442            if let Some(_) = self.arguments {
2443                return 3;
2444            }
2445            if let Some(_) = self.parallel {
2446                return 2;
2447            }
2448            if let Some(_) = self.run_disabled_tests {
2449                return 1;
2450            }
2451            0
2452        }
2453    }
2454
2455    impl fidl::encoding::ValueTypeMarker for RunOptions {
2456        type Borrowed<'a> = &'a Self;
2457        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
2458            value
2459        }
2460    }
2461
2462    unsafe impl fidl::encoding::TypeMarker for RunOptions {
2463        type Owned = Self;
2464
2465        #[inline(always)]
2466        fn inline_align(_context: fidl::encoding::Context) -> usize {
2467            8
2468        }
2469
2470        #[inline(always)]
2471        fn inline_size(_context: fidl::encoding::Context) -> usize {
2472            16
2473        }
2474    }
2475
2476    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunOptions, D>
2477        for &RunOptions
2478    {
2479        unsafe fn encode(
2480            self,
2481            encoder: &mut fidl::encoding::Encoder<'_, D>,
2482            offset: usize,
2483            mut depth: fidl::encoding::Depth,
2484        ) -> fidl::Result<()> {
2485            encoder.debug_check_bounds::<RunOptions>(offset);
2486            // Vector header
2487            let max_ordinal: u64 = self.max_ordinal_present();
2488            encoder.write_num(max_ordinal, offset);
2489            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
2490            // Calling encoder.out_of_line_offset(0) is not allowed.
2491            if max_ordinal == 0 {
2492                return Ok(());
2493            }
2494            depth.increment()?;
2495            let envelope_size = 8;
2496            let bytes_len = max_ordinal as usize * envelope_size;
2497            #[allow(unused_variables)]
2498            let offset = encoder.out_of_line_offset(bytes_len);
2499            let mut _prev_end_offset: usize = 0;
2500            if 1 > max_ordinal {
2501                return Ok(());
2502            }
2503
2504            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2505            // are envelope_size bytes.
2506            let cur_offset: usize = (1 - 1) * envelope_size;
2507
2508            // Zero reserved fields.
2509            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2510
2511            // Safety:
2512            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2513            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2514            //   envelope_size bytes, there is always sufficient room.
2515            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2516                self.run_disabled_tests
2517                    .as_ref()
2518                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2519                encoder,
2520                offset + cur_offset,
2521                depth,
2522            )?;
2523
2524            _prev_end_offset = cur_offset + envelope_size;
2525            if 2 > max_ordinal {
2526                return Ok(());
2527            }
2528
2529            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2530            // are envelope_size bytes.
2531            let cur_offset: usize = (2 - 1) * envelope_size;
2532
2533            // Zero reserved fields.
2534            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2535
2536            // Safety:
2537            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2538            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2539            //   envelope_size bytes, there is always sufficient room.
2540            fidl::encoding::encode_in_envelope_optional::<u16, D>(
2541                self.parallel.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
2542                encoder,
2543                offset + cur_offset,
2544                depth,
2545            )?;
2546
2547            _prev_end_offset = cur_offset + envelope_size;
2548            if 3 > max_ordinal {
2549                return Ok(());
2550            }
2551
2552            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2553            // are envelope_size bytes.
2554            let cur_offset: usize = (3 - 1) * envelope_size;
2555
2556            // Zero reserved fields.
2557            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2558
2559            // Safety:
2560            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2561            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2562            //   envelope_size bytes, there is always sufficient room.
2563            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2564            self.arguments.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2565            encoder, offset + cur_offset, depth
2566        )?;
2567
2568            _prev_end_offset = cur_offset + envelope_size;
2569            if 4 > max_ordinal {
2570                return Ok(());
2571            }
2572
2573            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2574            // are envelope_size bytes.
2575            let cur_offset: usize = (4 - 1) * envelope_size;
2576
2577            // Zero reserved fields.
2578            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2579
2580            // Safety:
2581            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2582            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2583            //   envelope_size bytes, there is always sufficient room.
2584            fidl::encoding::encode_in_envelope_optional::<i64, D>(
2585                self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
2586                encoder,
2587                offset + cur_offset,
2588                depth,
2589            )?;
2590
2591            _prev_end_offset = cur_offset + envelope_size;
2592            if 5 > max_ordinal {
2593                return Ok(());
2594            }
2595
2596            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2597            // are envelope_size bytes.
2598            let cur_offset: usize = (5 - 1) * envelope_size;
2599
2600            // Zero reserved fields.
2601            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2602
2603            // Safety:
2604            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2605            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2606            //   envelope_size bytes, there is always sufficient room.
2607            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
2608            self.case_filters_to_run.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
2609            encoder, offset + cur_offset, depth
2610        )?;
2611
2612            _prev_end_offset = cur_offset + envelope_size;
2613            if 6 > max_ordinal {
2614                return Ok(());
2615            }
2616
2617            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2618            // are envelope_size bytes.
2619            let cur_offset: usize = (6 - 1) * envelope_size;
2620
2621            // Zero reserved fields.
2622            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2623
2624            // Safety:
2625            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2626            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2627            //   envelope_size bytes, there is always sufficient room.
2628            fidl::encoding::encode_in_envelope_optional::<LogsIteratorOption, D>(
2629                self.log_iterator
2630                    .as_ref()
2631                    .map(<LogsIteratorOption as fidl::encoding::ValueTypeMarker>::borrow),
2632                encoder,
2633                offset + cur_offset,
2634                depth,
2635            )?;
2636
2637            _prev_end_offset = cur_offset + envelope_size;
2638            if 7 > max_ordinal {
2639                return Ok(());
2640            }
2641
2642            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2643            // are envelope_size bytes.
2644            let cur_offset: usize = (7 - 1) * envelope_size;
2645
2646            // Zero reserved fields.
2647            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2648
2649            // Safety:
2650            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2651            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2652            //   envelope_size bytes, there is always sufficient room.
2653            fidl::encoding::encode_in_envelope_optional::<
2654                fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>,
2655                D,
2656            >(
2657                self.log_interest.as_ref().map(
2658                    <fidl::encoding::Vector<
2659                        fidl_fuchsia_diagnostics__common::LogInterestSelector,
2660                        64,
2661                    > as fidl::encoding::ValueTypeMarker>::borrow,
2662                ),
2663                encoder,
2664                offset + cur_offset,
2665                depth,
2666            )?;
2667
2668            _prev_end_offset = cur_offset + envelope_size;
2669            if 8 > max_ordinal {
2670                return Ok(());
2671            }
2672
2673            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2674            // are envelope_size bytes.
2675            let cur_offset: usize = (8 - 1) * envelope_size;
2676
2677            // Zero reserved fields.
2678            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2679
2680            // Safety:
2681            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2682            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2683            //   envelope_size bytes, there is always sufficient room.
2684            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2685                self.break_on_failure
2686                    .as_ref()
2687                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2688                encoder,
2689                offset + cur_offset,
2690                depth,
2691            )?;
2692
2693            _prev_end_offset = cur_offset + envelope_size;
2694            if 9 > max_ordinal {
2695                return Ok(());
2696            }
2697
2698            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
2699            // are envelope_size bytes.
2700            let cur_offset: usize = (9 - 1) * envelope_size;
2701
2702            // Zero reserved fields.
2703            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
2704
2705            // Safety:
2706            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
2707            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
2708            //   envelope_size bytes, there is always sufficient room.
2709            fidl::encoding::encode_in_envelope_optional::<bool, D>(
2710                self.no_exception_channel
2711                    .as_ref()
2712                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
2713                encoder,
2714                offset + cur_offset,
2715                depth,
2716            )?;
2717
2718            _prev_end_offset = cur_offset + envelope_size;
2719
2720            Ok(())
2721        }
2722    }
2723
2724    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunOptions {
2725        #[inline(always)]
2726        fn new_empty() -> Self {
2727            Self::default()
2728        }
2729
2730        unsafe fn decode(
2731            &mut self,
2732            decoder: &mut fidl::encoding::Decoder<'_, D>,
2733            offset: usize,
2734            mut depth: fidl::encoding::Depth,
2735        ) -> fidl::Result<()> {
2736            decoder.debug_check_bounds::<Self>(offset);
2737            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
2738                None => return Err(fidl::Error::NotNullable),
2739                Some(len) => len,
2740            };
2741            // Calling decoder.out_of_line_offset(0) is not allowed.
2742            if len == 0 {
2743                return Ok(());
2744            };
2745            depth.increment()?;
2746            let envelope_size = 8;
2747            let bytes_len = len * envelope_size;
2748            let offset = decoder.out_of_line_offset(bytes_len)?;
2749            // Decode the envelope for each type.
2750            let mut _next_ordinal_to_read = 0;
2751            let mut next_offset = offset;
2752            let end_offset = offset + bytes_len;
2753            _next_ordinal_to_read += 1;
2754            if next_offset >= end_offset {
2755                return Ok(());
2756            }
2757
2758            // Decode unknown envelopes for gaps in ordinals.
2759            while _next_ordinal_to_read < 1 {
2760                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2761                _next_ordinal_to_read += 1;
2762                next_offset += envelope_size;
2763            }
2764
2765            let next_out_of_line = decoder.next_out_of_line();
2766            let handles_before = decoder.remaining_handles();
2767            if let Some((inlined, num_bytes, num_handles)) =
2768                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2769            {
2770                let member_inline_size =
2771                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2772                if inlined != (member_inline_size <= 4) {
2773                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2774                }
2775                let inner_offset;
2776                let mut inner_depth = depth.clone();
2777                if inlined {
2778                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2779                    inner_offset = next_offset;
2780                } else {
2781                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2782                    inner_depth.increment()?;
2783                }
2784                let val_ref =
2785                    self.run_disabled_tests.get_or_insert_with(|| fidl::new_empty!(bool, D));
2786                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
2787                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2788                {
2789                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2790                }
2791                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2792                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2793                }
2794            }
2795
2796            next_offset += envelope_size;
2797            _next_ordinal_to_read += 1;
2798            if next_offset >= end_offset {
2799                return Ok(());
2800            }
2801
2802            // Decode unknown envelopes for gaps in ordinals.
2803            while _next_ordinal_to_read < 2 {
2804                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2805                _next_ordinal_to_read += 1;
2806                next_offset += envelope_size;
2807            }
2808
2809            let next_out_of_line = decoder.next_out_of_line();
2810            let handles_before = decoder.remaining_handles();
2811            if let Some((inlined, num_bytes, num_handles)) =
2812                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2813            {
2814                let member_inline_size =
2815                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2816                if inlined != (member_inline_size <= 4) {
2817                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2818                }
2819                let inner_offset;
2820                let mut inner_depth = depth.clone();
2821                if inlined {
2822                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2823                    inner_offset = next_offset;
2824                } else {
2825                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2826                    inner_depth.increment()?;
2827                }
2828                let val_ref = self.parallel.get_or_insert_with(|| fidl::new_empty!(u16, D));
2829                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
2830                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2831                {
2832                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2833                }
2834                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2835                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2836                }
2837            }
2838
2839            next_offset += envelope_size;
2840            _next_ordinal_to_read += 1;
2841            if next_offset >= end_offset {
2842                return Ok(());
2843            }
2844
2845            // Decode unknown envelopes for gaps in ordinals.
2846            while _next_ordinal_to_read < 3 {
2847                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2848                _next_ordinal_to_read += 1;
2849                next_offset += envelope_size;
2850            }
2851
2852            let next_out_of_line = decoder.next_out_of_line();
2853            let handles_before = decoder.remaining_handles();
2854            if let Some((inlined, num_bytes, num_handles)) =
2855                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2856            {
2857                let member_inline_size = <fidl::encoding::UnboundedVector<
2858                    fidl::encoding::UnboundedString,
2859                > as fidl::encoding::TypeMarker>::inline_size(
2860                    decoder.context
2861                );
2862                if inlined != (member_inline_size <= 4) {
2863                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2864                }
2865                let inner_offset;
2866                let mut inner_depth = depth.clone();
2867                if inlined {
2868                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2869                    inner_offset = next_offset;
2870                } else {
2871                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2872                    inner_depth.increment()?;
2873                }
2874                let val_ref = self.arguments.get_or_insert_with(|| {
2875                    fidl::new_empty!(
2876                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2877                        D
2878                    )
2879                });
2880                fidl::decode!(
2881                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2882                    D,
2883                    val_ref,
2884                    decoder,
2885                    inner_offset,
2886                    inner_depth
2887                )?;
2888                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2889                {
2890                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2891                }
2892                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2893                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2894                }
2895            }
2896
2897            next_offset += envelope_size;
2898            _next_ordinal_to_read += 1;
2899            if next_offset >= end_offset {
2900                return Ok(());
2901            }
2902
2903            // Decode unknown envelopes for gaps in ordinals.
2904            while _next_ordinal_to_read < 4 {
2905                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2906                _next_ordinal_to_read += 1;
2907                next_offset += envelope_size;
2908            }
2909
2910            let next_out_of_line = decoder.next_out_of_line();
2911            let handles_before = decoder.remaining_handles();
2912            if let Some((inlined, num_bytes, num_handles)) =
2913                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2914            {
2915                let member_inline_size =
2916                    <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
2917                if inlined != (member_inline_size <= 4) {
2918                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2919                }
2920                let inner_offset;
2921                let mut inner_depth = depth.clone();
2922                if inlined {
2923                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2924                    inner_offset = next_offset;
2925                } else {
2926                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2927                    inner_depth.increment()?;
2928                }
2929                let val_ref = self.timeout.get_or_insert_with(|| fidl::new_empty!(i64, D));
2930                fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
2931                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2932                {
2933                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2934                }
2935                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2936                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2937                }
2938            }
2939
2940            next_offset += envelope_size;
2941            _next_ordinal_to_read += 1;
2942            if next_offset >= end_offset {
2943                return Ok(());
2944            }
2945
2946            // Decode unknown envelopes for gaps in ordinals.
2947            while _next_ordinal_to_read < 5 {
2948                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
2949                _next_ordinal_to_read += 1;
2950                next_offset += envelope_size;
2951            }
2952
2953            let next_out_of_line = decoder.next_out_of_line();
2954            let handles_before = decoder.remaining_handles();
2955            if let Some((inlined, num_bytes, num_handles)) =
2956                fidl::encoding::decode_envelope_header(decoder, next_offset)?
2957            {
2958                let member_inline_size = <fidl::encoding::UnboundedVector<
2959                    fidl::encoding::UnboundedString,
2960                > as fidl::encoding::TypeMarker>::inline_size(
2961                    decoder.context
2962                );
2963                if inlined != (member_inline_size <= 4) {
2964                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
2965                }
2966                let inner_offset;
2967                let mut inner_depth = depth.clone();
2968                if inlined {
2969                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
2970                    inner_offset = next_offset;
2971                } else {
2972                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
2973                    inner_depth.increment()?;
2974                }
2975                let val_ref = self.case_filters_to_run.get_or_insert_with(|| {
2976                    fidl::new_empty!(
2977                        fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2978                        D
2979                    )
2980                });
2981                fidl::decode!(
2982                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
2983                    D,
2984                    val_ref,
2985                    decoder,
2986                    inner_offset,
2987                    inner_depth
2988                )?;
2989                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
2990                {
2991                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
2992                }
2993                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
2994                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
2995                }
2996            }
2997
2998            next_offset += envelope_size;
2999            _next_ordinal_to_read += 1;
3000            if next_offset >= end_offset {
3001                return Ok(());
3002            }
3003
3004            // Decode unknown envelopes for gaps in ordinals.
3005            while _next_ordinal_to_read < 6 {
3006                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3007                _next_ordinal_to_read += 1;
3008                next_offset += envelope_size;
3009            }
3010
3011            let next_out_of_line = decoder.next_out_of_line();
3012            let handles_before = decoder.remaining_handles();
3013            if let Some((inlined, num_bytes, num_handles)) =
3014                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3015            {
3016                let member_inline_size =
3017                    <LogsIteratorOption as fidl::encoding::TypeMarker>::inline_size(
3018                        decoder.context,
3019                    );
3020                if inlined != (member_inline_size <= 4) {
3021                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3022                }
3023                let inner_offset;
3024                let mut inner_depth = depth.clone();
3025                if inlined {
3026                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3027                    inner_offset = next_offset;
3028                } else {
3029                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3030                    inner_depth.increment()?;
3031                }
3032                let val_ref = self
3033                    .log_iterator
3034                    .get_or_insert_with(|| fidl::new_empty!(LogsIteratorOption, D));
3035                fidl::decode!(LogsIteratorOption, D, val_ref, decoder, inner_offset, inner_depth)?;
3036                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3037                {
3038                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3039                }
3040                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3041                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3042                }
3043            }
3044
3045            next_offset += envelope_size;
3046            _next_ordinal_to_read += 1;
3047            if next_offset >= end_offset {
3048                return Ok(());
3049            }
3050
3051            // Decode unknown envelopes for gaps in ordinals.
3052            while _next_ordinal_to_read < 7 {
3053                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3054                _next_ordinal_to_read += 1;
3055                next_offset += envelope_size;
3056            }
3057
3058            let next_out_of_line = decoder.next_out_of_line();
3059            let handles_before = decoder.remaining_handles();
3060            if let Some((inlined, num_bytes, num_handles)) =
3061                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3062            {
3063                let member_inline_size = <fidl::encoding::Vector<
3064                    fidl_fuchsia_diagnostics__common::LogInterestSelector,
3065                    64,
3066                > as fidl::encoding::TypeMarker>::inline_size(
3067                    decoder.context
3068                );
3069                if inlined != (member_inline_size <= 4) {
3070                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3071                }
3072                let inner_offset;
3073                let mut inner_depth = depth.clone();
3074                if inlined {
3075                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3076                    inner_offset = next_offset;
3077                } else {
3078                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3079                    inner_depth.increment()?;
3080                }
3081                let val_ref =
3082                self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D));
3083                fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics__common::LogInterestSelector, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
3084                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3085                {
3086                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3087                }
3088                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3089                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3090                }
3091            }
3092
3093            next_offset += envelope_size;
3094            _next_ordinal_to_read += 1;
3095            if next_offset >= end_offset {
3096                return Ok(());
3097            }
3098
3099            // Decode unknown envelopes for gaps in ordinals.
3100            while _next_ordinal_to_read < 8 {
3101                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3102                _next_ordinal_to_read += 1;
3103                next_offset += envelope_size;
3104            }
3105
3106            let next_out_of_line = decoder.next_out_of_line();
3107            let handles_before = decoder.remaining_handles();
3108            if let Some((inlined, num_bytes, num_handles)) =
3109                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3110            {
3111                let member_inline_size =
3112                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3113                if inlined != (member_inline_size <= 4) {
3114                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3115                }
3116                let inner_offset;
3117                let mut inner_depth = depth.clone();
3118                if inlined {
3119                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3120                    inner_offset = next_offset;
3121                } else {
3122                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3123                    inner_depth.increment()?;
3124                }
3125                let val_ref =
3126                    self.break_on_failure.get_or_insert_with(|| fidl::new_empty!(bool, D));
3127                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3128                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3129                {
3130                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3131                }
3132                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3133                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3134                }
3135            }
3136
3137            next_offset += envelope_size;
3138            _next_ordinal_to_read += 1;
3139            if next_offset >= end_offset {
3140                return Ok(());
3141            }
3142
3143            // Decode unknown envelopes for gaps in ordinals.
3144            while _next_ordinal_to_read < 9 {
3145                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3146                _next_ordinal_to_read += 1;
3147                next_offset += envelope_size;
3148            }
3149
3150            let next_out_of_line = decoder.next_out_of_line();
3151            let handles_before = decoder.remaining_handles();
3152            if let Some((inlined, num_bytes, num_handles)) =
3153                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3154            {
3155                let member_inline_size =
3156                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3157                if inlined != (member_inline_size <= 4) {
3158                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3159                }
3160                let inner_offset;
3161                let mut inner_depth = depth.clone();
3162                if inlined {
3163                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3164                    inner_offset = next_offset;
3165                } else {
3166                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3167                    inner_depth.increment()?;
3168                }
3169                let val_ref =
3170                    self.no_exception_channel.get_or_insert_with(|| fidl::new_empty!(bool, D));
3171                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3172                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3173                {
3174                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3175                }
3176                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3177                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3178                }
3179            }
3180
3181            next_offset += envelope_size;
3182
3183            // Decode the remaining unknown envelopes.
3184            while next_offset < end_offset {
3185                _next_ordinal_to_read += 1;
3186                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3187                next_offset += envelope_size;
3188            }
3189
3190            Ok(())
3191        }
3192    }
3193
3194    impl SchedulingOptions {
3195        #[inline(always)]
3196        fn max_ordinal_present(&self) -> u64 {
3197            if let Some(_) = self.accumulate_debug_data {
3198                return 2;
3199            }
3200            if let Some(_) = self.max_parallel_suites {
3201                return 1;
3202            }
3203            0
3204        }
3205    }
3206
3207    impl fidl::encoding::ValueTypeMarker for SchedulingOptions {
3208        type Borrowed<'a> = &'a Self;
3209        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3210            value
3211        }
3212    }
3213
3214    unsafe impl fidl::encoding::TypeMarker for SchedulingOptions {
3215        type Owned = Self;
3216
3217        #[inline(always)]
3218        fn inline_align(_context: fidl::encoding::Context) -> usize {
3219            8
3220        }
3221
3222        #[inline(always)]
3223        fn inline_size(_context: fidl::encoding::Context) -> usize {
3224            16
3225        }
3226    }
3227
3228    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SchedulingOptions, D>
3229        for &SchedulingOptions
3230    {
3231        unsafe fn encode(
3232            self,
3233            encoder: &mut fidl::encoding::Encoder<'_, D>,
3234            offset: usize,
3235            mut depth: fidl::encoding::Depth,
3236        ) -> fidl::Result<()> {
3237            encoder.debug_check_bounds::<SchedulingOptions>(offset);
3238            // Vector header
3239            let max_ordinal: u64 = self.max_ordinal_present();
3240            encoder.write_num(max_ordinal, offset);
3241            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3242            // Calling encoder.out_of_line_offset(0) is not allowed.
3243            if max_ordinal == 0 {
3244                return Ok(());
3245            }
3246            depth.increment()?;
3247            let envelope_size = 8;
3248            let bytes_len = max_ordinal as usize * envelope_size;
3249            #[allow(unused_variables)]
3250            let offset = encoder.out_of_line_offset(bytes_len);
3251            let mut _prev_end_offset: usize = 0;
3252            if 1 > max_ordinal {
3253                return Ok(());
3254            }
3255
3256            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3257            // are envelope_size bytes.
3258            let cur_offset: usize = (1 - 1) * envelope_size;
3259
3260            // Zero reserved fields.
3261            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3262
3263            // Safety:
3264            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3265            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3266            //   envelope_size bytes, there is always sufficient room.
3267            fidl::encoding::encode_in_envelope_optional::<u16, D>(
3268                self.max_parallel_suites
3269                    .as_ref()
3270                    .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
3271                encoder,
3272                offset + cur_offset,
3273                depth,
3274            )?;
3275
3276            _prev_end_offset = cur_offset + envelope_size;
3277            if 2 > max_ordinal {
3278                return Ok(());
3279            }
3280
3281            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3282            // are envelope_size bytes.
3283            let cur_offset: usize = (2 - 1) * envelope_size;
3284
3285            // Zero reserved fields.
3286            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3287
3288            // Safety:
3289            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3290            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3291            //   envelope_size bytes, there is always sufficient room.
3292            fidl::encoding::encode_in_envelope_optional::<bool, D>(
3293                self.accumulate_debug_data
3294                    .as_ref()
3295                    .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
3296                encoder,
3297                offset + cur_offset,
3298                depth,
3299            )?;
3300
3301            _prev_end_offset = cur_offset + envelope_size;
3302
3303            Ok(())
3304        }
3305    }
3306
3307    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SchedulingOptions {
3308        #[inline(always)]
3309        fn new_empty() -> Self {
3310            Self::default()
3311        }
3312
3313        unsafe fn decode(
3314            &mut self,
3315            decoder: &mut fidl::encoding::Decoder<'_, D>,
3316            offset: usize,
3317            mut depth: fidl::encoding::Depth,
3318        ) -> fidl::Result<()> {
3319            decoder.debug_check_bounds::<Self>(offset);
3320            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3321                None => return Err(fidl::Error::NotNullable),
3322                Some(len) => len,
3323            };
3324            // Calling decoder.out_of_line_offset(0) is not allowed.
3325            if len == 0 {
3326                return Ok(());
3327            };
3328            depth.increment()?;
3329            let envelope_size = 8;
3330            let bytes_len = len * envelope_size;
3331            let offset = decoder.out_of_line_offset(bytes_len)?;
3332            // Decode the envelope for each type.
3333            let mut _next_ordinal_to_read = 0;
3334            let mut next_offset = offset;
3335            let end_offset = offset + bytes_len;
3336            _next_ordinal_to_read += 1;
3337            if next_offset >= end_offset {
3338                return Ok(());
3339            }
3340
3341            // Decode unknown envelopes for gaps in ordinals.
3342            while _next_ordinal_to_read < 1 {
3343                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3344                _next_ordinal_to_read += 1;
3345                next_offset += envelope_size;
3346            }
3347
3348            let next_out_of_line = decoder.next_out_of_line();
3349            let handles_before = decoder.remaining_handles();
3350            if let Some((inlined, num_bytes, num_handles)) =
3351                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3352            {
3353                let member_inline_size =
3354                    <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3355                if inlined != (member_inline_size <= 4) {
3356                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3357                }
3358                let inner_offset;
3359                let mut inner_depth = depth.clone();
3360                if inlined {
3361                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3362                    inner_offset = next_offset;
3363                } else {
3364                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3365                    inner_depth.increment()?;
3366                }
3367                let val_ref =
3368                    self.max_parallel_suites.get_or_insert_with(|| fidl::new_empty!(u16, D));
3369                fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
3370                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3371                {
3372                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3373                }
3374                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3375                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3376                }
3377            }
3378
3379            next_offset += envelope_size;
3380            _next_ordinal_to_read += 1;
3381            if next_offset >= end_offset {
3382                return Ok(());
3383            }
3384
3385            // Decode unknown envelopes for gaps in ordinals.
3386            while _next_ordinal_to_read < 2 {
3387                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3388                _next_ordinal_to_read += 1;
3389                next_offset += envelope_size;
3390            }
3391
3392            let next_out_of_line = decoder.next_out_of_line();
3393            let handles_before = decoder.remaining_handles();
3394            if let Some((inlined, num_bytes, num_handles)) =
3395                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3396            {
3397                let member_inline_size =
3398                    <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3399                if inlined != (member_inline_size <= 4) {
3400                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3401                }
3402                let inner_offset;
3403                let mut inner_depth = depth.clone();
3404                if inlined {
3405                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3406                    inner_offset = next_offset;
3407                } else {
3408                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3409                    inner_depth.increment()?;
3410                }
3411                let val_ref =
3412                    self.accumulate_debug_data.get_or_insert_with(|| fidl::new_empty!(bool, D));
3413                fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
3414                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3415                {
3416                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3417                }
3418                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3419                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3420                }
3421            }
3422
3423            next_offset += envelope_size;
3424
3425            // Decode the remaining unknown envelopes.
3426            while next_offset < end_offset {
3427                _next_ordinal_to_read += 1;
3428                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3429                next_offset += envelope_size;
3430            }
3431
3432            Ok(())
3433        }
3434    }
3435
3436    impl SuiteStartedEventDetails {
3437        #[inline(always)]
3438        fn max_ordinal_present(&self) -> u64 {
3439            0
3440        }
3441    }
3442
3443    impl fidl::encoding::ValueTypeMarker for SuiteStartedEventDetails {
3444        type Borrowed<'a> = &'a Self;
3445        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3446            value
3447        }
3448    }
3449
3450    unsafe impl fidl::encoding::TypeMarker for SuiteStartedEventDetails {
3451        type Owned = Self;
3452
3453        #[inline(always)]
3454        fn inline_align(_context: fidl::encoding::Context) -> usize {
3455            8
3456        }
3457
3458        #[inline(always)]
3459        fn inline_size(_context: fidl::encoding::Context) -> usize {
3460            16
3461        }
3462    }
3463
3464    unsafe impl<D: fidl::encoding::ResourceDialect>
3465        fidl::encoding::Encode<SuiteStartedEventDetails, D> for &SuiteStartedEventDetails
3466    {
3467        unsafe fn encode(
3468            self,
3469            encoder: &mut fidl::encoding::Encoder<'_, D>,
3470            offset: usize,
3471            mut depth: fidl::encoding::Depth,
3472        ) -> fidl::Result<()> {
3473            encoder.debug_check_bounds::<SuiteStartedEventDetails>(offset);
3474            // Vector header
3475            let max_ordinal: u64 = self.max_ordinal_present();
3476            encoder.write_num(max_ordinal, offset);
3477            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3478            // Calling encoder.out_of_line_offset(0) is not allowed.
3479            if max_ordinal == 0 {
3480                return Ok(());
3481            }
3482            depth.increment()?;
3483            let envelope_size = 8;
3484            let bytes_len = max_ordinal as usize * envelope_size;
3485            #[allow(unused_variables)]
3486            let offset = encoder.out_of_line_offset(bytes_len);
3487            let mut _prev_end_offset: usize = 0;
3488
3489            Ok(())
3490        }
3491    }
3492
3493    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3494        for SuiteStartedEventDetails
3495    {
3496        #[inline(always)]
3497        fn new_empty() -> Self {
3498            Self::default()
3499        }
3500
3501        unsafe fn decode(
3502            &mut self,
3503            decoder: &mut fidl::encoding::Decoder<'_, D>,
3504            offset: usize,
3505            mut depth: fidl::encoding::Depth,
3506        ) -> fidl::Result<()> {
3507            decoder.debug_check_bounds::<Self>(offset);
3508            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3509                None => return Err(fidl::Error::NotNullable),
3510                Some(len) => len,
3511            };
3512            // Calling decoder.out_of_line_offset(0) is not allowed.
3513            if len == 0 {
3514                return Ok(());
3515            };
3516            depth.increment()?;
3517            let envelope_size = 8;
3518            let bytes_len = len * envelope_size;
3519            let offset = decoder.out_of_line_offset(bytes_len)?;
3520            // Decode the envelope for each type.
3521            let mut _next_ordinal_to_read = 0;
3522            let mut next_offset = offset;
3523            let end_offset = offset + bytes_len;
3524
3525            // Decode the remaining unknown envelopes.
3526            while next_offset < end_offset {
3527                _next_ordinal_to_read += 1;
3528                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3529                next_offset += envelope_size;
3530            }
3531
3532            Ok(())
3533        }
3534    }
3535
3536    impl SuiteStoppedEventDetails {
3537        #[inline(always)]
3538        fn max_ordinal_present(&self) -> u64 {
3539            if let Some(_) = self.result {
3540                return 1;
3541            }
3542            0
3543        }
3544    }
3545
3546    impl fidl::encoding::ValueTypeMarker for SuiteStoppedEventDetails {
3547        type Borrowed<'a> = &'a Self;
3548        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3549            value
3550        }
3551    }
3552
3553    unsafe impl fidl::encoding::TypeMarker for SuiteStoppedEventDetails {
3554        type Owned = Self;
3555
3556        #[inline(always)]
3557        fn inline_align(_context: fidl::encoding::Context) -> usize {
3558            8
3559        }
3560
3561        #[inline(always)]
3562        fn inline_size(_context: fidl::encoding::Context) -> usize {
3563            16
3564        }
3565    }
3566
3567    unsafe impl<D: fidl::encoding::ResourceDialect>
3568        fidl::encoding::Encode<SuiteStoppedEventDetails, D> for &SuiteStoppedEventDetails
3569    {
3570        unsafe fn encode(
3571            self,
3572            encoder: &mut fidl::encoding::Encoder<'_, D>,
3573            offset: usize,
3574            mut depth: fidl::encoding::Depth,
3575        ) -> fidl::Result<()> {
3576            encoder.debug_check_bounds::<SuiteStoppedEventDetails>(offset);
3577            // Vector header
3578            let max_ordinal: u64 = self.max_ordinal_present();
3579            encoder.write_num(max_ordinal, offset);
3580            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3581            // Calling encoder.out_of_line_offset(0) is not allowed.
3582            if max_ordinal == 0 {
3583                return Ok(());
3584            }
3585            depth.increment()?;
3586            let envelope_size = 8;
3587            let bytes_len = max_ordinal as usize * envelope_size;
3588            #[allow(unused_variables)]
3589            let offset = encoder.out_of_line_offset(bytes_len);
3590            let mut _prev_end_offset: usize = 0;
3591            if 1 > max_ordinal {
3592                return Ok(());
3593            }
3594
3595            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3596            // are envelope_size bytes.
3597            let cur_offset: usize = (1 - 1) * envelope_size;
3598
3599            // Zero reserved fields.
3600            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3601
3602            // Safety:
3603            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3604            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3605            //   envelope_size bytes, there is always sufficient room.
3606            fidl::encoding::encode_in_envelope_optional::<SuiteResult, D>(
3607                self.result.as_ref().map(<SuiteResult as fidl::encoding::ValueTypeMarker>::borrow),
3608                encoder,
3609                offset + cur_offset,
3610                depth,
3611            )?;
3612
3613            _prev_end_offset = cur_offset + envelope_size;
3614
3615            Ok(())
3616        }
3617    }
3618
3619    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3620        for SuiteStoppedEventDetails
3621    {
3622        #[inline(always)]
3623        fn new_empty() -> Self {
3624            Self::default()
3625        }
3626
3627        unsafe fn decode(
3628            &mut self,
3629            decoder: &mut fidl::encoding::Decoder<'_, D>,
3630            offset: usize,
3631            mut depth: fidl::encoding::Depth,
3632        ) -> fidl::Result<()> {
3633            decoder.debug_check_bounds::<Self>(offset);
3634            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3635                None => return Err(fidl::Error::NotNullable),
3636                Some(len) => len,
3637            };
3638            // Calling decoder.out_of_line_offset(0) is not allowed.
3639            if len == 0 {
3640                return Ok(());
3641            };
3642            depth.increment()?;
3643            let envelope_size = 8;
3644            let bytes_len = len * envelope_size;
3645            let offset = decoder.out_of_line_offset(bytes_len)?;
3646            // Decode the envelope for each type.
3647            let mut _next_ordinal_to_read = 0;
3648            let mut next_offset = offset;
3649            let end_offset = offset + bytes_len;
3650            _next_ordinal_to_read += 1;
3651            if next_offset >= end_offset {
3652                return Ok(());
3653            }
3654
3655            // Decode unknown envelopes for gaps in ordinals.
3656            while _next_ordinal_to_read < 1 {
3657                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3658                _next_ordinal_to_read += 1;
3659                next_offset += envelope_size;
3660            }
3661
3662            let next_out_of_line = decoder.next_out_of_line();
3663            let handles_before = decoder.remaining_handles();
3664            if let Some((inlined, num_bytes, num_handles)) =
3665                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3666            {
3667                let member_inline_size =
3668                    <SuiteResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3669                if inlined != (member_inline_size <= 4) {
3670                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3671                }
3672                let inner_offset;
3673                let mut inner_depth = depth.clone();
3674                if inlined {
3675                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3676                    inner_offset = next_offset;
3677                } else {
3678                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3679                    inner_depth.increment()?;
3680                }
3681                let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(SuiteResult, D));
3682                fidl::decode!(SuiteResult, D, val_ref, decoder, inner_offset, inner_depth)?;
3683                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3684                {
3685                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3686                }
3687                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3688                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3689                }
3690            }
3691
3692            next_offset += envelope_size;
3693
3694            // Decode the remaining unknown envelopes.
3695            while next_offset < end_offset {
3696                _next_ordinal_to_read += 1;
3697                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3698                next_offset += envelope_size;
3699            }
3700
3701            Ok(())
3702        }
3703    }
3704
3705    impl TestCase {
3706        #[inline(always)]
3707        fn max_ordinal_present(&self) -> u64 {
3708            if let Some(_) = self.name {
3709                return 1;
3710            }
3711            0
3712        }
3713    }
3714
3715    impl fidl::encoding::ValueTypeMarker for TestCase {
3716        type Borrowed<'a> = &'a Self;
3717        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3718            value
3719        }
3720    }
3721
3722    unsafe impl fidl::encoding::TypeMarker for TestCase {
3723        type Owned = Self;
3724
3725        #[inline(always)]
3726        fn inline_align(_context: fidl::encoding::Context) -> usize {
3727            8
3728        }
3729
3730        #[inline(always)]
3731        fn inline_size(_context: fidl::encoding::Context) -> usize {
3732            16
3733        }
3734    }
3735
3736    unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestCase, D> for &TestCase {
3737        unsafe fn encode(
3738            self,
3739            encoder: &mut fidl::encoding::Encoder<'_, D>,
3740            offset: usize,
3741            mut depth: fidl::encoding::Depth,
3742        ) -> fidl::Result<()> {
3743            encoder.debug_check_bounds::<TestCase>(offset);
3744            // Vector header
3745            let max_ordinal: u64 = self.max_ordinal_present();
3746            encoder.write_num(max_ordinal, offset);
3747            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3748            // Calling encoder.out_of_line_offset(0) is not allowed.
3749            if max_ordinal == 0 {
3750                return Ok(());
3751            }
3752            depth.increment()?;
3753            let envelope_size = 8;
3754            let bytes_len = max_ordinal as usize * envelope_size;
3755            #[allow(unused_variables)]
3756            let offset = encoder.out_of_line_offset(bytes_len);
3757            let mut _prev_end_offset: usize = 0;
3758            if 1 > max_ordinal {
3759                return Ok(());
3760            }
3761
3762            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3763            // are envelope_size bytes.
3764            let cur_offset: usize = (1 - 1) * envelope_size;
3765
3766            // Zero reserved fields.
3767            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3768
3769            // Safety:
3770            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3771            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3772            //   envelope_size bytes, there is always sufficient room.
3773            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
3774            self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
3775            encoder, offset + cur_offset, depth
3776        )?;
3777
3778            _prev_end_offset = cur_offset + envelope_size;
3779
3780            Ok(())
3781        }
3782    }
3783
3784    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCase {
3785        #[inline(always)]
3786        fn new_empty() -> Self {
3787            Self::default()
3788        }
3789
3790        unsafe fn decode(
3791            &mut self,
3792            decoder: &mut fidl::encoding::Decoder<'_, D>,
3793            offset: usize,
3794            mut depth: fidl::encoding::Depth,
3795        ) -> fidl::Result<()> {
3796            decoder.debug_check_bounds::<Self>(offset);
3797            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3798                None => return Err(fidl::Error::NotNullable),
3799                Some(len) => len,
3800            };
3801            // Calling decoder.out_of_line_offset(0) is not allowed.
3802            if len == 0 {
3803                return Ok(());
3804            };
3805            depth.increment()?;
3806            let envelope_size = 8;
3807            let bytes_len = len * envelope_size;
3808            let offset = decoder.out_of_line_offset(bytes_len)?;
3809            // Decode the envelope for each type.
3810            let mut _next_ordinal_to_read = 0;
3811            let mut next_offset = offset;
3812            let end_offset = offset + bytes_len;
3813            _next_ordinal_to_read += 1;
3814            if next_offset >= end_offset {
3815                return Ok(());
3816            }
3817
3818            // Decode unknown envelopes for gaps in ordinals.
3819            while _next_ordinal_to_read < 1 {
3820                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3821                _next_ordinal_to_read += 1;
3822                next_offset += envelope_size;
3823            }
3824
3825            let next_out_of_line = decoder.next_out_of_line();
3826            let handles_before = decoder.remaining_handles();
3827            if let Some((inlined, num_bytes, num_handles)) =
3828                fidl::encoding::decode_envelope_header(decoder, next_offset)?
3829            {
3830                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
3831                if inlined != (member_inline_size <= 4) {
3832                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
3833                }
3834                let inner_offset;
3835                let mut inner_depth = depth.clone();
3836                if inlined {
3837                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
3838                    inner_offset = next_offset;
3839                } else {
3840                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
3841                    inner_depth.increment()?;
3842                }
3843                let val_ref = self.name.get_or_insert_with(|| {
3844                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
3845                });
3846                fidl::decode!(
3847                    fidl::encoding::BoundedString<2048>,
3848                    D,
3849                    val_ref,
3850                    decoder,
3851                    inner_offset,
3852                    inner_depth
3853                )?;
3854                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
3855                {
3856                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
3857                }
3858                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
3859                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
3860                }
3861            }
3862
3863            next_offset += envelope_size;
3864
3865            // Decode the remaining unknown envelopes.
3866            while next_offset < end_offset {
3867                _next_ordinal_to_read += 1;
3868                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3869                next_offset += envelope_size;
3870            }
3871
3872            Ok(())
3873        }
3874    }
3875
3876    impl TestCaseFinishedEventDetails {
3877        #[inline(always)]
3878        fn max_ordinal_present(&self) -> u64 {
3879            if let Some(_) = self.test_case_id {
3880                return 1;
3881            }
3882            0
3883        }
3884    }
3885
3886    impl fidl::encoding::ValueTypeMarker for TestCaseFinishedEventDetails {
3887        type Borrowed<'a> = &'a Self;
3888        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
3889            value
3890        }
3891    }
3892
3893    unsafe impl fidl::encoding::TypeMarker for TestCaseFinishedEventDetails {
3894        type Owned = Self;
3895
3896        #[inline(always)]
3897        fn inline_align(_context: fidl::encoding::Context) -> usize {
3898            8
3899        }
3900
3901        #[inline(always)]
3902        fn inline_size(_context: fidl::encoding::Context) -> usize {
3903            16
3904        }
3905    }
3906
3907    unsafe impl<D: fidl::encoding::ResourceDialect>
3908        fidl::encoding::Encode<TestCaseFinishedEventDetails, D> for &TestCaseFinishedEventDetails
3909    {
3910        unsafe fn encode(
3911            self,
3912            encoder: &mut fidl::encoding::Encoder<'_, D>,
3913            offset: usize,
3914            mut depth: fidl::encoding::Depth,
3915        ) -> fidl::Result<()> {
3916            encoder.debug_check_bounds::<TestCaseFinishedEventDetails>(offset);
3917            // Vector header
3918            let max_ordinal: u64 = self.max_ordinal_present();
3919            encoder.write_num(max_ordinal, offset);
3920            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
3921            // Calling encoder.out_of_line_offset(0) is not allowed.
3922            if max_ordinal == 0 {
3923                return Ok(());
3924            }
3925            depth.increment()?;
3926            let envelope_size = 8;
3927            let bytes_len = max_ordinal as usize * envelope_size;
3928            #[allow(unused_variables)]
3929            let offset = encoder.out_of_line_offset(bytes_len);
3930            let mut _prev_end_offset: usize = 0;
3931            if 1 > max_ordinal {
3932                return Ok(());
3933            }
3934
3935            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
3936            // are envelope_size bytes.
3937            let cur_offset: usize = (1 - 1) * envelope_size;
3938
3939            // Zero reserved fields.
3940            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
3941
3942            // Safety:
3943            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
3944            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
3945            //   envelope_size bytes, there is always sufficient room.
3946            fidl::encoding::encode_in_envelope_optional::<u32, D>(
3947                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
3948                encoder,
3949                offset + cur_offset,
3950                depth,
3951            )?;
3952
3953            _prev_end_offset = cur_offset + envelope_size;
3954
3955            Ok(())
3956        }
3957    }
3958
3959    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
3960        for TestCaseFinishedEventDetails
3961    {
3962        #[inline(always)]
3963        fn new_empty() -> Self {
3964            Self::default()
3965        }
3966
3967        unsafe fn decode(
3968            &mut self,
3969            decoder: &mut fidl::encoding::Decoder<'_, D>,
3970            offset: usize,
3971            mut depth: fidl::encoding::Depth,
3972        ) -> fidl::Result<()> {
3973            decoder.debug_check_bounds::<Self>(offset);
3974            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
3975                None => return Err(fidl::Error::NotNullable),
3976                Some(len) => len,
3977            };
3978            // Calling decoder.out_of_line_offset(0) is not allowed.
3979            if len == 0 {
3980                return Ok(());
3981            };
3982            depth.increment()?;
3983            let envelope_size = 8;
3984            let bytes_len = len * envelope_size;
3985            let offset = decoder.out_of_line_offset(bytes_len)?;
3986            // Decode the envelope for each type.
3987            let mut _next_ordinal_to_read = 0;
3988            let mut next_offset = offset;
3989            let end_offset = offset + bytes_len;
3990            _next_ordinal_to_read += 1;
3991            if next_offset >= end_offset {
3992                return Ok(());
3993            }
3994
3995            // Decode unknown envelopes for gaps in ordinals.
3996            while _next_ordinal_to_read < 1 {
3997                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
3998                _next_ordinal_to_read += 1;
3999                next_offset += envelope_size;
4000            }
4001
4002            let next_out_of_line = decoder.next_out_of_line();
4003            let handles_before = decoder.remaining_handles();
4004            if let Some((inlined, num_bytes, num_handles)) =
4005                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4006            {
4007                let member_inline_size =
4008                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4009                if inlined != (member_inline_size <= 4) {
4010                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4011                }
4012                let inner_offset;
4013                let mut inner_depth = depth.clone();
4014                if inlined {
4015                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4016                    inner_offset = next_offset;
4017                } else {
4018                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4019                    inner_depth.increment()?;
4020                }
4021                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4022                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4023                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4024                {
4025                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4026                }
4027                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4028                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4029                }
4030            }
4031
4032            next_offset += envelope_size;
4033
4034            // Decode the remaining unknown envelopes.
4035            while next_offset < end_offset {
4036                _next_ordinal_to_read += 1;
4037                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4038                next_offset += envelope_size;
4039            }
4040
4041            Ok(())
4042        }
4043    }
4044
4045    impl TestCaseFoundEventDetails {
4046        #[inline(always)]
4047        fn max_ordinal_present(&self) -> u64 {
4048            if let Some(_) = self.test_case_id {
4049                return 2;
4050            }
4051            if let Some(_) = self.test_case_name {
4052                return 1;
4053            }
4054            0
4055        }
4056    }
4057
4058    impl fidl::encoding::ValueTypeMarker for TestCaseFoundEventDetails {
4059        type Borrowed<'a> = &'a Self;
4060        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4061            value
4062        }
4063    }
4064
4065    unsafe impl fidl::encoding::TypeMarker for TestCaseFoundEventDetails {
4066        type Owned = Self;
4067
4068        #[inline(always)]
4069        fn inline_align(_context: fidl::encoding::Context) -> usize {
4070            8
4071        }
4072
4073        #[inline(always)]
4074        fn inline_size(_context: fidl::encoding::Context) -> usize {
4075            16
4076        }
4077    }
4078
4079    unsafe impl<D: fidl::encoding::ResourceDialect>
4080        fidl::encoding::Encode<TestCaseFoundEventDetails, D> for &TestCaseFoundEventDetails
4081    {
4082        unsafe fn encode(
4083            self,
4084            encoder: &mut fidl::encoding::Encoder<'_, D>,
4085            offset: usize,
4086            mut depth: fidl::encoding::Depth,
4087        ) -> fidl::Result<()> {
4088            encoder.debug_check_bounds::<TestCaseFoundEventDetails>(offset);
4089            // Vector header
4090            let max_ordinal: u64 = self.max_ordinal_present();
4091            encoder.write_num(max_ordinal, offset);
4092            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4093            // Calling encoder.out_of_line_offset(0) is not allowed.
4094            if max_ordinal == 0 {
4095                return Ok(());
4096            }
4097            depth.increment()?;
4098            let envelope_size = 8;
4099            let bytes_len = max_ordinal as usize * envelope_size;
4100            #[allow(unused_variables)]
4101            let offset = encoder.out_of_line_offset(bytes_len);
4102            let mut _prev_end_offset: usize = 0;
4103            if 1 > max_ordinal {
4104                return Ok(());
4105            }
4106
4107            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4108            // are envelope_size bytes.
4109            let cur_offset: usize = (1 - 1) * envelope_size;
4110
4111            // Zero reserved fields.
4112            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4113
4114            // Safety:
4115            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4116            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4117            //   envelope_size bytes, there is always sufficient room.
4118            fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
4119            self.test_case_name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
4120            encoder, offset + cur_offset, depth
4121        )?;
4122
4123            _prev_end_offset = cur_offset + envelope_size;
4124            if 2 > max_ordinal {
4125                return Ok(());
4126            }
4127
4128            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4129            // are envelope_size bytes.
4130            let cur_offset: usize = (2 - 1) * envelope_size;
4131
4132            // Zero reserved fields.
4133            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4134
4135            // Safety:
4136            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4137            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4138            //   envelope_size bytes, there is always sufficient room.
4139            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4140                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4141                encoder,
4142                offset + cur_offset,
4143                depth,
4144            )?;
4145
4146            _prev_end_offset = cur_offset + envelope_size;
4147
4148            Ok(())
4149        }
4150    }
4151
4152    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4153        for TestCaseFoundEventDetails
4154    {
4155        #[inline(always)]
4156        fn new_empty() -> Self {
4157            Self::default()
4158        }
4159
4160        unsafe fn decode(
4161            &mut self,
4162            decoder: &mut fidl::encoding::Decoder<'_, D>,
4163            offset: usize,
4164            mut depth: fidl::encoding::Depth,
4165        ) -> fidl::Result<()> {
4166            decoder.debug_check_bounds::<Self>(offset);
4167            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4168                None => return Err(fidl::Error::NotNullable),
4169                Some(len) => len,
4170            };
4171            // Calling decoder.out_of_line_offset(0) is not allowed.
4172            if len == 0 {
4173                return Ok(());
4174            };
4175            depth.increment()?;
4176            let envelope_size = 8;
4177            let bytes_len = len * envelope_size;
4178            let offset = decoder.out_of_line_offset(bytes_len)?;
4179            // Decode the envelope for each type.
4180            let mut _next_ordinal_to_read = 0;
4181            let mut next_offset = offset;
4182            let end_offset = offset + bytes_len;
4183            _next_ordinal_to_read += 1;
4184            if next_offset >= end_offset {
4185                return Ok(());
4186            }
4187
4188            // Decode unknown envelopes for gaps in ordinals.
4189            while _next_ordinal_to_read < 1 {
4190                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4191                _next_ordinal_to_read += 1;
4192                next_offset += envelope_size;
4193            }
4194
4195            let next_out_of_line = decoder.next_out_of_line();
4196            let handles_before = decoder.remaining_handles();
4197            if let Some((inlined, num_bytes, num_handles)) =
4198                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4199            {
4200                let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4201                if inlined != (member_inline_size <= 4) {
4202                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4203                }
4204                let inner_offset;
4205                let mut inner_depth = depth.clone();
4206                if inlined {
4207                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4208                    inner_offset = next_offset;
4209                } else {
4210                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4211                    inner_depth.increment()?;
4212                }
4213                let val_ref = self.test_case_name.get_or_insert_with(|| {
4214                    fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
4215                });
4216                fidl::decode!(
4217                    fidl::encoding::BoundedString<2048>,
4218                    D,
4219                    val_ref,
4220                    decoder,
4221                    inner_offset,
4222                    inner_depth
4223                )?;
4224                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4225                {
4226                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4227                }
4228                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4229                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4230                }
4231            }
4232
4233            next_offset += envelope_size;
4234            _next_ordinal_to_read += 1;
4235            if next_offset >= end_offset {
4236                return Ok(());
4237            }
4238
4239            // Decode unknown envelopes for gaps in ordinals.
4240            while _next_ordinal_to_read < 2 {
4241                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4242                _next_ordinal_to_read += 1;
4243                next_offset += envelope_size;
4244            }
4245
4246            let next_out_of_line = decoder.next_out_of_line();
4247            let handles_before = decoder.remaining_handles();
4248            if let Some((inlined, num_bytes, num_handles)) =
4249                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4250            {
4251                let member_inline_size =
4252                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4253                if inlined != (member_inline_size <= 4) {
4254                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4255                }
4256                let inner_offset;
4257                let mut inner_depth = depth.clone();
4258                if inlined {
4259                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4260                    inner_offset = next_offset;
4261                } else {
4262                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4263                    inner_depth.increment()?;
4264                }
4265                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4266                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4267                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4268                {
4269                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4270                }
4271                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4272                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4273                }
4274            }
4275
4276            next_offset += envelope_size;
4277
4278            // Decode the remaining unknown envelopes.
4279            while next_offset < end_offset {
4280                _next_ordinal_to_read += 1;
4281                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4282                next_offset += envelope_size;
4283            }
4284
4285            Ok(())
4286        }
4287    }
4288
4289    impl TestCaseStartedEventDetails {
4290        #[inline(always)]
4291        fn max_ordinal_present(&self) -> u64 {
4292            if let Some(_) = self.test_case_id {
4293                return 1;
4294            }
4295            0
4296        }
4297    }
4298
4299    impl fidl::encoding::ValueTypeMarker for TestCaseStartedEventDetails {
4300        type Borrowed<'a> = &'a Self;
4301        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4302            value
4303        }
4304    }
4305
4306    unsafe impl fidl::encoding::TypeMarker for TestCaseStartedEventDetails {
4307        type Owned = Self;
4308
4309        #[inline(always)]
4310        fn inline_align(_context: fidl::encoding::Context) -> usize {
4311            8
4312        }
4313
4314        #[inline(always)]
4315        fn inline_size(_context: fidl::encoding::Context) -> usize {
4316            16
4317        }
4318    }
4319
4320    unsafe impl<D: fidl::encoding::ResourceDialect>
4321        fidl::encoding::Encode<TestCaseStartedEventDetails, D> for &TestCaseStartedEventDetails
4322    {
4323        unsafe fn encode(
4324            self,
4325            encoder: &mut fidl::encoding::Encoder<'_, D>,
4326            offset: usize,
4327            mut depth: fidl::encoding::Depth,
4328        ) -> fidl::Result<()> {
4329            encoder.debug_check_bounds::<TestCaseStartedEventDetails>(offset);
4330            // Vector header
4331            let max_ordinal: u64 = self.max_ordinal_present();
4332            encoder.write_num(max_ordinal, offset);
4333            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4334            // Calling encoder.out_of_line_offset(0) is not allowed.
4335            if max_ordinal == 0 {
4336                return Ok(());
4337            }
4338            depth.increment()?;
4339            let envelope_size = 8;
4340            let bytes_len = max_ordinal as usize * envelope_size;
4341            #[allow(unused_variables)]
4342            let offset = encoder.out_of_line_offset(bytes_len);
4343            let mut _prev_end_offset: usize = 0;
4344            if 1 > max_ordinal {
4345                return Ok(());
4346            }
4347
4348            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4349            // are envelope_size bytes.
4350            let cur_offset: usize = (1 - 1) * envelope_size;
4351
4352            // Zero reserved fields.
4353            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4354
4355            // Safety:
4356            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4357            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4358            //   envelope_size bytes, there is always sufficient room.
4359            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4360                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4361                encoder,
4362                offset + cur_offset,
4363                depth,
4364            )?;
4365
4366            _prev_end_offset = cur_offset + envelope_size;
4367
4368            Ok(())
4369        }
4370    }
4371
4372    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4373        for TestCaseStartedEventDetails
4374    {
4375        #[inline(always)]
4376        fn new_empty() -> Self {
4377            Self::default()
4378        }
4379
4380        unsafe fn decode(
4381            &mut self,
4382            decoder: &mut fidl::encoding::Decoder<'_, D>,
4383            offset: usize,
4384            mut depth: fidl::encoding::Depth,
4385        ) -> fidl::Result<()> {
4386            decoder.debug_check_bounds::<Self>(offset);
4387            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4388                None => return Err(fidl::Error::NotNullable),
4389                Some(len) => len,
4390            };
4391            // Calling decoder.out_of_line_offset(0) is not allowed.
4392            if len == 0 {
4393                return Ok(());
4394            };
4395            depth.increment()?;
4396            let envelope_size = 8;
4397            let bytes_len = len * envelope_size;
4398            let offset = decoder.out_of_line_offset(bytes_len)?;
4399            // Decode the envelope for each type.
4400            let mut _next_ordinal_to_read = 0;
4401            let mut next_offset = offset;
4402            let end_offset = offset + bytes_len;
4403            _next_ordinal_to_read += 1;
4404            if next_offset >= end_offset {
4405                return Ok(());
4406            }
4407
4408            // Decode unknown envelopes for gaps in ordinals.
4409            while _next_ordinal_to_read < 1 {
4410                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4411                _next_ordinal_to_read += 1;
4412                next_offset += envelope_size;
4413            }
4414
4415            let next_out_of_line = decoder.next_out_of_line();
4416            let handles_before = decoder.remaining_handles();
4417            if let Some((inlined, num_bytes, num_handles)) =
4418                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4419            {
4420                let member_inline_size =
4421                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4422                if inlined != (member_inline_size <= 4) {
4423                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4424                }
4425                let inner_offset;
4426                let mut inner_depth = depth.clone();
4427                if inlined {
4428                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4429                    inner_offset = next_offset;
4430                } else {
4431                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4432                    inner_depth.increment()?;
4433                }
4434                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4435                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4436                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4437                {
4438                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4439                }
4440                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4441                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4442                }
4443            }
4444
4445            next_offset += envelope_size;
4446
4447            // Decode the remaining unknown envelopes.
4448            while next_offset < end_offset {
4449                _next_ordinal_to_read += 1;
4450                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4451                next_offset += envelope_size;
4452            }
4453
4454            Ok(())
4455        }
4456    }
4457
4458    impl TestCaseStoppedEventDetails {
4459        #[inline(always)]
4460        fn max_ordinal_present(&self) -> u64 {
4461            if let Some(_) = self.result {
4462                return 2;
4463            }
4464            if let Some(_) = self.test_case_id {
4465                return 1;
4466            }
4467            0
4468        }
4469    }
4470
4471    impl fidl::encoding::ValueTypeMarker for TestCaseStoppedEventDetails {
4472        type Borrowed<'a> = &'a Self;
4473        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4474            value
4475        }
4476    }
4477
4478    unsafe impl fidl::encoding::TypeMarker for TestCaseStoppedEventDetails {
4479        type Owned = Self;
4480
4481        #[inline(always)]
4482        fn inline_align(_context: fidl::encoding::Context) -> usize {
4483            8
4484        }
4485
4486        #[inline(always)]
4487        fn inline_size(_context: fidl::encoding::Context) -> usize {
4488            16
4489        }
4490    }
4491
4492    unsafe impl<D: fidl::encoding::ResourceDialect>
4493        fidl::encoding::Encode<TestCaseStoppedEventDetails, D> for &TestCaseStoppedEventDetails
4494    {
4495        unsafe fn encode(
4496            self,
4497            encoder: &mut fidl::encoding::Encoder<'_, D>,
4498            offset: usize,
4499            mut depth: fidl::encoding::Depth,
4500        ) -> fidl::Result<()> {
4501            encoder.debug_check_bounds::<TestCaseStoppedEventDetails>(offset);
4502            // Vector header
4503            let max_ordinal: u64 = self.max_ordinal_present();
4504            encoder.write_num(max_ordinal, offset);
4505            encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
4506            // Calling encoder.out_of_line_offset(0) is not allowed.
4507            if max_ordinal == 0 {
4508                return Ok(());
4509            }
4510            depth.increment()?;
4511            let envelope_size = 8;
4512            let bytes_len = max_ordinal as usize * envelope_size;
4513            #[allow(unused_variables)]
4514            let offset = encoder.out_of_line_offset(bytes_len);
4515            let mut _prev_end_offset: usize = 0;
4516            if 1 > max_ordinal {
4517                return Ok(());
4518            }
4519
4520            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4521            // are envelope_size bytes.
4522            let cur_offset: usize = (1 - 1) * envelope_size;
4523
4524            // Zero reserved fields.
4525            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4526
4527            // Safety:
4528            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4529            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4530            //   envelope_size bytes, there is always sufficient room.
4531            fidl::encoding::encode_in_envelope_optional::<u32, D>(
4532                self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
4533                encoder,
4534                offset + cur_offset,
4535                depth,
4536            )?;
4537
4538            _prev_end_offset = cur_offset + envelope_size;
4539            if 2 > max_ordinal {
4540                return Ok(());
4541            }
4542
4543            // Write at offset+(ordinal-1)*envelope_size, since ordinals are one-based and envelopes
4544            // are envelope_size bytes.
4545            let cur_offset: usize = (2 - 1) * envelope_size;
4546
4547            // Zero reserved fields.
4548            encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
4549
4550            // Safety:
4551            // - bytes_len is calculated to fit envelope_size*max(member.ordinal).
4552            // - Since cur_offset is envelope_size*(member.ordinal - 1) and the envelope takes
4553            //   envelope_size bytes, there is always sufficient room.
4554            fidl::encoding::encode_in_envelope_optional::<TestCaseResult, D>(
4555                self.result
4556                    .as_ref()
4557                    .map(<TestCaseResult as fidl::encoding::ValueTypeMarker>::borrow),
4558                encoder,
4559                offset + cur_offset,
4560                depth,
4561            )?;
4562
4563            _prev_end_offset = cur_offset + envelope_size;
4564
4565            Ok(())
4566        }
4567    }
4568
4569    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4570        for TestCaseStoppedEventDetails
4571    {
4572        #[inline(always)]
4573        fn new_empty() -> Self {
4574            Self::default()
4575        }
4576
4577        unsafe fn decode(
4578            &mut self,
4579            decoder: &mut fidl::encoding::Decoder<'_, D>,
4580            offset: usize,
4581            mut depth: fidl::encoding::Depth,
4582        ) -> fidl::Result<()> {
4583            decoder.debug_check_bounds::<Self>(offset);
4584            let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
4585                None => return Err(fidl::Error::NotNullable),
4586                Some(len) => len,
4587            };
4588            // Calling decoder.out_of_line_offset(0) is not allowed.
4589            if len == 0 {
4590                return Ok(());
4591            };
4592            depth.increment()?;
4593            let envelope_size = 8;
4594            let bytes_len = len * envelope_size;
4595            let offset = decoder.out_of_line_offset(bytes_len)?;
4596            // Decode the envelope for each type.
4597            let mut _next_ordinal_to_read = 0;
4598            let mut next_offset = offset;
4599            let end_offset = offset + bytes_len;
4600            _next_ordinal_to_read += 1;
4601            if next_offset >= end_offset {
4602                return Ok(());
4603            }
4604
4605            // Decode unknown envelopes for gaps in ordinals.
4606            while _next_ordinal_to_read < 1 {
4607                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4608                _next_ordinal_to_read += 1;
4609                next_offset += envelope_size;
4610            }
4611
4612            let next_out_of_line = decoder.next_out_of_line();
4613            let handles_before = decoder.remaining_handles();
4614            if let Some((inlined, num_bytes, num_handles)) =
4615                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4616            {
4617                let member_inline_size =
4618                    <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4619                if inlined != (member_inline_size <= 4) {
4620                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4621                }
4622                let inner_offset;
4623                let mut inner_depth = depth.clone();
4624                if inlined {
4625                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4626                    inner_offset = next_offset;
4627                } else {
4628                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4629                    inner_depth.increment()?;
4630                }
4631                let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
4632                fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
4633                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4634                {
4635                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4636                }
4637                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4638                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4639                }
4640            }
4641
4642            next_offset += envelope_size;
4643            _next_ordinal_to_read += 1;
4644            if next_offset >= end_offset {
4645                return Ok(());
4646            }
4647
4648            // Decode unknown envelopes for gaps in ordinals.
4649            while _next_ordinal_to_read < 2 {
4650                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4651                _next_ordinal_to_read += 1;
4652                next_offset += envelope_size;
4653            }
4654
4655            let next_out_of_line = decoder.next_out_of_line();
4656            let handles_before = decoder.remaining_handles();
4657            if let Some((inlined, num_bytes, num_handles)) =
4658                fidl::encoding::decode_envelope_header(decoder, next_offset)?
4659            {
4660                let member_inline_size =
4661                    <TestCaseResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
4662                if inlined != (member_inline_size <= 4) {
4663                    return Err(fidl::Error::InvalidInlineBitInEnvelope);
4664                }
4665                let inner_offset;
4666                let mut inner_depth = depth.clone();
4667                if inlined {
4668                    decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
4669                    inner_offset = next_offset;
4670                } else {
4671                    inner_offset = decoder.out_of_line_offset(member_inline_size)?;
4672                    inner_depth.increment()?;
4673                }
4674                let val_ref =
4675                    self.result.get_or_insert_with(|| fidl::new_empty!(TestCaseResult, D));
4676                fidl::decode!(TestCaseResult, D, val_ref, decoder, inner_offset, inner_depth)?;
4677                if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
4678                {
4679                    return Err(fidl::Error::InvalidNumBytesInEnvelope);
4680                }
4681                if handles_before != decoder.remaining_handles() + (num_handles as usize) {
4682                    return Err(fidl::Error::InvalidNumHandlesInEnvelope);
4683                }
4684            }
4685
4686            next_offset += envelope_size;
4687
4688            // Decode the remaining unknown envelopes.
4689            while next_offset < end_offset {
4690                _next_ordinal_to_read += 1;
4691                fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
4692                next_offset += envelope_size;
4693            }
4694
4695            Ok(())
4696        }
4697    }
4698}