1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub type CaseName = String;
15
16pub type TestCaseId = u32;
18
19pub type TestCaseName = String;
21
22pub const MAX_ARGUMENTS: u64 = fidl_fuchsia_io::MAX_PATH_LENGTH as u64;
23
24pub const MAX_ARGUMENT_LENGTH: u64 = 1024;
25
26pub const MAX_DEBUG_DATAS_PER_GET: u64 = 1024;
27
28pub const MAX_EVENTS_PER_WATCH: u64 = 1024;
29
30pub const MAX_FILTERS: u64 = 1024;
31
32pub const MAX_FILTER_LENGTH: u64 = fidl_fuchsia_component::MAX_MONIKER_LENGTH as u64;
33
34pub const MAX_OFFERS: u64 = 1024;
35
36pub const MAX_TEST_CASES_PER_GET: u64 = 1024;
37
38pub const MAX_TEST_COLLECTION_NAME_LENGTH: u64 = fidl_fuchsia_io::MAX_NAME_LENGTH as u64;
39
40#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
42pub enum CaseStatus {
43 Passed,
45 Failed,
47 TimedOut,
49 Skipped,
51 Error,
53 #[doc(hidden)]
54 __SourceBreaking { unknown_ordinal: u32 },
55}
56
57#[macro_export]
59macro_rules! CaseStatusUnknown {
60 () => {
61 _
62 };
63}
64
65impl CaseStatus {
66 #[inline]
67 pub fn from_primitive(prim: u32) -> Option<Self> {
68 match prim {
69 0 => Some(Self::Passed),
70 1 => Some(Self::Failed),
71 2 => Some(Self::TimedOut),
72 3 => Some(Self::Skipped),
73 4 => Some(Self::Error),
74 _ => None,
75 }
76 }
77
78 #[inline]
79 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
80 match prim {
81 0 => Self::Passed,
82 1 => Self::Failed,
83 2 => Self::TimedOut,
84 3 => Self::Skipped,
85 4 => Self::Error,
86 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
87 }
88 }
89
90 #[inline]
91 pub fn unknown() -> Self {
92 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
93 }
94
95 #[inline]
96 pub const fn into_primitive(self) -> u32 {
97 match self {
98 Self::Passed => 0,
99 Self::Failed => 1,
100 Self::TimedOut => 2,
101 Self::Skipped => 3,
102 Self::Error => 4,
103 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
104 }
105 }
106
107 #[inline]
108 pub fn is_unknown(&self) -> bool {
109 match self {
110 Self::__SourceBreaking { unknown_ordinal: _ } => true,
111 _ => false,
112 }
113 }
114}
115
116#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
118pub enum LaunchError {
119 ResourceUnavailable,
121 InstanceCannotResolve,
123 InvalidArgs,
125 FailedToConnectToTestSuite,
128 CaseEnumeration,
130 InternalError,
133 NoMatchingCases,
137 InvalidManifest,
139 #[doc(hidden)]
140 __SourceBreaking { unknown_ordinal: u32 },
141}
142
143#[macro_export]
145macro_rules! LaunchErrorUnknown {
146 () => {
147 _
148 };
149}
150
151impl LaunchError {
152 #[inline]
153 pub fn from_primitive(prim: u32) -> Option<Self> {
154 match prim {
155 1 => Some(Self::ResourceUnavailable),
156 2 => Some(Self::InstanceCannotResolve),
157 3 => Some(Self::InvalidArgs),
158 4 => Some(Self::FailedToConnectToTestSuite),
159 5 => Some(Self::CaseEnumeration),
160 6 => Some(Self::InternalError),
161 7 => Some(Self::NoMatchingCases),
162 8 => Some(Self::InvalidManifest),
163 _ => None,
164 }
165 }
166
167 #[inline]
168 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
169 match prim {
170 1 => Self::ResourceUnavailable,
171 2 => Self::InstanceCannotResolve,
172 3 => Self::InvalidArgs,
173 4 => Self::FailedToConnectToTestSuite,
174 5 => Self::CaseEnumeration,
175 6 => Self::InternalError,
176 7 => Self::NoMatchingCases,
177 8 => Self::InvalidManifest,
178 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
179 }
180 }
181
182 #[inline]
183 pub fn unknown() -> Self {
184 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
185 }
186
187 #[inline]
188 pub const fn into_primitive(self) -> u32 {
189 match self {
190 Self::ResourceUnavailable => 1,
191 Self::InstanceCannotResolve => 2,
192 Self::InvalidArgs => 3,
193 Self::FailedToConnectToTestSuite => 4,
194 Self::CaseEnumeration => 5,
195 Self::InternalError => 6,
196 Self::NoMatchingCases => 7,
197 Self::InvalidManifest => 8,
198 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
199 }
200 }
201
202 #[inline]
203 pub fn is_unknown(&self) -> bool {
204 match self {
205 Self::__SourceBreaking { unknown_ordinal: _ } => true,
206 _ => false,
207 }
208 }
209}
210
211#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
213pub enum LogsIteratorOption {
214 BatchIterator,
215 ArchiveIterator,
216 SocketBatchIterator,
217 #[doc(hidden)]
218 __SourceBreaking {
219 unknown_ordinal: u32,
220 },
221}
222
223#[macro_export]
225macro_rules! LogsIteratorOptionUnknown {
226 () => {
227 _
228 };
229}
230
231impl LogsIteratorOption {
232 #[inline]
233 pub fn from_primitive(prim: u32) -> Option<Self> {
234 match prim {
235 0 => Some(Self::BatchIterator),
236 1 => Some(Self::ArchiveIterator),
237 2 => Some(Self::SocketBatchIterator),
238 _ => None,
239 }
240 }
241
242 #[inline]
243 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
244 match prim {
245 0 => Self::BatchIterator,
246 1 => Self::ArchiveIterator,
247 2 => Self::SocketBatchIterator,
248 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
249 }
250 }
251
252 #[inline]
253 pub fn unknown() -> Self {
254 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
255 }
256
257 #[inline]
258 pub const fn into_primitive(self) -> u32 {
259 match self {
260 Self::BatchIterator => 0,
261 Self::ArchiveIterator => 1,
262 Self::SocketBatchIterator => 2,
263 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
264 }
265 }
266
267 #[inline]
268 pub fn is_unknown(&self) -> bool {
269 match self {
270 Self::__SourceBreaking { unknown_ordinal: _ } => true,
271 _ => false,
272 }
273 }
274}
275
276#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
278pub enum LogsIteratorType {
279 Batch,
284 Socket,
288 #[doc(hidden)]
289 __SourceBreaking { unknown_ordinal: u32 },
290}
291
292#[macro_export]
294macro_rules! LogsIteratorTypeUnknown {
295 () => {
296 _
297 };
298}
299
300impl LogsIteratorType {
301 #[inline]
302 pub fn from_primitive(prim: u32) -> Option<Self> {
303 match prim {
304 1 => Some(Self::Batch),
305 2 => Some(Self::Socket),
306 _ => None,
307 }
308 }
309
310 #[inline]
311 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
312 match prim {
313 1 => Self::Batch,
314 2 => Self::Socket,
315 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
316 }
317 }
318
319 #[inline]
320 pub fn unknown() -> Self {
321 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
322 }
323
324 #[inline]
325 pub const fn into_primitive(self) -> u32 {
326 match self {
327 Self::Batch => 1,
328 Self::Socket => 2,
329 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
330 }
331 }
332
333 #[inline]
334 pub fn is_unknown(&self) -> bool {
335 match self {
336 Self::__SourceBreaking { unknown_ordinal: _ } => true,
337 _ => false,
338 }
339 }
340}
341
342#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
344pub enum SuiteResult {
345 Finished,
347 Failed,
350 DidNotFinish,
353 TimedOut,
355 Stopped,
357 InternalError,
358 #[doc(hidden)]
359 __SourceBreaking {
360 unknown_ordinal: u32,
361 },
362}
363
364#[macro_export]
366macro_rules! SuiteResultUnknown {
367 () => {
368 _
369 };
370}
371
372impl SuiteResult {
373 #[inline]
374 pub fn from_primitive(prim: u32) -> Option<Self> {
375 match prim {
376 1 => Some(Self::Finished),
377 2 => Some(Self::Failed),
378 3 => Some(Self::DidNotFinish),
379 4 => Some(Self::TimedOut),
380 5 => Some(Self::Stopped),
381 6 => Some(Self::InternalError),
382 _ => None,
383 }
384 }
385
386 #[inline]
387 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
388 match prim {
389 1 => Self::Finished,
390 2 => Self::Failed,
391 3 => Self::DidNotFinish,
392 4 => Self::TimedOut,
393 5 => Self::Stopped,
394 6 => Self::InternalError,
395 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
396 }
397 }
398
399 #[inline]
400 pub fn unknown() -> Self {
401 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
402 }
403
404 #[inline]
405 pub const fn into_primitive(self) -> u32 {
406 match self {
407 Self::Finished => 1,
408 Self::Failed => 2,
409 Self::DidNotFinish => 3,
410 Self::TimedOut => 4,
411 Self::Stopped => 5,
412 Self::InternalError => 6,
413 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
414 }
415 }
416
417 #[inline]
418 pub fn is_unknown(&self) -> bool {
419 match self {
420 Self::__SourceBreaking { unknown_ordinal: _ } => true,
421 _ => false,
422 }
423 }
424}
425
426#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
431pub enum SuiteStatus {
432 Passed,
434 Failed,
436 DidNotFinish,
439 TimedOut,
441 Stopped,
443 InternalError,
444 #[doc(hidden)]
445 __SourceBreaking {
446 unknown_ordinal: u32,
447 },
448}
449
450#[macro_export]
452macro_rules! SuiteStatusUnknown {
453 () => {
454 _
455 };
456}
457
458impl SuiteStatus {
459 #[inline]
460 pub fn from_primitive(prim: u32) -> Option<Self> {
461 match prim {
462 0 => Some(Self::Passed),
463 1 => Some(Self::Failed),
464 3 => Some(Self::DidNotFinish),
465 4 => Some(Self::TimedOut),
466 5 => Some(Self::Stopped),
467 6 => Some(Self::InternalError),
468 _ => None,
469 }
470 }
471
472 #[inline]
473 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
474 match prim {
475 0 => Self::Passed,
476 1 => Self::Failed,
477 3 => Self::DidNotFinish,
478 4 => Self::TimedOut,
479 5 => Self::Stopped,
480 6 => Self::InternalError,
481 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
482 }
483 }
484
485 #[inline]
486 pub fn unknown() -> Self {
487 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
488 }
489
490 #[inline]
491 pub const fn into_primitive(self) -> u32 {
492 match self {
493 Self::Passed => 0,
494 Self::Failed => 1,
495 Self::DidNotFinish => 3,
496 Self::TimedOut => 4,
497 Self::Stopped => 5,
498 Self::InternalError => 6,
499 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
500 }
501 }
502
503 #[inline]
504 pub fn is_unknown(&self) -> bool {
505 match self {
506 Self::__SourceBreaking { unknown_ordinal: _ } => true,
507 _ => false,
508 }
509 }
510}
511
512#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
514pub enum TestCaseResult {
515 Skipped,
517 Passed,
519 Failed,
521 TimedOut,
523 Error,
525 #[doc(hidden)]
526 __SourceBreaking { unknown_ordinal: u32 },
527}
528
529#[macro_export]
531macro_rules! TestCaseResultUnknown {
532 () => {
533 _
534 };
535}
536
537impl TestCaseResult {
538 #[inline]
539 pub fn from_primitive(prim: u32) -> Option<Self> {
540 match prim {
541 1 => Some(Self::Skipped),
542 2 => Some(Self::Passed),
543 3 => Some(Self::Failed),
544 4 => Some(Self::TimedOut),
545 5 => Some(Self::Error),
546 _ => None,
547 }
548 }
549
550 #[inline]
551 pub fn from_primitive_allow_unknown(prim: u32) -> Self {
552 match prim {
553 1 => Self::Skipped,
554 2 => Self::Passed,
555 3 => Self::Failed,
556 4 => Self::TimedOut,
557 5 => Self::Error,
558 unknown_ordinal => Self::__SourceBreaking { unknown_ordinal },
559 }
560 }
561
562 #[inline]
563 pub fn unknown() -> Self {
564 Self::__SourceBreaking { unknown_ordinal: 0xffffffff }
565 }
566
567 #[inline]
568 pub const fn into_primitive(self) -> u32 {
569 match self {
570 Self::Skipped => 1,
571 Self::Passed => 2,
572 Self::Failed => 3,
573 Self::TimedOut => 4,
574 Self::Error => 5,
575 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
576 }
577 }
578
579 #[inline]
580 pub fn is_unknown(&self) -> bool {
581 match self {
582 Self::__SourceBreaking { unknown_ordinal: _ } => true,
583 _ => false,
584 }
585 }
586}
587
588#[derive(Debug, PartialEq)]
589pub struct CaseArtifact {
590 pub identifier: u32,
591 pub artifact: Artifact,
592}
593
594impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CaseArtifact {}
595
596#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
597#[repr(C)]
598pub struct CaseFinished {
599 pub identifier: u32,
600}
601
602impl fidl::Persistable for CaseFinished {}
603
604#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
605pub struct CaseFound {
606 pub test_case_name: String,
608 pub identifier: u32,
610}
611
612impl fidl::Persistable for CaseFound {}
613
614#[derive(Clone, Debug, PartialEq)]
615pub struct CaseIteratorGetNextResponse {
616 pub cases: Vec<Case>,
617}
618
619impl fidl::Persistable for CaseIteratorGetNextResponse {}
620
621#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
622#[repr(C)]
623pub struct CaseStarted {
624 pub identifier: u32,
625}
626
627impl fidl::Persistable for CaseStarted {}
628
629#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
630pub struct CaseStopped {
631 pub identifier: u32,
632 pub status: CaseStatus,
633}
634
635impl fidl::Persistable for CaseStopped {}
636
637#[derive(Debug, PartialEq)]
638pub struct DebugDataIteratorGetNextCompressedResponse {
639 pub data: Vec<DebugData>,
640}
641
642impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
643 for DebugDataIteratorGetNextCompressedResponse
644{
645}
646
647#[derive(Debug, PartialEq)]
648pub struct DebugDataIteratorGetNextResponse {
649 pub data: Vec<DebugData>,
650}
651
652impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
653 for DebugDataIteratorGetNextResponse
654{
655}
656
657#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
663pub struct DirectoryAndToken {
664 pub directory: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
667 pub token: fidl::EventPair,
670}
671
672impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryAndToken {}
673
674#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
675pub struct EarlyBootProfileRegisterWatcherRequest {
676 pub iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
677}
678
679impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
680 for EarlyBootProfileRegisterWatcherRequest
681{
682}
683
684#[derive(Debug, PartialEq)]
685pub struct QueryEnumerateInRealmRequest {
686 pub test_url: String,
687 pub realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
689 pub offers: Vec<fidl_fuchsia_component_decl::Offer>,
691 pub test_collection: String,
693 pub iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
694}
695
696impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
697 for QueryEnumerateInRealmRequest
698{
699}
700
701#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
702pub struct QueryEnumerateRequest {
703 pub test_url: String,
704 pub iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
705}
706
707impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for QueryEnumerateRequest {}
708
709#[derive(Debug, PartialEq)]
710pub struct RunBuilderAddSuiteInRealmRequest {
711 pub realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
713 pub offers: Vec<fidl_fuchsia_component_decl::Offer>,
715 pub test_collection: String,
717 pub test_url: String,
718 pub options: RunOptions,
719 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
720}
721
722impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
723 for RunBuilderAddSuiteInRealmRequest
724{
725}
726
727#[derive(Debug, PartialEq)]
728pub struct RunBuilderAddSuiteRequest {
729 pub test_url: String,
730 pub options: RunOptions,
731 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
732}
733
734impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunBuilderAddSuiteRequest {}
735
736#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
737pub struct RunBuilderBuildRequest {
738 pub controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
739}
740
741impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunBuilderBuildRequest {}
742
743#[derive(Clone, Debug, PartialEq)]
744pub struct RunBuilderWithSchedulingOptionsRequest {
745 pub options: SchedulingOptions,
746}
747
748impl fidl::Persistable for RunBuilderWithSchedulingOptionsRequest {}
749
750#[derive(Debug, PartialEq)]
751pub struct RunControllerGetEventsResponse {
752 pub events: Vec<RunEvent>,
753}
754
755impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
756 for RunControllerGetEventsResponse
757{
758}
759
760#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
761pub struct RunStarted;
762
763impl fidl::Persistable for RunStarted {}
764
765#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
766pub struct RunStopped;
767
768impl fidl::Persistable for RunStopped {}
769
770#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
771pub struct Stderr {
772 pub socket: fidl::Socket,
773}
774
775impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Stderr {}
776
777#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
778pub struct Stdout {
779 pub socket: fidl::Socket,
780}
781
782impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Stdout {}
783
784#[derive(Debug, PartialEq)]
785pub struct SuiteArtifact {
786 pub artifact: Artifact,
787}
788
789impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteArtifact {}
790
791#[derive(Debug, PartialEq)]
792pub struct SuiteControllerGetEventsResponse {
793 pub events: Vec<SuiteEvent>,
794}
795
796impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
797 for SuiteControllerGetEventsResponse
798{
799}
800
801#[derive(Debug, PartialEq)]
802pub struct SuiteControllerWatchEventsResponse {
803 pub events: Vec<Event>,
804}
805
806impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
807 for SuiteControllerWatchEventsResponse
808{
809}
810
811#[derive(Debug, PartialEq)]
812pub struct SuiteRunnerRunRequest {
813 pub test_suite_url: String,
815 pub options: RunSuiteOptions,
817 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
820}
821
822impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteRunnerRunRequest {}
823
824#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
825pub struct SuiteStarted;
826
827impl fidl::Persistable for SuiteStarted {}
828
829#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
830pub struct SuiteStopped {
831 pub status: SuiteStatus,
832}
833
834impl fidl::Persistable for SuiteStopped {}
835
836#[derive(Debug, PartialEq)]
837pub struct TestCaseEnumeratorEnumerateRequest {
838 pub test_suite_url: String,
840 pub options: EnumerateTestCasesOptions,
842 pub iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
844}
845
846impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
847 for TestCaseEnumeratorEnumerateRequest
848{
849}
850
851#[derive(Clone, Debug, PartialEq)]
852pub struct TestCaseIteratorGetNextResponse {
853 pub test_cases: Vec<TestCase>,
854}
855
856impl fidl::Persistable for TestCaseIteratorGetNextResponse {}
857
858#[derive(Clone, Debug, Default, PartialEq)]
860pub struct Case {
861 pub name: Option<String>,
863 #[doc(hidden)]
864 pub __source_breaking: fidl::marker::SourceBreaking,
865}
866
867impl fidl::Persistable for Case {}
868
869#[derive(Debug, Default, PartialEq)]
871pub struct CustomArtifact {
872 pub component_moniker: Option<String>,
875 pub directory_and_token: Option<DirectoryAndToken>,
877 #[doc(hidden)]
878 pub __source_breaking: fidl::marker::SourceBreaking,
879}
880
881impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CustomArtifact {}
882
883#[derive(Debug, Default, PartialEq)]
885pub struct DebugData {
886 pub name: Option<String>,
888 pub socket: Option<fidl::Socket>,
890 #[doc(hidden)]
891 pub __source_breaking: fidl::marker::SourceBreaking,
892}
893
894impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DebugData {}
895
896#[derive(Debug, Default, PartialEq)]
898pub struct EnumerateTestCasesOptions {
899 pub realm_options: Option<RealmOptions>,
903 #[doc(hidden)]
904 pub __source_breaking: fidl::marker::SourceBreaking,
905}
906
907impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnumerateTestCasesOptions {}
908
909#[derive(Debug, Default, PartialEq)]
911pub struct Event {
912 pub timestamp: Option<i64>,
914 pub details: Option<EventDetails>,
916 #[doc(hidden)]
917 pub __source_breaking: fidl::marker::SourceBreaking,
918}
919
920impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Event {}
921
922#[derive(Debug, Default, PartialEq)]
928pub struct RealmOptions {
929 pub realm: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>>,
931 pub offers: Option<Vec<fidl_fuchsia_component_decl::Offer>>,
933 pub test_collection: Option<String>,
935 #[doc(hidden)]
936 pub __source_breaking: fidl::marker::SourceBreaking,
937}
938
939impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RealmOptions {}
940
941#[derive(Debug, Default, PartialEq)]
942pub struct RunEvent {
943 pub timestamp: Option<i64>,
944 pub payload: Option<RunEventPayload>,
945 #[doc(hidden)]
946 pub __source_breaking: fidl::marker::SourceBreaking,
947}
948
949impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunEvent {}
950
951#[derive(Clone, Debug, Default, PartialEq)]
953pub struct RunOptions {
954 pub run_disabled_tests: Option<bool>,
957 pub parallel: Option<u16>,
961 pub arguments: Option<Vec<String>>,
964 pub timeout: Option<i64>,
966 pub case_filters_to_run: Option<Vec<String>>,
988 pub log_iterator: Option<LogsIteratorOption>,
991 pub log_interest: Option<Vec<fidl_fuchsia_diagnostics::LogInterestSelector>>,
993 pub break_on_failure: Option<bool>,
998 pub no_exception_channel: Option<bool>,
1002 #[doc(hidden)]
1003 pub __source_breaking: fidl::marker::SourceBreaking,
1004}
1005
1006impl fidl::Persistable for RunOptions {}
1007
1008#[derive(Debug, Default, PartialEq)]
1010pub struct RunSuiteOptions {
1011 pub realm_options: Option<RealmOptions>,
1015 pub run_disabled_tests: Option<bool>,
1018 pub max_concurrent_test_case_runs: Option<u16>,
1021 pub arguments: Option<Vec<String>>,
1024 pub timeout: Option<i64>,
1027 pub test_case_filters: Option<Vec<String>>,
1041 pub logs_iterator_type: Option<LogsIteratorType>,
1044 pub log_interest: Option<Vec<fidl_fuchsia_diagnostics::LogInterestSelector>>,
1047 pub accumulate_debug_data: Option<bool>,
1054 pub no_exception_channel: Option<bool>,
1058 #[doc(hidden)]
1059 pub __source_breaking: fidl::marker::SourceBreaking,
1060}
1061
1062impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunSuiteOptions {}
1063
1064#[derive(Clone, Debug, Default, PartialEq)]
1066pub struct SchedulingOptions {
1067 pub max_parallel_suites: Option<u16>,
1070 pub accumulate_debug_data: Option<bool>,
1074 #[doc(hidden)]
1075 pub __source_breaking: fidl::marker::SourceBreaking,
1076}
1077
1078impl fidl::Persistable for SchedulingOptions {}
1079
1080#[derive(Debug, Default, PartialEq)]
1082pub struct SuiteArtifactGeneratedEventDetails {
1083 pub artifact: Option<Artifact>,
1085 #[doc(hidden)]
1086 pub __source_breaking: fidl::marker::SourceBreaking,
1087}
1088
1089impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1090 for SuiteArtifactGeneratedEventDetails
1091{
1092}
1093
1094#[derive(Debug, Default, PartialEq)]
1095pub struct SuiteEvent {
1096 pub timestamp: Option<i64>,
1097 pub payload: Option<SuiteEventPayload>,
1098 #[doc(hidden)]
1099 pub __source_breaking: fidl::marker::SourceBreaking,
1100}
1101
1102impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEvent {}
1103
1104#[derive(Clone, Debug, Default, PartialEq)]
1106pub struct SuiteStartedEventDetails {
1107 #[doc(hidden)]
1108 pub __source_breaking: fidl::marker::SourceBreaking,
1109}
1110
1111impl fidl::Persistable for SuiteStartedEventDetails {}
1112
1113#[derive(Clone, Debug, Default, PartialEq)]
1115pub struct SuiteStoppedEventDetails {
1116 pub result: Option<SuiteResult>,
1118 #[doc(hidden)]
1119 pub __source_breaking: fidl::marker::SourceBreaking,
1120}
1121
1122impl fidl::Persistable for SuiteStoppedEventDetails {}
1123
1124#[derive(Clone, Debug, Default, PartialEq)]
1126pub struct TestCase {
1127 pub name: Option<String>,
1129 #[doc(hidden)]
1130 pub __source_breaking: fidl::marker::SourceBreaking,
1131}
1132
1133impl fidl::Persistable for TestCase {}
1134
1135#[derive(Debug, Default, PartialEq)]
1137pub struct TestCaseArtifactGeneratedEventDetails {
1138 pub test_case_id: Option<u32>,
1141 pub artifact: Option<Artifact>,
1143 #[doc(hidden)]
1144 pub __source_breaking: fidl::marker::SourceBreaking,
1145}
1146
1147impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
1148 for TestCaseArtifactGeneratedEventDetails
1149{
1150}
1151
1152#[derive(Clone, Debug, Default, PartialEq)]
1154pub struct TestCaseFinishedEventDetails {
1155 pub test_case_id: Option<u32>,
1158 #[doc(hidden)]
1159 pub __source_breaking: fidl::marker::SourceBreaking,
1160}
1161
1162impl fidl::Persistable for TestCaseFinishedEventDetails {}
1163
1164#[derive(Clone, Debug, Default, PartialEq)]
1166pub struct TestCaseFoundEventDetails {
1167 pub test_case_name: Option<String>,
1169 pub test_case_id: Option<u32>,
1172 #[doc(hidden)]
1173 pub __source_breaking: fidl::marker::SourceBreaking,
1174}
1175
1176impl fidl::Persistable for TestCaseFoundEventDetails {}
1177
1178#[derive(Clone, Debug, Default, PartialEq)]
1180pub struct TestCaseStartedEventDetails {
1181 pub test_case_id: Option<u32>,
1184 #[doc(hidden)]
1185 pub __source_breaking: fidl::marker::SourceBreaking,
1186}
1187
1188impl fidl::Persistable for TestCaseStartedEventDetails {}
1189
1190#[derive(Clone, Debug, Default, PartialEq)]
1192pub struct TestCaseStoppedEventDetails {
1193 pub test_case_id: Option<u32>,
1196 pub result: Option<TestCaseResult>,
1198 #[doc(hidden)]
1199 pub __source_breaking: fidl::marker::SourceBreaking,
1200}
1201
1202impl fidl::Persistable for TestCaseStoppedEventDetails {}
1203
1204#[derive(Debug)]
1206pub enum Artifact {
1207 Stdout(fidl::Socket),
1210 Stderr(fidl::Socket),
1213 Log(Syslog),
1216 Custom(CustomArtifact),
1218 DebugData(fidl::endpoints::ClientEnd<DebugDataIteratorMarker>),
1220 #[doc(hidden)]
1221 __SourceBreaking { unknown_ordinal: u64 },
1222}
1223
1224#[macro_export]
1226macro_rules! ArtifactUnknown {
1227 () => {
1228 _
1229 };
1230}
1231
1232impl PartialEq for Artifact {
1234 fn eq(&self, other: &Self) -> bool {
1235 match (self, other) {
1236 (Self::Stdout(x), Self::Stdout(y)) => *x == *y,
1237 (Self::Stderr(x), Self::Stderr(y)) => *x == *y,
1238 (Self::Log(x), Self::Log(y)) => *x == *y,
1239 (Self::Custom(x), Self::Custom(y)) => *x == *y,
1240 (Self::DebugData(x), Self::DebugData(y)) => *x == *y,
1241 _ => false,
1242 }
1243 }
1244}
1245
1246impl Artifact {
1247 #[inline]
1248 pub fn ordinal(&self) -> u64 {
1249 match *self {
1250 Self::Stdout(_) => 1,
1251 Self::Stderr(_) => 2,
1252 Self::Log(_) => 3,
1253 Self::Custom(_) => 4,
1254 Self::DebugData(_) => 5,
1255 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1256 }
1257 }
1258
1259 #[inline]
1260 pub fn unknown_variant_for_testing() -> Self {
1261 Self::__SourceBreaking { unknown_ordinal: 0 }
1262 }
1263
1264 #[inline]
1265 pub fn is_unknown(&self) -> bool {
1266 match self {
1267 Self::__SourceBreaking { .. } => true,
1268 _ => false,
1269 }
1270 }
1271}
1272
1273impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {}
1274
1275#[derive(Debug)]
1298pub enum EventDetails {
1299 SuiteStarted(SuiteStartedEventDetails),
1301 TestCaseFound(TestCaseFoundEventDetails),
1303 TestCaseStarted(TestCaseStartedEventDetails),
1307 TestCaseArtifactGenerated(TestCaseArtifactGeneratedEventDetails),
1310 TestCaseStopped(TestCaseStoppedEventDetails),
1313 TestCaseFinished(TestCaseFinishedEventDetails),
1316 SuiteArtifactGenerated(SuiteArtifactGeneratedEventDetails),
1318 SuiteStopped(SuiteStoppedEventDetails),
1321 #[doc(hidden)]
1322 __SourceBreaking { unknown_ordinal: u64 },
1323}
1324
1325#[macro_export]
1327macro_rules! EventDetailsUnknown {
1328 () => {
1329 _
1330 };
1331}
1332
1333impl PartialEq for EventDetails {
1335 fn eq(&self, other: &Self) -> bool {
1336 match (self, other) {
1337 (Self::SuiteStarted(x), Self::SuiteStarted(y)) => *x == *y,
1338 (Self::TestCaseFound(x), Self::TestCaseFound(y)) => *x == *y,
1339 (Self::TestCaseStarted(x), Self::TestCaseStarted(y)) => *x == *y,
1340 (Self::TestCaseArtifactGenerated(x), Self::TestCaseArtifactGenerated(y)) => *x == *y,
1341 (Self::TestCaseStopped(x), Self::TestCaseStopped(y)) => *x == *y,
1342 (Self::TestCaseFinished(x), Self::TestCaseFinished(y)) => *x == *y,
1343 (Self::SuiteArtifactGenerated(x), Self::SuiteArtifactGenerated(y)) => *x == *y,
1344 (Self::SuiteStopped(x), Self::SuiteStopped(y)) => *x == *y,
1345 _ => false,
1346 }
1347 }
1348}
1349
1350impl EventDetails {
1351 #[inline]
1352 pub fn ordinal(&self) -> u64 {
1353 match *self {
1354 Self::SuiteStarted(_) => 1,
1355 Self::TestCaseFound(_) => 2,
1356 Self::TestCaseStarted(_) => 3,
1357 Self::TestCaseArtifactGenerated(_) => 4,
1358 Self::TestCaseStopped(_) => 5,
1359 Self::TestCaseFinished(_) => 6,
1360 Self::SuiteArtifactGenerated(_) => 7,
1361 Self::SuiteStopped(_) => 8,
1362 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1363 }
1364 }
1365
1366 #[inline]
1367 pub fn unknown_variant_for_testing() -> Self {
1368 Self::__SourceBreaking { unknown_ordinal: 0 }
1369 }
1370
1371 #[inline]
1372 pub fn is_unknown(&self) -> bool {
1373 match self {
1374 Self::__SourceBreaking { .. } => true,
1375 _ => false,
1376 }
1377 }
1378}
1379
1380impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventDetails {}
1381
1382#[derive(Debug)]
1384pub enum LogsIterator {
1385 Batch(fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>),
1387 Stream(fidl::Socket),
1390 #[doc(hidden)]
1391 __SourceBreaking { unknown_ordinal: u64 },
1392}
1393
1394#[macro_export]
1396macro_rules! LogsIteratorUnknown {
1397 () => {
1398 _
1399 };
1400}
1401
1402impl PartialEq for LogsIterator {
1404 fn eq(&self, other: &Self) -> bool {
1405 match (self, other) {
1406 (Self::Batch(x), Self::Batch(y)) => *x == *y,
1407 (Self::Stream(x), Self::Stream(y)) => *x == *y,
1408 _ => false,
1409 }
1410 }
1411}
1412
1413impl LogsIterator {
1414 #[inline]
1415 pub fn ordinal(&self) -> u64 {
1416 match *self {
1417 Self::Batch(_) => 2,
1418 Self::Stream(_) => 3,
1419 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1420 }
1421 }
1422
1423 #[inline]
1424 pub fn unknown_variant_for_testing() -> Self {
1425 Self::__SourceBreaking { unknown_ordinal: 0 }
1426 }
1427
1428 #[inline]
1429 pub fn is_unknown(&self) -> bool {
1430 match self {
1431 Self::__SourceBreaking { .. } => true,
1432 _ => false,
1433 }
1434 }
1435}
1436
1437impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LogsIterator {}
1438
1439#[derive(Debug)]
1443pub enum RunEventPayload {
1444 RunStarted(RunStarted),
1446 RunStopped(RunStopped),
1448 Artifact(Artifact),
1450 #[doc(hidden)]
1451 __SourceBreaking { unknown_ordinal: u64 },
1452}
1453
1454#[macro_export]
1456macro_rules! RunEventPayloadUnknown {
1457 () => {
1458 _
1459 };
1460}
1461
1462impl PartialEq for RunEventPayload {
1464 fn eq(&self, other: &Self) -> bool {
1465 match (self, other) {
1466 (Self::RunStarted(x), Self::RunStarted(y)) => *x == *y,
1467 (Self::RunStopped(x), Self::RunStopped(y)) => *x == *y,
1468 (Self::Artifact(x), Self::Artifact(y)) => *x == *y,
1469 _ => false,
1470 }
1471 }
1472}
1473
1474impl RunEventPayload {
1475 #[inline]
1476 pub fn ordinal(&self) -> u64 {
1477 match *self {
1478 Self::RunStarted(_) => 1,
1479 Self::RunStopped(_) => 2,
1480 Self::Artifact(_) => 3,
1481 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1482 }
1483 }
1484
1485 #[inline]
1486 pub fn unknown_variant_for_testing() -> Self {
1487 Self::__SourceBreaking { unknown_ordinal: 0 }
1488 }
1489
1490 #[inline]
1491 pub fn is_unknown(&self) -> bool {
1492 match self {
1493 Self::__SourceBreaking { .. } => true,
1494 _ => false,
1495 }
1496 }
1497}
1498
1499impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunEventPayload {}
1500
1501#[derive(Debug)]
1514pub enum SuiteEventPayload {
1515 CaseFound(CaseFound),
1517 CaseStarted(CaseStarted),
1519 CaseStopped(CaseStopped),
1523 CaseFinished(CaseFinished),
1526 CaseArtifact(CaseArtifact),
1528 SuiteArtifact(SuiteArtifact),
1530 SuiteStarted(SuiteStarted),
1532 SuiteStopped(SuiteStopped),
1536 #[doc(hidden)]
1537 __SourceBreaking { unknown_ordinal: u64 },
1538}
1539
1540#[macro_export]
1542macro_rules! SuiteEventPayloadUnknown {
1543 () => {
1544 _
1545 };
1546}
1547
1548impl PartialEq for SuiteEventPayload {
1550 fn eq(&self, other: &Self) -> bool {
1551 match (self, other) {
1552 (Self::CaseFound(x), Self::CaseFound(y)) => *x == *y,
1553 (Self::CaseStarted(x), Self::CaseStarted(y)) => *x == *y,
1554 (Self::CaseStopped(x), Self::CaseStopped(y)) => *x == *y,
1555 (Self::CaseFinished(x), Self::CaseFinished(y)) => *x == *y,
1556 (Self::CaseArtifact(x), Self::CaseArtifact(y)) => *x == *y,
1557 (Self::SuiteArtifact(x), Self::SuiteArtifact(y)) => *x == *y,
1558 (Self::SuiteStarted(x), Self::SuiteStarted(y)) => *x == *y,
1559 (Self::SuiteStopped(x), Self::SuiteStopped(y)) => *x == *y,
1560 _ => false,
1561 }
1562 }
1563}
1564
1565impl SuiteEventPayload {
1566 #[inline]
1567 pub fn ordinal(&self) -> u64 {
1568 match *self {
1569 Self::CaseFound(_) => 1,
1570 Self::CaseStarted(_) => 2,
1571 Self::CaseStopped(_) => 3,
1572 Self::CaseFinished(_) => 4,
1573 Self::CaseArtifact(_) => 5,
1574 Self::SuiteArtifact(_) => 6,
1575 Self::SuiteStarted(_) => 7,
1576 Self::SuiteStopped(_) => 8,
1577 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1578 }
1579 }
1580
1581 #[inline]
1582 pub fn unknown_variant_for_testing() -> Self {
1583 Self::__SourceBreaking { unknown_ordinal: 0 }
1584 }
1585
1586 #[inline]
1587 pub fn is_unknown(&self) -> bool {
1588 match self {
1589 Self::__SourceBreaking { .. } => true,
1590 _ => false,
1591 }
1592 }
1593}
1594
1595impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEventPayload {}
1596
1597#[derive(Debug)]
1599pub enum Syslog {
1600 Batch(fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>),
1602 Stream(fidl::Socket),
1604 #[doc(hidden)]
1605 __SourceBreaking { unknown_ordinal: u64 },
1606}
1607
1608#[macro_export]
1610macro_rules! SyslogUnknown {
1611 () => {
1612 _
1613 };
1614}
1615
1616impl PartialEq for Syslog {
1618 fn eq(&self, other: &Self) -> bool {
1619 match (self, other) {
1620 (Self::Batch(x), Self::Batch(y)) => *x == *y,
1621 (Self::Stream(x), Self::Stream(y)) => *x == *y,
1622 _ => false,
1623 }
1624 }
1625}
1626
1627impl Syslog {
1628 #[inline]
1629 pub fn ordinal(&self) -> u64 {
1630 match *self {
1631 Self::Batch(_) => 2,
1632 Self::Stream(_) => 3,
1633 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
1634 }
1635 }
1636
1637 #[inline]
1638 pub fn unknown_variant_for_testing() -> Self {
1639 Self::__SourceBreaking { unknown_ordinal: 0 }
1640 }
1641
1642 #[inline]
1643 pub fn is_unknown(&self) -> bool {
1644 match self {
1645 Self::__SourceBreaking { .. } => true,
1646 _ => false,
1647 }
1648 }
1649}
1650
1651impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Syslog {}
1652
1653#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1654pub struct CaseIteratorMarker;
1655
1656impl fidl::endpoints::ProtocolMarker for CaseIteratorMarker {
1657 type Proxy = CaseIteratorProxy;
1658 type RequestStream = CaseIteratorRequestStream;
1659 #[cfg(target_os = "fuchsia")]
1660 type SynchronousProxy = CaseIteratorSynchronousProxy;
1661
1662 const DEBUG_NAME: &'static str = "(anonymous) CaseIterator";
1663}
1664
1665pub trait CaseIteratorProxyInterface: Send + Sync {
1666 type GetNextResponseFut: std::future::Future<Output = Result<Vec<Case>, fidl::Error>> + Send;
1667 fn r#get_next(&self) -> Self::GetNextResponseFut;
1668}
1669#[derive(Debug)]
1670#[cfg(target_os = "fuchsia")]
1671pub struct CaseIteratorSynchronousProxy {
1672 client: fidl::client::sync::Client,
1673}
1674
1675#[cfg(target_os = "fuchsia")]
1676impl fidl::endpoints::SynchronousProxy for CaseIteratorSynchronousProxy {
1677 type Proxy = CaseIteratorProxy;
1678 type Protocol = CaseIteratorMarker;
1679
1680 fn from_channel(inner: fidl::Channel) -> Self {
1681 Self::new(inner)
1682 }
1683
1684 fn into_channel(self) -> fidl::Channel {
1685 self.client.into_channel()
1686 }
1687
1688 fn as_channel(&self) -> &fidl::Channel {
1689 self.client.as_channel()
1690 }
1691}
1692
1693#[cfg(target_os = "fuchsia")]
1694impl CaseIteratorSynchronousProxy {
1695 pub fn new(channel: fidl::Channel) -> Self {
1696 let protocol_name = <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1697 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1698 }
1699
1700 pub fn into_channel(self) -> fidl::Channel {
1701 self.client.into_channel()
1702 }
1703
1704 pub fn wait_for_event(
1707 &self,
1708 deadline: zx::MonotonicInstant,
1709 ) -> Result<CaseIteratorEvent, fidl::Error> {
1710 CaseIteratorEvent::decode(self.client.wait_for_event(deadline)?)
1711 }
1712
1713 pub fn r#get_next(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<Case>, fidl::Error> {
1716 let _response =
1717 self.client.send_query::<fidl::encoding::EmptyPayload, CaseIteratorGetNextResponse>(
1718 (),
1719 0x7583f97b7486467c,
1720 fidl::encoding::DynamicFlags::empty(),
1721 ___deadline,
1722 )?;
1723 Ok(_response.cases)
1724 }
1725}
1726
1727#[derive(Debug, Clone)]
1728pub struct CaseIteratorProxy {
1729 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1730}
1731
1732impl fidl::endpoints::Proxy for CaseIteratorProxy {
1733 type Protocol = CaseIteratorMarker;
1734
1735 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1736 Self::new(inner)
1737 }
1738
1739 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1740 self.client.into_channel().map_err(|client| Self { client })
1741 }
1742
1743 fn as_channel(&self) -> &::fidl::AsyncChannel {
1744 self.client.as_channel()
1745 }
1746}
1747
1748impl CaseIteratorProxy {
1749 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1751 let protocol_name = <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1752 Self { client: fidl::client::Client::new(channel, protocol_name) }
1753 }
1754
1755 pub fn take_event_stream(&self) -> CaseIteratorEventStream {
1761 CaseIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1762 }
1763
1764 pub fn r#get_next(
1767 &self,
1768 ) -> fidl::client::QueryResponseFut<Vec<Case>, fidl::encoding::DefaultFuchsiaResourceDialect>
1769 {
1770 CaseIteratorProxyInterface::r#get_next(self)
1771 }
1772}
1773
1774impl CaseIteratorProxyInterface for CaseIteratorProxy {
1775 type GetNextResponseFut =
1776 fidl::client::QueryResponseFut<Vec<Case>, fidl::encoding::DefaultFuchsiaResourceDialect>;
1777 fn r#get_next(&self) -> Self::GetNextResponseFut {
1778 fn _decode(
1779 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1780 ) -> Result<Vec<Case>, fidl::Error> {
1781 let _response = fidl::client::decode_transaction_body::<
1782 CaseIteratorGetNextResponse,
1783 fidl::encoding::DefaultFuchsiaResourceDialect,
1784 0x7583f97b7486467c,
1785 >(_buf?)?;
1786 Ok(_response.cases)
1787 }
1788 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<Case>>(
1789 (),
1790 0x7583f97b7486467c,
1791 fidl::encoding::DynamicFlags::empty(),
1792 _decode,
1793 )
1794 }
1795}
1796
1797pub struct CaseIteratorEventStream {
1798 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1799}
1800
1801impl std::marker::Unpin for CaseIteratorEventStream {}
1802
1803impl futures::stream::FusedStream for CaseIteratorEventStream {
1804 fn is_terminated(&self) -> bool {
1805 self.event_receiver.is_terminated()
1806 }
1807}
1808
1809impl futures::Stream for CaseIteratorEventStream {
1810 type Item = Result<CaseIteratorEvent, fidl::Error>;
1811
1812 fn poll_next(
1813 mut self: std::pin::Pin<&mut Self>,
1814 cx: &mut std::task::Context<'_>,
1815 ) -> std::task::Poll<Option<Self::Item>> {
1816 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1817 &mut self.event_receiver,
1818 cx
1819 )?) {
1820 Some(buf) => std::task::Poll::Ready(Some(CaseIteratorEvent::decode(buf))),
1821 None => std::task::Poll::Ready(None),
1822 }
1823 }
1824}
1825
1826#[derive(Debug)]
1827pub enum CaseIteratorEvent {}
1828
1829impl CaseIteratorEvent {
1830 fn decode(
1832 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1833 ) -> Result<CaseIteratorEvent, fidl::Error> {
1834 let (bytes, _handles) = buf.split_mut();
1835 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1836 debug_assert_eq!(tx_header.tx_id, 0);
1837 match tx_header.ordinal {
1838 _ => Err(fidl::Error::UnknownOrdinal {
1839 ordinal: tx_header.ordinal,
1840 protocol_name: <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1841 }),
1842 }
1843 }
1844}
1845
1846pub struct CaseIteratorRequestStream {
1848 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1849 is_terminated: bool,
1850}
1851
1852impl std::marker::Unpin for CaseIteratorRequestStream {}
1853
1854impl futures::stream::FusedStream for CaseIteratorRequestStream {
1855 fn is_terminated(&self) -> bool {
1856 self.is_terminated
1857 }
1858}
1859
1860impl fidl::endpoints::RequestStream for CaseIteratorRequestStream {
1861 type Protocol = CaseIteratorMarker;
1862 type ControlHandle = CaseIteratorControlHandle;
1863
1864 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1865 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1866 }
1867
1868 fn control_handle(&self) -> Self::ControlHandle {
1869 CaseIteratorControlHandle { inner: self.inner.clone() }
1870 }
1871
1872 fn into_inner(
1873 self,
1874 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1875 {
1876 (self.inner, self.is_terminated)
1877 }
1878
1879 fn from_inner(
1880 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1881 is_terminated: bool,
1882 ) -> Self {
1883 Self { inner, is_terminated }
1884 }
1885}
1886
1887impl futures::Stream for CaseIteratorRequestStream {
1888 type Item = Result<CaseIteratorRequest, fidl::Error>;
1889
1890 fn poll_next(
1891 mut self: std::pin::Pin<&mut Self>,
1892 cx: &mut std::task::Context<'_>,
1893 ) -> std::task::Poll<Option<Self::Item>> {
1894 let this = &mut *self;
1895 if this.inner.check_shutdown(cx) {
1896 this.is_terminated = true;
1897 return std::task::Poll::Ready(None);
1898 }
1899 if this.is_terminated {
1900 panic!("polled CaseIteratorRequestStream after completion");
1901 }
1902 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1903 |bytes, handles| {
1904 match this.inner.channel().read_etc(cx, bytes, handles) {
1905 std::task::Poll::Ready(Ok(())) => {}
1906 std::task::Poll::Pending => return std::task::Poll::Pending,
1907 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1908 this.is_terminated = true;
1909 return std::task::Poll::Ready(None);
1910 }
1911 std::task::Poll::Ready(Err(e)) => {
1912 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1913 e.into(),
1914 ))))
1915 }
1916 }
1917
1918 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1920
1921 std::task::Poll::Ready(Some(match header.ordinal {
1922 0x7583f97b7486467c => {
1923 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1924 let mut req = fidl::new_empty!(
1925 fidl::encoding::EmptyPayload,
1926 fidl::encoding::DefaultFuchsiaResourceDialect
1927 );
1928 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1929 let control_handle =
1930 CaseIteratorControlHandle { inner: this.inner.clone() };
1931 Ok(CaseIteratorRequest::GetNext {
1932 responder: CaseIteratorGetNextResponder {
1933 control_handle: std::mem::ManuallyDrop::new(control_handle),
1934 tx_id: header.tx_id,
1935 },
1936 })
1937 }
1938 _ => Err(fidl::Error::UnknownOrdinal {
1939 ordinal: header.ordinal,
1940 protocol_name:
1941 <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1942 }),
1943 }))
1944 },
1945 )
1946 }
1947}
1948
1949#[derive(Debug)]
1951pub enum CaseIteratorRequest {
1952 GetNext { responder: CaseIteratorGetNextResponder },
1955}
1956
1957impl CaseIteratorRequest {
1958 #[allow(irrefutable_let_patterns)]
1959 pub fn into_get_next(self) -> Option<(CaseIteratorGetNextResponder)> {
1960 if let CaseIteratorRequest::GetNext { responder } = self {
1961 Some((responder))
1962 } else {
1963 None
1964 }
1965 }
1966
1967 pub fn method_name(&self) -> &'static str {
1969 match *self {
1970 CaseIteratorRequest::GetNext { .. } => "get_next",
1971 }
1972 }
1973}
1974
1975#[derive(Debug, Clone)]
1976pub struct CaseIteratorControlHandle {
1977 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1978}
1979
1980impl fidl::endpoints::ControlHandle for CaseIteratorControlHandle {
1981 fn shutdown(&self) {
1982 self.inner.shutdown()
1983 }
1984 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1985 self.inner.shutdown_with_epitaph(status)
1986 }
1987
1988 fn is_closed(&self) -> bool {
1989 self.inner.channel().is_closed()
1990 }
1991 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1992 self.inner.channel().on_closed()
1993 }
1994
1995 #[cfg(target_os = "fuchsia")]
1996 fn signal_peer(
1997 &self,
1998 clear_mask: zx::Signals,
1999 set_mask: zx::Signals,
2000 ) -> Result<(), zx_status::Status> {
2001 use fidl::Peered;
2002 self.inner.channel().signal_peer(clear_mask, set_mask)
2003 }
2004}
2005
2006impl CaseIteratorControlHandle {}
2007
2008#[must_use = "FIDL methods require a response to be sent"]
2009#[derive(Debug)]
2010pub struct CaseIteratorGetNextResponder {
2011 control_handle: std::mem::ManuallyDrop<CaseIteratorControlHandle>,
2012 tx_id: u32,
2013}
2014
2015impl std::ops::Drop for CaseIteratorGetNextResponder {
2019 fn drop(&mut self) {
2020 self.control_handle.shutdown();
2021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2023 }
2024}
2025
2026impl fidl::endpoints::Responder for CaseIteratorGetNextResponder {
2027 type ControlHandle = CaseIteratorControlHandle;
2028
2029 fn control_handle(&self) -> &CaseIteratorControlHandle {
2030 &self.control_handle
2031 }
2032
2033 fn drop_without_shutdown(mut self) {
2034 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2036 std::mem::forget(self);
2038 }
2039}
2040
2041impl CaseIteratorGetNextResponder {
2042 pub fn send(self, mut cases: &[Case]) -> Result<(), fidl::Error> {
2046 let _result = self.send_raw(cases);
2047 if _result.is_err() {
2048 self.control_handle.shutdown();
2049 }
2050 self.drop_without_shutdown();
2051 _result
2052 }
2053
2054 pub fn send_no_shutdown_on_err(self, mut cases: &[Case]) -> Result<(), fidl::Error> {
2056 let _result = self.send_raw(cases);
2057 self.drop_without_shutdown();
2058 _result
2059 }
2060
2061 fn send_raw(&self, mut cases: &[Case]) -> Result<(), fidl::Error> {
2062 self.control_handle.inner.send::<CaseIteratorGetNextResponse>(
2063 (cases,),
2064 self.tx_id,
2065 0x7583f97b7486467c,
2066 fidl::encoding::DynamicFlags::empty(),
2067 )
2068 }
2069}
2070
2071#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2072pub struct DebugDataIteratorMarker;
2073
2074impl fidl::endpoints::ProtocolMarker for DebugDataIteratorMarker {
2075 type Proxy = DebugDataIteratorProxy;
2076 type RequestStream = DebugDataIteratorRequestStream;
2077 #[cfg(target_os = "fuchsia")]
2078 type SynchronousProxy = DebugDataIteratorSynchronousProxy;
2079
2080 const DEBUG_NAME: &'static str = "(anonymous) DebugDataIterator";
2081}
2082
2083pub trait DebugDataIteratorProxyInterface: Send + Sync {
2084 type GetNextResponseFut: std::future::Future<Output = Result<Vec<DebugData>, fidl::Error>>
2085 + Send;
2086 fn r#get_next(&self) -> Self::GetNextResponseFut;
2087 type GetNextCompressedResponseFut: std::future::Future<Output = Result<Vec<DebugData>, fidl::Error>>
2088 + Send;
2089 fn r#get_next_compressed(&self) -> Self::GetNextCompressedResponseFut;
2090}
2091#[derive(Debug)]
2092#[cfg(target_os = "fuchsia")]
2093pub struct DebugDataIteratorSynchronousProxy {
2094 client: fidl::client::sync::Client,
2095}
2096
2097#[cfg(target_os = "fuchsia")]
2098impl fidl::endpoints::SynchronousProxy for DebugDataIteratorSynchronousProxy {
2099 type Proxy = DebugDataIteratorProxy;
2100 type Protocol = DebugDataIteratorMarker;
2101
2102 fn from_channel(inner: fidl::Channel) -> Self {
2103 Self::new(inner)
2104 }
2105
2106 fn into_channel(self) -> fidl::Channel {
2107 self.client.into_channel()
2108 }
2109
2110 fn as_channel(&self) -> &fidl::Channel {
2111 self.client.as_channel()
2112 }
2113}
2114
2115#[cfg(target_os = "fuchsia")]
2116impl DebugDataIteratorSynchronousProxy {
2117 pub fn new(channel: fidl::Channel) -> Self {
2118 let protocol_name =
2119 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2120 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2121 }
2122
2123 pub fn into_channel(self) -> fidl::Channel {
2124 self.client.into_channel()
2125 }
2126
2127 pub fn wait_for_event(
2130 &self,
2131 deadline: zx::MonotonicInstant,
2132 ) -> Result<DebugDataIteratorEvent, fidl::Error> {
2133 DebugDataIteratorEvent::decode(self.client.wait_for_event(deadline)?)
2134 }
2135
2136 pub fn r#get_next(
2140 &self,
2141 ___deadline: zx::MonotonicInstant,
2142 ) -> Result<Vec<DebugData>, fidl::Error> {
2143 let _response = self
2144 .client
2145 .send_query::<fidl::encoding::EmptyPayload, DebugDataIteratorGetNextResponse>(
2146 (),
2147 0x9ef24c823f5ad60,
2148 fidl::encoding::DynamicFlags::empty(),
2149 ___deadline,
2150 )?;
2151 Ok(_response.data)
2152 }
2153
2154 pub fn r#get_next_compressed(
2158 &self,
2159 ___deadline: zx::MonotonicInstant,
2160 ) -> Result<Vec<DebugData>, fidl::Error> {
2161 let _response = self
2162 .client
2163 .send_query::<fidl::encoding::EmptyPayload, DebugDataIteratorGetNextCompressedResponse>(
2164 (),
2165 0x6765e9cb918301f4,
2166 fidl::encoding::DynamicFlags::empty(),
2167 ___deadline,
2168 )?;
2169 Ok(_response.data)
2170 }
2171}
2172
2173#[derive(Debug, Clone)]
2174pub struct DebugDataIteratorProxy {
2175 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2176}
2177
2178impl fidl::endpoints::Proxy for DebugDataIteratorProxy {
2179 type Protocol = DebugDataIteratorMarker;
2180
2181 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2182 Self::new(inner)
2183 }
2184
2185 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2186 self.client.into_channel().map_err(|client| Self { client })
2187 }
2188
2189 fn as_channel(&self) -> &::fidl::AsyncChannel {
2190 self.client.as_channel()
2191 }
2192}
2193
2194impl DebugDataIteratorProxy {
2195 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2197 let protocol_name =
2198 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2199 Self { client: fidl::client::Client::new(channel, protocol_name) }
2200 }
2201
2202 pub fn take_event_stream(&self) -> DebugDataIteratorEventStream {
2208 DebugDataIteratorEventStream { event_receiver: self.client.take_event_receiver() }
2209 }
2210
2211 pub fn r#get_next(
2215 &self,
2216 ) -> fidl::client::QueryResponseFut<Vec<DebugData>, fidl::encoding::DefaultFuchsiaResourceDialect>
2217 {
2218 DebugDataIteratorProxyInterface::r#get_next(self)
2219 }
2220
2221 pub fn r#get_next_compressed(
2225 &self,
2226 ) -> fidl::client::QueryResponseFut<Vec<DebugData>, fidl::encoding::DefaultFuchsiaResourceDialect>
2227 {
2228 DebugDataIteratorProxyInterface::r#get_next_compressed(self)
2229 }
2230}
2231
2232impl DebugDataIteratorProxyInterface for DebugDataIteratorProxy {
2233 type GetNextResponseFut = fidl::client::QueryResponseFut<
2234 Vec<DebugData>,
2235 fidl::encoding::DefaultFuchsiaResourceDialect,
2236 >;
2237 fn r#get_next(&self) -> Self::GetNextResponseFut {
2238 fn _decode(
2239 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2240 ) -> Result<Vec<DebugData>, fidl::Error> {
2241 let _response = fidl::client::decode_transaction_body::<
2242 DebugDataIteratorGetNextResponse,
2243 fidl::encoding::DefaultFuchsiaResourceDialect,
2244 0x9ef24c823f5ad60,
2245 >(_buf?)?;
2246 Ok(_response.data)
2247 }
2248 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DebugData>>(
2249 (),
2250 0x9ef24c823f5ad60,
2251 fidl::encoding::DynamicFlags::empty(),
2252 _decode,
2253 )
2254 }
2255
2256 type GetNextCompressedResponseFut = fidl::client::QueryResponseFut<
2257 Vec<DebugData>,
2258 fidl::encoding::DefaultFuchsiaResourceDialect,
2259 >;
2260 fn r#get_next_compressed(&self) -> Self::GetNextCompressedResponseFut {
2261 fn _decode(
2262 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2263 ) -> Result<Vec<DebugData>, fidl::Error> {
2264 let _response = fidl::client::decode_transaction_body::<
2265 DebugDataIteratorGetNextCompressedResponse,
2266 fidl::encoding::DefaultFuchsiaResourceDialect,
2267 0x6765e9cb918301f4,
2268 >(_buf?)?;
2269 Ok(_response.data)
2270 }
2271 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DebugData>>(
2272 (),
2273 0x6765e9cb918301f4,
2274 fidl::encoding::DynamicFlags::empty(),
2275 _decode,
2276 )
2277 }
2278}
2279
2280pub struct DebugDataIteratorEventStream {
2281 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2282}
2283
2284impl std::marker::Unpin for DebugDataIteratorEventStream {}
2285
2286impl futures::stream::FusedStream for DebugDataIteratorEventStream {
2287 fn is_terminated(&self) -> bool {
2288 self.event_receiver.is_terminated()
2289 }
2290}
2291
2292impl futures::Stream for DebugDataIteratorEventStream {
2293 type Item = Result<DebugDataIteratorEvent, fidl::Error>;
2294
2295 fn poll_next(
2296 mut self: std::pin::Pin<&mut Self>,
2297 cx: &mut std::task::Context<'_>,
2298 ) -> std::task::Poll<Option<Self::Item>> {
2299 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2300 &mut self.event_receiver,
2301 cx
2302 )?) {
2303 Some(buf) => std::task::Poll::Ready(Some(DebugDataIteratorEvent::decode(buf))),
2304 None => std::task::Poll::Ready(None),
2305 }
2306 }
2307}
2308
2309#[derive(Debug)]
2310pub enum DebugDataIteratorEvent {}
2311
2312impl DebugDataIteratorEvent {
2313 fn decode(
2315 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2316 ) -> Result<DebugDataIteratorEvent, fidl::Error> {
2317 let (bytes, _handles) = buf.split_mut();
2318 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2319 debug_assert_eq!(tx_header.tx_id, 0);
2320 match tx_header.ordinal {
2321 _ => Err(fidl::Error::UnknownOrdinal {
2322 ordinal: tx_header.ordinal,
2323 protocol_name:
2324 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2325 }),
2326 }
2327 }
2328}
2329
2330pub struct DebugDataIteratorRequestStream {
2332 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2333 is_terminated: bool,
2334}
2335
2336impl std::marker::Unpin for DebugDataIteratorRequestStream {}
2337
2338impl futures::stream::FusedStream for DebugDataIteratorRequestStream {
2339 fn is_terminated(&self) -> bool {
2340 self.is_terminated
2341 }
2342}
2343
2344impl fidl::endpoints::RequestStream for DebugDataIteratorRequestStream {
2345 type Protocol = DebugDataIteratorMarker;
2346 type ControlHandle = DebugDataIteratorControlHandle;
2347
2348 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2349 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2350 }
2351
2352 fn control_handle(&self) -> Self::ControlHandle {
2353 DebugDataIteratorControlHandle { inner: self.inner.clone() }
2354 }
2355
2356 fn into_inner(
2357 self,
2358 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2359 {
2360 (self.inner, self.is_terminated)
2361 }
2362
2363 fn from_inner(
2364 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2365 is_terminated: bool,
2366 ) -> Self {
2367 Self { inner, is_terminated }
2368 }
2369}
2370
2371impl futures::Stream for DebugDataIteratorRequestStream {
2372 type Item = Result<DebugDataIteratorRequest, fidl::Error>;
2373
2374 fn poll_next(
2375 mut self: std::pin::Pin<&mut Self>,
2376 cx: &mut std::task::Context<'_>,
2377 ) -> std::task::Poll<Option<Self::Item>> {
2378 let this = &mut *self;
2379 if this.inner.check_shutdown(cx) {
2380 this.is_terminated = true;
2381 return std::task::Poll::Ready(None);
2382 }
2383 if this.is_terminated {
2384 panic!("polled DebugDataIteratorRequestStream after completion");
2385 }
2386 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2387 |bytes, handles| {
2388 match this.inner.channel().read_etc(cx, bytes, handles) {
2389 std::task::Poll::Ready(Ok(())) => {}
2390 std::task::Poll::Pending => return std::task::Poll::Pending,
2391 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2392 this.is_terminated = true;
2393 return std::task::Poll::Ready(None);
2394 }
2395 std::task::Poll::Ready(Err(e)) => {
2396 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2397 e.into(),
2398 ))))
2399 }
2400 }
2401
2402 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2404
2405 std::task::Poll::Ready(Some(match header.ordinal {
2406 0x9ef24c823f5ad60 => {
2407 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2408 let mut req = fidl::new_empty!(
2409 fidl::encoding::EmptyPayload,
2410 fidl::encoding::DefaultFuchsiaResourceDialect
2411 );
2412 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2413 let control_handle =
2414 DebugDataIteratorControlHandle { inner: this.inner.clone() };
2415 Ok(DebugDataIteratorRequest::GetNext {
2416 responder: DebugDataIteratorGetNextResponder {
2417 control_handle: std::mem::ManuallyDrop::new(control_handle),
2418 tx_id: header.tx_id,
2419 },
2420 })
2421 }
2422 0x6765e9cb918301f4 => {
2423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2424 let mut req = fidl::new_empty!(
2425 fidl::encoding::EmptyPayload,
2426 fidl::encoding::DefaultFuchsiaResourceDialect
2427 );
2428 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2429 let control_handle =
2430 DebugDataIteratorControlHandle { inner: this.inner.clone() };
2431 Ok(DebugDataIteratorRequest::GetNextCompressed {
2432 responder: DebugDataIteratorGetNextCompressedResponder {
2433 control_handle: std::mem::ManuallyDrop::new(control_handle),
2434 tx_id: header.tx_id,
2435 },
2436 })
2437 }
2438 _ => Err(fidl::Error::UnknownOrdinal {
2439 ordinal: header.ordinal,
2440 protocol_name:
2441 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2442 }),
2443 }))
2444 },
2445 )
2446 }
2447}
2448
2449#[derive(Debug)]
2451pub enum DebugDataIteratorRequest {
2452 GetNext { responder: DebugDataIteratorGetNextResponder },
2456 GetNextCompressed { responder: DebugDataIteratorGetNextCompressedResponder },
2460}
2461
2462impl DebugDataIteratorRequest {
2463 #[allow(irrefutable_let_patterns)]
2464 pub fn into_get_next(self) -> Option<(DebugDataIteratorGetNextResponder)> {
2465 if let DebugDataIteratorRequest::GetNext { responder } = self {
2466 Some((responder))
2467 } else {
2468 None
2469 }
2470 }
2471
2472 #[allow(irrefutable_let_patterns)]
2473 pub fn into_get_next_compressed(self) -> Option<(DebugDataIteratorGetNextCompressedResponder)> {
2474 if let DebugDataIteratorRequest::GetNextCompressed { responder } = self {
2475 Some((responder))
2476 } else {
2477 None
2478 }
2479 }
2480
2481 pub fn method_name(&self) -> &'static str {
2483 match *self {
2484 DebugDataIteratorRequest::GetNext { .. } => "get_next",
2485 DebugDataIteratorRequest::GetNextCompressed { .. } => "get_next_compressed",
2486 }
2487 }
2488}
2489
2490#[derive(Debug, Clone)]
2491pub struct DebugDataIteratorControlHandle {
2492 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2493}
2494
2495impl fidl::endpoints::ControlHandle for DebugDataIteratorControlHandle {
2496 fn shutdown(&self) {
2497 self.inner.shutdown()
2498 }
2499 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2500 self.inner.shutdown_with_epitaph(status)
2501 }
2502
2503 fn is_closed(&self) -> bool {
2504 self.inner.channel().is_closed()
2505 }
2506 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2507 self.inner.channel().on_closed()
2508 }
2509
2510 #[cfg(target_os = "fuchsia")]
2511 fn signal_peer(
2512 &self,
2513 clear_mask: zx::Signals,
2514 set_mask: zx::Signals,
2515 ) -> Result<(), zx_status::Status> {
2516 use fidl::Peered;
2517 self.inner.channel().signal_peer(clear_mask, set_mask)
2518 }
2519}
2520
2521impl DebugDataIteratorControlHandle {}
2522
2523#[must_use = "FIDL methods require a response to be sent"]
2524#[derive(Debug)]
2525pub struct DebugDataIteratorGetNextResponder {
2526 control_handle: std::mem::ManuallyDrop<DebugDataIteratorControlHandle>,
2527 tx_id: u32,
2528}
2529
2530impl std::ops::Drop for DebugDataIteratorGetNextResponder {
2534 fn drop(&mut self) {
2535 self.control_handle.shutdown();
2536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2538 }
2539}
2540
2541impl fidl::endpoints::Responder for DebugDataIteratorGetNextResponder {
2542 type ControlHandle = DebugDataIteratorControlHandle;
2543
2544 fn control_handle(&self) -> &DebugDataIteratorControlHandle {
2545 &self.control_handle
2546 }
2547
2548 fn drop_without_shutdown(mut self) {
2549 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2551 std::mem::forget(self);
2553 }
2554}
2555
2556impl DebugDataIteratorGetNextResponder {
2557 pub fn send(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2561 let _result = self.send_raw(data);
2562 if _result.is_err() {
2563 self.control_handle.shutdown();
2564 }
2565 self.drop_without_shutdown();
2566 _result
2567 }
2568
2569 pub fn send_no_shutdown_on_err(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2571 let _result = self.send_raw(data);
2572 self.drop_without_shutdown();
2573 _result
2574 }
2575
2576 fn send_raw(&self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2577 self.control_handle.inner.send::<DebugDataIteratorGetNextResponse>(
2578 (data.as_mut(),),
2579 self.tx_id,
2580 0x9ef24c823f5ad60,
2581 fidl::encoding::DynamicFlags::empty(),
2582 )
2583 }
2584}
2585
2586#[must_use = "FIDL methods require a response to be sent"]
2587#[derive(Debug)]
2588pub struct DebugDataIteratorGetNextCompressedResponder {
2589 control_handle: std::mem::ManuallyDrop<DebugDataIteratorControlHandle>,
2590 tx_id: u32,
2591}
2592
2593impl std::ops::Drop for DebugDataIteratorGetNextCompressedResponder {
2597 fn drop(&mut self) {
2598 self.control_handle.shutdown();
2599 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2601 }
2602}
2603
2604impl fidl::endpoints::Responder for DebugDataIteratorGetNextCompressedResponder {
2605 type ControlHandle = DebugDataIteratorControlHandle;
2606
2607 fn control_handle(&self) -> &DebugDataIteratorControlHandle {
2608 &self.control_handle
2609 }
2610
2611 fn drop_without_shutdown(mut self) {
2612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2614 std::mem::forget(self);
2616 }
2617}
2618
2619impl DebugDataIteratorGetNextCompressedResponder {
2620 pub fn send(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2624 let _result = self.send_raw(data);
2625 if _result.is_err() {
2626 self.control_handle.shutdown();
2627 }
2628 self.drop_without_shutdown();
2629 _result
2630 }
2631
2632 pub fn send_no_shutdown_on_err(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2634 let _result = self.send_raw(data);
2635 self.drop_without_shutdown();
2636 _result
2637 }
2638
2639 fn send_raw(&self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
2640 self.control_handle.inner.send::<DebugDataIteratorGetNextCompressedResponse>(
2641 (data.as_mut(),),
2642 self.tx_id,
2643 0x6765e9cb918301f4,
2644 fidl::encoding::DynamicFlags::empty(),
2645 )
2646 }
2647}
2648
2649#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2650pub struct EarlyBootProfileMarker;
2651
2652impl fidl::endpoints::ProtocolMarker for EarlyBootProfileMarker {
2653 type Proxy = EarlyBootProfileProxy;
2654 type RequestStream = EarlyBootProfileRequestStream;
2655 #[cfg(target_os = "fuchsia")]
2656 type SynchronousProxy = EarlyBootProfileSynchronousProxy;
2657
2658 const DEBUG_NAME: &'static str = "fuchsia.test.manager.EarlyBootProfile";
2659}
2660impl fidl::endpoints::DiscoverableProtocolMarker for EarlyBootProfileMarker {}
2661
2662pub trait EarlyBootProfileProxyInterface: Send + Sync {
2663 fn r#register_watcher(
2664 &self,
2665 iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2666 ) -> Result<(), fidl::Error>;
2667}
2668#[derive(Debug)]
2669#[cfg(target_os = "fuchsia")]
2670pub struct EarlyBootProfileSynchronousProxy {
2671 client: fidl::client::sync::Client,
2672}
2673
2674#[cfg(target_os = "fuchsia")]
2675impl fidl::endpoints::SynchronousProxy for EarlyBootProfileSynchronousProxy {
2676 type Proxy = EarlyBootProfileProxy;
2677 type Protocol = EarlyBootProfileMarker;
2678
2679 fn from_channel(inner: fidl::Channel) -> Self {
2680 Self::new(inner)
2681 }
2682
2683 fn into_channel(self) -> fidl::Channel {
2684 self.client.into_channel()
2685 }
2686
2687 fn as_channel(&self) -> &fidl::Channel {
2688 self.client.as_channel()
2689 }
2690}
2691
2692#[cfg(target_os = "fuchsia")]
2693impl EarlyBootProfileSynchronousProxy {
2694 pub fn new(channel: fidl::Channel) -> Self {
2695 let protocol_name = <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2696 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2697 }
2698
2699 pub fn into_channel(self) -> fidl::Channel {
2700 self.client.into_channel()
2701 }
2702
2703 pub fn wait_for_event(
2706 &self,
2707 deadline: zx::MonotonicInstant,
2708 ) -> Result<EarlyBootProfileEvent, fidl::Error> {
2709 EarlyBootProfileEvent::decode(self.client.wait_for_event(deadline)?)
2710 }
2711
2712 pub fn r#register_watcher(
2714 &self,
2715 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2716 ) -> Result<(), fidl::Error> {
2717 self.client.send::<EarlyBootProfileRegisterWatcherRequest>(
2718 (iterator,),
2719 0x6bd6b03803b93715,
2720 fidl::encoding::DynamicFlags::empty(),
2721 )
2722 }
2723}
2724
2725#[derive(Debug, Clone)]
2726pub struct EarlyBootProfileProxy {
2727 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2728}
2729
2730impl fidl::endpoints::Proxy for EarlyBootProfileProxy {
2731 type Protocol = EarlyBootProfileMarker;
2732
2733 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2734 Self::new(inner)
2735 }
2736
2737 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2738 self.client.into_channel().map_err(|client| Self { client })
2739 }
2740
2741 fn as_channel(&self) -> &::fidl::AsyncChannel {
2742 self.client.as_channel()
2743 }
2744}
2745
2746impl EarlyBootProfileProxy {
2747 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2749 let protocol_name = <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2750 Self { client: fidl::client::Client::new(channel, protocol_name) }
2751 }
2752
2753 pub fn take_event_stream(&self) -> EarlyBootProfileEventStream {
2759 EarlyBootProfileEventStream { event_receiver: self.client.take_event_receiver() }
2760 }
2761
2762 pub fn r#register_watcher(
2764 &self,
2765 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2766 ) -> Result<(), fidl::Error> {
2767 EarlyBootProfileProxyInterface::r#register_watcher(self, iterator)
2768 }
2769}
2770
2771impl EarlyBootProfileProxyInterface for EarlyBootProfileProxy {
2772 fn r#register_watcher(
2773 &self,
2774 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2775 ) -> Result<(), fidl::Error> {
2776 self.client.send::<EarlyBootProfileRegisterWatcherRequest>(
2777 (iterator,),
2778 0x6bd6b03803b93715,
2779 fidl::encoding::DynamicFlags::empty(),
2780 )
2781 }
2782}
2783
2784pub struct EarlyBootProfileEventStream {
2785 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2786}
2787
2788impl std::marker::Unpin for EarlyBootProfileEventStream {}
2789
2790impl futures::stream::FusedStream for EarlyBootProfileEventStream {
2791 fn is_terminated(&self) -> bool {
2792 self.event_receiver.is_terminated()
2793 }
2794}
2795
2796impl futures::Stream for EarlyBootProfileEventStream {
2797 type Item = Result<EarlyBootProfileEvent, fidl::Error>;
2798
2799 fn poll_next(
2800 mut self: std::pin::Pin<&mut Self>,
2801 cx: &mut std::task::Context<'_>,
2802 ) -> std::task::Poll<Option<Self::Item>> {
2803 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2804 &mut self.event_receiver,
2805 cx
2806 )?) {
2807 Some(buf) => std::task::Poll::Ready(Some(EarlyBootProfileEvent::decode(buf))),
2808 None => std::task::Poll::Ready(None),
2809 }
2810 }
2811}
2812
2813#[derive(Debug)]
2814pub enum EarlyBootProfileEvent {
2815 #[non_exhaustive]
2816 _UnknownEvent {
2817 ordinal: u64,
2819 },
2820}
2821
2822impl EarlyBootProfileEvent {
2823 fn decode(
2825 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2826 ) -> Result<EarlyBootProfileEvent, fidl::Error> {
2827 let (bytes, _handles) = buf.split_mut();
2828 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2829 debug_assert_eq!(tx_header.tx_id, 0);
2830 match tx_header.ordinal {
2831 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2832 Ok(EarlyBootProfileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2833 }
2834 _ => Err(fidl::Error::UnknownOrdinal {
2835 ordinal: tx_header.ordinal,
2836 protocol_name:
2837 <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2838 }),
2839 }
2840 }
2841}
2842
2843pub struct EarlyBootProfileRequestStream {
2845 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2846 is_terminated: bool,
2847}
2848
2849impl std::marker::Unpin for EarlyBootProfileRequestStream {}
2850
2851impl futures::stream::FusedStream for EarlyBootProfileRequestStream {
2852 fn is_terminated(&self) -> bool {
2853 self.is_terminated
2854 }
2855}
2856
2857impl fidl::endpoints::RequestStream for EarlyBootProfileRequestStream {
2858 type Protocol = EarlyBootProfileMarker;
2859 type ControlHandle = EarlyBootProfileControlHandle;
2860
2861 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2862 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2863 }
2864
2865 fn control_handle(&self) -> Self::ControlHandle {
2866 EarlyBootProfileControlHandle { inner: self.inner.clone() }
2867 }
2868
2869 fn into_inner(
2870 self,
2871 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2872 {
2873 (self.inner, self.is_terminated)
2874 }
2875
2876 fn from_inner(
2877 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2878 is_terminated: bool,
2879 ) -> Self {
2880 Self { inner, is_terminated }
2881 }
2882}
2883
2884impl futures::Stream for EarlyBootProfileRequestStream {
2885 type Item = Result<EarlyBootProfileRequest, fidl::Error>;
2886
2887 fn poll_next(
2888 mut self: std::pin::Pin<&mut Self>,
2889 cx: &mut std::task::Context<'_>,
2890 ) -> std::task::Poll<Option<Self::Item>> {
2891 let this = &mut *self;
2892 if this.inner.check_shutdown(cx) {
2893 this.is_terminated = true;
2894 return std::task::Poll::Ready(None);
2895 }
2896 if this.is_terminated {
2897 panic!("polled EarlyBootProfileRequestStream after completion");
2898 }
2899 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2900 |bytes, handles| {
2901 match this.inner.channel().read_etc(cx, bytes, handles) {
2902 std::task::Poll::Ready(Ok(())) => {}
2903 std::task::Poll::Pending => return std::task::Poll::Pending,
2904 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2905 this.is_terminated = true;
2906 return std::task::Poll::Ready(None);
2907 }
2908 std::task::Poll::Ready(Err(e)) => {
2909 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2910 e.into(),
2911 ))))
2912 }
2913 }
2914
2915 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2917
2918 std::task::Poll::Ready(Some(match header.ordinal {
2919 0x6bd6b03803b93715 => {
2920 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2921 let mut req = fidl::new_empty!(
2922 EarlyBootProfileRegisterWatcherRequest,
2923 fidl::encoding::DefaultFuchsiaResourceDialect
2924 );
2925 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EarlyBootProfileRegisterWatcherRequest>(&header, _body_bytes, handles, &mut req)?;
2926 let control_handle =
2927 EarlyBootProfileControlHandle { inner: this.inner.clone() };
2928 Ok(EarlyBootProfileRequest::RegisterWatcher {
2929 iterator: req.iterator,
2930
2931 control_handle,
2932 })
2933 }
2934 _ if header.tx_id == 0
2935 && header
2936 .dynamic_flags()
2937 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2938 {
2939 Ok(EarlyBootProfileRequest::_UnknownMethod {
2940 ordinal: header.ordinal,
2941 control_handle: EarlyBootProfileControlHandle {
2942 inner: this.inner.clone(),
2943 },
2944 method_type: fidl::MethodType::OneWay,
2945 })
2946 }
2947 _ if header
2948 .dynamic_flags()
2949 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2950 {
2951 this.inner.send_framework_err(
2952 fidl::encoding::FrameworkErr::UnknownMethod,
2953 header.tx_id,
2954 header.ordinal,
2955 header.dynamic_flags(),
2956 (bytes, handles),
2957 )?;
2958 Ok(EarlyBootProfileRequest::_UnknownMethod {
2959 ordinal: header.ordinal,
2960 control_handle: EarlyBootProfileControlHandle {
2961 inner: this.inner.clone(),
2962 },
2963 method_type: fidl::MethodType::TwoWay,
2964 })
2965 }
2966 _ => Err(fidl::Error::UnknownOrdinal {
2967 ordinal: header.ordinal,
2968 protocol_name:
2969 <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2970 }),
2971 }))
2972 },
2973 )
2974 }
2975}
2976
2977#[derive(Debug)]
2980pub enum EarlyBootProfileRequest {
2981 RegisterWatcher {
2983 iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2984 control_handle: EarlyBootProfileControlHandle,
2985 },
2986 #[non_exhaustive]
2988 _UnknownMethod {
2989 ordinal: u64,
2991 control_handle: EarlyBootProfileControlHandle,
2992 method_type: fidl::MethodType,
2993 },
2994}
2995
2996impl EarlyBootProfileRequest {
2997 #[allow(irrefutable_let_patterns)]
2998 pub fn into_register_watcher(
2999 self,
3000 ) -> Option<(fidl::endpoints::ServerEnd<DebugDataIteratorMarker>, EarlyBootProfileControlHandle)>
3001 {
3002 if let EarlyBootProfileRequest::RegisterWatcher { iterator, control_handle } = self {
3003 Some((iterator, control_handle))
3004 } else {
3005 None
3006 }
3007 }
3008
3009 pub fn method_name(&self) -> &'static str {
3011 match *self {
3012 EarlyBootProfileRequest::RegisterWatcher { .. } => "register_watcher",
3013 EarlyBootProfileRequest::_UnknownMethod {
3014 method_type: fidl::MethodType::OneWay,
3015 ..
3016 } => "unknown one-way method",
3017 EarlyBootProfileRequest::_UnknownMethod {
3018 method_type: fidl::MethodType::TwoWay,
3019 ..
3020 } => "unknown two-way method",
3021 }
3022 }
3023}
3024
3025#[derive(Debug, Clone)]
3026pub struct EarlyBootProfileControlHandle {
3027 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3028}
3029
3030impl fidl::endpoints::ControlHandle for EarlyBootProfileControlHandle {
3031 fn shutdown(&self) {
3032 self.inner.shutdown()
3033 }
3034 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3035 self.inner.shutdown_with_epitaph(status)
3036 }
3037
3038 fn is_closed(&self) -> bool {
3039 self.inner.channel().is_closed()
3040 }
3041 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3042 self.inner.channel().on_closed()
3043 }
3044
3045 #[cfg(target_os = "fuchsia")]
3046 fn signal_peer(
3047 &self,
3048 clear_mask: zx::Signals,
3049 set_mask: zx::Signals,
3050 ) -> Result<(), zx_status::Status> {
3051 use fidl::Peered;
3052 self.inner.channel().signal_peer(clear_mask, set_mask)
3053 }
3054}
3055
3056impl EarlyBootProfileControlHandle {}
3057
3058#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3059pub struct QueryMarker;
3060
3061impl fidl::endpoints::ProtocolMarker for QueryMarker {
3062 type Proxy = QueryProxy;
3063 type RequestStream = QueryRequestStream;
3064 #[cfg(target_os = "fuchsia")]
3065 type SynchronousProxy = QuerySynchronousProxy;
3066
3067 const DEBUG_NAME: &'static str = "fuchsia.test.manager.Query";
3068}
3069impl fidl::endpoints::DiscoverableProtocolMarker for QueryMarker {}
3070pub type QueryEnumerateResult = Result<(), LaunchError>;
3071pub type QueryEnumerateInRealmResult = Result<(), LaunchError>;
3072
3073pub trait QueryProxyInterface: Send + Sync {
3074 type EnumerateResponseFut: std::future::Future<Output = Result<QueryEnumerateResult, fidl::Error>>
3075 + Send;
3076 fn r#enumerate(
3077 &self,
3078 test_url: &str,
3079 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3080 ) -> Self::EnumerateResponseFut;
3081 type EnumerateInRealmResponseFut: std::future::Future<Output = Result<QueryEnumerateInRealmResult, fidl::Error>>
3082 + Send;
3083 fn r#enumerate_in_realm(
3084 &self,
3085 test_url: &str,
3086 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3087 offers: &[fidl_fuchsia_component_decl::Offer],
3088 test_collection: &str,
3089 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3090 ) -> Self::EnumerateInRealmResponseFut;
3091}
3092#[derive(Debug)]
3093#[cfg(target_os = "fuchsia")]
3094pub struct QuerySynchronousProxy {
3095 client: fidl::client::sync::Client,
3096}
3097
3098#[cfg(target_os = "fuchsia")]
3099impl fidl::endpoints::SynchronousProxy for QuerySynchronousProxy {
3100 type Proxy = QueryProxy;
3101 type Protocol = QueryMarker;
3102
3103 fn from_channel(inner: fidl::Channel) -> Self {
3104 Self::new(inner)
3105 }
3106
3107 fn into_channel(self) -> fidl::Channel {
3108 self.client.into_channel()
3109 }
3110
3111 fn as_channel(&self) -> &fidl::Channel {
3112 self.client.as_channel()
3113 }
3114}
3115
3116#[cfg(target_os = "fuchsia")]
3117impl QuerySynchronousProxy {
3118 pub fn new(channel: fidl::Channel) -> Self {
3119 let protocol_name = <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3120 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3121 }
3122
3123 pub fn into_channel(self) -> fidl::Channel {
3124 self.client.into_channel()
3125 }
3126
3127 pub fn wait_for_event(
3130 &self,
3131 deadline: zx::MonotonicInstant,
3132 ) -> Result<QueryEvent, fidl::Error> {
3133 QueryEvent::decode(self.client.wait_for_event(deadline)?)
3134 }
3135
3136 pub fn r#enumerate(
3138 &self,
3139 mut test_url: &str,
3140 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3141 ___deadline: zx::MonotonicInstant,
3142 ) -> Result<QueryEnumerateResult, fidl::Error> {
3143 let _response = self.client.send_query::<
3144 QueryEnumerateRequest,
3145 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
3146 >(
3147 (test_url, iterator,),
3148 0x6cd89c1f2728d418,
3149 fidl::encoding::DynamicFlags::empty(),
3150 ___deadline,
3151 )?;
3152 Ok(_response.map(|x| x))
3153 }
3154
3155 pub fn r#enumerate_in_realm(
3157 &self,
3158 mut test_url: &str,
3159 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3160 mut offers: &[fidl_fuchsia_component_decl::Offer],
3161 mut test_collection: &str,
3162 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3163 ___deadline: zx::MonotonicInstant,
3164 ) -> Result<QueryEnumerateInRealmResult, fidl::Error> {
3165 let _response = self.client.send_query::<
3166 QueryEnumerateInRealmRequest,
3167 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
3168 >(
3169 (test_url, realm, offers, test_collection, iterator,),
3170 0x7f7f533194a51ec5,
3171 fidl::encoding::DynamicFlags::empty(),
3172 ___deadline,
3173 )?;
3174 Ok(_response.map(|x| x))
3175 }
3176}
3177
3178#[derive(Debug, Clone)]
3179pub struct QueryProxy {
3180 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3181}
3182
3183impl fidl::endpoints::Proxy for QueryProxy {
3184 type Protocol = QueryMarker;
3185
3186 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3187 Self::new(inner)
3188 }
3189
3190 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3191 self.client.into_channel().map_err(|client| Self { client })
3192 }
3193
3194 fn as_channel(&self) -> &::fidl::AsyncChannel {
3195 self.client.as_channel()
3196 }
3197}
3198
3199impl QueryProxy {
3200 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3202 let protocol_name = <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3203 Self { client: fidl::client::Client::new(channel, protocol_name) }
3204 }
3205
3206 pub fn take_event_stream(&self) -> QueryEventStream {
3212 QueryEventStream { event_receiver: self.client.take_event_receiver() }
3213 }
3214
3215 pub fn r#enumerate(
3217 &self,
3218 mut test_url: &str,
3219 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3220 ) -> fidl::client::QueryResponseFut<
3221 QueryEnumerateResult,
3222 fidl::encoding::DefaultFuchsiaResourceDialect,
3223 > {
3224 QueryProxyInterface::r#enumerate(self, test_url, iterator)
3225 }
3226
3227 pub fn r#enumerate_in_realm(
3229 &self,
3230 mut test_url: &str,
3231 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3232 mut offers: &[fidl_fuchsia_component_decl::Offer],
3233 mut test_collection: &str,
3234 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3235 ) -> fidl::client::QueryResponseFut<
3236 QueryEnumerateInRealmResult,
3237 fidl::encoding::DefaultFuchsiaResourceDialect,
3238 > {
3239 QueryProxyInterface::r#enumerate_in_realm(
3240 self,
3241 test_url,
3242 realm,
3243 offers,
3244 test_collection,
3245 iterator,
3246 )
3247 }
3248}
3249
3250impl QueryProxyInterface for QueryProxy {
3251 type EnumerateResponseFut = fidl::client::QueryResponseFut<
3252 QueryEnumerateResult,
3253 fidl::encoding::DefaultFuchsiaResourceDialect,
3254 >;
3255 fn r#enumerate(
3256 &self,
3257 mut test_url: &str,
3258 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3259 ) -> Self::EnumerateResponseFut {
3260 fn _decode(
3261 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3262 ) -> Result<QueryEnumerateResult, fidl::Error> {
3263 let _response = fidl::client::decode_transaction_body::<
3264 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
3265 fidl::encoding::DefaultFuchsiaResourceDialect,
3266 0x6cd89c1f2728d418,
3267 >(_buf?)?;
3268 Ok(_response.map(|x| x))
3269 }
3270 self.client.send_query_and_decode::<QueryEnumerateRequest, QueryEnumerateResult>(
3271 (test_url, iterator),
3272 0x6cd89c1f2728d418,
3273 fidl::encoding::DynamicFlags::empty(),
3274 _decode,
3275 )
3276 }
3277
3278 type EnumerateInRealmResponseFut = fidl::client::QueryResponseFut<
3279 QueryEnumerateInRealmResult,
3280 fidl::encoding::DefaultFuchsiaResourceDialect,
3281 >;
3282 fn r#enumerate_in_realm(
3283 &self,
3284 mut test_url: &str,
3285 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3286 mut offers: &[fidl_fuchsia_component_decl::Offer],
3287 mut test_collection: &str,
3288 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3289 ) -> Self::EnumerateInRealmResponseFut {
3290 fn _decode(
3291 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3292 ) -> Result<QueryEnumerateInRealmResult, fidl::Error> {
3293 let _response = fidl::client::decode_transaction_body::<
3294 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
3295 fidl::encoding::DefaultFuchsiaResourceDialect,
3296 0x7f7f533194a51ec5,
3297 >(_buf?)?;
3298 Ok(_response.map(|x| x))
3299 }
3300 self.client
3301 .send_query_and_decode::<QueryEnumerateInRealmRequest, QueryEnumerateInRealmResult>(
3302 (test_url, realm, offers, test_collection, iterator),
3303 0x7f7f533194a51ec5,
3304 fidl::encoding::DynamicFlags::empty(),
3305 _decode,
3306 )
3307 }
3308}
3309
3310pub struct QueryEventStream {
3311 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3312}
3313
3314impl std::marker::Unpin for QueryEventStream {}
3315
3316impl futures::stream::FusedStream for QueryEventStream {
3317 fn is_terminated(&self) -> bool {
3318 self.event_receiver.is_terminated()
3319 }
3320}
3321
3322impl futures::Stream for QueryEventStream {
3323 type Item = Result<QueryEvent, fidl::Error>;
3324
3325 fn poll_next(
3326 mut self: std::pin::Pin<&mut Self>,
3327 cx: &mut std::task::Context<'_>,
3328 ) -> std::task::Poll<Option<Self::Item>> {
3329 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3330 &mut self.event_receiver,
3331 cx
3332 )?) {
3333 Some(buf) => std::task::Poll::Ready(Some(QueryEvent::decode(buf))),
3334 None => std::task::Poll::Ready(None),
3335 }
3336 }
3337}
3338
3339#[derive(Debug)]
3340pub enum QueryEvent {
3341 #[non_exhaustive]
3342 _UnknownEvent {
3343 ordinal: u64,
3345 },
3346}
3347
3348impl QueryEvent {
3349 fn decode(
3351 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3352 ) -> Result<QueryEvent, fidl::Error> {
3353 let (bytes, _handles) = buf.split_mut();
3354 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3355 debug_assert_eq!(tx_header.tx_id, 0);
3356 match tx_header.ordinal {
3357 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3358 Ok(QueryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3359 }
3360 _ => Err(fidl::Error::UnknownOrdinal {
3361 ordinal: tx_header.ordinal,
3362 protocol_name: <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3363 }),
3364 }
3365 }
3366}
3367
3368pub struct QueryRequestStream {
3370 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3371 is_terminated: bool,
3372}
3373
3374impl std::marker::Unpin for QueryRequestStream {}
3375
3376impl futures::stream::FusedStream for QueryRequestStream {
3377 fn is_terminated(&self) -> bool {
3378 self.is_terminated
3379 }
3380}
3381
3382impl fidl::endpoints::RequestStream for QueryRequestStream {
3383 type Protocol = QueryMarker;
3384 type ControlHandle = QueryControlHandle;
3385
3386 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3387 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3388 }
3389
3390 fn control_handle(&self) -> Self::ControlHandle {
3391 QueryControlHandle { inner: self.inner.clone() }
3392 }
3393
3394 fn into_inner(
3395 self,
3396 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3397 {
3398 (self.inner, self.is_terminated)
3399 }
3400
3401 fn from_inner(
3402 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3403 is_terminated: bool,
3404 ) -> Self {
3405 Self { inner, is_terminated }
3406 }
3407}
3408
3409impl futures::Stream for QueryRequestStream {
3410 type Item = Result<QueryRequest, fidl::Error>;
3411
3412 fn poll_next(
3413 mut self: std::pin::Pin<&mut Self>,
3414 cx: &mut std::task::Context<'_>,
3415 ) -> std::task::Poll<Option<Self::Item>> {
3416 let this = &mut *self;
3417 if this.inner.check_shutdown(cx) {
3418 this.is_terminated = true;
3419 return std::task::Poll::Ready(None);
3420 }
3421 if this.is_terminated {
3422 panic!("polled QueryRequestStream after completion");
3423 }
3424 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3425 |bytes, handles| {
3426 match this.inner.channel().read_etc(cx, bytes, handles) {
3427 std::task::Poll::Ready(Ok(())) => {}
3428 std::task::Poll::Pending => return std::task::Poll::Pending,
3429 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3430 this.is_terminated = true;
3431 return std::task::Poll::Ready(None);
3432 }
3433 std::task::Poll::Ready(Err(e)) => {
3434 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3435 e.into(),
3436 ))))
3437 }
3438 }
3439
3440 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3442
3443 std::task::Poll::Ready(Some(match header.ordinal {
3444 0x6cd89c1f2728d418 => {
3445 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3446 let mut req = fidl::new_empty!(
3447 QueryEnumerateRequest,
3448 fidl::encoding::DefaultFuchsiaResourceDialect
3449 );
3450 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<QueryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
3451 let control_handle = QueryControlHandle { inner: this.inner.clone() };
3452 Ok(QueryRequest::Enumerate {
3453 test_url: req.test_url,
3454 iterator: req.iterator,
3455
3456 responder: QueryEnumerateResponder {
3457 control_handle: std::mem::ManuallyDrop::new(control_handle),
3458 tx_id: header.tx_id,
3459 },
3460 })
3461 }
3462 0x7f7f533194a51ec5 => {
3463 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3464 let mut req = fidl::new_empty!(
3465 QueryEnumerateInRealmRequest,
3466 fidl::encoding::DefaultFuchsiaResourceDialect
3467 );
3468 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<QueryEnumerateInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
3469 let control_handle = QueryControlHandle { inner: this.inner.clone() };
3470 Ok(QueryRequest::EnumerateInRealm {
3471 test_url: req.test_url,
3472 realm: req.realm,
3473 offers: req.offers,
3474 test_collection: req.test_collection,
3475 iterator: req.iterator,
3476
3477 responder: QueryEnumerateInRealmResponder {
3478 control_handle: std::mem::ManuallyDrop::new(control_handle),
3479 tx_id: header.tx_id,
3480 },
3481 })
3482 }
3483 _ if header.tx_id == 0
3484 && header
3485 .dynamic_flags()
3486 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3487 {
3488 Ok(QueryRequest::_UnknownMethod {
3489 ordinal: header.ordinal,
3490 control_handle: QueryControlHandle { inner: this.inner.clone() },
3491 method_type: fidl::MethodType::OneWay,
3492 })
3493 }
3494 _ if header
3495 .dynamic_flags()
3496 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3497 {
3498 this.inner.send_framework_err(
3499 fidl::encoding::FrameworkErr::UnknownMethod,
3500 header.tx_id,
3501 header.ordinal,
3502 header.dynamic_flags(),
3503 (bytes, handles),
3504 )?;
3505 Ok(QueryRequest::_UnknownMethod {
3506 ordinal: header.ordinal,
3507 control_handle: QueryControlHandle { inner: this.inner.clone() },
3508 method_type: fidl::MethodType::TwoWay,
3509 })
3510 }
3511 _ => Err(fidl::Error::UnknownOrdinal {
3512 ordinal: header.ordinal,
3513 protocol_name: <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3514 }),
3515 }))
3516 },
3517 )
3518 }
3519}
3520
3521#[derive(Debug)]
3522pub enum QueryRequest {
3523 Enumerate {
3525 test_url: String,
3526 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3527 responder: QueryEnumerateResponder,
3528 },
3529 EnumerateInRealm {
3531 test_url: String,
3532 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3533 offers: Vec<fidl_fuchsia_component_decl::Offer>,
3534 test_collection: String,
3535 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3536 responder: QueryEnumerateInRealmResponder,
3537 },
3538 #[non_exhaustive]
3540 _UnknownMethod {
3541 ordinal: u64,
3543 control_handle: QueryControlHandle,
3544 method_type: fidl::MethodType,
3545 },
3546}
3547
3548impl QueryRequest {
3549 #[allow(irrefutable_let_patterns)]
3550 pub fn into_enumerate(
3551 self,
3552 ) -> Option<(String, fidl::endpoints::ServerEnd<CaseIteratorMarker>, QueryEnumerateResponder)>
3553 {
3554 if let QueryRequest::Enumerate { test_url, iterator, responder } = self {
3555 Some((test_url, iterator, responder))
3556 } else {
3557 None
3558 }
3559 }
3560
3561 #[allow(irrefutable_let_patterns)]
3562 pub fn into_enumerate_in_realm(
3563 self,
3564 ) -> Option<(
3565 String,
3566 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3567 Vec<fidl_fuchsia_component_decl::Offer>,
3568 String,
3569 fidl::endpoints::ServerEnd<CaseIteratorMarker>,
3570 QueryEnumerateInRealmResponder,
3571 )> {
3572 if let QueryRequest::EnumerateInRealm {
3573 test_url,
3574 realm,
3575 offers,
3576 test_collection,
3577 iterator,
3578 responder,
3579 } = self
3580 {
3581 Some((test_url, realm, offers, test_collection, iterator, responder))
3582 } else {
3583 None
3584 }
3585 }
3586
3587 pub fn method_name(&self) -> &'static str {
3589 match *self {
3590 QueryRequest::Enumerate { .. } => "enumerate",
3591 QueryRequest::EnumerateInRealm { .. } => "enumerate_in_realm",
3592 QueryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3593 "unknown one-way method"
3594 }
3595 QueryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3596 "unknown two-way method"
3597 }
3598 }
3599 }
3600}
3601
3602#[derive(Debug, Clone)]
3603pub struct QueryControlHandle {
3604 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3605}
3606
3607impl fidl::endpoints::ControlHandle for QueryControlHandle {
3608 fn shutdown(&self) {
3609 self.inner.shutdown()
3610 }
3611 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3612 self.inner.shutdown_with_epitaph(status)
3613 }
3614
3615 fn is_closed(&self) -> bool {
3616 self.inner.channel().is_closed()
3617 }
3618 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3619 self.inner.channel().on_closed()
3620 }
3621
3622 #[cfg(target_os = "fuchsia")]
3623 fn signal_peer(
3624 &self,
3625 clear_mask: zx::Signals,
3626 set_mask: zx::Signals,
3627 ) -> Result<(), zx_status::Status> {
3628 use fidl::Peered;
3629 self.inner.channel().signal_peer(clear_mask, set_mask)
3630 }
3631}
3632
3633impl QueryControlHandle {}
3634
3635#[must_use = "FIDL methods require a response to be sent"]
3636#[derive(Debug)]
3637pub struct QueryEnumerateResponder {
3638 control_handle: std::mem::ManuallyDrop<QueryControlHandle>,
3639 tx_id: u32,
3640}
3641
3642impl std::ops::Drop for QueryEnumerateResponder {
3646 fn drop(&mut self) {
3647 self.control_handle.shutdown();
3648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3650 }
3651}
3652
3653impl fidl::endpoints::Responder for QueryEnumerateResponder {
3654 type ControlHandle = QueryControlHandle;
3655
3656 fn control_handle(&self) -> &QueryControlHandle {
3657 &self.control_handle
3658 }
3659
3660 fn drop_without_shutdown(mut self) {
3661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3663 std::mem::forget(self);
3665 }
3666}
3667
3668impl QueryEnumerateResponder {
3669 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3673 let _result = self.send_raw(result);
3674 if _result.is_err() {
3675 self.control_handle.shutdown();
3676 }
3677 self.drop_without_shutdown();
3678 _result
3679 }
3680
3681 pub fn send_no_shutdown_on_err(
3683 self,
3684 mut result: Result<(), LaunchError>,
3685 ) -> Result<(), fidl::Error> {
3686 let _result = self.send_raw(result);
3687 self.drop_without_shutdown();
3688 _result
3689 }
3690
3691 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3692 self.control_handle.inner.send::<fidl::encoding::ResultType<
3693 fidl::encoding::EmptyStruct,
3694 LaunchError,
3695 >>(
3696 result,
3697 self.tx_id,
3698 0x6cd89c1f2728d418,
3699 fidl::encoding::DynamicFlags::empty(),
3700 )
3701 }
3702}
3703
3704#[must_use = "FIDL methods require a response to be sent"]
3705#[derive(Debug)]
3706pub struct QueryEnumerateInRealmResponder {
3707 control_handle: std::mem::ManuallyDrop<QueryControlHandle>,
3708 tx_id: u32,
3709}
3710
3711impl std::ops::Drop for QueryEnumerateInRealmResponder {
3715 fn drop(&mut self) {
3716 self.control_handle.shutdown();
3717 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3719 }
3720}
3721
3722impl fidl::endpoints::Responder for QueryEnumerateInRealmResponder {
3723 type ControlHandle = QueryControlHandle;
3724
3725 fn control_handle(&self) -> &QueryControlHandle {
3726 &self.control_handle
3727 }
3728
3729 fn drop_without_shutdown(mut self) {
3730 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3732 std::mem::forget(self);
3734 }
3735}
3736
3737impl QueryEnumerateInRealmResponder {
3738 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3742 let _result = self.send_raw(result);
3743 if _result.is_err() {
3744 self.control_handle.shutdown();
3745 }
3746 self.drop_without_shutdown();
3747 _result
3748 }
3749
3750 pub fn send_no_shutdown_on_err(
3752 self,
3753 mut result: Result<(), LaunchError>,
3754 ) -> Result<(), fidl::Error> {
3755 let _result = self.send_raw(result);
3756 self.drop_without_shutdown();
3757 _result
3758 }
3759
3760 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3761 self.control_handle.inner.send::<fidl::encoding::ResultType<
3762 fidl::encoding::EmptyStruct,
3763 LaunchError,
3764 >>(
3765 result,
3766 self.tx_id,
3767 0x7f7f533194a51ec5,
3768 fidl::encoding::DynamicFlags::empty(),
3769 )
3770 }
3771}
3772
3773#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3774pub struct RunBuilderMarker;
3775
3776impl fidl::endpoints::ProtocolMarker for RunBuilderMarker {
3777 type Proxy = RunBuilderProxy;
3778 type RequestStream = RunBuilderRequestStream;
3779 #[cfg(target_os = "fuchsia")]
3780 type SynchronousProxy = RunBuilderSynchronousProxy;
3781
3782 const DEBUG_NAME: &'static str = "fuchsia.test.manager.RunBuilder";
3783}
3784impl fidl::endpoints::DiscoverableProtocolMarker for RunBuilderMarker {}
3785
3786pub trait RunBuilderProxyInterface: Send + Sync {
3787 fn r#add_suite(
3788 &self,
3789 test_url: &str,
3790 options: &RunOptions,
3791 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3792 ) -> Result<(), fidl::Error>;
3793 fn r#add_suite_in_realm(
3794 &self,
3795 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3796 offers: &[fidl_fuchsia_component_decl::Offer],
3797 test_collection: &str,
3798 test_url: &str,
3799 options: &RunOptions,
3800 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3801 ) -> Result<(), fidl::Error>;
3802 fn r#with_scheduling_options(&self, options: &SchedulingOptions) -> Result<(), fidl::Error>;
3803 fn r#build(
3804 &self,
3805 controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3806 ) -> Result<(), fidl::Error>;
3807}
3808#[derive(Debug)]
3809#[cfg(target_os = "fuchsia")]
3810pub struct RunBuilderSynchronousProxy {
3811 client: fidl::client::sync::Client,
3812}
3813
3814#[cfg(target_os = "fuchsia")]
3815impl fidl::endpoints::SynchronousProxy for RunBuilderSynchronousProxy {
3816 type Proxy = RunBuilderProxy;
3817 type Protocol = RunBuilderMarker;
3818
3819 fn from_channel(inner: fidl::Channel) -> Self {
3820 Self::new(inner)
3821 }
3822
3823 fn into_channel(self) -> fidl::Channel {
3824 self.client.into_channel()
3825 }
3826
3827 fn as_channel(&self) -> &fidl::Channel {
3828 self.client.as_channel()
3829 }
3830}
3831
3832#[cfg(target_os = "fuchsia")]
3833impl RunBuilderSynchronousProxy {
3834 pub fn new(channel: fidl::Channel) -> Self {
3835 let protocol_name = <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3836 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3837 }
3838
3839 pub fn into_channel(self) -> fidl::Channel {
3840 self.client.into_channel()
3841 }
3842
3843 pub fn wait_for_event(
3846 &self,
3847 deadline: zx::MonotonicInstant,
3848 ) -> Result<RunBuilderEvent, fidl::Error> {
3849 RunBuilderEvent::decode(self.client.wait_for_event(deadline)?)
3850 }
3851
3852 pub fn r#add_suite(
3857 &self,
3858 mut test_url: &str,
3859 mut options: &RunOptions,
3860 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3861 ) -> Result<(), fidl::Error> {
3862 self.client.send::<RunBuilderAddSuiteRequest>(
3863 (test_url, options, controller),
3864 0x71e7f9a06daac486,
3865 fidl::encoding::DynamicFlags::FLEXIBLE,
3866 )
3867 }
3868
3869 pub fn r#add_suite_in_realm(
3875 &self,
3876 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3877 mut offers: &[fidl_fuchsia_component_decl::Offer],
3878 mut test_collection: &str,
3879 mut test_url: &str,
3880 mut options: &RunOptions,
3881 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3882 ) -> Result<(), fidl::Error> {
3883 self.client.send::<RunBuilderAddSuiteInRealmRequest>(
3884 (realm, offers, test_collection, test_url, options, controller),
3885 0x4d10c582715a8683,
3886 fidl::encoding::DynamicFlags::FLEXIBLE,
3887 )
3888 }
3889
3890 pub fn r#with_scheduling_options(
3892 &self,
3893 mut options: &SchedulingOptions,
3894 ) -> Result<(), fidl::Error> {
3895 self.client.send::<RunBuilderWithSchedulingOptionsRequest>(
3896 (options,),
3897 0x55e73fdbeade0b0b,
3898 fidl::encoding::DynamicFlags::FLEXIBLE,
3899 )
3900 }
3901
3902 pub fn r#build(
3907 &self,
3908 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3909 ) -> Result<(), fidl::Error> {
3910 self.client.send::<RunBuilderBuildRequest>(
3911 (controller,),
3912 0x7879f2360ff1f160,
3913 fidl::encoding::DynamicFlags::FLEXIBLE,
3914 )
3915 }
3916}
3917
3918#[derive(Debug, Clone)]
3919pub struct RunBuilderProxy {
3920 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3921}
3922
3923impl fidl::endpoints::Proxy for RunBuilderProxy {
3924 type Protocol = RunBuilderMarker;
3925
3926 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3927 Self::new(inner)
3928 }
3929
3930 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3931 self.client.into_channel().map_err(|client| Self { client })
3932 }
3933
3934 fn as_channel(&self) -> &::fidl::AsyncChannel {
3935 self.client.as_channel()
3936 }
3937}
3938
3939impl RunBuilderProxy {
3940 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3942 let protocol_name = <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3943 Self { client: fidl::client::Client::new(channel, protocol_name) }
3944 }
3945
3946 pub fn take_event_stream(&self) -> RunBuilderEventStream {
3952 RunBuilderEventStream { event_receiver: self.client.take_event_receiver() }
3953 }
3954
3955 pub fn r#add_suite(
3960 &self,
3961 mut test_url: &str,
3962 mut options: &RunOptions,
3963 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3964 ) -> Result<(), fidl::Error> {
3965 RunBuilderProxyInterface::r#add_suite(self, test_url, options, controller)
3966 }
3967
3968 pub fn r#add_suite_in_realm(
3974 &self,
3975 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3976 mut offers: &[fidl_fuchsia_component_decl::Offer],
3977 mut test_collection: &str,
3978 mut test_url: &str,
3979 mut options: &RunOptions,
3980 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3981 ) -> Result<(), fidl::Error> {
3982 RunBuilderProxyInterface::r#add_suite_in_realm(
3983 self,
3984 realm,
3985 offers,
3986 test_collection,
3987 test_url,
3988 options,
3989 controller,
3990 )
3991 }
3992
3993 pub fn r#with_scheduling_options(
3995 &self,
3996 mut options: &SchedulingOptions,
3997 ) -> Result<(), fidl::Error> {
3998 RunBuilderProxyInterface::r#with_scheduling_options(self, options)
3999 }
4000
4001 pub fn r#build(
4006 &self,
4007 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
4008 ) -> Result<(), fidl::Error> {
4009 RunBuilderProxyInterface::r#build(self, controller)
4010 }
4011}
4012
4013impl RunBuilderProxyInterface for RunBuilderProxy {
4014 fn r#add_suite(
4015 &self,
4016 mut test_url: &str,
4017 mut options: &RunOptions,
4018 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4019 ) -> Result<(), fidl::Error> {
4020 self.client.send::<RunBuilderAddSuiteRequest>(
4021 (test_url, options, controller),
4022 0x71e7f9a06daac486,
4023 fidl::encoding::DynamicFlags::FLEXIBLE,
4024 )
4025 }
4026
4027 fn r#add_suite_in_realm(
4028 &self,
4029 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
4030 mut offers: &[fidl_fuchsia_component_decl::Offer],
4031 mut test_collection: &str,
4032 mut test_url: &str,
4033 mut options: &RunOptions,
4034 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4035 ) -> Result<(), fidl::Error> {
4036 self.client.send::<RunBuilderAddSuiteInRealmRequest>(
4037 (realm, offers, test_collection, test_url, options, controller),
4038 0x4d10c582715a8683,
4039 fidl::encoding::DynamicFlags::FLEXIBLE,
4040 )
4041 }
4042
4043 fn r#with_scheduling_options(
4044 &self,
4045 mut options: &SchedulingOptions,
4046 ) -> Result<(), fidl::Error> {
4047 self.client.send::<RunBuilderWithSchedulingOptionsRequest>(
4048 (options,),
4049 0x55e73fdbeade0b0b,
4050 fidl::encoding::DynamicFlags::FLEXIBLE,
4051 )
4052 }
4053
4054 fn r#build(
4055 &self,
4056 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
4057 ) -> Result<(), fidl::Error> {
4058 self.client.send::<RunBuilderBuildRequest>(
4059 (controller,),
4060 0x7879f2360ff1f160,
4061 fidl::encoding::DynamicFlags::FLEXIBLE,
4062 )
4063 }
4064}
4065
4066pub struct RunBuilderEventStream {
4067 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4068}
4069
4070impl std::marker::Unpin for RunBuilderEventStream {}
4071
4072impl futures::stream::FusedStream for RunBuilderEventStream {
4073 fn is_terminated(&self) -> bool {
4074 self.event_receiver.is_terminated()
4075 }
4076}
4077
4078impl futures::Stream for RunBuilderEventStream {
4079 type Item = Result<RunBuilderEvent, fidl::Error>;
4080
4081 fn poll_next(
4082 mut self: std::pin::Pin<&mut Self>,
4083 cx: &mut std::task::Context<'_>,
4084 ) -> std::task::Poll<Option<Self::Item>> {
4085 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4086 &mut self.event_receiver,
4087 cx
4088 )?) {
4089 Some(buf) => std::task::Poll::Ready(Some(RunBuilderEvent::decode(buf))),
4090 None => std::task::Poll::Ready(None),
4091 }
4092 }
4093}
4094
4095#[derive(Debug)]
4096pub enum RunBuilderEvent {
4097 #[non_exhaustive]
4098 _UnknownEvent {
4099 ordinal: u64,
4101 },
4102}
4103
4104impl RunBuilderEvent {
4105 fn decode(
4107 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4108 ) -> Result<RunBuilderEvent, fidl::Error> {
4109 let (bytes, _handles) = buf.split_mut();
4110 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4111 debug_assert_eq!(tx_header.tx_id, 0);
4112 match tx_header.ordinal {
4113 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4114 Ok(RunBuilderEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4115 }
4116 _ => Err(fidl::Error::UnknownOrdinal {
4117 ordinal: tx_header.ordinal,
4118 protocol_name: <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4119 }),
4120 }
4121 }
4122}
4123
4124pub struct RunBuilderRequestStream {
4126 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4127 is_terminated: bool,
4128}
4129
4130impl std::marker::Unpin for RunBuilderRequestStream {}
4131
4132impl futures::stream::FusedStream for RunBuilderRequestStream {
4133 fn is_terminated(&self) -> bool {
4134 self.is_terminated
4135 }
4136}
4137
4138impl fidl::endpoints::RequestStream for RunBuilderRequestStream {
4139 type Protocol = RunBuilderMarker;
4140 type ControlHandle = RunBuilderControlHandle;
4141
4142 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4143 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4144 }
4145
4146 fn control_handle(&self) -> Self::ControlHandle {
4147 RunBuilderControlHandle { inner: self.inner.clone() }
4148 }
4149
4150 fn into_inner(
4151 self,
4152 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4153 {
4154 (self.inner, self.is_terminated)
4155 }
4156
4157 fn from_inner(
4158 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4159 is_terminated: bool,
4160 ) -> Self {
4161 Self { inner, is_terminated }
4162 }
4163}
4164
4165impl futures::Stream for RunBuilderRequestStream {
4166 type Item = Result<RunBuilderRequest, fidl::Error>;
4167
4168 fn poll_next(
4169 mut self: std::pin::Pin<&mut Self>,
4170 cx: &mut std::task::Context<'_>,
4171 ) -> std::task::Poll<Option<Self::Item>> {
4172 let this = &mut *self;
4173 if this.inner.check_shutdown(cx) {
4174 this.is_terminated = true;
4175 return std::task::Poll::Ready(None);
4176 }
4177 if this.is_terminated {
4178 panic!("polled RunBuilderRequestStream after completion");
4179 }
4180 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4181 |bytes, handles| {
4182 match this.inner.channel().read_etc(cx, bytes, handles) {
4183 std::task::Poll::Ready(Ok(())) => {}
4184 std::task::Poll::Pending => return std::task::Poll::Pending,
4185 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4186 this.is_terminated = true;
4187 return std::task::Poll::Ready(None);
4188 }
4189 std::task::Poll::Ready(Err(e)) => {
4190 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4191 e.into(),
4192 ))))
4193 }
4194 }
4195
4196 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4198
4199 std::task::Poll::Ready(Some(match header.ordinal {
4200 0x71e7f9a06daac486 => {
4201 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4202 let mut req = fidl::new_empty!(
4203 RunBuilderAddSuiteRequest,
4204 fidl::encoding::DefaultFuchsiaResourceDialect
4205 );
4206 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderAddSuiteRequest>(&header, _body_bytes, handles, &mut req)?;
4207 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
4208 Ok(RunBuilderRequest::AddSuite {
4209 test_url: req.test_url,
4210 options: req.options,
4211 controller: req.controller,
4212
4213 control_handle,
4214 })
4215 }
4216 0x4d10c582715a8683 => {
4217 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4218 let mut req = fidl::new_empty!(
4219 RunBuilderAddSuiteInRealmRequest,
4220 fidl::encoding::DefaultFuchsiaResourceDialect
4221 );
4222 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderAddSuiteInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
4223 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
4224 Ok(RunBuilderRequest::AddSuiteInRealm {
4225 realm: req.realm,
4226 offers: req.offers,
4227 test_collection: req.test_collection,
4228 test_url: req.test_url,
4229 options: req.options,
4230 controller: req.controller,
4231
4232 control_handle,
4233 })
4234 }
4235 0x55e73fdbeade0b0b => {
4236 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4237 let mut req = fidl::new_empty!(
4238 RunBuilderWithSchedulingOptionsRequest,
4239 fidl::encoding::DefaultFuchsiaResourceDialect
4240 );
4241 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderWithSchedulingOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
4242 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
4243 Ok(RunBuilderRequest::WithSchedulingOptions {
4244 options: req.options,
4245
4246 control_handle,
4247 })
4248 }
4249 0x7879f2360ff1f160 => {
4250 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4251 let mut req = fidl::new_empty!(
4252 RunBuilderBuildRequest,
4253 fidl::encoding::DefaultFuchsiaResourceDialect
4254 );
4255 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderBuildRequest>(&header, _body_bytes, handles, &mut req)?;
4256 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
4257 Ok(RunBuilderRequest::Build { controller: req.controller, control_handle })
4258 }
4259 _ if header.tx_id == 0
4260 && header
4261 .dynamic_flags()
4262 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4263 {
4264 Ok(RunBuilderRequest::_UnknownMethod {
4265 ordinal: header.ordinal,
4266 control_handle: RunBuilderControlHandle { inner: this.inner.clone() },
4267 method_type: fidl::MethodType::OneWay,
4268 })
4269 }
4270 _ if header
4271 .dynamic_flags()
4272 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4273 {
4274 this.inner.send_framework_err(
4275 fidl::encoding::FrameworkErr::UnknownMethod,
4276 header.tx_id,
4277 header.ordinal,
4278 header.dynamic_flags(),
4279 (bytes, handles),
4280 )?;
4281 Ok(RunBuilderRequest::_UnknownMethod {
4282 ordinal: header.ordinal,
4283 control_handle: RunBuilderControlHandle { inner: this.inner.clone() },
4284 method_type: fidl::MethodType::TwoWay,
4285 })
4286 }
4287 _ => Err(fidl::Error::UnknownOrdinal {
4288 ordinal: header.ordinal,
4289 protocol_name:
4290 <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4291 }),
4292 }))
4293 },
4294 )
4295 }
4296}
4297
4298#[derive(Debug)]
4301pub enum RunBuilderRequest {
4302 AddSuite {
4307 test_url: String,
4308 options: RunOptions,
4309 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4310 control_handle: RunBuilderControlHandle,
4311 },
4312 AddSuiteInRealm {
4318 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
4319 offers: Vec<fidl_fuchsia_component_decl::Offer>,
4320 test_collection: String,
4321 test_url: String,
4322 options: RunOptions,
4323 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4324 control_handle: RunBuilderControlHandle,
4325 },
4326 WithSchedulingOptions { options: SchedulingOptions, control_handle: RunBuilderControlHandle },
4328 Build {
4333 controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
4334 control_handle: RunBuilderControlHandle,
4335 },
4336 #[non_exhaustive]
4338 _UnknownMethod {
4339 ordinal: u64,
4341 control_handle: RunBuilderControlHandle,
4342 method_type: fidl::MethodType,
4343 },
4344}
4345
4346impl RunBuilderRequest {
4347 #[allow(irrefutable_let_patterns)]
4348 pub fn into_add_suite(
4349 self,
4350 ) -> Option<(
4351 String,
4352 RunOptions,
4353 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4354 RunBuilderControlHandle,
4355 )> {
4356 if let RunBuilderRequest::AddSuite { test_url, options, controller, control_handle } = self
4357 {
4358 Some((test_url, options, controller, control_handle))
4359 } else {
4360 None
4361 }
4362 }
4363
4364 #[allow(irrefutable_let_patterns)]
4365 pub fn into_add_suite_in_realm(
4366 self,
4367 ) -> Option<(
4368 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
4369 Vec<fidl_fuchsia_component_decl::Offer>,
4370 String,
4371 String,
4372 RunOptions,
4373 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
4374 RunBuilderControlHandle,
4375 )> {
4376 if let RunBuilderRequest::AddSuiteInRealm {
4377 realm,
4378 offers,
4379 test_collection,
4380 test_url,
4381 options,
4382 controller,
4383 control_handle,
4384 } = self
4385 {
4386 Some((realm, offers, test_collection, test_url, options, controller, control_handle))
4387 } else {
4388 None
4389 }
4390 }
4391
4392 #[allow(irrefutable_let_patterns)]
4393 pub fn into_with_scheduling_options(
4394 self,
4395 ) -> Option<(SchedulingOptions, RunBuilderControlHandle)> {
4396 if let RunBuilderRequest::WithSchedulingOptions { options, control_handle } = self {
4397 Some((options, control_handle))
4398 } else {
4399 None
4400 }
4401 }
4402
4403 #[allow(irrefutable_let_patterns)]
4404 pub fn into_build(
4405 self,
4406 ) -> Option<(fidl::endpoints::ServerEnd<RunControllerMarker>, RunBuilderControlHandle)> {
4407 if let RunBuilderRequest::Build { controller, control_handle } = self {
4408 Some((controller, control_handle))
4409 } else {
4410 None
4411 }
4412 }
4413
4414 pub fn method_name(&self) -> &'static str {
4416 match *self {
4417 RunBuilderRequest::AddSuite { .. } => "add_suite",
4418 RunBuilderRequest::AddSuiteInRealm { .. } => "add_suite_in_realm",
4419 RunBuilderRequest::WithSchedulingOptions { .. } => "with_scheduling_options",
4420 RunBuilderRequest::Build { .. } => "build",
4421 RunBuilderRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
4422 "unknown one-way method"
4423 }
4424 RunBuilderRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
4425 "unknown two-way method"
4426 }
4427 }
4428 }
4429}
4430
4431#[derive(Debug, Clone)]
4432pub struct RunBuilderControlHandle {
4433 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4434}
4435
4436impl fidl::endpoints::ControlHandle for RunBuilderControlHandle {
4437 fn shutdown(&self) {
4438 self.inner.shutdown()
4439 }
4440 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4441 self.inner.shutdown_with_epitaph(status)
4442 }
4443
4444 fn is_closed(&self) -> bool {
4445 self.inner.channel().is_closed()
4446 }
4447 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4448 self.inner.channel().on_closed()
4449 }
4450
4451 #[cfg(target_os = "fuchsia")]
4452 fn signal_peer(
4453 &self,
4454 clear_mask: zx::Signals,
4455 set_mask: zx::Signals,
4456 ) -> Result<(), zx_status::Status> {
4457 use fidl::Peered;
4458 self.inner.channel().signal_peer(clear_mask, set_mask)
4459 }
4460}
4461
4462impl RunBuilderControlHandle {}
4463
4464#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4465pub struct RunControllerMarker;
4466
4467impl fidl::endpoints::ProtocolMarker for RunControllerMarker {
4468 type Proxy = RunControllerProxy;
4469 type RequestStream = RunControllerRequestStream;
4470 #[cfg(target_os = "fuchsia")]
4471 type SynchronousProxy = RunControllerSynchronousProxy;
4472
4473 const DEBUG_NAME: &'static str = "fuchsia.test.manager.RunController";
4474}
4475impl fidl::endpoints::DiscoverableProtocolMarker for RunControllerMarker {}
4476
4477pub trait RunControllerProxyInterface: Send + Sync {
4478 fn r#stop(&self) -> Result<(), fidl::Error>;
4479 fn r#kill(&self) -> Result<(), fidl::Error>;
4480 type GetEventsResponseFut: std::future::Future<Output = Result<Vec<RunEvent>, fidl::Error>>
4481 + Send;
4482 fn r#get_events(&self) -> Self::GetEventsResponseFut;
4483}
4484#[derive(Debug)]
4485#[cfg(target_os = "fuchsia")]
4486pub struct RunControllerSynchronousProxy {
4487 client: fidl::client::sync::Client,
4488}
4489
4490#[cfg(target_os = "fuchsia")]
4491impl fidl::endpoints::SynchronousProxy for RunControllerSynchronousProxy {
4492 type Proxy = RunControllerProxy;
4493 type Protocol = RunControllerMarker;
4494
4495 fn from_channel(inner: fidl::Channel) -> Self {
4496 Self::new(inner)
4497 }
4498
4499 fn into_channel(self) -> fidl::Channel {
4500 self.client.into_channel()
4501 }
4502
4503 fn as_channel(&self) -> &fidl::Channel {
4504 self.client.as_channel()
4505 }
4506}
4507
4508#[cfg(target_os = "fuchsia")]
4509impl RunControllerSynchronousProxy {
4510 pub fn new(channel: fidl::Channel) -> Self {
4511 let protocol_name = <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4512 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4513 }
4514
4515 pub fn into_channel(self) -> fidl::Channel {
4516 self.client.into_channel()
4517 }
4518
4519 pub fn wait_for_event(
4522 &self,
4523 deadline: zx::MonotonicInstant,
4524 ) -> Result<RunControllerEvent, fidl::Error> {
4525 RunControllerEvent::decode(self.client.wait_for_event(deadline)?)
4526 }
4527
4528 pub fn r#stop(&self) -> Result<(), fidl::Error> {
4533 self.client.send::<fidl::encoding::EmptyPayload>(
4534 (),
4535 0x24972633e2cf712d,
4536 fidl::encoding::DynamicFlags::FLEXIBLE,
4537 )
4538 }
4539
4540 pub fn r#kill(&self) -> Result<(), fidl::Error> {
4544 self.client.send::<fidl::encoding::EmptyPayload>(
4545 (),
4546 0x6e62104929fc55c5,
4547 fidl::encoding::DynamicFlags::FLEXIBLE,
4548 )
4549 }
4550
4551 pub fn r#get_events(
4555 &self,
4556 ___deadline: zx::MonotonicInstant,
4557 ) -> Result<Vec<RunEvent>, fidl::Error> {
4558 let _response = self
4559 .client
4560 .send_query::<fidl::encoding::EmptyPayload, RunControllerGetEventsResponse>(
4561 (),
4562 0x273bbd98cfcea4ba,
4563 fidl::encoding::DynamicFlags::empty(),
4564 ___deadline,
4565 )?;
4566 Ok(_response.events)
4567 }
4568}
4569
4570#[derive(Debug, Clone)]
4571pub struct RunControllerProxy {
4572 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4573}
4574
4575impl fidl::endpoints::Proxy for RunControllerProxy {
4576 type Protocol = RunControllerMarker;
4577
4578 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4579 Self::new(inner)
4580 }
4581
4582 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4583 self.client.into_channel().map_err(|client| Self { client })
4584 }
4585
4586 fn as_channel(&self) -> &::fidl::AsyncChannel {
4587 self.client.as_channel()
4588 }
4589}
4590
4591impl RunControllerProxy {
4592 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4594 let protocol_name = <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4595 Self { client: fidl::client::Client::new(channel, protocol_name) }
4596 }
4597
4598 pub fn take_event_stream(&self) -> RunControllerEventStream {
4604 RunControllerEventStream { event_receiver: self.client.take_event_receiver() }
4605 }
4606
4607 pub fn r#stop(&self) -> Result<(), fidl::Error> {
4612 RunControllerProxyInterface::r#stop(self)
4613 }
4614
4615 pub fn r#kill(&self) -> Result<(), fidl::Error> {
4619 RunControllerProxyInterface::r#kill(self)
4620 }
4621
4622 pub fn r#get_events(
4626 &self,
4627 ) -> fidl::client::QueryResponseFut<Vec<RunEvent>, fidl::encoding::DefaultFuchsiaResourceDialect>
4628 {
4629 RunControllerProxyInterface::r#get_events(self)
4630 }
4631}
4632
4633impl RunControllerProxyInterface for RunControllerProxy {
4634 fn r#stop(&self) -> Result<(), fidl::Error> {
4635 self.client.send::<fidl::encoding::EmptyPayload>(
4636 (),
4637 0x24972633e2cf712d,
4638 fidl::encoding::DynamicFlags::FLEXIBLE,
4639 )
4640 }
4641
4642 fn r#kill(&self) -> Result<(), fidl::Error> {
4643 self.client.send::<fidl::encoding::EmptyPayload>(
4644 (),
4645 0x6e62104929fc55c5,
4646 fidl::encoding::DynamicFlags::FLEXIBLE,
4647 )
4648 }
4649
4650 type GetEventsResponseFut = fidl::client::QueryResponseFut<
4651 Vec<RunEvent>,
4652 fidl::encoding::DefaultFuchsiaResourceDialect,
4653 >;
4654 fn r#get_events(&self) -> Self::GetEventsResponseFut {
4655 fn _decode(
4656 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4657 ) -> Result<Vec<RunEvent>, fidl::Error> {
4658 let _response = fidl::client::decode_transaction_body::<
4659 RunControllerGetEventsResponse,
4660 fidl::encoding::DefaultFuchsiaResourceDialect,
4661 0x273bbd98cfcea4ba,
4662 >(_buf?)?;
4663 Ok(_response.events)
4664 }
4665 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<RunEvent>>(
4666 (),
4667 0x273bbd98cfcea4ba,
4668 fidl::encoding::DynamicFlags::empty(),
4669 _decode,
4670 )
4671 }
4672}
4673
4674pub struct RunControllerEventStream {
4675 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4676}
4677
4678impl std::marker::Unpin for RunControllerEventStream {}
4679
4680impl futures::stream::FusedStream for RunControllerEventStream {
4681 fn is_terminated(&self) -> bool {
4682 self.event_receiver.is_terminated()
4683 }
4684}
4685
4686impl futures::Stream for RunControllerEventStream {
4687 type Item = Result<RunControllerEvent, fidl::Error>;
4688
4689 fn poll_next(
4690 mut self: std::pin::Pin<&mut Self>,
4691 cx: &mut std::task::Context<'_>,
4692 ) -> std::task::Poll<Option<Self::Item>> {
4693 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4694 &mut self.event_receiver,
4695 cx
4696 )?) {
4697 Some(buf) => std::task::Poll::Ready(Some(RunControllerEvent::decode(buf))),
4698 None => std::task::Poll::Ready(None),
4699 }
4700 }
4701}
4702
4703#[derive(Debug)]
4704pub enum RunControllerEvent {
4705 #[non_exhaustive]
4706 _UnknownEvent {
4707 ordinal: u64,
4709 },
4710}
4711
4712impl RunControllerEvent {
4713 fn decode(
4715 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4716 ) -> Result<RunControllerEvent, fidl::Error> {
4717 let (bytes, _handles) = buf.split_mut();
4718 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4719 debug_assert_eq!(tx_header.tx_id, 0);
4720 match tx_header.ordinal {
4721 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4722 Ok(RunControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4723 }
4724 _ => Err(fidl::Error::UnknownOrdinal {
4725 ordinal: tx_header.ordinal,
4726 protocol_name: <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4727 }),
4728 }
4729 }
4730}
4731
4732pub struct RunControllerRequestStream {
4734 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4735 is_terminated: bool,
4736}
4737
4738impl std::marker::Unpin for RunControllerRequestStream {}
4739
4740impl futures::stream::FusedStream for RunControllerRequestStream {
4741 fn is_terminated(&self) -> bool {
4742 self.is_terminated
4743 }
4744}
4745
4746impl fidl::endpoints::RequestStream for RunControllerRequestStream {
4747 type Protocol = RunControllerMarker;
4748 type ControlHandle = RunControllerControlHandle;
4749
4750 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4751 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4752 }
4753
4754 fn control_handle(&self) -> Self::ControlHandle {
4755 RunControllerControlHandle { inner: self.inner.clone() }
4756 }
4757
4758 fn into_inner(
4759 self,
4760 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4761 {
4762 (self.inner, self.is_terminated)
4763 }
4764
4765 fn from_inner(
4766 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4767 is_terminated: bool,
4768 ) -> Self {
4769 Self { inner, is_terminated }
4770 }
4771}
4772
4773impl futures::Stream for RunControllerRequestStream {
4774 type Item = Result<RunControllerRequest, fidl::Error>;
4775
4776 fn poll_next(
4777 mut self: std::pin::Pin<&mut Self>,
4778 cx: &mut std::task::Context<'_>,
4779 ) -> std::task::Poll<Option<Self::Item>> {
4780 let this = &mut *self;
4781 if this.inner.check_shutdown(cx) {
4782 this.is_terminated = true;
4783 return std::task::Poll::Ready(None);
4784 }
4785 if this.is_terminated {
4786 panic!("polled RunControllerRequestStream after completion");
4787 }
4788 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4789 |bytes, handles| {
4790 match this.inner.channel().read_etc(cx, bytes, handles) {
4791 std::task::Poll::Ready(Ok(())) => {}
4792 std::task::Poll::Pending => return std::task::Poll::Pending,
4793 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4794 this.is_terminated = true;
4795 return std::task::Poll::Ready(None);
4796 }
4797 std::task::Poll::Ready(Err(e)) => {
4798 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4799 e.into(),
4800 ))))
4801 }
4802 }
4803
4804 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4806
4807 std::task::Poll::Ready(Some(match header.ordinal {
4808 0x24972633e2cf712d => {
4809 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4810 let mut req = fidl::new_empty!(
4811 fidl::encoding::EmptyPayload,
4812 fidl::encoding::DefaultFuchsiaResourceDialect
4813 );
4814 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4815 let control_handle =
4816 RunControllerControlHandle { inner: this.inner.clone() };
4817 Ok(RunControllerRequest::Stop { control_handle })
4818 }
4819 0x6e62104929fc55c5 => {
4820 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4821 let mut req = fidl::new_empty!(
4822 fidl::encoding::EmptyPayload,
4823 fidl::encoding::DefaultFuchsiaResourceDialect
4824 );
4825 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4826 let control_handle =
4827 RunControllerControlHandle { inner: this.inner.clone() };
4828 Ok(RunControllerRequest::Kill { control_handle })
4829 }
4830 0x273bbd98cfcea4ba => {
4831 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4832 let mut req = fidl::new_empty!(
4833 fidl::encoding::EmptyPayload,
4834 fidl::encoding::DefaultFuchsiaResourceDialect
4835 );
4836 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4837 let control_handle =
4838 RunControllerControlHandle { inner: this.inner.clone() };
4839 Ok(RunControllerRequest::GetEvents {
4840 responder: RunControllerGetEventsResponder {
4841 control_handle: std::mem::ManuallyDrop::new(control_handle),
4842 tx_id: header.tx_id,
4843 },
4844 })
4845 }
4846 _ if header.tx_id == 0
4847 && header
4848 .dynamic_flags()
4849 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4850 {
4851 Ok(RunControllerRequest::_UnknownMethod {
4852 ordinal: header.ordinal,
4853 control_handle: RunControllerControlHandle {
4854 inner: this.inner.clone(),
4855 },
4856 method_type: fidl::MethodType::OneWay,
4857 })
4858 }
4859 _ if header
4860 .dynamic_flags()
4861 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4862 {
4863 this.inner.send_framework_err(
4864 fidl::encoding::FrameworkErr::UnknownMethod,
4865 header.tx_id,
4866 header.ordinal,
4867 header.dynamic_flags(),
4868 (bytes, handles),
4869 )?;
4870 Ok(RunControllerRequest::_UnknownMethod {
4871 ordinal: header.ordinal,
4872 control_handle: RunControllerControlHandle {
4873 inner: this.inner.clone(),
4874 },
4875 method_type: fidl::MethodType::TwoWay,
4876 })
4877 }
4878 _ => Err(fidl::Error::UnknownOrdinal {
4879 ordinal: header.ordinal,
4880 protocol_name:
4881 <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4882 }),
4883 }))
4884 },
4885 )
4886 }
4887}
4888
4889#[derive(Debug)]
4894pub enum RunControllerRequest {
4895 Stop { control_handle: RunControllerControlHandle },
4900 Kill { control_handle: RunControllerControlHandle },
4904 GetEvents { responder: RunControllerGetEventsResponder },
4908 #[non_exhaustive]
4910 _UnknownMethod {
4911 ordinal: u64,
4913 control_handle: RunControllerControlHandle,
4914 method_type: fidl::MethodType,
4915 },
4916}
4917
4918impl RunControllerRequest {
4919 #[allow(irrefutable_let_patterns)]
4920 pub fn into_stop(self) -> Option<(RunControllerControlHandle)> {
4921 if let RunControllerRequest::Stop { control_handle } = self {
4922 Some((control_handle))
4923 } else {
4924 None
4925 }
4926 }
4927
4928 #[allow(irrefutable_let_patterns)]
4929 pub fn into_kill(self) -> Option<(RunControllerControlHandle)> {
4930 if let RunControllerRequest::Kill { control_handle } = self {
4931 Some((control_handle))
4932 } else {
4933 None
4934 }
4935 }
4936
4937 #[allow(irrefutable_let_patterns)]
4938 pub fn into_get_events(self) -> Option<(RunControllerGetEventsResponder)> {
4939 if let RunControllerRequest::GetEvents { responder } = self {
4940 Some((responder))
4941 } else {
4942 None
4943 }
4944 }
4945
4946 pub fn method_name(&self) -> &'static str {
4948 match *self {
4949 RunControllerRequest::Stop { .. } => "stop",
4950 RunControllerRequest::Kill { .. } => "kill",
4951 RunControllerRequest::GetEvents { .. } => "get_events",
4952 RunControllerRequest::_UnknownMethod {
4953 method_type: fidl::MethodType::OneWay, ..
4954 } => "unknown one-way method",
4955 RunControllerRequest::_UnknownMethod {
4956 method_type: fidl::MethodType::TwoWay, ..
4957 } => "unknown two-way method",
4958 }
4959 }
4960}
4961
4962#[derive(Debug, Clone)]
4963pub struct RunControllerControlHandle {
4964 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4965}
4966
4967impl fidl::endpoints::ControlHandle for RunControllerControlHandle {
4968 fn shutdown(&self) {
4969 self.inner.shutdown()
4970 }
4971 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4972 self.inner.shutdown_with_epitaph(status)
4973 }
4974
4975 fn is_closed(&self) -> bool {
4976 self.inner.channel().is_closed()
4977 }
4978 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4979 self.inner.channel().on_closed()
4980 }
4981
4982 #[cfg(target_os = "fuchsia")]
4983 fn signal_peer(
4984 &self,
4985 clear_mask: zx::Signals,
4986 set_mask: zx::Signals,
4987 ) -> Result<(), zx_status::Status> {
4988 use fidl::Peered;
4989 self.inner.channel().signal_peer(clear_mask, set_mask)
4990 }
4991}
4992
4993impl RunControllerControlHandle {}
4994
4995#[must_use = "FIDL methods require a response to be sent"]
4996#[derive(Debug)]
4997pub struct RunControllerGetEventsResponder {
4998 control_handle: std::mem::ManuallyDrop<RunControllerControlHandle>,
4999 tx_id: u32,
5000}
5001
5002impl std::ops::Drop for RunControllerGetEventsResponder {
5006 fn drop(&mut self) {
5007 self.control_handle.shutdown();
5008 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5010 }
5011}
5012
5013impl fidl::endpoints::Responder for RunControllerGetEventsResponder {
5014 type ControlHandle = RunControllerControlHandle;
5015
5016 fn control_handle(&self) -> &RunControllerControlHandle {
5017 &self.control_handle
5018 }
5019
5020 fn drop_without_shutdown(mut self) {
5021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5023 std::mem::forget(self);
5025 }
5026}
5027
5028impl RunControllerGetEventsResponder {
5029 pub fn send(self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
5033 let _result = self.send_raw(events);
5034 if _result.is_err() {
5035 self.control_handle.shutdown();
5036 }
5037 self.drop_without_shutdown();
5038 _result
5039 }
5040
5041 pub fn send_no_shutdown_on_err(self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
5043 let _result = self.send_raw(events);
5044 self.drop_without_shutdown();
5045 _result
5046 }
5047
5048 fn send_raw(&self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
5049 self.control_handle.inner.send::<RunControllerGetEventsResponse>(
5050 (events.as_mut(),),
5051 self.tx_id,
5052 0x273bbd98cfcea4ba,
5053 fidl::encoding::DynamicFlags::empty(),
5054 )
5055 }
5056}
5057
5058#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5059pub struct SuiteControllerMarker;
5060
5061impl fidl::endpoints::ProtocolMarker for SuiteControllerMarker {
5062 type Proxy = SuiteControllerProxy;
5063 type RequestStream = SuiteControllerRequestStream;
5064 #[cfg(target_os = "fuchsia")]
5065 type SynchronousProxy = SuiteControllerSynchronousProxy;
5066
5067 const DEBUG_NAME: &'static str = "(anonymous) SuiteController";
5068}
5069pub type SuiteControllerWatchEventsResult = Result<Vec<Event>, LaunchError>;
5070pub type SuiteControllerGetEventsResult = Result<Vec<SuiteEvent>, LaunchError>;
5071
5072pub trait SuiteControllerProxyInterface: Send + Sync {
5073 fn r#stop(&self) -> Result<(), fidl::Error>;
5074 fn r#kill(&self) -> Result<(), fidl::Error>;
5075 type WatchEventsResponseFut: std::future::Future<Output = Result<SuiteControllerWatchEventsResult, fidl::Error>>
5076 + Send;
5077 fn r#watch_events(&self) -> Self::WatchEventsResponseFut;
5078 type GetEventsResponseFut: std::future::Future<Output = Result<SuiteControllerGetEventsResult, fidl::Error>>
5079 + Send;
5080 fn r#get_events(&self) -> Self::GetEventsResponseFut;
5081}
5082#[derive(Debug)]
5083#[cfg(target_os = "fuchsia")]
5084pub struct SuiteControllerSynchronousProxy {
5085 client: fidl::client::sync::Client,
5086}
5087
5088#[cfg(target_os = "fuchsia")]
5089impl fidl::endpoints::SynchronousProxy for SuiteControllerSynchronousProxy {
5090 type Proxy = SuiteControllerProxy;
5091 type Protocol = SuiteControllerMarker;
5092
5093 fn from_channel(inner: fidl::Channel) -> Self {
5094 Self::new(inner)
5095 }
5096
5097 fn into_channel(self) -> fidl::Channel {
5098 self.client.into_channel()
5099 }
5100
5101 fn as_channel(&self) -> &fidl::Channel {
5102 self.client.as_channel()
5103 }
5104}
5105
5106#[cfg(target_os = "fuchsia")]
5107impl SuiteControllerSynchronousProxy {
5108 pub fn new(channel: fidl::Channel) -> Self {
5109 let protocol_name = <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5110 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5111 }
5112
5113 pub fn into_channel(self) -> fidl::Channel {
5114 self.client.into_channel()
5115 }
5116
5117 pub fn wait_for_event(
5120 &self,
5121 deadline: zx::MonotonicInstant,
5122 ) -> Result<SuiteControllerEvent, fidl::Error> {
5123 SuiteControllerEvent::decode(self.client.wait_for_event(deadline)?)
5124 }
5125
5126 pub fn r#stop(&self) -> Result<(), fidl::Error> {
5129 self.client.send::<fidl::encoding::EmptyPayload>(
5130 (),
5131 0x4675fc6c8f404fef,
5132 fidl::encoding::DynamicFlags::FLEXIBLE,
5133 )
5134 }
5135
5136 pub fn r#kill(&self) -> Result<(), fidl::Error> {
5140 self.client.send::<fidl::encoding::EmptyPayload>(
5141 (),
5142 0x5f813fb72887fc17,
5143 fidl::encoding::DynamicFlags::FLEXIBLE,
5144 )
5145 }
5146
5147 pub fn r#watch_events(
5150 &self,
5151 ___deadline: zx::MonotonicInstant,
5152 ) -> Result<SuiteControllerWatchEventsResult, fidl::Error> {
5153 let _response =
5154 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
5155 SuiteControllerWatchEventsResponse,
5156 LaunchError,
5157 >>(
5158 (),
5159 0x5d1a75b1d06839b4,
5160 fidl::encoding::DynamicFlags::empty(),
5161 ___deadline,
5162 )?;
5163 Ok(_response.map(|x| x.events))
5164 }
5165
5166 pub fn r#get_events(
5170 &self,
5171 ___deadline: zx::MonotonicInstant,
5172 ) -> Result<SuiteControllerGetEventsResult, fidl::Error> {
5173 let _response = self.client.send_query::<
5174 fidl::encoding::EmptyPayload,
5175 fidl::encoding::FlexibleResultType<SuiteControllerGetEventsResponse, LaunchError>,
5176 >(
5177 (),
5178 0x1f2ec93d2236d1db,
5179 fidl::encoding::DynamicFlags::FLEXIBLE,
5180 ___deadline,
5181 )?
5182 .into_result::<SuiteControllerMarker>("get_events")?;
5183 Ok(_response.map(|x| x.events))
5184 }
5185}
5186
5187#[derive(Debug, Clone)]
5188pub struct SuiteControllerProxy {
5189 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5190}
5191
5192impl fidl::endpoints::Proxy for SuiteControllerProxy {
5193 type Protocol = SuiteControllerMarker;
5194
5195 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5196 Self::new(inner)
5197 }
5198
5199 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5200 self.client.into_channel().map_err(|client| Self { client })
5201 }
5202
5203 fn as_channel(&self) -> &::fidl::AsyncChannel {
5204 self.client.as_channel()
5205 }
5206}
5207
5208impl SuiteControllerProxy {
5209 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5211 let protocol_name = <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5212 Self { client: fidl::client::Client::new(channel, protocol_name) }
5213 }
5214
5215 pub fn take_event_stream(&self) -> SuiteControllerEventStream {
5221 SuiteControllerEventStream { event_receiver: self.client.take_event_receiver() }
5222 }
5223
5224 pub fn r#stop(&self) -> Result<(), fidl::Error> {
5227 SuiteControllerProxyInterface::r#stop(self)
5228 }
5229
5230 pub fn r#kill(&self) -> Result<(), fidl::Error> {
5234 SuiteControllerProxyInterface::r#kill(self)
5235 }
5236
5237 pub fn r#watch_events(
5240 &self,
5241 ) -> fidl::client::QueryResponseFut<
5242 SuiteControllerWatchEventsResult,
5243 fidl::encoding::DefaultFuchsiaResourceDialect,
5244 > {
5245 SuiteControllerProxyInterface::r#watch_events(self)
5246 }
5247
5248 pub fn r#get_events(
5252 &self,
5253 ) -> fidl::client::QueryResponseFut<
5254 SuiteControllerGetEventsResult,
5255 fidl::encoding::DefaultFuchsiaResourceDialect,
5256 > {
5257 SuiteControllerProxyInterface::r#get_events(self)
5258 }
5259}
5260
5261impl SuiteControllerProxyInterface for SuiteControllerProxy {
5262 fn r#stop(&self) -> Result<(), fidl::Error> {
5263 self.client.send::<fidl::encoding::EmptyPayload>(
5264 (),
5265 0x4675fc6c8f404fef,
5266 fidl::encoding::DynamicFlags::FLEXIBLE,
5267 )
5268 }
5269
5270 fn r#kill(&self) -> Result<(), fidl::Error> {
5271 self.client.send::<fidl::encoding::EmptyPayload>(
5272 (),
5273 0x5f813fb72887fc17,
5274 fidl::encoding::DynamicFlags::FLEXIBLE,
5275 )
5276 }
5277
5278 type WatchEventsResponseFut = fidl::client::QueryResponseFut<
5279 SuiteControllerWatchEventsResult,
5280 fidl::encoding::DefaultFuchsiaResourceDialect,
5281 >;
5282 fn r#watch_events(&self) -> Self::WatchEventsResponseFut {
5283 fn _decode(
5284 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5285 ) -> Result<SuiteControllerWatchEventsResult, fidl::Error> {
5286 let _response = fidl::client::decode_transaction_body::<
5287 fidl::encoding::ResultType<SuiteControllerWatchEventsResponse, LaunchError>,
5288 fidl::encoding::DefaultFuchsiaResourceDialect,
5289 0x5d1a75b1d06839b4,
5290 >(_buf?)?;
5291 Ok(_response.map(|x| x.events))
5292 }
5293 self.client.send_query_and_decode::<
5294 fidl::encoding::EmptyPayload,
5295 SuiteControllerWatchEventsResult,
5296 >(
5297 (),
5298 0x5d1a75b1d06839b4,
5299 fidl::encoding::DynamicFlags::empty(),
5300 _decode,
5301 )
5302 }
5303
5304 type GetEventsResponseFut = fidl::client::QueryResponseFut<
5305 SuiteControllerGetEventsResult,
5306 fidl::encoding::DefaultFuchsiaResourceDialect,
5307 >;
5308 fn r#get_events(&self) -> Self::GetEventsResponseFut {
5309 fn _decode(
5310 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5311 ) -> Result<SuiteControllerGetEventsResult, fidl::Error> {
5312 let _response = fidl::client::decode_transaction_body::<
5313 fidl::encoding::FlexibleResultType<SuiteControllerGetEventsResponse, LaunchError>,
5314 fidl::encoding::DefaultFuchsiaResourceDialect,
5315 0x1f2ec93d2236d1db,
5316 >(_buf?)?
5317 .into_result::<SuiteControllerMarker>("get_events")?;
5318 Ok(_response.map(|x| x.events))
5319 }
5320 self.client
5321 .send_query_and_decode::<fidl::encoding::EmptyPayload, SuiteControllerGetEventsResult>(
5322 (),
5323 0x1f2ec93d2236d1db,
5324 fidl::encoding::DynamicFlags::FLEXIBLE,
5325 _decode,
5326 )
5327 }
5328}
5329
5330pub struct SuiteControllerEventStream {
5331 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5332}
5333
5334impl std::marker::Unpin for SuiteControllerEventStream {}
5335
5336impl futures::stream::FusedStream for SuiteControllerEventStream {
5337 fn is_terminated(&self) -> bool {
5338 self.event_receiver.is_terminated()
5339 }
5340}
5341
5342impl futures::Stream for SuiteControllerEventStream {
5343 type Item = Result<SuiteControllerEvent, fidl::Error>;
5344
5345 fn poll_next(
5346 mut self: std::pin::Pin<&mut Self>,
5347 cx: &mut std::task::Context<'_>,
5348 ) -> std::task::Poll<Option<Self::Item>> {
5349 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5350 &mut self.event_receiver,
5351 cx
5352 )?) {
5353 Some(buf) => std::task::Poll::Ready(Some(SuiteControllerEvent::decode(buf))),
5354 None => std::task::Poll::Ready(None),
5355 }
5356 }
5357}
5358
5359#[derive(Debug)]
5360pub enum SuiteControllerEvent {
5361 #[non_exhaustive]
5362 _UnknownEvent {
5363 ordinal: u64,
5365 },
5366}
5367
5368impl SuiteControllerEvent {
5369 fn decode(
5371 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5372 ) -> Result<SuiteControllerEvent, fidl::Error> {
5373 let (bytes, _handles) = buf.split_mut();
5374 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5375 debug_assert_eq!(tx_header.tx_id, 0);
5376 match tx_header.ordinal {
5377 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5378 Ok(SuiteControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5379 }
5380 _ => Err(fidl::Error::UnknownOrdinal {
5381 ordinal: tx_header.ordinal,
5382 protocol_name:
5383 <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5384 }),
5385 }
5386 }
5387}
5388
5389pub struct SuiteControllerRequestStream {
5391 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5392 is_terminated: bool,
5393}
5394
5395impl std::marker::Unpin for SuiteControllerRequestStream {}
5396
5397impl futures::stream::FusedStream for SuiteControllerRequestStream {
5398 fn is_terminated(&self) -> bool {
5399 self.is_terminated
5400 }
5401}
5402
5403impl fidl::endpoints::RequestStream for SuiteControllerRequestStream {
5404 type Protocol = SuiteControllerMarker;
5405 type ControlHandle = SuiteControllerControlHandle;
5406
5407 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5408 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5409 }
5410
5411 fn control_handle(&self) -> Self::ControlHandle {
5412 SuiteControllerControlHandle { inner: self.inner.clone() }
5413 }
5414
5415 fn into_inner(
5416 self,
5417 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5418 {
5419 (self.inner, self.is_terminated)
5420 }
5421
5422 fn from_inner(
5423 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5424 is_terminated: bool,
5425 ) -> Self {
5426 Self { inner, is_terminated }
5427 }
5428}
5429
5430impl futures::Stream for SuiteControllerRequestStream {
5431 type Item = Result<SuiteControllerRequest, fidl::Error>;
5432
5433 fn poll_next(
5434 mut self: std::pin::Pin<&mut Self>,
5435 cx: &mut std::task::Context<'_>,
5436 ) -> std::task::Poll<Option<Self::Item>> {
5437 let this = &mut *self;
5438 if this.inner.check_shutdown(cx) {
5439 this.is_terminated = true;
5440 return std::task::Poll::Ready(None);
5441 }
5442 if this.is_terminated {
5443 panic!("polled SuiteControllerRequestStream after completion");
5444 }
5445 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5446 |bytes, handles| {
5447 match this.inner.channel().read_etc(cx, bytes, handles) {
5448 std::task::Poll::Ready(Ok(())) => {}
5449 std::task::Poll::Pending => return std::task::Poll::Pending,
5450 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5451 this.is_terminated = true;
5452 return std::task::Poll::Ready(None);
5453 }
5454 std::task::Poll::Ready(Err(e)) => {
5455 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5456 e.into(),
5457 ))))
5458 }
5459 }
5460
5461 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5463
5464 std::task::Poll::Ready(Some(match header.ordinal {
5465 0x4675fc6c8f404fef => {
5466 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5467 let mut req = fidl::new_empty!(
5468 fidl::encoding::EmptyPayload,
5469 fidl::encoding::DefaultFuchsiaResourceDialect
5470 );
5471 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5472 let control_handle =
5473 SuiteControllerControlHandle { inner: this.inner.clone() };
5474 Ok(SuiteControllerRequest::Stop { control_handle })
5475 }
5476 0x5f813fb72887fc17 => {
5477 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5478 let mut req = fidl::new_empty!(
5479 fidl::encoding::EmptyPayload,
5480 fidl::encoding::DefaultFuchsiaResourceDialect
5481 );
5482 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5483 let control_handle =
5484 SuiteControllerControlHandle { inner: this.inner.clone() };
5485 Ok(SuiteControllerRequest::Kill { control_handle })
5486 }
5487 0x5d1a75b1d06839b4 => {
5488 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5489 let mut req = fidl::new_empty!(
5490 fidl::encoding::EmptyPayload,
5491 fidl::encoding::DefaultFuchsiaResourceDialect
5492 );
5493 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5494 let control_handle =
5495 SuiteControllerControlHandle { inner: this.inner.clone() };
5496 Ok(SuiteControllerRequest::WatchEvents {
5497 responder: SuiteControllerWatchEventsResponder {
5498 control_handle: std::mem::ManuallyDrop::new(control_handle),
5499 tx_id: header.tx_id,
5500 },
5501 })
5502 }
5503 0x1f2ec93d2236d1db => {
5504 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5505 let mut req = fidl::new_empty!(
5506 fidl::encoding::EmptyPayload,
5507 fidl::encoding::DefaultFuchsiaResourceDialect
5508 );
5509 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5510 let control_handle =
5511 SuiteControllerControlHandle { inner: this.inner.clone() };
5512 Ok(SuiteControllerRequest::GetEvents {
5513 responder: SuiteControllerGetEventsResponder {
5514 control_handle: std::mem::ManuallyDrop::new(control_handle),
5515 tx_id: header.tx_id,
5516 },
5517 })
5518 }
5519 _ if header.tx_id == 0
5520 && header
5521 .dynamic_flags()
5522 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5523 {
5524 Ok(SuiteControllerRequest::_UnknownMethod {
5525 ordinal: header.ordinal,
5526 control_handle: SuiteControllerControlHandle {
5527 inner: this.inner.clone(),
5528 },
5529 method_type: fidl::MethodType::OneWay,
5530 })
5531 }
5532 _ if header
5533 .dynamic_flags()
5534 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5535 {
5536 this.inner.send_framework_err(
5537 fidl::encoding::FrameworkErr::UnknownMethod,
5538 header.tx_id,
5539 header.ordinal,
5540 header.dynamic_flags(),
5541 (bytes, handles),
5542 )?;
5543 Ok(SuiteControllerRequest::_UnknownMethod {
5544 ordinal: header.ordinal,
5545 control_handle: SuiteControllerControlHandle {
5546 inner: this.inner.clone(),
5547 },
5548 method_type: fidl::MethodType::TwoWay,
5549 })
5550 }
5551 _ => Err(fidl::Error::UnknownOrdinal {
5552 ordinal: header.ordinal,
5553 protocol_name:
5554 <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5555 }),
5556 }))
5557 },
5558 )
5559 }
5560}
5561
5562#[derive(Debug)]
5568pub enum SuiteControllerRequest {
5569 Stop { control_handle: SuiteControllerControlHandle },
5572 Kill { control_handle: SuiteControllerControlHandle },
5576 WatchEvents { responder: SuiteControllerWatchEventsResponder },
5579 GetEvents { responder: SuiteControllerGetEventsResponder },
5583 #[non_exhaustive]
5585 _UnknownMethod {
5586 ordinal: u64,
5588 control_handle: SuiteControllerControlHandle,
5589 method_type: fidl::MethodType,
5590 },
5591}
5592
5593impl SuiteControllerRequest {
5594 #[allow(irrefutable_let_patterns)]
5595 pub fn into_stop(self) -> Option<(SuiteControllerControlHandle)> {
5596 if let SuiteControllerRequest::Stop { control_handle } = self {
5597 Some((control_handle))
5598 } else {
5599 None
5600 }
5601 }
5602
5603 #[allow(irrefutable_let_patterns)]
5604 pub fn into_kill(self) -> Option<(SuiteControllerControlHandle)> {
5605 if let SuiteControllerRequest::Kill { control_handle } = self {
5606 Some((control_handle))
5607 } else {
5608 None
5609 }
5610 }
5611
5612 #[allow(irrefutable_let_patterns)]
5613 pub fn into_watch_events(self) -> Option<(SuiteControllerWatchEventsResponder)> {
5614 if let SuiteControllerRequest::WatchEvents { responder } = self {
5615 Some((responder))
5616 } else {
5617 None
5618 }
5619 }
5620
5621 #[allow(irrefutable_let_patterns)]
5622 pub fn into_get_events(self) -> Option<(SuiteControllerGetEventsResponder)> {
5623 if let SuiteControllerRequest::GetEvents { responder } = self {
5624 Some((responder))
5625 } else {
5626 None
5627 }
5628 }
5629
5630 pub fn method_name(&self) -> &'static str {
5632 match *self {
5633 SuiteControllerRequest::Stop { .. } => "stop",
5634 SuiteControllerRequest::Kill { .. } => "kill",
5635 SuiteControllerRequest::WatchEvents { .. } => "watch_events",
5636 SuiteControllerRequest::GetEvents { .. } => "get_events",
5637 SuiteControllerRequest::_UnknownMethod {
5638 method_type: fidl::MethodType::OneWay,
5639 ..
5640 } => "unknown one-way method",
5641 SuiteControllerRequest::_UnknownMethod {
5642 method_type: fidl::MethodType::TwoWay,
5643 ..
5644 } => "unknown two-way method",
5645 }
5646 }
5647}
5648
5649#[derive(Debug, Clone)]
5650pub struct SuiteControllerControlHandle {
5651 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5652}
5653
5654impl fidl::endpoints::ControlHandle for SuiteControllerControlHandle {
5655 fn shutdown(&self) {
5656 self.inner.shutdown()
5657 }
5658 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5659 self.inner.shutdown_with_epitaph(status)
5660 }
5661
5662 fn is_closed(&self) -> bool {
5663 self.inner.channel().is_closed()
5664 }
5665 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5666 self.inner.channel().on_closed()
5667 }
5668
5669 #[cfg(target_os = "fuchsia")]
5670 fn signal_peer(
5671 &self,
5672 clear_mask: zx::Signals,
5673 set_mask: zx::Signals,
5674 ) -> Result<(), zx_status::Status> {
5675 use fidl::Peered;
5676 self.inner.channel().signal_peer(clear_mask, set_mask)
5677 }
5678}
5679
5680impl SuiteControllerControlHandle {}
5681
5682#[must_use = "FIDL methods require a response to be sent"]
5683#[derive(Debug)]
5684pub struct SuiteControllerWatchEventsResponder {
5685 control_handle: std::mem::ManuallyDrop<SuiteControllerControlHandle>,
5686 tx_id: u32,
5687}
5688
5689impl std::ops::Drop for SuiteControllerWatchEventsResponder {
5693 fn drop(&mut self) {
5694 self.control_handle.shutdown();
5695 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5697 }
5698}
5699
5700impl fidl::endpoints::Responder for SuiteControllerWatchEventsResponder {
5701 type ControlHandle = SuiteControllerControlHandle;
5702
5703 fn control_handle(&self) -> &SuiteControllerControlHandle {
5704 &self.control_handle
5705 }
5706
5707 fn drop_without_shutdown(mut self) {
5708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5710 std::mem::forget(self);
5712 }
5713}
5714
5715impl SuiteControllerWatchEventsResponder {
5716 pub fn send(self, mut result: Result<Vec<Event>, LaunchError>) -> Result<(), fidl::Error> {
5720 let _result = self.send_raw(result);
5721 if _result.is_err() {
5722 self.control_handle.shutdown();
5723 }
5724 self.drop_without_shutdown();
5725 _result
5726 }
5727
5728 pub fn send_no_shutdown_on_err(
5730 self,
5731 mut result: Result<Vec<Event>, LaunchError>,
5732 ) -> Result<(), fidl::Error> {
5733 let _result = self.send_raw(result);
5734 self.drop_without_shutdown();
5735 _result
5736 }
5737
5738 fn send_raw(&self, mut result: Result<Vec<Event>, LaunchError>) -> Result<(), fidl::Error> {
5739 self.control_handle.inner.send::<fidl::encoding::ResultType<
5740 SuiteControllerWatchEventsResponse,
5741 LaunchError,
5742 >>(
5743 result.as_mut().map_err(|e| *e).map(|events| (events.as_mut_slice(),)),
5744 self.tx_id,
5745 0x5d1a75b1d06839b4,
5746 fidl::encoding::DynamicFlags::empty(),
5747 )
5748 }
5749}
5750
5751#[must_use = "FIDL methods require a response to be sent"]
5752#[derive(Debug)]
5753pub struct SuiteControllerGetEventsResponder {
5754 control_handle: std::mem::ManuallyDrop<SuiteControllerControlHandle>,
5755 tx_id: u32,
5756}
5757
5758impl std::ops::Drop for SuiteControllerGetEventsResponder {
5762 fn drop(&mut self) {
5763 self.control_handle.shutdown();
5764 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5766 }
5767}
5768
5769impl fidl::endpoints::Responder for SuiteControllerGetEventsResponder {
5770 type ControlHandle = SuiteControllerControlHandle;
5771
5772 fn control_handle(&self) -> &SuiteControllerControlHandle {
5773 &self.control_handle
5774 }
5775
5776 fn drop_without_shutdown(mut self) {
5777 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5779 std::mem::forget(self);
5781 }
5782}
5783
5784impl SuiteControllerGetEventsResponder {
5785 pub fn send(self, mut result: Result<Vec<SuiteEvent>, LaunchError>) -> Result<(), fidl::Error> {
5789 let _result = self.send_raw(result);
5790 if _result.is_err() {
5791 self.control_handle.shutdown();
5792 }
5793 self.drop_without_shutdown();
5794 _result
5795 }
5796
5797 pub fn send_no_shutdown_on_err(
5799 self,
5800 mut result: Result<Vec<SuiteEvent>, LaunchError>,
5801 ) -> Result<(), fidl::Error> {
5802 let _result = self.send_raw(result);
5803 self.drop_without_shutdown();
5804 _result
5805 }
5806
5807 fn send_raw(
5808 &self,
5809 mut result: Result<Vec<SuiteEvent>, LaunchError>,
5810 ) -> Result<(), fidl::Error> {
5811 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5812 SuiteControllerGetEventsResponse,
5813 LaunchError,
5814 >>(
5815 fidl::encoding::FlexibleResult::new(
5816 result.as_mut().map_err(|e| *e).map(|events| (events.as_mut_slice(),)),
5817 ),
5818 self.tx_id,
5819 0x1f2ec93d2236d1db,
5820 fidl::encoding::DynamicFlags::FLEXIBLE,
5821 )
5822 }
5823}
5824
5825#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5826pub struct SuiteRunnerMarker;
5827
5828impl fidl::endpoints::ProtocolMarker for SuiteRunnerMarker {
5829 type Proxy = SuiteRunnerProxy;
5830 type RequestStream = SuiteRunnerRequestStream;
5831 #[cfg(target_os = "fuchsia")]
5832 type SynchronousProxy = SuiteRunnerSynchronousProxy;
5833
5834 const DEBUG_NAME: &'static str = "fuchsia.test.manager.SuiteRunner";
5835}
5836impl fidl::endpoints::DiscoverableProtocolMarker for SuiteRunnerMarker {}
5837
5838pub trait SuiteRunnerProxyInterface: Send + Sync {
5839 fn r#run(
5840 &self,
5841 test_suite_url: &str,
5842 options: RunSuiteOptions,
5843 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5844 ) -> Result<(), fidl::Error>;
5845}
5846#[derive(Debug)]
5847#[cfg(target_os = "fuchsia")]
5848pub struct SuiteRunnerSynchronousProxy {
5849 client: fidl::client::sync::Client,
5850}
5851
5852#[cfg(target_os = "fuchsia")]
5853impl fidl::endpoints::SynchronousProxy for SuiteRunnerSynchronousProxy {
5854 type Proxy = SuiteRunnerProxy;
5855 type Protocol = SuiteRunnerMarker;
5856
5857 fn from_channel(inner: fidl::Channel) -> Self {
5858 Self::new(inner)
5859 }
5860
5861 fn into_channel(self) -> fidl::Channel {
5862 self.client.into_channel()
5863 }
5864
5865 fn as_channel(&self) -> &fidl::Channel {
5866 self.client.as_channel()
5867 }
5868}
5869
5870#[cfg(target_os = "fuchsia")]
5871impl SuiteRunnerSynchronousProxy {
5872 pub fn new(channel: fidl::Channel) -> Self {
5873 let protocol_name = <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5874 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5875 }
5876
5877 pub fn into_channel(self) -> fidl::Channel {
5878 self.client.into_channel()
5879 }
5880
5881 pub fn wait_for_event(
5884 &self,
5885 deadline: zx::MonotonicInstant,
5886 ) -> Result<SuiteRunnerEvent, fidl::Error> {
5887 SuiteRunnerEvent::decode(self.client.wait_for_event(deadline)?)
5888 }
5889
5890 pub fn r#run(
5892 &self,
5893 mut test_suite_url: &str,
5894 mut options: RunSuiteOptions,
5895 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5896 ) -> Result<(), fidl::Error> {
5897 self.client.send::<SuiteRunnerRunRequest>(
5898 (test_suite_url, &mut options, controller),
5899 0x16f5ec6a46c223f0,
5900 fidl::encoding::DynamicFlags::FLEXIBLE,
5901 )
5902 }
5903}
5904
5905#[derive(Debug, Clone)]
5906pub struct SuiteRunnerProxy {
5907 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5908}
5909
5910impl fidl::endpoints::Proxy for SuiteRunnerProxy {
5911 type Protocol = SuiteRunnerMarker;
5912
5913 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5914 Self::new(inner)
5915 }
5916
5917 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5918 self.client.into_channel().map_err(|client| Self { client })
5919 }
5920
5921 fn as_channel(&self) -> &::fidl::AsyncChannel {
5922 self.client.as_channel()
5923 }
5924}
5925
5926impl SuiteRunnerProxy {
5927 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5929 let protocol_name = <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5930 Self { client: fidl::client::Client::new(channel, protocol_name) }
5931 }
5932
5933 pub fn take_event_stream(&self) -> SuiteRunnerEventStream {
5939 SuiteRunnerEventStream { event_receiver: self.client.take_event_receiver() }
5940 }
5941
5942 pub fn r#run(
5944 &self,
5945 mut test_suite_url: &str,
5946 mut options: RunSuiteOptions,
5947 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5948 ) -> Result<(), fidl::Error> {
5949 SuiteRunnerProxyInterface::r#run(self, test_suite_url, options, controller)
5950 }
5951}
5952
5953impl SuiteRunnerProxyInterface for SuiteRunnerProxy {
5954 fn r#run(
5955 &self,
5956 mut test_suite_url: &str,
5957 mut options: RunSuiteOptions,
5958 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5959 ) -> Result<(), fidl::Error> {
5960 self.client.send::<SuiteRunnerRunRequest>(
5961 (test_suite_url, &mut options, controller),
5962 0x16f5ec6a46c223f0,
5963 fidl::encoding::DynamicFlags::FLEXIBLE,
5964 )
5965 }
5966}
5967
5968pub struct SuiteRunnerEventStream {
5969 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5970}
5971
5972impl std::marker::Unpin for SuiteRunnerEventStream {}
5973
5974impl futures::stream::FusedStream for SuiteRunnerEventStream {
5975 fn is_terminated(&self) -> bool {
5976 self.event_receiver.is_terminated()
5977 }
5978}
5979
5980impl futures::Stream for SuiteRunnerEventStream {
5981 type Item = Result<SuiteRunnerEvent, fidl::Error>;
5982
5983 fn poll_next(
5984 mut self: std::pin::Pin<&mut Self>,
5985 cx: &mut std::task::Context<'_>,
5986 ) -> std::task::Poll<Option<Self::Item>> {
5987 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5988 &mut self.event_receiver,
5989 cx
5990 )?) {
5991 Some(buf) => std::task::Poll::Ready(Some(SuiteRunnerEvent::decode(buf))),
5992 None => std::task::Poll::Ready(None),
5993 }
5994 }
5995}
5996
5997#[derive(Debug)]
5998pub enum SuiteRunnerEvent {
5999 #[non_exhaustive]
6000 _UnknownEvent {
6001 ordinal: u64,
6003 },
6004}
6005
6006impl SuiteRunnerEvent {
6007 fn decode(
6009 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6010 ) -> Result<SuiteRunnerEvent, fidl::Error> {
6011 let (bytes, _handles) = buf.split_mut();
6012 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6013 debug_assert_eq!(tx_header.tx_id, 0);
6014 match tx_header.ordinal {
6015 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6016 Ok(SuiteRunnerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6017 }
6018 _ => Err(fidl::Error::UnknownOrdinal {
6019 ordinal: tx_header.ordinal,
6020 protocol_name: <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6021 }),
6022 }
6023 }
6024}
6025
6026pub struct SuiteRunnerRequestStream {
6028 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6029 is_terminated: bool,
6030}
6031
6032impl std::marker::Unpin for SuiteRunnerRequestStream {}
6033
6034impl futures::stream::FusedStream for SuiteRunnerRequestStream {
6035 fn is_terminated(&self) -> bool {
6036 self.is_terminated
6037 }
6038}
6039
6040impl fidl::endpoints::RequestStream for SuiteRunnerRequestStream {
6041 type Protocol = SuiteRunnerMarker;
6042 type ControlHandle = SuiteRunnerControlHandle;
6043
6044 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6045 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6046 }
6047
6048 fn control_handle(&self) -> Self::ControlHandle {
6049 SuiteRunnerControlHandle { inner: self.inner.clone() }
6050 }
6051
6052 fn into_inner(
6053 self,
6054 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6055 {
6056 (self.inner, self.is_terminated)
6057 }
6058
6059 fn from_inner(
6060 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6061 is_terminated: bool,
6062 ) -> Self {
6063 Self { inner, is_terminated }
6064 }
6065}
6066
6067impl futures::Stream for SuiteRunnerRequestStream {
6068 type Item = Result<SuiteRunnerRequest, fidl::Error>;
6069
6070 fn poll_next(
6071 mut self: std::pin::Pin<&mut Self>,
6072 cx: &mut std::task::Context<'_>,
6073 ) -> std::task::Poll<Option<Self::Item>> {
6074 let this = &mut *self;
6075 if this.inner.check_shutdown(cx) {
6076 this.is_terminated = true;
6077 return std::task::Poll::Ready(None);
6078 }
6079 if this.is_terminated {
6080 panic!("polled SuiteRunnerRequestStream after completion");
6081 }
6082 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6083 |bytes, handles| {
6084 match this.inner.channel().read_etc(cx, bytes, handles) {
6085 std::task::Poll::Ready(Ok(())) => {}
6086 std::task::Poll::Pending => return std::task::Poll::Pending,
6087 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6088 this.is_terminated = true;
6089 return std::task::Poll::Ready(None);
6090 }
6091 std::task::Poll::Ready(Err(e)) => {
6092 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6093 e.into(),
6094 ))))
6095 }
6096 }
6097
6098 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6100
6101 std::task::Poll::Ready(Some(match header.ordinal {
6102 0x16f5ec6a46c223f0 => {
6103 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6104 let mut req = fidl::new_empty!(
6105 SuiteRunnerRunRequest,
6106 fidl::encoding::DefaultFuchsiaResourceDialect
6107 );
6108 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SuiteRunnerRunRequest>(&header, _body_bytes, handles, &mut req)?;
6109 let control_handle = SuiteRunnerControlHandle { inner: this.inner.clone() };
6110 Ok(SuiteRunnerRequest::Run {
6111 test_suite_url: req.test_suite_url,
6112 options: req.options,
6113 controller: req.controller,
6114
6115 control_handle,
6116 })
6117 }
6118 _ if header.tx_id == 0
6119 && header
6120 .dynamic_flags()
6121 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
6122 {
6123 Ok(SuiteRunnerRequest::_UnknownMethod {
6124 ordinal: header.ordinal,
6125 control_handle: SuiteRunnerControlHandle { inner: this.inner.clone() },
6126 method_type: fidl::MethodType::OneWay,
6127 })
6128 }
6129 _ if header
6130 .dynamic_flags()
6131 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
6132 {
6133 this.inner.send_framework_err(
6134 fidl::encoding::FrameworkErr::UnknownMethod,
6135 header.tx_id,
6136 header.ordinal,
6137 header.dynamic_flags(),
6138 (bytes, handles),
6139 )?;
6140 Ok(SuiteRunnerRequest::_UnknownMethod {
6141 ordinal: header.ordinal,
6142 control_handle: SuiteRunnerControlHandle { inner: this.inner.clone() },
6143 method_type: fidl::MethodType::TwoWay,
6144 })
6145 }
6146 _ => Err(fidl::Error::UnknownOrdinal {
6147 ordinal: header.ordinal,
6148 protocol_name:
6149 <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6150 }),
6151 }))
6152 },
6153 )
6154 }
6155}
6156
6157#[derive(Debug)]
6159pub enum SuiteRunnerRequest {
6160 Run {
6162 test_suite_url: String,
6163 options: RunSuiteOptions,
6164 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
6165 control_handle: SuiteRunnerControlHandle,
6166 },
6167 #[non_exhaustive]
6169 _UnknownMethod {
6170 ordinal: u64,
6172 control_handle: SuiteRunnerControlHandle,
6173 method_type: fidl::MethodType,
6174 },
6175}
6176
6177impl SuiteRunnerRequest {
6178 #[allow(irrefutable_let_patterns)]
6179 pub fn into_run(
6180 self,
6181 ) -> Option<(
6182 String,
6183 RunSuiteOptions,
6184 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
6185 SuiteRunnerControlHandle,
6186 )> {
6187 if let SuiteRunnerRequest::Run { test_suite_url, options, controller, control_handle } =
6188 self
6189 {
6190 Some((test_suite_url, options, controller, control_handle))
6191 } else {
6192 None
6193 }
6194 }
6195
6196 pub fn method_name(&self) -> &'static str {
6198 match *self {
6199 SuiteRunnerRequest::Run { .. } => "run",
6200 SuiteRunnerRequest::_UnknownMethod {
6201 method_type: fidl::MethodType::OneWay, ..
6202 } => "unknown one-way method",
6203 SuiteRunnerRequest::_UnknownMethod {
6204 method_type: fidl::MethodType::TwoWay, ..
6205 } => "unknown two-way method",
6206 }
6207 }
6208}
6209
6210#[derive(Debug, Clone)]
6211pub struct SuiteRunnerControlHandle {
6212 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6213}
6214
6215impl fidl::endpoints::ControlHandle for SuiteRunnerControlHandle {
6216 fn shutdown(&self) {
6217 self.inner.shutdown()
6218 }
6219 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6220 self.inner.shutdown_with_epitaph(status)
6221 }
6222
6223 fn is_closed(&self) -> bool {
6224 self.inner.channel().is_closed()
6225 }
6226 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6227 self.inner.channel().on_closed()
6228 }
6229
6230 #[cfg(target_os = "fuchsia")]
6231 fn signal_peer(
6232 &self,
6233 clear_mask: zx::Signals,
6234 set_mask: zx::Signals,
6235 ) -> Result<(), zx_status::Status> {
6236 use fidl::Peered;
6237 self.inner.channel().signal_peer(clear_mask, set_mask)
6238 }
6239}
6240
6241impl SuiteRunnerControlHandle {}
6242
6243#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6244pub struct TestCaseEnumeratorMarker;
6245
6246impl fidl::endpoints::ProtocolMarker for TestCaseEnumeratorMarker {
6247 type Proxy = TestCaseEnumeratorProxy;
6248 type RequestStream = TestCaseEnumeratorRequestStream;
6249 #[cfg(target_os = "fuchsia")]
6250 type SynchronousProxy = TestCaseEnumeratorSynchronousProxy;
6251
6252 const DEBUG_NAME: &'static str = "fuchsia.test.manager.TestCaseEnumerator";
6253}
6254impl fidl::endpoints::DiscoverableProtocolMarker for TestCaseEnumeratorMarker {}
6255pub type TestCaseEnumeratorEnumerateResult = Result<(), LaunchError>;
6256
6257pub trait TestCaseEnumeratorProxyInterface: Send + Sync {
6258 type EnumerateResponseFut: std::future::Future<Output = Result<TestCaseEnumeratorEnumerateResult, fidl::Error>>
6259 + Send;
6260 fn r#enumerate(
6261 &self,
6262 test_suite_url: &str,
6263 options: EnumerateTestCasesOptions,
6264 iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6265 ) -> Self::EnumerateResponseFut;
6266}
6267#[derive(Debug)]
6268#[cfg(target_os = "fuchsia")]
6269pub struct TestCaseEnumeratorSynchronousProxy {
6270 client: fidl::client::sync::Client,
6271}
6272
6273#[cfg(target_os = "fuchsia")]
6274impl fidl::endpoints::SynchronousProxy for TestCaseEnumeratorSynchronousProxy {
6275 type Proxy = TestCaseEnumeratorProxy;
6276 type Protocol = TestCaseEnumeratorMarker;
6277
6278 fn from_channel(inner: fidl::Channel) -> Self {
6279 Self::new(inner)
6280 }
6281
6282 fn into_channel(self) -> fidl::Channel {
6283 self.client.into_channel()
6284 }
6285
6286 fn as_channel(&self) -> &fidl::Channel {
6287 self.client.as_channel()
6288 }
6289}
6290
6291#[cfg(target_os = "fuchsia")]
6292impl TestCaseEnumeratorSynchronousProxy {
6293 pub fn new(channel: fidl::Channel) -> Self {
6294 let protocol_name =
6295 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6296 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6297 }
6298
6299 pub fn into_channel(self) -> fidl::Channel {
6300 self.client.into_channel()
6301 }
6302
6303 pub fn wait_for_event(
6306 &self,
6307 deadline: zx::MonotonicInstant,
6308 ) -> Result<TestCaseEnumeratorEvent, fidl::Error> {
6309 TestCaseEnumeratorEvent::decode(self.client.wait_for_event(deadline)?)
6310 }
6311
6312 pub fn r#enumerate(
6314 &self,
6315 mut test_suite_url: &str,
6316 mut options: EnumerateTestCasesOptions,
6317 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6318 ___deadline: zx::MonotonicInstant,
6319 ) -> Result<TestCaseEnumeratorEnumerateResult, fidl::Error> {
6320 let _response = self.client.send_query::<
6321 TestCaseEnumeratorEnumerateRequest,
6322 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, LaunchError>,
6323 >(
6324 (test_suite_url, &mut options, iterator,),
6325 0x24f8a91d96134492,
6326 fidl::encoding::DynamicFlags::FLEXIBLE,
6327 ___deadline,
6328 )?
6329 .into_result::<TestCaseEnumeratorMarker>("enumerate")?;
6330 Ok(_response.map(|x| x))
6331 }
6332}
6333
6334#[derive(Debug, Clone)]
6335pub struct TestCaseEnumeratorProxy {
6336 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6337}
6338
6339impl fidl::endpoints::Proxy for TestCaseEnumeratorProxy {
6340 type Protocol = TestCaseEnumeratorMarker;
6341
6342 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6343 Self::new(inner)
6344 }
6345
6346 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6347 self.client.into_channel().map_err(|client| Self { client })
6348 }
6349
6350 fn as_channel(&self) -> &::fidl::AsyncChannel {
6351 self.client.as_channel()
6352 }
6353}
6354
6355impl TestCaseEnumeratorProxy {
6356 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6358 let protocol_name =
6359 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6360 Self { client: fidl::client::Client::new(channel, protocol_name) }
6361 }
6362
6363 pub fn take_event_stream(&self) -> TestCaseEnumeratorEventStream {
6369 TestCaseEnumeratorEventStream { event_receiver: self.client.take_event_receiver() }
6370 }
6371
6372 pub fn r#enumerate(
6374 &self,
6375 mut test_suite_url: &str,
6376 mut options: EnumerateTestCasesOptions,
6377 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6378 ) -> fidl::client::QueryResponseFut<
6379 TestCaseEnumeratorEnumerateResult,
6380 fidl::encoding::DefaultFuchsiaResourceDialect,
6381 > {
6382 TestCaseEnumeratorProxyInterface::r#enumerate(self, test_suite_url, options, iterator)
6383 }
6384}
6385
6386impl TestCaseEnumeratorProxyInterface for TestCaseEnumeratorProxy {
6387 type EnumerateResponseFut = fidl::client::QueryResponseFut<
6388 TestCaseEnumeratorEnumerateResult,
6389 fidl::encoding::DefaultFuchsiaResourceDialect,
6390 >;
6391 fn r#enumerate(
6392 &self,
6393 mut test_suite_url: &str,
6394 mut options: EnumerateTestCasesOptions,
6395 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6396 ) -> Self::EnumerateResponseFut {
6397 fn _decode(
6398 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6399 ) -> Result<TestCaseEnumeratorEnumerateResult, fidl::Error> {
6400 let _response = fidl::client::decode_transaction_body::<
6401 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, LaunchError>,
6402 fidl::encoding::DefaultFuchsiaResourceDialect,
6403 0x24f8a91d96134492,
6404 >(_buf?)?
6405 .into_result::<TestCaseEnumeratorMarker>("enumerate")?;
6406 Ok(_response.map(|x| x))
6407 }
6408 self.client.send_query_and_decode::<
6409 TestCaseEnumeratorEnumerateRequest,
6410 TestCaseEnumeratorEnumerateResult,
6411 >(
6412 (test_suite_url, &mut options, iterator,),
6413 0x24f8a91d96134492,
6414 fidl::encoding::DynamicFlags::FLEXIBLE,
6415 _decode,
6416 )
6417 }
6418}
6419
6420pub struct TestCaseEnumeratorEventStream {
6421 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6422}
6423
6424impl std::marker::Unpin for TestCaseEnumeratorEventStream {}
6425
6426impl futures::stream::FusedStream for TestCaseEnumeratorEventStream {
6427 fn is_terminated(&self) -> bool {
6428 self.event_receiver.is_terminated()
6429 }
6430}
6431
6432impl futures::Stream for TestCaseEnumeratorEventStream {
6433 type Item = Result<TestCaseEnumeratorEvent, fidl::Error>;
6434
6435 fn poll_next(
6436 mut self: std::pin::Pin<&mut Self>,
6437 cx: &mut std::task::Context<'_>,
6438 ) -> std::task::Poll<Option<Self::Item>> {
6439 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6440 &mut self.event_receiver,
6441 cx
6442 )?) {
6443 Some(buf) => std::task::Poll::Ready(Some(TestCaseEnumeratorEvent::decode(buf))),
6444 None => std::task::Poll::Ready(None),
6445 }
6446 }
6447}
6448
6449#[derive(Debug)]
6450pub enum TestCaseEnumeratorEvent {
6451 #[non_exhaustive]
6452 _UnknownEvent {
6453 ordinal: u64,
6455 },
6456}
6457
6458impl TestCaseEnumeratorEvent {
6459 fn decode(
6461 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6462 ) -> Result<TestCaseEnumeratorEvent, fidl::Error> {
6463 let (bytes, _handles) = buf.split_mut();
6464 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6465 debug_assert_eq!(tx_header.tx_id, 0);
6466 match tx_header.ordinal {
6467 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6468 Ok(TestCaseEnumeratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
6469 }
6470 _ => Err(fidl::Error::UnknownOrdinal {
6471 ordinal: tx_header.ordinal,
6472 protocol_name:
6473 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6474 }),
6475 }
6476 }
6477}
6478
6479pub struct TestCaseEnumeratorRequestStream {
6481 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6482 is_terminated: bool,
6483}
6484
6485impl std::marker::Unpin for TestCaseEnumeratorRequestStream {}
6486
6487impl futures::stream::FusedStream for TestCaseEnumeratorRequestStream {
6488 fn is_terminated(&self) -> bool {
6489 self.is_terminated
6490 }
6491}
6492
6493impl fidl::endpoints::RequestStream for TestCaseEnumeratorRequestStream {
6494 type Protocol = TestCaseEnumeratorMarker;
6495 type ControlHandle = TestCaseEnumeratorControlHandle;
6496
6497 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6498 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6499 }
6500
6501 fn control_handle(&self) -> Self::ControlHandle {
6502 TestCaseEnumeratorControlHandle { inner: self.inner.clone() }
6503 }
6504
6505 fn into_inner(
6506 self,
6507 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6508 {
6509 (self.inner, self.is_terminated)
6510 }
6511
6512 fn from_inner(
6513 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6514 is_terminated: bool,
6515 ) -> Self {
6516 Self { inner, is_terminated }
6517 }
6518}
6519
6520impl futures::Stream for TestCaseEnumeratorRequestStream {
6521 type Item = Result<TestCaseEnumeratorRequest, fidl::Error>;
6522
6523 fn poll_next(
6524 mut self: std::pin::Pin<&mut Self>,
6525 cx: &mut std::task::Context<'_>,
6526 ) -> std::task::Poll<Option<Self::Item>> {
6527 let this = &mut *self;
6528 if this.inner.check_shutdown(cx) {
6529 this.is_terminated = true;
6530 return std::task::Poll::Ready(None);
6531 }
6532 if this.is_terminated {
6533 panic!("polled TestCaseEnumeratorRequestStream after completion");
6534 }
6535 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6536 |bytes, handles| {
6537 match this.inner.channel().read_etc(cx, bytes, handles) {
6538 std::task::Poll::Ready(Ok(())) => {}
6539 std::task::Poll::Pending => return std::task::Poll::Pending,
6540 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6541 this.is_terminated = true;
6542 return std::task::Poll::Ready(None);
6543 }
6544 std::task::Poll::Ready(Err(e)) => {
6545 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6546 e.into(),
6547 ))))
6548 }
6549 }
6550
6551 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6553
6554 std::task::Poll::Ready(Some(match header.ordinal {
6555 0x24f8a91d96134492 => {
6556 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6557 let mut req = fidl::new_empty!(TestCaseEnumeratorEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
6558 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TestCaseEnumeratorEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
6559 let control_handle = TestCaseEnumeratorControlHandle {
6560 inner: this.inner.clone(),
6561 };
6562 Ok(TestCaseEnumeratorRequest::Enumerate {test_suite_url: req.test_suite_url,
6563options: req.options,
6564iterator: req.iterator,
6565
6566 responder: TestCaseEnumeratorEnumerateResponder {
6567 control_handle: std::mem::ManuallyDrop::new(control_handle),
6568 tx_id: header.tx_id,
6569 },
6570 })
6571 }
6572 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6573 Ok(TestCaseEnumeratorRequest::_UnknownMethod {
6574 ordinal: header.ordinal,
6575 control_handle: TestCaseEnumeratorControlHandle { inner: this.inner.clone() },
6576 method_type: fidl::MethodType::OneWay,
6577 })
6578 }
6579 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
6580 this.inner.send_framework_err(
6581 fidl::encoding::FrameworkErr::UnknownMethod,
6582 header.tx_id,
6583 header.ordinal,
6584 header.dynamic_flags(),
6585 (bytes, handles),
6586 )?;
6587 Ok(TestCaseEnumeratorRequest::_UnknownMethod {
6588 ordinal: header.ordinal,
6589 control_handle: TestCaseEnumeratorControlHandle { inner: this.inner.clone() },
6590 method_type: fidl::MethodType::TwoWay,
6591 })
6592 }
6593 _ => Err(fidl::Error::UnknownOrdinal {
6594 ordinal: header.ordinal,
6595 protocol_name: <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6596 }),
6597 }))
6598 },
6599 )
6600 }
6601}
6602
6603#[derive(Debug)]
6605pub enum TestCaseEnumeratorRequest {
6606 Enumerate {
6608 test_suite_url: String,
6609 options: EnumerateTestCasesOptions,
6610 iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6611 responder: TestCaseEnumeratorEnumerateResponder,
6612 },
6613 #[non_exhaustive]
6615 _UnknownMethod {
6616 ordinal: u64,
6618 control_handle: TestCaseEnumeratorControlHandle,
6619 method_type: fidl::MethodType,
6620 },
6621}
6622
6623impl TestCaseEnumeratorRequest {
6624 #[allow(irrefutable_let_patterns)]
6625 pub fn into_enumerate(
6626 self,
6627 ) -> Option<(
6628 String,
6629 EnumerateTestCasesOptions,
6630 fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6631 TestCaseEnumeratorEnumerateResponder,
6632 )> {
6633 if let TestCaseEnumeratorRequest::Enumerate {
6634 test_suite_url,
6635 options,
6636 iterator,
6637 responder,
6638 } = self
6639 {
6640 Some((test_suite_url, options, iterator, responder))
6641 } else {
6642 None
6643 }
6644 }
6645
6646 pub fn method_name(&self) -> &'static str {
6648 match *self {
6649 TestCaseEnumeratorRequest::Enumerate { .. } => "enumerate",
6650 TestCaseEnumeratorRequest::_UnknownMethod {
6651 method_type: fidl::MethodType::OneWay,
6652 ..
6653 } => "unknown one-way method",
6654 TestCaseEnumeratorRequest::_UnknownMethod {
6655 method_type: fidl::MethodType::TwoWay,
6656 ..
6657 } => "unknown two-way method",
6658 }
6659 }
6660}
6661
6662#[derive(Debug, Clone)]
6663pub struct TestCaseEnumeratorControlHandle {
6664 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6665}
6666
6667impl fidl::endpoints::ControlHandle for TestCaseEnumeratorControlHandle {
6668 fn shutdown(&self) {
6669 self.inner.shutdown()
6670 }
6671 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6672 self.inner.shutdown_with_epitaph(status)
6673 }
6674
6675 fn is_closed(&self) -> bool {
6676 self.inner.channel().is_closed()
6677 }
6678 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6679 self.inner.channel().on_closed()
6680 }
6681
6682 #[cfg(target_os = "fuchsia")]
6683 fn signal_peer(
6684 &self,
6685 clear_mask: zx::Signals,
6686 set_mask: zx::Signals,
6687 ) -> Result<(), zx_status::Status> {
6688 use fidl::Peered;
6689 self.inner.channel().signal_peer(clear_mask, set_mask)
6690 }
6691}
6692
6693impl TestCaseEnumeratorControlHandle {}
6694
6695#[must_use = "FIDL methods require a response to be sent"]
6696#[derive(Debug)]
6697pub struct TestCaseEnumeratorEnumerateResponder {
6698 control_handle: std::mem::ManuallyDrop<TestCaseEnumeratorControlHandle>,
6699 tx_id: u32,
6700}
6701
6702impl std::ops::Drop for TestCaseEnumeratorEnumerateResponder {
6706 fn drop(&mut self) {
6707 self.control_handle.shutdown();
6708 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6710 }
6711}
6712
6713impl fidl::endpoints::Responder for TestCaseEnumeratorEnumerateResponder {
6714 type ControlHandle = TestCaseEnumeratorControlHandle;
6715
6716 fn control_handle(&self) -> &TestCaseEnumeratorControlHandle {
6717 &self.control_handle
6718 }
6719
6720 fn drop_without_shutdown(mut self) {
6721 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6723 std::mem::forget(self);
6725 }
6726}
6727
6728impl TestCaseEnumeratorEnumerateResponder {
6729 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
6733 let _result = self.send_raw(result);
6734 if _result.is_err() {
6735 self.control_handle.shutdown();
6736 }
6737 self.drop_without_shutdown();
6738 _result
6739 }
6740
6741 pub fn send_no_shutdown_on_err(
6743 self,
6744 mut result: Result<(), LaunchError>,
6745 ) -> Result<(), fidl::Error> {
6746 let _result = self.send_raw(result);
6747 self.drop_without_shutdown();
6748 _result
6749 }
6750
6751 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
6752 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6753 fidl::encoding::EmptyStruct,
6754 LaunchError,
6755 >>(
6756 fidl::encoding::FlexibleResult::new(result),
6757 self.tx_id,
6758 0x24f8a91d96134492,
6759 fidl::encoding::DynamicFlags::FLEXIBLE,
6760 )
6761 }
6762}
6763
6764#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6765pub struct TestCaseIteratorMarker;
6766
6767impl fidl::endpoints::ProtocolMarker for TestCaseIteratorMarker {
6768 type Proxy = TestCaseIteratorProxy;
6769 type RequestStream = TestCaseIteratorRequestStream;
6770 #[cfg(target_os = "fuchsia")]
6771 type SynchronousProxy = TestCaseIteratorSynchronousProxy;
6772
6773 const DEBUG_NAME: &'static str = "(anonymous) TestCaseIterator";
6774}
6775
6776pub trait TestCaseIteratorProxyInterface: Send + Sync {
6777 type GetNextResponseFut: std::future::Future<Output = Result<Vec<TestCase>, fidl::Error>> + Send;
6778 fn r#get_next(&self) -> Self::GetNextResponseFut;
6779}
6780#[derive(Debug)]
6781#[cfg(target_os = "fuchsia")]
6782pub struct TestCaseIteratorSynchronousProxy {
6783 client: fidl::client::sync::Client,
6784}
6785
6786#[cfg(target_os = "fuchsia")]
6787impl fidl::endpoints::SynchronousProxy for TestCaseIteratorSynchronousProxy {
6788 type Proxy = TestCaseIteratorProxy;
6789 type Protocol = TestCaseIteratorMarker;
6790
6791 fn from_channel(inner: fidl::Channel) -> Self {
6792 Self::new(inner)
6793 }
6794
6795 fn into_channel(self) -> fidl::Channel {
6796 self.client.into_channel()
6797 }
6798
6799 fn as_channel(&self) -> &fidl::Channel {
6800 self.client.as_channel()
6801 }
6802}
6803
6804#[cfg(target_os = "fuchsia")]
6805impl TestCaseIteratorSynchronousProxy {
6806 pub fn new(channel: fidl::Channel) -> Self {
6807 let protocol_name = <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6808 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6809 }
6810
6811 pub fn into_channel(self) -> fidl::Channel {
6812 self.client.into_channel()
6813 }
6814
6815 pub fn wait_for_event(
6818 &self,
6819 deadline: zx::MonotonicInstant,
6820 ) -> Result<TestCaseIteratorEvent, fidl::Error> {
6821 TestCaseIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6822 }
6823
6824 pub fn r#get_next(
6827 &self,
6828 ___deadline: zx::MonotonicInstant,
6829 ) -> Result<Vec<TestCase>, fidl::Error> {
6830 let _response = self
6831 .client
6832 .send_query::<fidl::encoding::EmptyPayload, TestCaseIteratorGetNextResponse>(
6833 (),
6834 0x37abec519b2ac1be,
6835 fidl::encoding::DynamicFlags::empty(),
6836 ___deadline,
6837 )?;
6838 Ok(_response.test_cases)
6839 }
6840}
6841
6842#[derive(Debug, Clone)]
6843pub struct TestCaseIteratorProxy {
6844 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6845}
6846
6847impl fidl::endpoints::Proxy for TestCaseIteratorProxy {
6848 type Protocol = TestCaseIteratorMarker;
6849
6850 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6851 Self::new(inner)
6852 }
6853
6854 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6855 self.client.into_channel().map_err(|client| Self { client })
6856 }
6857
6858 fn as_channel(&self) -> &::fidl::AsyncChannel {
6859 self.client.as_channel()
6860 }
6861}
6862
6863impl TestCaseIteratorProxy {
6864 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6866 let protocol_name = <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6867 Self { client: fidl::client::Client::new(channel, protocol_name) }
6868 }
6869
6870 pub fn take_event_stream(&self) -> TestCaseIteratorEventStream {
6876 TestCaseIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6877 }
6878
6879 pub fn r#get_next(
6882 &self,
6883 ) -> fidl::client::QueryResponseFut<Vec<TestCase>, fidl::encoding::DefaultFuchsiaResourceDialect>
6884 {
6885 TestCaseIteratorProxyInterface::r#get_next(self)
6886 }
6887}
6888
6889impl TestCaseIteratorProxyInterface for TestCaseIteratorProxy {
6890 type GetNextResponseFut = fidl::client::QueryResponseFut<
6891 Vec<TestCase>,
6892 fidl::encoding::DefaultFuchsiaResourceDialect,
6893 >;
6894 fn r#get_next(&self) -> Self::GetNextResponseFut {
6895 fn _decode(
6896 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6897 ) -> Result<Vec<TestCase>, fidl::Error> {
6898 let _response = fidl::client::decode_transaction_body::<
6899 TestCaseIteratorGetNextResponse,
6900 fidl::encoding::DefaultFuchsiaResourceDialect,
6901 0x37abec519b2ac1be,
6902 >(_buf?)?;
6903 Ok(_response.test_cases)
6904 }
6905 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<TestCase>>(
6906 (),
6907 0x37abec519b2ac1be,
6908 fidl::encoding::DynamicFlags::empty(),
6909 _decode,
6910 )
6911 }
6912}
6913
6914pub struct TestCaseIteratorEventStream {
6915 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6916}
6917
6918impl std::marker::Unpin for TestCaseIteratorEventStream {}
6919
6920impl futures::stream::FusedStream for TestCaseIteratorEventStream {
6921 fn is_terminated(&self) -> bool {
6922 self.event_receiver.is_terminated()
6923 }
6924}
6925
6926impl futures::Stream for TestCaseIteratorEventStream {
6927 type Item = Result<TestCaseIteratorEvent, fidl::Error>;
6928
6929 fn poll_next(
6930 mut self: std::pin::Pin<&mut Self>,
6931 cx: &mut std::task::Context<'_>,
6932 ) -> std::task::Poll<Option<Self::Item>> {
6933 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6934 &mut self.event_receiver,
6935 cx
6936 )?) {
6937 Some(buf) => std::task::Poll::Ready(Some(TestCaseIteratorEvent::decode(buf))),
6938 None => std::task::Poll::Ready(None),
6939 }
6940 }
6941}
6942
6943#[derive(Debug)]
6944pub enum TestCaseIteratorEvent {}
6945
6946impl TestCaseIteratorEvent {
6947 fn decode(
6949 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6950 ) -> Result<TestCaseIteratorEvent, fidl::Error> {
6951 let (bytes, _handles) = buf.split_mut();
6952 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6953 debug_assert_eq!(tx_header.tx_id, 0);
6954 match tx_header.ordinal {
6955 _ => Err(fidl::Error::UnknownOrdinal {
6956 ordinal: tx_header.ordinal,
6957 protocol_name:
6958 <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6959 }),
6960 }
6961 }
6962}
6963
6964pub struct TestCaseIteratorRequestStream {
6966 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6967 is_terminated: bool,
6968}
6969
6970impl std::marker::Unpin for TestCaseIteratorRequestStream {}
6971
6972impl futures::stream::FusedStream for TestCaseIteratorRequestStream {
6973 fn is_terminated(&self) -> bool {
6974 self.is_terminated
6975 }
6976}
6977
6978impl fidl::endpoints::RequestStream for TestCaseIteratorRequestStream {
6979 type Protocol = TestCaseIteratorMarker;
6980 type ControlHandle = TestCaseIteratorControlHandle;
6981
6982 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6983 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6984 }
6985
6986 fn control_handle(&self) -> Self::ControlHandle {
6987 TestCaseIteratorControlHandle { inner: self.inner.clone() }
6988 }
6989
6990 fn into_inner(
6991 self,
6992 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6993 {
6994 (self.inner, self.is_terminated)
6995 }
6996
6997 fn from_inner(
6998 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6999 is_terminated: bool,
7000 ) -> Self {
7001 Self { inner, is_terminated }
7002 }
7003}
7004
7005impl futures::Stream for TestCaseIteratorRequestStream {
7006 type Item = Result<TestCaseIteratorRequest, fidl::Error>;
7007
7008 fn poll_next(
7009 mut self: std::pin::Pin<&mut Self>,
7010 cx: &mut std::task::Context<'_>,
7011 ) -> std::task::Poll<Option<Self::Item>> {
7012 let this = &mut *self;
7013 if this.inner.check_shutdown(cx) {
7014 this.is_terminated = true;
7015 return std::task::Poll::Ready(None);
7016 }
7017 if this.is_terminated {
7018 panic!("polled TestCaseIteratorRequestStream after completion");
7019 }
7020 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7021 |bytes, handles| {
7022 match this.inner.channel().read_etc(cx, bytes, handles) {
7023 std::task::Poll::Ready(Ok(())) => {}
7024 std::task::Poll::Pending => return std::task::Poll::Pending,
7025 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7026 this.is_terminated = true;
7027 return std::task::Poll::Ready(None);
7028 }
7029 std::task::Poll::Ready(Err(e)) => {
7030 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7031 e.into(),
7032 ))))
7033 }
7034 }
7035
7036 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7038
7039 std::task::Poll::Ready(Some(match header.ordinal {
7040 0x37abec519b2ac1be => {
7041 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7042 let mut req = fidl::new_empty!(
7043 fidl::encoding::EmptyPayload,
7044 fidl::encoding::DefaultFuchsiaResourceDialect
7045 );
7046 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7047 let control_handle =
7048 TestCaseIteratorControlHandle { inner: this.inner.clone() };
7049 Ok(TestCaseIteratorRequest::GetNext {
7050 responder: TestCaseIteratorGetNextResponder {
7051 control_handle: std::mem::ManuallyDrop::new(control_handle),
7052 tx_id: header.tx_id,
7053 },
7054 })
7055 }
7056 _ => Err(fidl::Error::UnknownOrdinal {
7057 ordinal: header.ordinal,
7058 protocol_name:
7059 <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7060 }),
7061 }))
7062 },
7063 )
7064 }
7065}
7066
7067#[derive(Debug)]
7069pub enum TestCaseIteratorRequest {
7070 GetNext { responder: TestCaseIteratorGetNextResponder },
7073}
7074
7075impl TestCaseIteratorRequest {
7076 #[allow(irrefutable_let_patterns)]
7077 pub fn into_get_next(self) -> Option<(TestCaseIteratorGetNextResponder)> {
7078 if let TestCaseIteratorRequest::GetNext { responder } = self {
7079 Some((responder))
7080 } else {
7081 None
7082 }
7083 }
7084
7085 pub fn method_name(&self) -> &'static str {
7087 match *self {
7088 TestCaseIteratorRequest::GetNext { .. } => "get_next",
7089 }
7090 }
7091}
7092
7093#[derive(Debug, Clone)]
7094pub struct TestCaseIteratorControlHandle {
7095 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7096}
7097
7098impl fidl::endpoints::ControlHandle for TestCaseIteratorControlHandle {
7099 fn shutdown(&self) {
7100 self.inner.shutdown()
7101 }
7102 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7103 self.inner.shutdown_with_epitaph(status)
7104 }
7105
7106 fn is_closed(&self) -> bool {
7107 self.inner.channel().is_closed()
7108 }
7109 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7110 self.inner.channel().on_closed()
7111 }
7112
7113 #[cfg(target_os = "fuchsia")]
7114 fn signal_peer(
7115 &self,
7116 clear_mask: zx::Signals,
7117 set_mask: zx::Signals,
7118 ) -> Result<(), zx_status::Status> {
7119 use fidl::Peered;
7120 self.inner.channel().signal_peer(clear_mask, set_mask)
7121 }
7122}
7123
7124impl TestCaseIteratorControlHandle {}
7125
7126#[must_use = "FIDL methods require a response to be sent"]
7127#[derive(Debug)]
7128pub struct TestCaseIteratorGetNextResponder {
7129 control_handle: std::mem::ManuallyDrop<TestCaseIteratorControlHandle>,
7130 tx_id: u32,
7131}
7132
7133impl std::ops::Drop for TestCaseIteratorGetNextResponder {
7137 fn drop(&mut self) {
7138 self.control_handle.shutdown();
7139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7141 }
7142}
7143
7144impl fidl::endpoints::Responder for TestCaseIteratorGetNextResponder {
7145 type ControlHandle = TestCaseIteratorControlHandle;
7146
7147 fn control_handle(&self) -> &TestCaseIteratorControlHandle {
7148 &self.control_handle
7149 }
7150
7151 fn drop_without_shutdown(mut self) {
7152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7154 std::mem::forget(self);
7156 }
7157}
7158
7159impl TestCaseIteratorGetNextResponder {
7160 pub fn send(self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
7164 let _result = self.send_raw(test_cases);
7165 if _result.is_err() {
7166 self.control_handle.shutdown();
7167 }
7168 self.drop_without_shutdown();
7169 _result
7170 }
7171
7172 pub fn send_no_shutdown_on_err(self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
7174 let _result = self.send_raw(test_cases);
7175 self.drop_without_shutdown();
7176 _result
7177 }
7178
7179 fn send_raw(&self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
7180 self.control_handle.inner.send::<TestCaseIteratorGetNextResponse>(
7181 (test_cases,),
7182 self.tx_id,
7183 0x37abec519b2ac1be,
7184 fidl::encoding::DynamicFlags::empty(),
7185 )
7186 }
7187}
7188
7189mod internal {
7190 use super::*;
7191 unsafe impl fidl::encoding::TypeMarker for CaseStatus {
7192 type Owned = Self;
7193
7194 #[inline(always)]
7195 fn inline_align(_context: fidl::encoding::Context) -> usize {
7196 std::mem::align_of::<u32>()
7197 }
7198
7199 #[inline(always)]
7200 fn inline_size(_context: fidl::encoding::Context) -> usize {
7201 std::mem::size_of::<u32>()
7202 }
7203
7204 #[inline(always)]
7205 fn encode_is_copy() -> bool {
7206 false
7207 }
7208
7209 #[inline(always)]
7210 fn decode_is_copy() -> bool {
7211 false
7212 }
7213 }
7214
7215 impl fidl::encoding::ValueTypeMarker for CaseStatus {
7216 type Borrowed<'a> = Self;
7217 #[inline(always)]
7218 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7219 *value
7220 }
7221 }
7222
7223 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for CaseStatus {
7224 #[inline]
7225 unsafe fn encode(
7226 self,
7227 encoder: &mut fidl::encoding::Encoder<'_, D>,
7228 offset: usize,
7229 _depth: fidl::encoding::Depth,
7230 ) -> fidl::Result<()> {
7231 encoder.debug_check_bounds::<Self>(offset);
7232 encoder.write_num(self.into_primitive(), offset);
7233 Ok(())
7234 }
7235 }
7236
7237 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStatus {
7238 #[inline(always)]
7239 fn new_empty() -> Self {
7240 Self::unknown()
7241 }
7242
7243 #[inline]
7244 unsafe fn decode(
7245 &mut self,
7246 decoder: &mut fidl::encoding::Decoder<'_, D>,
7247 offset: usize,
7248 _depth: fidl::encoding::Depth,
7249 ) -> fidl::Result<()> {
7250 decoder.debug_check_bounds::<Self>(offset);
7251 let prim = decoder.read_num::<u32>(offset);
7252
7253 *self = Self::from_primitive_allow_unknown(prim);
7254 Ok(())
7255 }
7256 }
7257 unsafe impl fidl::encoding::TypeMarker for LaunchError {
7258 type Owned = Self;
7259
7260 #[inline(always)]
7261 fn inline_align(_context: fidl::encoding::Context) -> usize {
7262 std::mem::align_of::<u32>()
7263 }
7264
7265 #[inline(always)]
7266 fn inline_size(_context: fidl::encoding::Context) -> usize {
7267 std::mem::size_of::<u32>()
7268 }
7269
7270 #[inline(always)]
7271 fn encode_is_copy() -> bool {
7272 false
7273 }
7274
7275 #[inline(always)]
7276 fn decode_is_copy() -> bool {
7277 false
7278 }
7279 }
7280
7281 impl fidl::encoding::ValueTypeMarker for LaunchError {
7282 type Borrowed<'a> = Self;
7283 #[inline(always)]
7284 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7285 *value
7286 }
7287 }
7288
7289 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for LaunchError {
7290 #[inline]
7291 unsafe fn encode(
7292 self,
7293 encoder: &mut fidl::encoding::Encoder<'_, D>,
7294 offset: usize,
7295 _depth: fidl::encoding::Depth,
7296 ) -> fidl::Result<()> {
7297 encoder.debug_check_bounds::<Self>(offset);
7298 encoder.write_num(self.into_primitive(), offset);
7299 Ok(())
7300 }
7301 }
7302
7303 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LaunchError {
7304 #[inline(always)]
7305 fn new_empty() -> Self {
7306 Self::unknown()
7307 }
7308
7309 #[inline]
7310 unsafe fn decode(
7311 &mut self,
7312 decoder: &mut fidl::encoding::Decoder<'_, D>,
7313 offset: usize,
7314 _depth: fidl::encoding::Depth,
7315 ) -> fidl::Result<()> {
7316 decoder.debug_check_bounds::<Self>(offset);
7317 let prim = decoder.read_num::<u32>(offset);
7318
7319 *self = Self::from_primitive_allow_unknown(prim);
7320 Ok(())
7321 }
7322 }
7323 unsafe impl fidl::encoding::TypeMarker for LogsIteratorOption {
7324 type Owned = Self;
7325
7326 #[inline(always)]
7327 fn inline_align(_context: fidl::encoding::Context) -> usize {
7328 std::mem::align_of::<u32>()
7329 }
7330
7331 #[inline(always)]
7332 fn inline_size(_context: fidl::encoding::Context) -> usize {
7333 std::mem::size_of::<u32>()
7334 }
7335
7336 #[inline(always)]
7337 fn encode_is_copy() -> bool {
7338 false
7339 }
7340
7341 #[inline(always)]
7342 fn decode_is_copy() -> bool {
7343 false
7344 }
7345 }
7346
7347 impl fidl::encoding::ValueTypeMarker for LogsIteratorOption {
7348 type Borrowed<'a> = Self;
7349 #[inline(always)]
7350 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7351 *value
7352 }
7353 }
7354
7355 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7356 for LogsIteratorOption
7357 {
7358 #[inline]
7359 unsafe fn encode(
7360 self,
7361 encoder: &mut fidl::encoding::Encoder<'_, D>,
7362 offset: usize,
7363 _depth: fidl::encoding::Depth,
7364 ) -> fidl::Result<()> {
7365 encoder.debug_check_bounds::<Self>(offset);
7366 encoder.write_num(self.into_primitive(), offset);
7367 Ok(())
7368 }
7369 }
7370
7371 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorOption {
7372 #[inline(always)]
7373 fn new_empty() -> Self {
7374 Self::unknown()
7375 }
7376
7377 #[inline]
7378 unsafe fn decode(
7379 &mut self,
7380 decoder: &mut fidl::encoding::Decoder<'_, D>,
7381 offset: usize,
7382 _depth: fidl::encoding::Depth,
7383 ) -> fidl::Result<()> {
7384 decoder.debug_check_bounds::<Self>(offset);
7385 let prim = decoder.read_num::<u32>(offset);
7386
7387 *self = Self::from_primitive_allow_unknown(prim);
7388 Ok(())
7389 }
7390 }
7391 unsafe impl fidl::encoding::TypeMarker for LogsIteratorType {
7392 type Owned = Self;
7393
7394 #[inline(always)]
7395 fn inline_align(_context: fidl::encoding::Context) -> usize {
7396 std::mem::align_of::<u32>()
7397 }
7398
7399 #[inline(always)]
7400 fn inline_size(_context: fidl::encoding::Context) -> usize {
7401 std::mem::size_of::<u32>()
7402 }
7403
7404 #[inline(always)]
7405 fn encode_is_copy() -> bool {
7406 false
7407 }
7408
7409 #[inline(always)]
7410 fn decode_is_copy() -> bool {
7411 false
7412 }
7413 }
7414
7415 impl fidl::encoding::ValueTypeMarker for LogsIteratorType {
7416 type Borrowed<'a> = Self;
7417 #[inline(always)]
7418 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7419 *value
7420 }
7421 }
7422
7423 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D>
7424 for LogsIteratorType
7425 {
7426 #[inline]
7427 unsafe fn encode(
7428 self,
7429 encoder: &mut fidl::encoding::Encoder<'_, D>,
7430 offset: usize,
7431 _depth: fidl::encoding::Depth,
7432 ) -> fidl::Result<()> {
7433 encoder.debug_check_bounds::<Self>(offset);
7434 encoder.write_num(self.into_primitive(), offset);
7435 Ok(())
7436 }
7437 }
7438
7439 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for LogsIteratorType {
7440 #[inline(always)]
7441 fn new_empty() -> Self {
7442 Self::unknown()
7443 }
7444
7445 #[inline]
7446 unsafe fn decode(
7447 &mut self,
7448 decoder: &mut fidl::encoding::Decoder<'_, D>,
7449 offset: usize,
7450 _depth: fidl::encoding::Depth,
7451 ) -> fidl::Result<()> {
7452 decoder.debug_check_bounds::<Self>(offset);
7453 let prim = decoder.read_num::<u32>(offset);
7454
7455 *self = Self::from_primitive_allow_unknown(prim);
7456 Ok(())
7457 }
7458 }
7459 unsafe impl fidl::encoding::TypeMarker for SuiteResult {
7460 type Owned = Self;
7461
7462 #[inline(always)]
7463 fn inline_align(_context: fidl::encoding::Context) -> usize {
7464 std::mem::align_of::<u32>()
7465 }
7466
7467 #[inline(always)]
7468 fn inline_size(_context: fidl::encoding::Context) -> usize {
7469 std::mem::size_of::<u32>()
7470 }
7471
7472 #[inline(always)]
7473 fn encode_is_copy() -> bool {
7474 false
7475 }
7476
7477 #[inline(always)]
7478 fn decode_is_copy() -> bool {
7479 false
7480 }
7481 }
7482
7483 impl fidl::encoding::ValueTypeMarker for SuiteResult {
7484 type Borrowed<'a> = Self;
7485 #[inline(always)]
7486 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7487 *value
7488 }
7489 }
7490
7491 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteResult {
7492 #[inline]
7493 unsafe fn encode(
7494 self,
7495 encoder: &mut fidl::encoding::Encoder<'_, D>,
7496 offset: usize,
7497 _depth: fidl::encoding::Depth,
7498 ) -> fidl::Result<()> {
7499 encoder.debug_check_bounds::<Self>(offset);
7500 encoder.write_num(self.into_primitive(), offset);
7501 Ok(())
7502 }
7503 }
7504
7505 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteResult {
7506 #[inline(always)]
7507 fn new_empty() -> Self {
7508 Self::unknown()
7509 }
7510
7511 #[inline]
7512 unsafe fn decode(
7513 &mut self,
7514 decoder: &mut fidl::encoding::Decoder<'_, D>,
7515 offset: usize,
7516 _depth: fidl::encoding::Depth,
7517 ) -> fidl::Result<()> {
7518 decoder.debug_check_bounds::<Self>(offset);
7519 let prim = decoder.read_num::<u32>(offset);
7520
7521 *self = Self::from_primitive_allow_unknown(prim);
7522 Ok(())
7523 }
7524 }
7525 unsafe impl fidl::encoding::TypeMarker for SuiteStatus {
7526 type Owned = Self;
7527
7528 #[inline(always)]
7529 fn inline_align(_context: fidl::encoding::Context) -> usize {
7530 std::mem::align_of::<u32>()
7531 }
7532
7533 #[inline(always)]
7534 fn inline_size(_context: fidl::encoding::Context) -> usize {
7535 std::mem::size_of::<u32>()
7536 }
7537
7538 #[inline(always)]
7539 fn encode_is_copy() -> bool {
7540 false
7541 }
7542
7543 #[inline(always)]
7544 fn decode_is_copy() -> bool {
7545 false
7546 }
7547 }
7548
7549 impl fidl::encoding::ValueTypeMarker for SuiteStatus {
7550 type Borrowed<'a> = Self;
7551 #[inline(always)]
7552 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7553 *value
7554 }
7555 }
7556
7557 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for SuiteStatus {
7558 #[inline]
7559 unsafe fn encode(
7560 self,
7561 encoder: &mut fidl::encoding::Encoder<'_, D>,
7562 offset: usize,
7563 _depth: fidl::encoding::Depth,
7564 ) -> fidl::Result<()> {
7565 encoder.debug_check_bounds::<Self>(offset);
7566 encoder.write_num(self.into_primitive(), offset);
7567 Ok(())
7568 }
7569 }
7570
7571 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStatus {
7572 #[inline(always)]
7573 fn new_empty() -> Self {
7574 Self::unknown()
7575 }
7576
7577 #[inline]
7578 unsafe fn decode(
7579 &mut self,
7580 decoder: &mut fidl::encoding::Decoder<'_, D>,
7581 offset: usize,
7582 _depth: fidl::encoding::Depth,
7583 ) -> fidl::Result<()> {
7584 decoder.debug_check_bounds::<Self>(offset);
7585 let prim = decoder.read_num::<u32>(offset);
7586
7587 *self = Self::from_primitive_allow_unknown(prim);
7588 Ok(())
7589 }
7590 }
7591 unsafe impl fidl::encoding::TypeMarker for TestCaseResult {
7592 type Owned = Self;
7593
7594 #[inline(always)]
7595 fn inline_align(_context: fidl::encoding::Context) -> usize {
7596 std::mem::align_of::<u32>()
7597 }
7598
7599 #[inline(always)]
7600 fn inline_size(_context: fidl::encoding::Context) -> usize {
7601 std::mem::size_of::<u32>()
7602 }
7603
7604 #[inline(always)]
7605 fn encode_is_copy() -> bool {
7606 false
7607 }
7608
7609 #[inline(always)]
7610 fn decode_is_copy() -> bool {
7611 false
7612 }
7613 }
7614
7615 impl fidl::encoding::ValueTypeMarker for TestCaseResult {
7616 type Borrowed<'a> = Self;
7617 #[inline(always)]
7618 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7619 *value
7620 }
7621 }
7622
7623 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Self, D> for TestCaseResult {
7624 #[inline]
7625 unsafe fn encode(
7626 self,
7627 encoder: &mut fidl::encoding::Encoder<'_, D>,
7628 offset: usize,
7629 _depth: fidl::encoding::Depth,
7630 ) -> fidl::Result<()> {
7631 encoder.debug_check_bounds::<Self>(offset);
7632 encoder.write_num(self.into_primitive(), offset);
7633 Ok(())
7634 }
7635 }
7636
7637 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCaseResult {
7638 #[inline(always)]
7639 fn new_empty() -> Self {
7640 Self::unknown()
7641 }
7642
7643 #[inline]
7644 unsafe fn decode(
7645 &mut self,
7646 decoder: &mut fidl::encoding::Decoder<'_, D>,
7647 offset: usize,
7648 _depth: fidl::encoding::Depth,
7649 ) -> fidl::Result<()> {
7650 decoder.debug_check_bounds::<Self>(offset);
7651 let prim = decoder.read_num::<u32>(offset);
7652
7653 *self = Self::from_primitive_allow_unknown(prim);
7654 Ok(())
7655 }
7656 }
7657
7658 impl fidl::encoding::ResourceTypeMarker for CaseArtifact {
7659 type Borrowed<'a> = &'a mut Self;
7660 fn take_or_borrow<'a>(
7661 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7662 ) -> Self::Borrowed<'a> {
7663 value
7664 }
7665 }
7666
7667 unsafe impl fidl::encoding::TypeMarker for CaseArtifact {
7668 type Owned = Self;
7669
7670 #[inline(always)]
7671 fn inline_align(_context: fidl::encoding::Context) -> usize {
7672 8
7673 }
7674
7675 #[inline(always)]
7676 fn inline_size(_context: fidl::encoding::Context) -> usize {
7677 24
7678 }
7679 }
7680
7681 unsafe impl fidl::encoding::Encode<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
7682 for &mut CaseArtifact
7683 {
7684 #[inline]
7685 unsafe fn encode(
7686 self,
7687 encoder: &mut fidl::encoding::Encoder<
7688 '_,
7689 fidl::encoding::DefaultFuchsiaResourceDialect,
7690 >,
7691 offset: usize,
7692 _depth: fidl::encoding::Depth,
7693 ) -> fidl::Result<()> {
7694 encoder.debug_check_bounds::<CaseArtifact>(offset);
7695 fidl::encoding::Encode::<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7697 (
7698 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
7699 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.artifact),
7700 ),
7701 encoder, offset, _depth
7702 )
7703 }
7704 }
7705 unsafe impl<
7706 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
7707 T1: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>,
7708 > fidl::encoding::Encode<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
7709 for (T0, T1)
7710 {
7711 #[inline]
7712 unsafe fn encode(
7713 self,
7714 encoder: &mut fidl::encoding::Encoder<
7715 '_,
7716 fidl::encoding::DefaultFuchsiaResourceDialect,
7717 >,
7718 offset: usize,
7719 depth: fidl::encoding::Depth,
7720 ) -> fidl::Result<()> {
7721 encoder.debug_check_bounds::<CaseArtifact>(offset);
7722 unsafe {
7725 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7726 (ptr as *mut u64).write_unaligned(0);
7727 }
7728 self.0.encode(encoder, offset + 0, depth)?;
7730 self.1.encode(encoder, offset + 8, depth)?;
7731 Ok(())
7732 }
7733 }
7734
7735 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for CaseArtifact {
7736 #[inline(always)]
7737 fn new_empty() -> Self {
7738 Self {
7739 identifier: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
7740 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
7741 }
7742 }
7743
7744 #[inline]
7745 unsafe fn decode(
7746 &mut self,
7747 decoder: &mut fidl::encoding::Decoder<
7748 '_,
7749 fidl::encoding::DefaultFuchsiaResourceDialect,
7750 >,
7751 offset: usize,
7752 _depth: fidl::encoding::Depth,
7753 ) -> fidl::Result<()> {
7754 decoder.debug_check_bounds::<Self>(offset);
7755 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7757 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7758 let mask = 0xffffffff00000000u64;
7759 let maskedval = padval & mask;
7760 if maskedval != 0 {
7761 return Err(fidl::Error::NonZeroPadding {
7762 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7763 });
7764 }
7765 fidl::decode!(
7766 u32,
7767 fidl::encoding::DefaultFuchsiaResourceDialect,
7768 &mut self.identifier,
7769 decoder,
7770 offset + 0,
7771 _depth
7772 )?;
7773 fidl::decode!(
7774 Artifact,
7775 fidl::encoding::DefaultFuchsiaResourceDialect,
7776 &mut self.artifact,
7777 decoder,
7778 offset + 8,
7779 _depth
7780 )?;
7781 Ok(())
7782 }
7783 }
7784
7785 impl fidl::encoding::ValueTypeMarker for CaseFinished {
7786 type Borrowed<'a> = &'a Self;
7787 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7788 value
7789 }
7790 }
7791
7792 unsafe impl fidl::encoding::TypeMarker for CaseFinished {
7793 type Owned = Self;
7794
7795 #[inline(always)]
7796 fn inline_align(_context: fidl::encoding::Context) -> usize {
7797 4
7798 }
7799
7800 #[inline(always)]
7801 fn inline_size(_context: fidl::encoding::Context) -> usize {
7802 4
7803 }
7804 #[inline(always)]
7805 fn encode_is_copy() -> bool {
7806 true
7807 }
7808
7809 #[inline(always)]
7810 fn decode_is_copy() -> bool {
7811 true
7812 }
7813 }
7814
7815 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFinished, D>
7816 for &CaseFinished
7817 {
7818 #[inline]
7819 unsafe fn encode(
7820 self,
7821 encoder: &mut fidl::encoding::Encoder<'_, D>,
7822 offset: usize,
7823 _depth: fidl::encoding::Depth,
7824 ) -> fidl::Result<()> {
7825 encoder.debug_check_bounds::<CaseFinished>(offset);
7826 unsafe {
7827 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
7829 (buf_ptr as *mut CaseFinished)
7830 .write_unaligned((self as *const CaseFinished).read());
7831 }
7834 Ok(())
7835 }
7836 }
7837 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
7838 fidl::encoding::Encode<CaseFinished, D> for (T0,)
7839 {
7840 #[inline]
7841 unsafe fn encode(
7842 self,
7843 encoder: &mut fidl::encoding::Encoder<'_, D>,
7844 offset: usize,
7845 depth: fidl::encoding::Depth,
7846 ) -> fidl::Result<()> {
7847 encoder.debug_check_bounds::<CaseFinished>(offset);
7848 self.0.encode(encoder, offset + 0, depth)?;
7852 Ok(())
7853 }
7854 }
7855
7856 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFinished {
7857 #[inline(always)]
7858 fn new_empty() -> Self {
7859 Self { identifier: fidl::new_empty!(u32, D) }
7860 }
7861
7862 #[inline]
7863 unsafe fn decode(
7864 &mut self,
7865 decoder: &mut fidl::encoding::Decoder<'_, D>,
7866 offset: usize,
7867 _depth: fidl::encoding::Depth,
7868 ) -> fidl::Result<()> {
7869 decoder.debug_check_bounds::<Self>(offset);
7870 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
7871 unsafe {
7874 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
7875 }
7876 Ok(())
7877 }
7878 }
7879
7880 impl fidl::encoding::ValueTypeMarker for CaseFound {
7881 type Borrowed<'a> = &'a Self;
7882 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7883 value
7884 }
7885 }
7886
7887 unsafe impl fidl::encoding::TypeMarker for CaseFound {
7888 type Owned = Self;
7889
7890 #[inline(always)]
7891 fn inline_align(_context: fidl::encoding::Context) -> usize {
7892 8
7893 }
7894
7895 #[inline(always)]
7896 fn inline_size(_context: fidl::encoding::Context) -> usize {
7897 24
7898 }
7899 }
7900
7901 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseFound, D>
7902 for &CaseFound
7903 {
7904 #[inline]
7905 unsafe fn encode(
7906 self,
7907 encoder: &mut fidl::encoding::Encoder<'_, D>,
7908 offset: usize,
7909 _depth: fidl::encoding::Depth,
7910 ) -> fidl::Result<()> {
7911 encoder.debug_check_bounds::<CaseFound>(offset);
7912 fidl::encoding::Encode::<CaseFound, D>::encode(
7914 (
7915 <fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_case_name),
7916 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
7917 ),
7918 encoder, offset, _depth
7919 )
7920 }
7921 }
7922 unsafe impl<
7923 D: fidl::encoding::ResourceDialect,
7924 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<2048>, D>,
7925 T1: fidl::encoding::Encode<u32, D>,
7926 > fidl::encoding::Encode<CaseFound, D> for (T0, T1)
7927 {
7928 #[inline]
7929 unsafe fn encode(
7930 self,
7931 encoder: &mut fidl::encoding::Encoder<'_, D>,
7932 offset: usize,
7933 depth: fidl::encoding::Depth,
7934 ) -> fidl::Result<()> {
7935 encoder.debug_check_bounds::<CaseFound>(offset);
7936 unsafe {
7939 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7940 (ptr as *mut u64).write_unaligned(0);
7941 }
7942 self.0.encode(encoder, offset + 0, depth)?;
7944 self.1.encode(encoder, offset + 16, depth)?;
7945 Ok(())
7946 }
7947 }
7948
7949 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseFound {
7950 #[inline(always)]
7951 fn new_empty() -> Self {
7952 Self {
7953 test_case_name: fidl::new_empty!(fidl::encoding::BoundedString<2048>, D),
7954 identifier: fidl::new_empty!(u32, D),
7955 }
7956 }
7957
7958 #[inline]
7959 unsafe fn decode(
7960 &mut self,
7961 decoder: &mut fidl::encoding::Decoder<'_, D>,
7962 offset: usize,
7963 _depth: fidl::encoding::Depth,
7964 ) -> fidl::Result<()> {
7965 decoder.debug_check_bounds::<Self>(offset);
7966 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7968 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7969 let mask = 0xffffffff00000000u64;
7970 let maskedval = padval & mask;
7971 if maskedval != 0 {
7972 return Err(fidl::Error::NonZeroPadding {
7973 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7974 });
7975 }
7976 fidl::decode!(
7977 fidl::encoding::BoundedString<2048>,
7978 D,
7979 &mut self.test_case_name,
7980 decoder,
7981 offset + 0,
7982 _depth
7983 )?;
7984 fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 16, _depth)?;
7985 Ok(())
7986 }
7987 }
7988
7989 impl fidl::encoding::ValueTypeMarker for CaseIteratorGetNextResponse {
7990 type Borrowed<'a> = &'a Self;
7991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
7992 value
7993 }
7994 }
7995
7996 unsafe impl fidl::encoding::TypeMarker for CaseIteratorGetNextResponse {
7997 type Owned = Self;
7998
7999 #[inline(always)]
8000 fn inline_align(_context: fidl::encoding::Context) -> usize {
8001 8
8002 }
8003
8004 #[inline(always)]
8005 fn inline_size(_context: fidl::encoding::Context) -> usize {
8006 16
8007 }
8008 }
8009
8010 unsafe impl<D: fidl::encoding::ResourceDialect>
8011 fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for &CaseIteratorGetNextResponse
8012 {
8013 #[inline]
8014 unsafe fn encode(
8015 self,
8016 encoder: &mut fidl::encoding::Encoder<'_, D>,
8017 offset: usize,
8018 _depth: fidl::encoding::Depth,
8019 ) -> fidl::Result<()> {
8020 encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
8021 fidl::encoding::Encode::<CaseIteratorGetNextResponse, D>::encode(
8023 (
8024 <fidl::encoding::UnboundedVector<Case> as fidl::encoding::ValueTypeMarker>::borrow(&self.cases),
8025 ),
8026 encoder, offset, _depth
8027 )
8028 }
8029 }
8030 unsafe impl<
8031 D: fidl::encoding::ResourceDialect,
8032 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<Case>, D>,
8033 > fidl::encoding::Encode<CaseIteratorGetNextResponse, D> for (T0,)
8034 {
8035 #[inline]
8036 unsafe fn encode(
8037 self,
8038 encoder: &mut fidl::encoding::Encoder<'_, D>,
8039 offset: usize,
8040 depth: fidl::encoding::Depth,
8041 ) -> fidl::Result<()> {
8042 encoder.debug_check_bounds::<CaseIteratorGetNextResponse>(offset);
8043 self.0.encode(encoder, offset + 0, depth)?;
8047 Ok(())
8048 }
8049 }
8050
8051 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
8052 for CaseIteratorGetNextResponse
8053 {
8054 #[inline(always)]
8055 fn new_empty() -> Self {
8056 Self { cases: fidl::new_empty!(fidl::encoding::UnboundedVector<Case>, D) }
8057 }
8058
8059 #[inline]
8060 unsafe fn decode(
8061 &mut self,
8062 decoder: &mut fidl::encoding::Decoder<'_, D>,
8063 offset: usize,
8064 _depth: fidl::encoding::Depth,
8065 ) -> fidl::Result<()> {
8066 decoder.debug_check_bounds::<Self>(offset);
8067 fidl::decode!(
8069 fidl::encoding::UnboundedVector<Case>,
8070 D,
8071 &mut self.cases,
8072 decoder,
8073 offset + 0,
8074 _depth
8075 )?;
8076 Ok(())
8077 }
8078 }
8079
8080 impl fidl::encoding::ValueTypeMarker for CaseStarted {
8081 type Borrowed<'a> = &'a Self;
8082 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8083 value
8084 }
8085 }
8086
8087 unsafe impl fidl::encoding::TypeMarker for CaseStarted {
8088 type Owned = Self;
8089
8090 #[inline(always)]
8091 fn inline_align(_context: fidl::encoding::Context) -> usize {
8092 4
8093 }
8094
8095 #[inline(always)]
8096 fn inline_size(_context: fidl::encoding::Context) -> usize {
8097 4
8098 }
8099 #[inline(always)]
8100 fn encode_is_copy() -> bool {
8101 true
8102 }
8103
8104 #[inline(always)]
8105 fn decode_is_copy() -> bool {
8106 true
8107 }
8108 }
8109
8110 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStarted, D>
8111 for &CaseStarted
8112 {
8113 #[inline]
8114 unsafe fn encode(
8115 self,
8116 encoder: &mut fidl::encoding::Encoder<'_, D>,
8117 offset: usize,
8118 _depth: fidl::encoding::Depth,
8119 ) -> fidl::Result<()> {
8120 encoder.debug_check_bounds::<CaseStarted>(offset);
8121 unsafe {
8122 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
8124 (buf_ptr as *mut CaseStarted).write_unaligned((self as *const CaseStarted).read());
8125 }
8128 Ok(())
8129 }
8130 }
8131 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
8132 fidl::encoding::Encode<CaseStarted, D> for (T0,)
8133 {
8134 #[inline]
8135 unsafe fn encode(
8136 self,
8137 encoder: &mut fidl::encoding::Encoder<'_, D>,
8138 offset: usize,
8139 depth: fidl::encoding::Depth,
8140 ) -> fidl::Result<()> {
8141 encoder.debug_check_bounds::<CaseStarted>(offset);
8142 self.0.encode(encoder, offset + 0, depth)?;
8146 Ok(())
8147 }
8148 }
8149
8150 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStarted {
8151 #[inline(always)]
8152 fn new_empty() -> Self {
8153 Self { identifier: fidl::new_empty!(u32, D) }
8154 }
8155
8156 #[inline]
8157 unsafe fn decode(
8158 &mut self,
8159 decoder: &mut fidl::encoding::Decoder<'_, D>,
8160 offset: usize,
8161 _depth: fidl::encoding::Depth,
8162 ) -> fidl::Result<()> {
8163 decoder.debug_check_bounds::<Self>(offset);
8164 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
8165 unsafe {
8168 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
8169 }
8170 Ok(())
8171 }
8172 }
8173
8174 impl fidl::encoding::ValueTypeMarker for CaseStopped {
8175 type Borrowed<'a> = &'a Self;
8176 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
8177 value
8178 }
8179 }
8180
8181 unsafe impl fidl::encoding::TypeMarker for CaseStopped {
8182 type Owned = Self;
8183
8184 #[inline(always)]
8185 fn inline_align(_context: fidl::encoding::Context) -> usize {
8186 4
8187 }
8188
8189 #[inline(always)]
8190 fn inline_size(_context: fidl::encoding::Context) -> usize {
8191 8
8192 }
8193 }
8194
8195 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<CaseStopped, D>
8196 for &CaseStopped
8197 {
8198 #[inline]
8199 unsafe fn encode(
8200 self,
8201 encoder: &mut fidl::encoding::Encoder<'_, D>,
8202 offset: usize,
8203 _depth: fidl::encoding::Depth,
8204 ) -> fidl::Result<()> {
8205 encoder.debug_check_bounds::<CaseStopped>(offset);
8206 fidl::encoding::Encode::<CaseStopped, D>::encode(
8208 (
8209 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
8210 <CaseStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),
8211 ),
8212 encoder,
8213 offset,
8214 _depth,
8215 )
8216 }
8217 }
8218 unsafe impl<
8219 D: fidl::encoding::ResourceDialect,
8220 T0: fidl::encoding::Encode<u32, D>,
8221 T1: fidl::encoding::Encode<CaseStatus, D>,
8222 > fidl::encoding::Encode<CaseStopped, D> for (T0, T1)
8223 {
8224 #[inline]
8225 unsafe fn encode(
8226 self,
8227 encoder: &mut fidl::encoding::Encoder<'_, D>,
8228 offset: usize,
8229 depth: fidl::encoding::Depth,
8230 ) -> fidl::Result<()> {
8231 encoder.debug_check_bounds::<CaseStopped>(offset);
8232 self.0.encode(encoder, offset + 0, depth)?;
8236 self.1.encode(encoder, offset + 4, depth)?;
8237 Ok(())
8238 }
8239 }
8240
8241 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for CaseStopped {
8242 #[inline(always)]
8243 fn new_empty() -> Self {
8244 Self { identifier: fidl::new_empty!(u32, D), status: fidl::new_empty!(CaseStatus, D) }
8245 }
8246
8247 #[inline]
8248 unsafe fn decode(
8249 &mut self,
8250 decoder: &mut fidl::encoding::Decoder<'_, D>,
8251 offset: usize,
8252 _depth: fidl::encoding::Depth,
8253 ) -> fidl::Result<()> {
8254 decoder.debug_check_bounds::<Self>(offset);
8255 fidl::decode!(u32, D, &mut self.identifier, decoder, offset + 0, _depth)?;
8257 fidl::decode!(CaseStatus, D, &mut self.status, decoder, offset + 4, _depth)?;
8258 Ok(())
8259 }
8260 }
8261
8262 impl fidl::encoding::ResourceTypeMarker for DebugDataIteratorGetNextCompressedResponse {
8263 type Borrowed<'a> = &'a mut Self;
8264 fn take_or_borrow<'a>(
8265 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8266 ) -> Self::Borrowed<'a> {
8267 value
8268 }
8269 }
8270
8271 unsafe impl fidl::encoding::TypeMarker for DebugDataIteratorGetNextCompressedResponse {
8272 type Owned = Self;
8273
8274 #[inline(always)]
8275 fn inline_align(_context: fidl::encoding::Context) -> usize {
8276 8
8277 }
8278
8279 #[inline(always)]
8280 fn inline_size(_context: fidl::encoding::Context) -> usize {
8281 16
8282 }
8283 }
8284
8285 unsafe impl
8286 fidl::encoding::Encode<
8287 DebugDataIteratorGetNextCompressedResponse,
8288 fidl::encoding::DefaultFuchsiaResourceDialect,
8289 > for &mut DebugDataIteratorGetNextCompressedResponse
8290 {
8291 #[inline]
8292 unsafe fn encode(
8293 self,
8294 encoder: &mut fidl::encoding::Encoder<
8295 '_,
8296 fidl::encoding::DefaultFuchsiaResourceDialect,
8297 >,
8298 offset: usize,
8299 _depth: fidl::encoding::Depth,
8300 ) -> fidl::Result<()> {
8301 encoder.debug_check_bounds::<DebugDataIteratorGetNextCompressedResponse>(offset);
8302 fidl::encoding::Encode::<DebugDataIteratorGetNextCompressedResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8304 (
8305 <fidl::encoding::UnboundedVector<DebugData> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
8306 ),
8307 encoder, offset, _depth
8308 )
8309 }
8310 }
8311 unsafe impl<
8312 T0: fidl::encoding::Encode<
8313 fidl::encoding::UnboundedVector<DebugData>,
8314 fidl::encoding::DefaultFuchsiaResourceDialect,
8315 >,
8316 >
8317 fidl::encoding::Encode<
8318 DebugDataIteratorGetNextCompressedResponse,
8319 fidl::encoding::DefaultFuchsiaResourceDialect,
8320 > for (T0,)
8321 {
8322 #[inline]
8323 unsafe fn encode(
8324 self,
8325 encoder: &mut fidl::encoding::Encoder<
8326 '_,
8327 fidl::encoding::DefaultFuchsiaResourceDialect,
8328 >,
8329 offset: usize,
8330 depth: fidl::encoding::Depth,
8331 ) -> fidl::Result<()> {
8332 encoder.debug_check_bounds::<DebugDataIteratorGetNextCompressedResponse>(offset);
8333 self.0.encode(encoder, offset + 0, depth)?;
8337 Ok(())
8338 }
8339 }
8340
8341 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8342 for DebugDataIteratorGetNextCompressedResponse
8343 {
8344 #[inline(always)]
8345 fn new_empty() -> Self {
8346 Self {
8347 data: fidl::new_empty!(
8348 fidl::encoding::UnboundedVector<DebugData>,
8349 fidl::encoding::DefaultFuchsiaResourceDialect
8350 ),
8351 }
8352 }
8353
8354 #[inline]
8355 unsafe fn decode(
8356 &mut self,
8357 decoder: &mut fidl::encoding::Decoder<
8358 '_,
8359 fidl::encoding::DefaultFuchsiaResourceDialect,
8360 >,
8361 offset: usize,
8362 _depth: fidl::encoding::Depth,
8363 ) -> fidl::Result<()> {
8364 decoder.debug_check_bounds::<Self>(offset);
8365 fidl::decode!(
8367 fidl::encoding::UnboundedVector<DebugData>,
8368 fidl::encoding::DefaultFuchsiaResourceDialect,
8369 &mut self.data,
8370 decoder,
8371 offset + 0,
8372 _depth
8373 )?;
8374 Ok(())
8375 }
8376 }
8377
8378 impl fidl::encoding::ResourceTypeMarker for DebugDataIteratorGetNextResponse {
8379 type Borrowed<'a> = &'a mut Self;
8380 fn take_or_borrow<'a>(
8381 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8382 ) -> Self::Borrowed<'a> {
8383 value
8384 }
8385 }
8386
8387 unsafe impl fidl::encoding::TypeMarker for DebugDataIteratorGetNextResponse {
8388 type Owned = Self;
8389
8390 #[inline(always)]
8391 fn inline_align(_context: fidl::encoding::Context) -> usize {
8392 8
8393 }
8394
8395 #[inline(always)]
8396 fn inline_size(_context: fidl::encoding::Context) -> usize {
8397 16
8398 }
8399 }
8400
8401 unsafe impl
8402 fidl::encoding::Encode<
8403 DebugDataIteratorGetNextResponse,
8404 fidl::encoding::DefaultFuchsiaResourceDialect,
8405 > for &mut DebugDataIteratorGetNextResponse
8406 {
8407 #[inline]
8408 unsafe fn encode(
8409 self,
8410 encoder: &mut fidl::encoding::Encoder<
8411 '_,
8412 fidl::encoding::DefaultFuchsiaResourceDialect,
8413 >,
8414 offset: usize,
8415 _depth: fidl::encoding::Depth,
8416 ) -> fidl::Result<()> {
8417 encoder.debug_check_bounds::<DebugDataIteratorGetNextResponse>(offset);
8418 fidl::encoding::Encode::<DebugDataIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8420 (
8421 <fidl::encoding::UnboundedVector<DebugData> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
8422 ),
8423 encoder, offset, _depth
8424 )
8425 }
8426 }
8427 unsafe impl<
8428 T0: fidl::encoding::Encode<
8429 fidl::encoding::UnboundedVector<DebugData>,
8430 fidl::encoding::DefaultFuchsiaResourceDialect,
8431 >,
8432 >
8433 fidl::encoding::Encode<
8434 DebugDataIteratorGetNextResponse,
8435 fidl::encoding::DefaultFuchsiaResourceDialect,
8436 > for (T0,)
8437 {
8438 #[inline]
8439 unsafe fn encode(
8440 self,
8441 encoder: &mut fidl::encoding::Encoder<
8442 '_,
8443 fidl::encoding::DefaultFuchsiaResourceDialect,
8444 >,
8445 offset: usize,
8446 depth: fidl::encoding::Depth,
8447 ) -> fidl::Result<()> {
8448 encoder.debug_check_bounds::<DebugDataIteratorGetNextResponse>(offset);
8449 self.0.encode(encoder, offset + 0, depth)?;
8453 Ok(())
8454 }
8455 }
8456
8457 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8458 for DebugDataIteratorGetNextResponse
8459 {
8460 #[inline(always)]
8461 fn new_empty() -> Self {
8462 Self {
8463 data: fidl::new_empty!(
8464 fidl::encoding::UnboundedVector<DebugData>,
8465 fidl::encoding::DefaultFuchsiaResourceDialect
8466 ),
8467 }
8468 }
8469
8470 #[inline]
8471 unsafe fn decode(
8472 &mut self,
8473 decoder: &mut fidl::encoding::Decoder<
8474 '_,
8475 fidl::encoding::DefaultFuchsiaResourceDialect,
8476 >,
8477 offset: usize,
8478 _depth: fidl::encoding::Depth,
8479 ) -> fidl::Result<()> {
8480 decoder.debug_check_bounds::<Self>(offset);
8481 fidl::decode!(
8483 fidl::encoding::UnboundedVector<DebugData>,
8484 fidl::encoding::DefaultFuchsiaResourceDialect,
8485 &mut self.data,
8486 decoder,
8487 offset + 0,
8488 _depth
8489 )?;
8490 Ok(())
8491 }
8492 }
8493
8494 impl fidl::encoding::ResourceTypeMarker for DirectoryAndToken {
8495 type Borrowed<'a> = &'a mut Self;
8496 fn take_or_borrow<'a>(
8497 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8498 ) -> Self::Borrowed<'a> {
8499 value
8500 }
8501 }
8502
8503 unsafe impl fidl::encoding::TypeMarker for DirectoryAndToken {
8504 type Owned = Self;
8505
8506 #[inline(always)]
8507 fn inline_align(_context: fidl::encoding::Context) -> usize {
8508 4
8509 }
8510
8511 #[inline(always)]
8512 fn inline_size(_context: fidl::encoding::Context) -> usize {
8513 8
8514 }
8515 }
8516
8517 unsafe impl
8518 fidl::encoding::Encode<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>
8519 for &mut DirectoryAndToken
8520 {
8521 #[inline]
8522 unsafe fn encode(
8523 self,
8524 encoder: &mut fidl::encoding::Encoder<
8525 '_,
8526 fidl::encoding::DefaultFuchsiaResourceDialect,
8527 >,
8528 offset: usize,
8529 _depth: fidl::encoding::Depth,
8530 ) -> fidl::Result<()> {
8531 encoder.debug_check_bounds::<DirectoryAndToken>(offset);
8532 fidl::encoding::Encode::<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8534 (
8535 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.directory),
8536 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
8537 ),
8538 encoder, offset, _depth
8539 )
8540 }
8541 }
8542 unsafe impl<
8543 T0: fidl::encoding::Encode<
8544 fidl::encoding::Endpoint<
8545 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
8546 >,
8547 fidl::encoding::DefaultFuchsiaResourceDialect,
8548 >,
8549 T1: fidl::encoding::Encode<
8550 fidl::encoding::HandleType<
8551 fidl::EventPair,
8552 { fidl::ObjectType::EVENTPAIR.into_raw() },
8553 2147483648,
8554 >,
8555 fidl::encoding::DefaultFuchsiaResourceDialect,
8556 >,
8557 >
8558 fidl::encoding::Encode<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>
8559 for (T0, T1)
8560 {
8561 #[inline]
8562 unsafe fn encode(
8563 self,
8564 encoder: &mut fidl::encoding::Encoder<
8565 '_,
8566 fidl::encoding::DefaultFuchsiaResourceDialect,
8567 >,
8568 offset: usize,
8569 depth: fidl::encoding::Depth,
8570 ) -> fidl::Result<()> {
8571 encoder.debug_check_bounds::<DirectoryAndToken>(offset);
8572 self.0.encode(encoder, offset + 0, depth)?;
8576 self.1.encode(encoder, offset + 4, depth)?;
8577 Ok(())
8578 }
8579 }
8580
8581 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8582 for DirectoryAndToken
8583 {
8584 #[inline(always)]
8585 fn new_empty() -> Self {
8586 Self {
8587 directory: fidl::new_empty!(
8588 fidl::encoding::Endpoint<
8589 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
8590 >,
8591 fidl::encoding::DefaultFuchsiaResourceDialect
8592 ),
8593 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8594 }
8595 }
8596
8597 #[inline]
8598 unsafe fn decode(
8599 &mut self,
8600 decoder: &mut fidl::encoding::Decoder<
8601 '_,
8602 fidl::encoding::DefaultFuchsiaResourceDialect,
8603 >,
8604 offset: usize,
8605 _depth: fidl::encoding::Depth,
8606 ) -> fidl::Result<()> {
8607 decoder.debug_check_bounds::<Self>(offset);
8608 fidl::decode!(
8610 fidl::encoding::Endpoint<
8611 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
8612 >,
8613 fidl::encoding::DefaultFuchsiaResourceDialect,
8614 &mut self.directory,
8615 decoder,
8616 offset + 0,
8617 _depth
8618 )?;
8619 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
8620 Ok(())
8621 }
8622 }
8623
8624 impl fidl::encoding::ResourceTypeMarker for EarlyBootProfileRegisterWatcherRequest {
8625 type Borrowed<'a> = &'a mut Self;
8626 fn take_or_borrow<'a>(
8627 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8628 ) -> Self::Borrowed<'a> {
8629 value
8630 }
8631 }
8632
8633 unsafe impl fidl::encoding::TypeMarker for EarlyBootProfileRegisterWatcherRequest {
8634 type Owned = Self;
8635
8636 #[inline(always)]
8637 fn inline_align(_context: fidl::encoding::Context) -> usize {
8638 4
8639 }
8640
8641 #[inline(always)]
8642 fn inline_size(_context: fidl::encoding::Context) -> usize {
8643 4
8644 }
8645 }
8646
8647 unsafe impl
8648 fidl::encoding::Encode<
8649 EarlyBootProfileRegisterWatcherRequest,
8650 fidl::encoding::DefaultFuchsiaResourceDialect,
8651 > for &mut EarlyBootProfileRegisterWatcherRequest
8652 {
8653 #[inline]
8654 unsafe fn encode(
8655 self,
8656 encoder: &mut fidl::encoding::Encoder<
8657 '_,
8658 fidl::encoding::DefaultFuchsiaResourceDialect,
8659 >,
8660 offset: usize,
8661 _depth: fidl::encoding::Depth,
8662 ) -> fidl::Result<()> {
8663 encoder.debug_check_bounds::<EarlyBootProfileRegisterWatcherRequest>(offset);
8664 fidl::encoding::Encode::<EarlyBootProfileRegisterWatcherRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8666 (
8667 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
8668 ),
8669 encoder, offset, _depth
8670 )
8671 }
8672 }
8673 unsafe impl<
8674 T0: fidl::encoding::Encode<
8675 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
8676 fidl::encoding::DefaultFuchsiaResourceDialect,
8677 >,
8678 >
8679 fidl::encoding::Encode<
8680 EarlyBootProfileRegisterWatcherRequest,
8681 fidl::encoding::DefaultFuchsiaResourceDialect,
8682 > for (T0,)
8683 {
8684 #[inline]
8685 unsafe fn encode(
8686 self,
8687 encoder: &mut fidl::encoding::Encoder<
8688 '_,
8689 fidl::encoding::DefaultFuchsiaResourceDialect,
8690 >,
8691 offset: usize,
8692 depth: fidl::encoding::Depth,
8693 ) -> fidl::Result<()> {
8694 encoder.debug_check_bounds::<EarlyBootProfileRegisterWatcherRequest>(offset);
8695 self.0.encode(encoder, offset + 0, depth)?;
8699 Ok(())
8700 }
8701 }
8702
8703 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8704 for EarlyBootProfileRegisterWatcherRequest
8705 {
8706 #[inline(always)]
8707 fn new_empty() -> Self {
8708 Self {
8709 iterator: fidl::new_empty!(
8710 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
8711 fidl::encoding::DefaultFuchsiaResourceDialect
8712 ),
8713 }
8714 }
8715
8716 #[inline]
8717 unsafe fn decode(
8718 &mut self,
8719 decoder: &mut fidl::encoding::Decoder<
8720 '_,
8721 fidl::encoding::DefaultFuchsiaResourceDialect,
8722 >,
8723 offset: usize,
8724 _depth: fidl::encoding::Depth,
8725 ) -> fidl::Result<()> {
8726 decoder.debug_check_bounds::<Self>(offset);
8727 fidl::decode!(
8729 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
8730 fidl::encoding::DefaultFuchsiaResourceDialect,
8731 &mut self.iterator,
8732 decoder,
8733 offset + 0,
8734 _depth
8735 )?;
8736 Ok(())
8737 }
8738 }
8739
8740 impl fidl::encoding::ResourceTypeMarker for QueryEnumerateInRealmRequest {
8741 type Borrowed<'a> = &'a mut Self;
8742 fn take_or_borrow<'a>(
8743 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8744 ) -> Self::Borrowed<'a> {
8745 value
8746 }
8747 }
8748
8749 unsafe impl fidl::encoding::TypeMarker for QueryEnumerateInRealmRequest {
8750 type Owned = Self;
8751
8752 #[inline(always)]
8753 fn inline_align(_context: fidl::encoding::Context) -> usize {
8754 8
8755 }
8756
8757 #[inline(always)]
8758 fn inline_size(_context: fidl::encoding::Context) -> usize {
8759 64
8760 }
8761 }
8762
8763 unsafe impl
8764 fidl::encoding::Encode<
8765 QueryEnumerateInRealmRequest,
8766 fidl::encoding::DefaultFuchsiaResourceDialect,
8767 > for &mut QueryEnumerateInRealmRequest
8768 {
8769 #[inline]
8770 unsafe fn encode(
8771 self,
8772 encoder: &mut fidl::encoding::Encoder<
8773 '_,
8774 fidl::encoding::DefaultFuchsiaResourceDialect,
8775 >,
8776 offset: usize,
8777 _depth: fidl::encoding::Depth,
8778 ) -> fidl::Result<()> {
8779 encoder.debug_check_bounds::<QueryEnumerateInRealmRequest>(offset);
8780 fidl::encoding::Encode::<QueryEnumerateInRealmRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8782 (
8783 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
8784 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm),
8785 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer> as fidl::encoding::ValueTypeMarker>::borrow(&self.offers),
8786 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.test_collection),
8787 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
8788 ),
8789 encoder, offset, _depth
8790 )
8791 }
8792 }
8793 unsafe impl<
8794 T0: fidl::encoding::Encode<
8795 fidl::encoding::BoundedString<4096>,
8796 fidl::encoding::DefaultFuchsiaResourceDialect,
8797 >,
8798 T1: fidl::encoding::Encode<
8799 fidl::encoding::Endpoint<
8800 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
8801 >,
8802 fidl::encoding::DefaultFuchsiaResourceDialect,
8803 >,
8804 T2: fidl::encoding::Encode<
8805 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
8806 fidl::encoding::DefaultFuchsiaResourceDialect,
8807 >,
8808 T3: fidl::encoding::Encode<
8809 fidl::encoding::UnboundedString,
8810 fidl::encoding::DefaultFuchsiaResourceDialect,
8811 >,
8812 T4: fidl::encoding::Encode<
8813 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
8814 fidl::encoding::DefaultFuchsiaResourceDialect,
8815 >,
8816 >
8817 fidl::encoding::Encode<
8818 QueryEnumerateInRealmRequest,
8819 fidl::encoding::DefaultFuchsiaResourceDialect,
8820 > for (T0, T1, T2, T3, T4)
8821 {
8822 #[inline]
8823 unsafe fn encode(
8824 self,
8825 encoder: &mut fidl::encoding::Encoder<
8826 '_,
8827 fidl::encoding::DefaultFuchsiaResourceDialect,
8828 >,
8829 offset: usize,
8830 depth: fidl::encoding::Depth,
8831 ) -> fidl::Result<()> {
8832 encoder.debug_check_bounds::<QueryEnumerateInRealmRequest>(offset);
8833 unsafe {
8836 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
8837 (ptr as *mut u64).write_unaligned(0);
8838 }
8839 unsafe {
8840 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
8841 (ptr as *mut u64).write_unaligned(0);
8842 }
8843 self.0.encode(encoder, offset + 0, depth)?;
8845 self.1.encode(encoder, offset + 16, depth)?;
8846 self.2.encode(encoder, offset + 24, depth)?;
8847 self.3.encode(encoder, offset + 40, depth)?;
8848 self.4.encode(encoder, offset + 56, depth)?;
8849 Ok(())
8850 }
8851 }
8852
8853 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8854 for QueryEnumerateInRealmRequest
8855 {
8856 #[inline(always)]
8857 fn new_empty() -> Self {
8858 Self {
8859 test_url: fidl::new_empty!(
8860 fidl::encoding::BoundedString<4096>,
8861 fidl::encoding::DefaultFuchsiaResourceDialect
8862 ),
8863 realm: fidl::new_empty!(
8864 fidl::encoding::Endpoint<
8865 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
8866 >,
8867 fidl::encoding::DefaultFuchsiaResourceDialect
8868 ),
8869 offers: fidl::new_empty!(
8870 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
8871 fidl::encoding::DefaultFuchsiaResourceDialect
8872 ),
8873 test_collection: fidl::new_empty!(
8874 fidl::encoding::UnboundedString,
8875 fidl::encoding::DefaultFuchsiaResourceDialect
8876 ),
8877 iterator: fidl::new_empty!(
8878 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
8879 fidl::encoding::DefaultFuchsiaResourceDialect
8880 ),
8881 }
8882 }
8883
8884 #[inline]
8885 unsafe fn decode(
8886 &mut self,
8887 decoder: &mut fidl::encoding::Decoder<
8888 '_,
8889 fidl::encoding::DefaultFuchsiaResourceDialect,
8890 >,
8891 offset: usize,
8892 _depth: fidl::encoding::Depth,
8893 ) -> fidl::Result<()> {
8894 decoder.debug_check_bounds::<Self>(offset);
8895 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
8897 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8898 let mask = 0xffffffff00000000u64;
8899 let maskedval = padval & mask;
8900 if maskedval != 0 {
8901 return Err(fidl::Error::NonZeroPadding {
8902 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
8903 });
8904 }
8905 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
8906 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8907 let mask = 0xffffffff00000000u64;
8908 let maskedval = padval & mask;
8909 if maskedval != 0 {
8910 return Err(fidl::Error::NonZeroPadding {
8911 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
8912 });
8913 }
8914 fidl::decode!(
8915 fidl::encoding::BoundedString<4096>,
8916 fidl::encoding::DefaultFuchsiaResourceDialect,
8917 &mut self.test_url,
8918 decoder,
8919 offset + 0,
8920 _depth
8921 )?;
8922 fidl::decode!(
8923 fidl::encoding::Endpoint<
8924 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
8925 >,
8926 fidl::encoding::DefaultFuchsiaResourceDialect,
8927 &mut self.realm,
8928 decoder,
8929 offset + 16,
8930 _depth
8931 )?;
8932 fidl::decode!(
8933 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
8934 fidl::encoding::DefaultFuchsiaResourceDialect,
8935 &mut self.offers,
8936 decoder,
8937 offset + 24,
8938 _depth
8939 )?;
8940 fidl::decode!(
8941 fidl::encoding::UnboundedString,
8942 fidl::encoding::DefaultFuchsiaResourceDialect,
8943 &mut self.test_collection,
8944 decoder,
8945 offset + 40,
8946 _depth
8947 )?;
8948 fidl::decode!(
8949 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
8950 fidl::encoding::DefaultFuchsiaResourceDialect,
8951 &mut self.iterator,
8952 decoder,
8953 offset + 56,
8954 _depth
8955 )?;
8956 Ok(())
8957 }
8958 }
8959
8960 impl fidl::encoding::ResourceTypeMarker for QueryEnumerateRequest {
8961 type Borrowed<'a> = &'a mut Self;
8962 fn take_or_borrow<'a>(
8963 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8964 ) -> Self::Borrowed<'a> {
8965 value
8966 }
8967 }
8968
8969 unsafe impl fidl::encoding::TypeMarker for QueryEnumerateRequest {
8970 type Owned = Self;
8971
8972 #[inline(always)]
8973 fn inline_align(_context: fidl::encoding::Context) -> usize {
8974 8
8975 }
8976
8977 #[inline(always)]
8978 fn inline_size(_context: fidl::encoding::Context) -> usize {
8979 24
8980 }
8981 }
8982
8983 unsafe impl
8984 fidl::encoding::Encode<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
8985 for &mut QueryEnumerateRequest
8986 {
8987 #[inline]
8988 unsafe fn encode(
8989 self,
8990 encoder: &mut fidl::encoding::Encoder<
8991 '_,
8992 fidl::encoding::DefaultFuchsiaResourceDialect,
8993 >,
8994 offset: usize,
8995 _depth: fidl::encoding::Depth,
8996 ) -> fidl::Result<()> {
8997 encoder.debug_check_bounds::<QueryEnumerateRequest>(offset);
8998 fidl::encoding::Encode::<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9000 (
9001 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
9002 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
9003 ),
9004 encoder, offset, _depth
9005 )
9006 }
9007 }
9008 unsafe impl<
9009 T0: fidl::encoding::Encode<
9010 fidl::encoding::BoundedString<4096>,
9011 fidl::encoding::DefaultFuchsiaResourceDialect,
9012 >,
9013 T1: fidl::encoding::Encode<
9014 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
9015 fidl::encoding::DefaultFuchsiaResourceDialect,
9016 >,
9017 >
9018 fidl::encoding::Encode<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9019 for (T0, T1)
9020 {
9021 #[inline]
9022 unsafe fn encode(
9023 self,
9024 encoder: &mut fidl::encoding::Encoder<
9025 '_,
9026 fidl::encoding::DefaultFuchsiaResourceDialect,
9027 >,
9028 offset: usize,
9029 depth: fidl::encoding::Depth,
9030 ) -> fidl::Result<()> {
9031 encoder.debug_check_bounds::<QueryEnumerateRequest>(offset);
9032 unsafe {
9035 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
9036 (ptr as *mut u64).write_unaligned(0);
9037 }
9038 self.0.encode(encoder, offset + 0, depth)?;
9040 self.1.encode(encoder, offset + 16, depth)?;
9041 Ok(())
9042 }
9043 }
9044
9045 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9046 for QueryEnumerateRequest
9047 {
9048 #[inline(always)]
9049 fn new_empty() -> Self {
9050 Self {
9051 test_url: fidl::new_empty!(
9052 fidl::encoding::BoundedString<4096>,
9053 fidl::encoding::DefaultFuchsiaResourceDialect
9054 ),
9055 iterator: fidl::new_empty!(
9056 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
9057 fidl::encoding::DefaultFuchsiaResourceDialect
9058 ),
9059 }
9060 }
9061
9062 #[inline]
9063 unsafe fn decode(
9064 &mut self,
9065 decoder: &mut fidl::encoding::Decoder<
9066 '_,
9067 fidl::encoding::DefaultFuchsiaResourceDialect,
9068 >,
9069 offset: usize,
9070 _depth: fidl::encoding::Depth,
9071 ) -> fidl::Result<()> {
9072 decoder.debug_check_bounds::<Self>(offset);
9073 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
9075 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9076 let mask = 0xffffffff00000000u64;
9077 let maskedval = padval & mask;
9078 if maskedval != 0 {
9079 return Err(fidl::Error::NonZeroPadding {
9080 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
9081 });
9082 }
9083 fidl::decode!(
9084 fidl::encoding::BoundedString<4096>,
9085 fidl::encoding::DefaultFuchsiaResourceDialect,
9086 &mut self.test_url,
9087 decoder,
9088 offset + 0,
9089 _depth
9090 )?;
9091 fidl::decode!(
9092 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
9093 fidl::encoding::DefaultFuchsiaResourceDialect,
9094 &mut self.iterator,
9095 decoder,
9096 offset + 16,
9097 _depth
9098 )?;
9099 Ok(())
9100 }
9101 }
9102
9103 impl fidl::encoding::ResourceTypeMarker for RunBuilderAddSuiteInRealmRequest {
9104 type Borrowed<'a> = &'a mut Self;
9105 fn take_or_borrow<'a>(
9106 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9107 ) -> Self::Borrowed<'a> {
9108 value
9109 }
9110 }
9111
9112 unsafe impl fidl::encoding::TypeMarker for RunBuilderAddSuiteInRealmRequest {
9113 type Owned = Self;
9114
9115 #[inline(always)]
9116 fn inline_align(_context: fidl::encoding::Context) -> usize {
9117 8
9118 }
9119
9120 #[inline(always)]
9121 fn inline_size(_context: fidl::encoding::Context) -> usize {
9122 80
9123 }
9124 }
9125
9126 unsafe impl
9127 fidl::encoding::Encode<
9128 RunBuilderAddSuiteInRealmRequest,
9129 fidl::encoding::DefaultFuchsiaResourceDialect,
9130 > for &mut RunBuilderAddSuiteInRealmRequest
9131 {
9132 #[inline]
9133 unsafe fn encode(
9134 self,
9135 encoder: &mut fidl::encoding::Encoder<
9136 '_,
9137 fidl::encoding::DefaultFuchsiaResourceDialect,
9138 >,
9139 offset: usize,
9140 _depth: fidl::encoding::Depth,
9141 ) -> fidl::Result<()> {
9142 encoder.debug_check_bounds::<RunBuilderAddSuiteInRealmRequest>(offset);
9143 fidl::encoding::Encode::<RunBuilderAddSuiteInRealmRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9145 (
9146 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm),
9147 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer> as fidl::encoding::ValueTypeMarker>::borrow(&self.offers),
9148 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.test_collection),
9149 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
9150 <RunOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
9151 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9152 ),
9153 encoder, offset, _depth
9154 )
9155 }
9156 }
9157 unsafe impl<
9158 T0: fidl::encoding::Encode<
9159 fidl::encoding::Endpoint<
9160 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
9161 >,
9162 fidl::encoding::DefaultFuchsiaResourceDialect,
9163 >,
9164 T1: fidl::encoding::Encode<
9165 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
9166 fidl::encoding::DefaultFuchsiaResourceDialect,
9167 >,
9168 T2: fidl::encoding::Encode<
9169 fidl::encoding::UnboundedString,
9170 fidl::encoding::DefaultFuchsiaResourceDialect,
9171 >,
9172 T3: fidl::encoding::Encode<
9173 fidl::encoding::BoundedString<4096>,
9174 fidl::encoding::DefaultFuchsiaResourceDialect,
9175 >,
9176 T4: fidl::encoding::Encode<RunOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
9177 T5: fidl::encoding::Encode<
9178 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9179 fidl::encoding::DefaultFuchsiaResourceDialect,
9180 >,
9181 >
9182 fidl::encoding::Encode<
9183 RunBuilderAddSuiteInRealmRequest,
9184 fidl::encoding::DefaultFuchsiaResourceDialect,
9185 > for (T0, T1, T2, T3, T4, T5)
9186 {
9187 #[inline]
9188 unsafe fn encode(
9189 self,
9190 encoder: &mut fidl::encoding::Encoder<
9191 '_,
9192 fidl::encoding::DefaultFuchsiaResourceDialect,
9193 >,
9194 offset: usize,
9195 depth: fidl::encoding::Depth,
9196 ) -> fidl::Result<()> {
9197 encoder.debug_check_bounds::<RunBuilderAddSuiteInRealmRequest>(offset);
9198 unsafe {
9201 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9202 (ptr as *mut u64).write_unaligned(0);
9203 }
9204 unsafe {
9205 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
9206 (ptr as *mut u64).write_unaligned(0);
9207 }
9208 self.0.encode(encoder, offset + 0, depth)?;
9210 self.1.encode(encoder, offset + 8, depth)?;
9211 self.2.encode(encoder, offset + 24, depth)?;
9212 self.3.encode(encoder, offset + 40, depth)?;
9213 self.4.encode(encoder, offset + 56, depth)?;
9214 self.5.encode(encoder, offset + 72, depth)?;
9215 Ok(())
9216 }
9217 }
9218
9219 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9220 for RunBuilderAddSuiteInRealmRequest
9221 {
9222 #[inline(always)]
9223 fn new_empty() -> Self {
9224 Self {
9225 realm: fidl::new_empty!(
9226 fidl::encoding::Endpoint<
9227 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
9228 >,
9229 fidl::encoding::DefaultFuchsiaResourceDialect
9230 ),
9231 offers: fidl::new_empty!(
9232 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
9233 fidl::encoding::DefaultFuchsiaResourceDialect
9234 ),
9235 test_collection: fidl::new_empty!(
9236 fidl::encoding::UnboundedString,
9237 fidl::encoding::DefaultFuchsiaResourceDialect
9238 ),
9239 test_url: fidl::new_empty!(
9240 fidl::encoding::BoundedString<4096>,
9241 fidl::encoding::DefaultFuchsiaResourceDialect
9242 ),
9243 options: fidl::new_empty!(
9244 RunOptions,
9245 fidl::encoding::DefaultFuchsiaResourceDialect
9246 ),
9247 controller: fidl::new_empty!(
9248 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9249 fidl::encoding::DefaultFuchsiaResourceDialect
9250 ),
9251 }
9252 }
9253
9254 #[inline]
9255 unsafe fn decode(
9256 &mut self,
9257 decoder: &mut fidl::encoding::Decoder<
9258 '_,
9259 fidl::encoding::DefaultFuchsiaResourceDialect,
9260 >,
9261 offset: usize,
9262 _depth: fidl::encoding::Depth,
9263 ) -> fidl::Result<()> {
9264 decoder.debug_check_bounds::<Self>(offset);
9265 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9267 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9268 let mask = 0xffffffff00000000u64;
9269 let maskedval = padval & mask;
9270 if maskedval != 0 {
9271 return Err(fidl::Error::NonZeroPadding {
9272 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9273 });
9274 }
9275 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
9276 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9277 let mask = 0xffffffff00000000u64;
9278 let maskedval = padval & mask;
9279 if maskedval != 0 {
9280 return Err(fidl::Error::NonZeroPadding {
9281 padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
9282 });
9283 }
9284 fidl::decode!(
9285 fidl::encoding::Endpoint<
9286 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
9287 >,
9288 fidl::encoding::DefaultFuchsiaResourceDialect,
9289 &mut self.realm,
9290 decoder,
9291 offset + 0,
9292 _depth
9293 )?;
9294 fidl::decode!(
9295 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
9296 fidl::encoding::DefaultFuchsiaResourceDialect,
9297 &mut self.offers,
9298 decoder,
9299 offset + 8,
9300 _depth
9301 )?;
9302 fidl::decode!(
9303 fidl::encoding::UnboundedString,
9304 fidl::encoding::DefaultFuchsiaResourceDialect,
9305 &mut self.test_collection,
9306 decoder,
9307 offset + 24,
9308 _depth
9309 )?;
9310 fidl::decode!(
9311 fidl::encoding::BoundedString<4096>,
9312 fidl::encoding::DefaultFuchsiaResourceDialect,
9313 &mut self.test_url,
9314 decoder,
9315 offset + 40,
9316 _depth
9317 )?;
9318 fidl::decode!(
9319 RunOptions,
9320 fidl::encoding::DefaultFuchsiaResourceDialect,
9321 &mut self.options,
9322 decoder,
9323 offset + 56,
9324 _depth
9325 )?;
9326 fidl::decode!(
9327 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9328 fidl::encoding::DefaultFuchsiaResourceDialect,
9329 &mut self.controller,
9330 decoder,
9331 offset + 72,
9332 _depth
9333 )?;
9334 Ok(())
9335 }
9336 }
9337
9338 impl fidl::encoding::ResourceTypeMarker for RunBuilderAddSuiteRequest {
9339 type Borrowed<'a> = &'a mut Self;
9340 fn take_or_borrow<'a>(
9341 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9342 ) -> Self::Borrowed<'a> {
9343 value
9344 }
9345 }
9346
9347 unsafe impl fidl::encoding::TypeMarker for RunBuilderAddSuiteRequest {
9348 type Owned = Self;
9349
9350 #[inline(always)]
9351 fn inline_align(_context: fidl::encoding::Context) -> usize {
9352 8
9353 }
9354
9355 #[inline(always)]
9356 fn inline_size(_context: fidl::encoding::Context) -> usize {
9357 40
9358 }
9359 }
9360
9361 unsafe impl
9362 fidl::encoding::Encode<
9363 RunBuilderAddSuiteRequest,
9364 fidl::encoding::DefaultFuchsiaResourceDialect,
9365 > for &mut RunBuilderAddSuiteRequest
9366 {
9367 #[inline]
9368 unsafe fn encode(
9369 self,
9370 encoder: &mut fidl::encoding::Encoder<
9371 '_,
9372 fidl::encoding::DefaultFuchsiaResourceDialect,
9373 >,
9374 offset: usize,
9375 _depth: fidl::encoding::Depth,
9376 ) -> fidl::Result<()> {
9377 encoder.debug_check_bounds::<RunBuilderAddSuiteRequest>(offset);
9378 fidl::encoding::Encode::<RunBuilderAddSuiteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9380 (
9381 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
9382 <RunOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
9383 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9384 ),
9385 encoder, offset, _depth
9386 )
9387 }
9388 }
9389 unsafe impl<
9390 T0: fidl::encoding::Encode<
9391 fidl::encoding::BoundedString<4096>,
9392 fidl::encoding::DefaultFuchsiaResourceDialect,
9393 >,
9394 T1: fidl::encoding::Encode<RunOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
9395 T2: fidl::encoding::Encode<
9396 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9397 fidl::encoding::DefaultFuchsiaResourceDialect,
9398 >,
9399 >
9400 fidl::encoding::Encode<
9401 RunBuilderAddSuiteRequest,
9402 fidl::encoding::DefaultFuchsiaResourceDialect,
9403 > for (T0, T1, T2)
9404 {
9405 #[inline]
9406 unsafe fn encode(
9407 self,
9408 encoder: &mut fidl::encoding::Encoder<
9409 '_,
9410 fidl::encoding::DefaultFuchsiaResourceDialect,
9411 >,
9412 offset: usize,
9413 depth: fidl::encoding::Depth,
9414 ) -> fidl::Result<()> {
9415 encoder.debug_check_bounds::<RunBuilderAddSuiteRequest>(offset);
9416 unsafe {
9419 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
9420 (ptr as *mut u64).write_unaligned(0);
9421 }
9422 self.0.encode(encoder, offset + 0, depth)?;
9424 self.1.encode(encoder, offset + 16, depth)?;
9425 self.2.encode(encoder, offset + 32, depth)?;
9426 Ok(())
9427 }
9428 }
9429
9430 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9431 for RunBuilderAddSuiteRequest
9432 {
9433 #[inline(always)]
9434 fn new_empty() -> Self {
9435 Self {
9436 test_url: fidl::new_empty!(
9437 fidl::encoding::BoundedString<4096>,
9438 fidl::encoding::DefaultFuchsiaResourceDialect
9439 ),
9440 options: fidl::new_empty!(
9441 RunOptions,
9442 fidl::encoding::DefaultFuchsiaResourceDialect
9443 ),
9444 controller: fidl::new_empty!(
9445 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9446 fidl::encoding::DefaultFuchsiaResourceDialect
9447 ),
9448 }
9449 }
9450
9451 #[inline]
9452 unsafe fn decode(
9453 &mut self,
9454 decoder: &mut fidl::encoding::Decoder<
9455 '_,
9456 fidl::encoding::DefaultFuchsiaResourceDialect,
9457 >,
9458 offset: usize,
9459 _depth: fidl::encoding::Depth,
9460 ) -> fidl::Result<()> {
9461 decoder.debug_check_bounds::<Self>(offset);
9462 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9464 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9465 let mask = 0xffffffff00000000u64;
9466 let maskedval = padval & mask;
9467 if maskedval != 0 {
9468 return Err(fidl::Error::NonZeroPadding {
9469 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9470 });
9471 }
9472 fidl::decode!(
9473 fidl::encoding::BoundedString<4096>,
9474 fidl::encoding::DefaultFuchsiaResourceDialect,
9475 &mut self.test_url,
9476 decoder,
9477 offset + 0,
9478 _depth
9479 )?;
9480 fidl::decode!(
9481 RunOptions,
9482 fidl::encoding::DefaultFuchsiaResourceDialect,
9483 &mut self.options,
9484 decoder,
9485 offset + 16,
9486 _depth
9487 )?;
9488 fidl::decode!(
9489 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
9490 fidl::encoding::DefaultFuchsiaResourceDialect,
9491 &mut self.controller,
9492 decoder,
9493 offset + 32,
9494 _depth
9495 )?;
9496 Ok(())
9497 }
9498 }
9499
9500 impl fidl::encoding::ResourceTypeMarker for RunBuilderBuildRequest {
9501 type Borrowed<'a> = &'a mut Self;
9502 fn take_or_borrow<'a>(
9503 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9504 ) -> Self::Borrowed<'a> {
9505 value
9506 }
9507 }
9508
9509 unsafe impl fidl::encoding::TypeMarker for RunBuilderBuildRequest {
9510 type Owned = Self;
9511
9512 #[inline(always)]
9513 fn inline_align(_context: fidl::encoding::Context) -> usize {
9514 4
9515 }
9516
9517 #[inline(always)]
9518 fn inline_size(_context: fidl::encoding::Context) -> usize {
9519 4
9520 }
9521 }
9522
9523 unsafe impl
9524 fidl::encoding::Encode<
9525 RunBuilderBuildRequest,
9526 fidl::encoding::DefaultFuchsiaResourceDialect,
9527 > for &mut RunBuilderBuildRequest
9528 {
9529 #[inline]
9530 unsafe fn encode(
9531 self,
9532 encoder: &mut fidl::encoding::Encoder<
9533 '_,
9534 fidl::encoding::DefaultFuchsiaResourceDialect,
9535 >,
9536 offset: usize,
9537 _depth: fidl::encoding::Depth,
9538 ) -> fidl::Result<()> {
9539 encoder.debug_check_bounds::<RunBuilderBuildRequest>(offset);
9540 fidl::encoding::Encode::<RunBuilderBuildRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9542 (
9543 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9544 ),
9545 encoder, offset, _depth
9546 )
9547 }
9548 }
9549 unsafe impl<
9550 T0: fidl::encoding::Encode<
9551 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
9552 fidl::encoding::DefaultFuchsiaResourceDialect,
9553 >,
9554 >
9555 fidl::encoding::Encode<
9556 RunBuilderBuildRequest,
9557 fidl::encoding::DefaultFuchsiaResourceDialect,
9558 > for (T0,)
9559 {
9560 #[inline]
9561 unsafe fn encode(
9562 self,
9563 encoder: &mut fidl::encoding::Encoder<
9564 '_,
9565 fidl::encoding::DefaultFuchsiaResourceDialect,
9566 >,
9567 offset: usize,
9568 depth: fidl::encoding::Depth,
9569 ) -> fidl::Result<()> {
9570 encoder.debug_check_bounds::<RunBuilderBuildRequest>(offset);
9571 self.0.encode(encoder, offset + 0, depth)?;
9575 Ok(())
9576 }
9577 }
9578
9579 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9580 for RunBuilderBuildRequest
9581 {
9582 #[inline(always)]
9583 fn new_empty() -> Self {
9584 Self {
9585 controller: fidl::new_empty!(
9586 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
9587 fidl::encoding::DefaultFuchsiaResourceDialect
9588 ),
9589 }
9590 }
9591
9592 #[inline]
9593 unsafe fn decode(
9594 &mut self,
9595 decoder: &mut fidl::encoding::Decoder<
9596 '_,
9597 fidl::encoding::DefaultFuchsiaResourceDialect,
9598 >,
9599 offset: usize,
9600 _depth: fidl::encoding::Depth,
9601 ) -> fidl::Result<()> {
9602 decoder.debug_check_bounds::<Self>(offset);
9603 fidl::decode!(
9605 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
9606 fidl::encoding::DefaultFuchsiaResourceDialect,
9607 &mut self.controller,
9608 decoder,
9609 offset + 0,
9610 _depth
9611 )?;
9612 Ok(())
9613 }
9614 }
9615
9616 impl fidl::encoding::ValueTypeMarker for RunBuilderWithSchedulingOptionsRequest {
9617 type Borrowed<'a> = &'a Self;
9618 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9619 value
9620 }
9621 }
9622
9623 unsafe impl fidl::encoding::TypeMarker for RunBuilderWithSchedulingOptionsRequest {
9624 type Owned = Self;
9625
9626 #[inline(always)]
9627 fn inline_align(_context: fidl::encoding::Context) -> usize {
9628 8
9629 }
9630
9631 #[inline(always)]
9632 fn inline_size(_context: fidl::encoding::Context) -> usize {
9633 16
9634 }
9635 }
9636
9637 unsafe impl<D: fidl::encoding::ResourceDialect>
9638 fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D>
9639 for &RunBuilderWithSchedulingOptionsRequest
9640 {
9641 #[inline]
9642 unsafe fn encode(
9643 self,
9644 encoder: &mut fidl::encoding::Encoder<'_, D>,
9645 offset: usize,
9646 _depth: fidl::encoding::Depth,
9647 ) -> fidl::Result<()> {
9648 encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
9649 fidl::encoding::Encode::<RunBuilderWithSchedulingOptionsRequest, D>::encode(
9651 (<SchedulingOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),),
9652 encoder,
9653 offset,
9654 _depth,
9655 )
9656 }
9657 }
9658 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SchedulingOptions, D>>
9659 fidl::encoding::Encode<RunBuilderWithSchedulingOptionsRequest, D> for (T0,)
9660 {
9661 #[inline]
9662 unsafe fn encode(
9663 self,
9664 encoder: &mut fidl::encoding::Encoder<'_, D>,
9665 offset: usize,
9666 depth: fidl::encoding::Depth,
9667 ) -> fidl::Result<()> {
9668 encoder.debug_check_bounds::<RunBuilderWithSchedulingOptionsRequest>(offset);
9669 self.0.encode(encoder, offset + 0, depth)?;
9673 Ok(())
9674 }
9675 }
9676
9677 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
9678 for RunBuilderWithSchedulingOptionsRequest
9679 {
9680 #[inline(always)]
9681 fn new_empty() -> Self {
9682 Self { options: fidl::new_empty!(SchedulingOptions, D) }
9683 }
9684
9685 #[inline]
9686 unsafe fn decode(
9687 &mut self,
9688 decoder: &mut fidl::encoding::Decoder<'_, D>,
9689 offset: usize,
9690 _depth: fidl::encoding::Depth,
9691 ) -> fidl::Result<()> {
9692 decoder.debug_check_bounds::<Self>(offset);
9693 fidl::decode!(SchedulingOptions, D, &mut self.options, decoder, offset + 0, _depth)?;
9695 Ok(())
9696 }
9697 }
9698
9699 impl fidl::encoding::ResourceTypeMarker for RunControllerGetEventsResponse {
9700 type Borrowed<'a> = &'a mut Self;
9701 fn take_or_borrow<'a>(
9702 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9703 ) -> Self::Borrowed<'a> {
9704 value
9705 }
9706 }
9707
9708 unsafe impl fidl::encoding::TypeMarker for RunControllerGetEventsResponse {
9709 type Owned = Self;
9710
9711 #[inline(always)]
9712 fn inline_align(_context: fidl::encoding::Context) -> usize {
9713 8
9714 }
9715
9716 #[inline(always)]
9717 fn inline_size(_context: fidl::encoding::Context) -> usize {
9718 16
9719 }
9720 }
9721
9722 unsafe impl
9723 fidl::encoding::Encode<
9724 RunControllerGetEventsResponse,
9725 fidl::encoding::DefaultFuchsiaResourceDialect,
9726 > for &mut RunControllerGetEventsResponse
9727 {
9728 #[inline]
9729 unsafe fn encode(
9730 self,
9731 encoder: &mut fidl::encoding::Encoder<
9732 '_,
9733 fidl::encoding::DefaultFuchsiaResourceDialect,
9734 >,
9735 offset: usize,
9736 _depth: fidl::encoding::Depth,
9737 ) -> fidl::Result<()> {
9738 encoder.debug_check_bounds::<RunControllerGetEventsResponse>(offset);
9739 fidl::encoding::Encode::<RunControllerGetEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9741 (
9742 <fidl::encoding::UnboundedVector<RunEvent> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
9743 ),
9744 encoder, offset, _depth
9745 )
9746 }
9747 }
9748 unsafe impl<
9749 T0: fidl::encoding::Encode<
9750 fidl::encoding::UnboundedVector<RunEvent>,
9751 fidl::encoding::DefaultFuchsiaResourceDialect,
9752 >,
9753 >
9754 fidl::encoding::Encode<
9755 RunControllerGetEventsResponse,
9756 fidl::encoding::DefaultFuchsiaResourceDialect,
9757 > for (T0,)
9758 {
9759 #[inline]
9760 unsafe fn encode(
9761 self,
9762 encoder: &mut fidl::encoding::Encoder<
9763 '_,
9764 fidl::encoding::DefaultFuchsiaResourceDialect,
9765 >,
9766 offset: usize,
9767 depth: fidl::encoding::Depth,
9768 ) -> fidl::Result<()> {
9769 encoder.debug_check_bounds::<RunControllerGetEventsResponse>(offset);
9770 self.0.encode(encoder, offset + 0, depth)?;
9774 Ok(())
9775 }
9776 }
9777
9778 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9779 for RunControllerGetEventsResponse
9780 {
9781 #[inline(always)]
9782 fn new_empty() -> Self {
9783 Self {
9784 events: fidl::new_empty!(
9785 fidl::encoding::UnboundedVector<RunEvent>,
9786 fidl::encoding::DefaultFuchsiaResourceDialect
9787 ),
9788 }
9789 }
9790
9791 #[inline]
9792 unsafe fn decode(
9793 &mut self,
9794 decoder: &mut fidl::encoding::Decoder<
9795 '_,
9796 fidl::encoding::DefaultFuchsiaResourceDialect,
9797 >,
9798 offset: usize,
9799 _depth: fidl::encoding::Depth,
9800 ) -> fidl::Result<()> {
9801 decoder.debug_check_bounds::<Self>(offset);
9802 fidl::decode!(
9804 fidl::encoding::UnboundedVector<RunEvent>,
9805 fidl::encoding::DefaultFuchsiaResourceDialect,
9806 &mut self.events,
9807 decoder,
9808 offset + 0,
9809 _depth
9810 )?;
9811 Ok(())
9812 }
9813 }
9814
9815 impl fidl::encoding::ValueTypeMarker for RunStarted {
9816 type Borrowed<'a> = &'a Self;
9817 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9818 value
9819 }
9820 }
9821
9822 unsafe impl fidl::encoding::TypeMarker for RunStarted {
9823 type Owned = Self;
9824
9825 #[inline(always)]
9826 fn inline_align(_context: fidl::encoding::Context) -> usize {
9827 1
9828 }
9829
9830 #[inline(always)]
9831 fn inline_size(_context: fidl::encoding::Context) -> usize {
9832 1
9833 }
9834 }
9835
9836 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStarted, D>
9837 for &RunStarted
9838 {
9839 #[inline]
9840 unsafe fn encode(
9841 self,
9842 encoder: &mut fidl::encoding::Encoder<'_, D>,
9843 offset: usize,
9844 _depth: fidl::encoding::Depth,
9845 ) -> fidl::Result<()> {
9846 encoder.debug_check_bounds::<RunStarted>(offset);
9847 encoder.write_num(0u8, offset);
9848 Ok(())
9849 }
9850 }
9851
9852 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStarted {
9853 #[inline(always)]
9854 fn new_empty() -> Self {
9855 Self
9856 }
9857
9858 #[inline]
9859 unsafe fn decode(
9860 &mut self,
9861 decoder: &mut fidl::encoding::Decoder<'_, D>,
9862 offset: usize,
9863 _depth: fidl::encoding::Depth,
9864 ) -> fidl::Result<()> {
9865 decoder.debug_check_bounds::<Self>(offset);
9866 match decoder.read_num::<u8>(offset) {
9867 0 => Ok(()),
9868 _ => Err(fidl::Error::Invalid),
9869 }
9870 }
9871 }
9872
9873 impl fidl::encoding::ValueTypeMarker for RunStopped {
9874 type Borrowed<'a> = &'a Self;
9875 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
9876 value
9877 }
9878 }
9879
9880 unsafe impl fidl::encoding::TypeMarker for RunStopped {
9881 type Owned = Self;
9882
9883 #[inline(always)]
9884 fn inline_align(_context: fidl::encoding::Context) -> usize {
9885 1
9886 }
9887
9888 #[inline(always)]
9889 fn inline_size(_context: fidl::encoding::Context) -> usize {
9890 1
9891 }
9892 }
9893
9894 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunStopped, D>
9895 for &RunStopped
9896 {
9897 #[inline]
9898 unsafe fn encode(
9899 self,
9900 encoder: &mut fidl::encoding::Encoder<'_, D>,
9901 offset: usize,
9902 _depth: fidl::encoding::Depth,
9903 ) -> fidl::Result<()> {
9904 encoder.debug_check_bounds::<RunStopped>(offset);
9905 encoder.write_num(0u8, offset);
9906 Ok(())
9907 }
9908 }
9909
9910 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunStopped {
9911 #[inline(always)]
9912 fn new_empty() -> Self {
9913 Self
9914 }
9915
9916 #[inline]
9917 unsafe fn decode(
9918 &mut self,
9919 decoder: &mut fidl::encoding::Decoder<'_, D>,
9920 offset: usize,
9921 _depth: fidl::encoding::Depth,
9922 ) -> fidl::Result<()> {
9923 decoder.debug_check_bounds::<Self>(offset);
9924 match decoder.read_num::<u8>(offset) {
9925 0 => Ok(()),
9926 _ => Err(fidl::Error::Invalid),
9927 }
9928 }
9929 }
9930
9931 impl fidl::encoding::ResourceTypeMarker for Stderr {
9932 type Borrowed<'a> = &'a mut Self;
9933 fn take_or_borrow<'a>(
9934 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9935 ) -> Self::Borrowed<'a> {
9936 value
9937 }
9938 }
9939
9940 unsafe impl fidl::encoding::TypeMarker for Stderr {
9941 type Owned = Self;
9942
9943 #[inline(always)]
9944 fn inline_align(_context: fidl::encoding::Context) -> usize {
9945 4
9946 }
9947
9948 #[inline(always)]
9949 fn inline_size(_context: fidl::encoding::Context) -> usize {
9950 4
9951 }
9952 }
9953
9954 unsafe impl fidl::encoding::Encode<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect>
9955 for &mut Stderr
9956 {
9957 #[inline]
9958 unsafe fn encode(
9959 self,
9960 encoder: &mut fidl::encoding::Encoder<
9961 '_,
9962 fidl::encoding::DefaultFuchsiaResourceDialect,
9963 >,
9964 offset: usize,
9965 _depth: fidl::encoding::Depth,
9966 ) -> fidl::Result<()> {
9967 encoder.debug_check_bounds::<Stderr>(offset);
9968 fidl::encoding::Encode::<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9970 (<fidl::encoding::HandleType<
9971 fidl::Socket,
9972 { fidl::ObjectType::SOCKET.into_raw() },
9973 2147483648,
9974 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9975 &mut self.socket
9976 ),),
9977 encoder,
9978 offset,
9979 _depth,
9980 )
9981 }
9982 }
9983 unsafe impl<
9984 T0: fidl::encoding::Encode<
9985 fidl::encoding::HandleType<
9986 fidl::Socket,
9987 { fidl::ObjectType::SOCKET.into_raw() },
9988 2147483648,
9989 >,
9990 fidl::encoding::DefaultFuchsiaResourceDialect,
9991 >,
9992 > fidl::encoding::Encode<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
9993 {
9994 #[inline]
9995 unsafe fn encode(
9996 self,
9997 encoder: &mut fidl::encoding::Encoder<
9998 '_,
9999 fidl::encoding::DefaultFuchsiaResourceDialect,
10000 >,
10001 offset: usize,
10002 depth: fidl::encoding::Depth,
10003 ) -> fidl::Result<()> {
10004 encoder.debug_check_bounds::<Stderr>(offset);
10005 self.0.encode(encoder, offset + 0, depth)?;
10009 Ok(())
10010 }
10011 }
10012
10013 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Stderr {
10014 #[inline(always)]
10015 fn new_empty() -> Self {
10016 Self {
10017 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10018 }
10019 }
10020
10021 #[inline]
10022 unsafe fn decode(
10023 &mut self,
10024 decoder: &mut fidl::encoding::Decoder<
10025 '_,
10026 fidl::encoding::DefaultFuchsiaResourceDialect,
10027 >,
10028 offset: usize,
10029 _depth: fidl::encoding::Depth,
10030 ) -> fidl::Result<()> {
10031 decoder.debug_check_bounds::<Self>(offset);
10032 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
10034 Ok(())
10035 }
10036 }
10037
10038 impl fidl::encoding::ResourceTypeMarker for Stdout {
10039 type Borrowed<'a> = &'a mut Self;
10040 fn take_or_borrow<'a>(
10041 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10042 ) -> Self::Borrowed<'a> {
10043 value
10044 }
10045 }
10046
10047 unsafe impl fidl::encoding::TypeMarker for Stdout {
10048 type Owned = Self;
10049
10050 #[inline(always)]
10051 fn inline_align(_context: fidl::encoding::Context) -> usize {
10052 4
10053 }
10054
10055 #[inline(always)]
10056 fn inline_size(_context: fidl::encoding::Context) -> usize {
10057 4
10058 }
10059 }
10060
10061 unsafe impl fidl::encoding::Encode<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect>
10062 for &mut Stdout
10063 {
10064 #[inline]
10065 unsafe fn encode(
10066 self,
10067 encoder: &mut fidl::encoding::Encoder<
10068 '_,
10069 fidl::encoding::DefaultFuchsiaResourceDialect,
10070 >,
10071 offset: usize,
10072 _depth: fidl::encoding::Depth,
10073 ) -> fidl::Result<()> {
10074 encoder.debug_check_bounds::<Stdout>(offset);
10075 fidl::encoding::Encode::<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10077 (<fidl::encoding::HandleType<
10078 fidl::Socket,
10079 { fidl::ObjectType::SOCKET.into_raw() },
10080 2147483648,
10081 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10082 &mut self.socket
10083 ),),
10084 encoder,
10085 offset,
10086 _depth,
10087 )
10088 }
10089 }
10090 unsafe impl<
10091 T0: fidl::encoding::Encode<
10092 fidl::encoding::HandleType<
10093 fidl::Socket,
10094 { fidl::ObjectType::SOCKET.into_raw() },
10095 2147483648,
10096 >,
10097 fidl::encoding::DefaultFuchsiaResourceDialect,
10098 >,
10099 > fidl::encoding::Encode<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
10100 {
10101 #[inline]
10102 unsafe fn encode(
10103 self,
10104 encoder: &mut fidl::encoding::Encoder<
10105 '_,
10106 fidl::encoding::DefaultFuchsiaResourceDialect,
10107 >,
10108 offset: usize,
10109 depth: fidl::encoding::Depth,
10110 ) -> fidl::Result<()> {
10111 encoder.debug_check_bounds::<Stdout>(offset);
10112 self.0.encode(encoder, offset + 0, depth)?;
10116 Ok(())
10117 }
10118 }
10119
10120 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Stdout {
10121 #[inline(always)]
10122 fn new_empty() -> Self {
10123 Self {
10124 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10125 }
10126 }
10127
10128 #[inline]
10129 unsafe fn decode(
10130 &mut self,
10131 decoder: &mut fidl::encoding::Decoder<
10132 '_,
10133 fidl::encoding::DefaultFuchsiaResourceDialect,
10134 >,
10135 offset: usize,
10136 _depth: fidl::encoding::Depth,
10137 ) -> fidl::Result<()> {
10138 decoder.debug_check_bounds::<Self>(offset);
10139 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
10141 Ok(())
10142 }
10143 }
10144
10145 impl fidl::encoding::ResourceTypeMarker for SuiteArtifact {
10146 type Borrowed<'a> = &'a mut Self;
10147 fn take_or_borrow<'a>(
10148 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10149 ) -> Self::Borrowed<'a> {
10150 value
10151 }
10152 }
10153
10154 unsafe impl fidl::encoding::TypeMarker for SuiteArtifact {
10155 type Owned = Self;
10156
10157 #[inline(always)]
10158 fn inline_align(_context: fidl::encoding::Context) -> usize {
10159 8
10160 }
10161
10162 #[inline(always)]
10163 fn inline_size(_context: fidl::encoding::Context) -> usize {
10164 16
10165 }
10166 }
10167
10168 unsafe impl fidl::encoding::Encode<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
10169 for &mut SuiteArtifact
10170 {
10171 #[inline]
10172 unsafe fn encode(
10173 self,
10174 encoder: &mut fidl::encoding::Encoder<
10175 '_,
10176 fidl::encoding::DefaultFuchsiaResourceDialect,
10177 >,
10178 offset: usize,
10179 _depth: fidl::encoding::Depth,
10180 ) -> fidl::Result<()> {
10181 encoder.debug_check_bounds::<SuiteArtifact>(offset);
10182 fidl::encoding::Encode::<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10184 (
10185 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.artifact),
10186 ),
10187 encoder, offset, _depth
10188 )
10189 }
10190 }
10191 unsafe impl<T0: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>>
10192 fidl::encoding::Encode<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
10193 for (T0,)
10194 {
10195 #[inline]
10196 unsafe fn encode(
10197 self,
10198 encoder: &mut fidl::encoding::Encoder<
10199 '_,
10200 fidl::encoding::DefaultFuchsiaResourceDialect,
10201 >,
10202 offset: usize,
10203 depth: fidl::encoding::Depth,
10204 ) -> fidl::Result<()> {
10205 encoder.debug_check_bounds::<SuiteArtifact>(offset);
10206 self.0.encode(encoder, offset + 0, depth)?;
10210 Ok(())
10211 }
10212 }
10213
10214 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteArtifact {
10215 #[inline(always)]
10216 fn new_empty() -> Self {
10217 Self {
10218 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
10219 }
10220 }
10221
10222 #[inline]
10223 unsafe fn decode(
10224 &mut self,
10225 decoder: &mut fidl::encoding::Decoder<
10226 '_,
10227 fidl::encoding::DefaultFuchsiaResourceDialect,
10228 >,
10229 offset: usize,
10230 _depth: fidl::encoding::Depth,
10231 ) -> fidl::Result<()> {
10232 decoder.debug_check_bounds::<Self>(offset);
10233 fidl::decode!(
10235 Artifact,
10236 fidl::encoding::DefaultFuchsiaResourceDialect,
10237 &mut self.artifact,
10238 decoder,
10239 offset + 0,
10240 _depth
10241 )?;
10242 Ok(())
10243 }
10244 }
10245
10246 impl fidl::encoding::ResourceTypeMarker for SuiteControllerGetEventsResponse {
10247 type Borrowed<'a> = &'a mut Self;
10248 fn take_or_borrow<'a>(
10249 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10250 ) -> Self::Borrowed<'a> {
10251 value
10252 }
10253 }
10254
10255 unsafe impl fidl::encoding::TypeMarker for SuiteControllerGetEventsResponse {
10256 type Owned = Self;
10257
10258 #[inline(always)]
10259 fn inline_align(_context: fidl::encoding::Context) -> usize {
10260 8
10261 }
10262
10263 #[inline(always)]
10264 fn inline_size(_context: fidl::encoding::Context) -> usize {
10265 16
10266 }
10267 }
10268
10269 unsafe impl
10270 fidl::encoding::Encode<
10271 SuiteControllerGetEventsResponse,
10272 fidl::encoding::DefaultFuchsiaResourceDialect,
10273 > for &mut SuiteControllerGetEventsResponse
10274 {
10275 #[inline]
10276 unsafe fn encode(
10277 self,
10278 encoder: &mut fidl::encoding::Encoder<
10279 '_,
10280 fidl::encoding::DefaultFuchsiaResourceDialect,
10281 >,
10282 offset: usize,
10283 _depth: fidl::encoding::Depth,
10284 ) -> fidl::Result<()> {
10285 encoder.debug_check_bounds::<SuiteControllerGetEventsResponse>(offset);
10286 fidl::encoding::Encode::<SuiteControllerGetEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10288 (
10289 <fidl::encoding::UnboundedVector<SuiteEvent> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
10290 ),
10291 encoder, offset, _depth
10292 )
10293 }
10294 }
10295 unsafe impl<
10296 T0: fidl::encoding::Encode<
10297 fidl::encoding::UnboundedVector<SuiteEvent>,
10298 fidl::encoding::DefaultFuchsiaResourceDialect,
10299 >,
10300 >
10301 fidl::encoding::Encode<
10302 SuiteControllerGetEventsResponse,
10303 fidl::encoding::DefaultFuchsiaResourceDialect,
10304 > for (T0,)
10305 {
10306 #[inline]
10307 unsafe fn encode(
10308 self,
10309 encoder: &mut fidl::encoding::Encoder<
10310 '_,
10311 fidl::encoding::DefaultFuchsiaResourceDialect,
10312 >,
10313 offset: usize,
10314 depth: fidl::encoding::Depth,
10315 ) -> fidl::Result<()> {
10316 encoder.debug_check_bounds::<SuiteControllerGetEventsResponse>(offset);
10317 self.0.encode(encoder, offset + 0, depth)?;
10321 Ok(())
10322 }
10323 }
10324
10325 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10326 for SuiteControllerGetEventsResponse
10327 {
10328 #[inline(always)]
10329 fn new_empty() -> Self {
10330 Self {
10331 events: fidl::new_empty!(
10332 fidl::encoding::UnboundedVector<SuiteEvent>,
10333 fidl::encoding::DefaultFuchsiaResourceDialect
10334 ),
10335 }
10336 }
10337
10338 #[inline]
10339 unsafe fn decode(
10340 &mut self,
10341 decoder: &mut fidl::encoding::Decoder<
10342 '_,
10343 fidl::encoding::DefaultFuchsiaResourceDialect,
10344 >,
10345 offset: usize,
10346 _depth: fidl::encoding::Depth,
10347 ) -> fidl::Result<()> {
10348 decoder.debug_check_bounds::<Self>(offset);
10349 fidl::decode!(
10351 fidl::encoding::UnboundedVector<SuiteEvent>,
10352 fidl::encoding::DefaultFuchsiaResourceDialect,
10353 &mut self.events,
10354 decoder,
10355 offset + 0,
10356 _depth
10357 )?;
10358 Ok(())
10359 }
10360 }
10361
10362 impl fidl::encoding::ResourceTypeMarker for SuiteControllerWatchEventsResponse {
10363 type Borrowed<'a> = &'a mut Self;
10364 fn take_or_borrow<'a>(
10365 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10366 ) -> Self::Borrowed<'a> {
10367 value
10368 }
10369 }
10370
10371 unsafe impl fidl::encoding::TypeMarker for SuiteControllerWatchEventsResponse {
10372 type Owned = Self;
10373
10374 #[inline(always)]
10375 fn inline_align(_context: fidl::encoding::Context) -> usize {
10376 8
10377 }
10378
10379 #[inline(always)]
10380 fn inline_size(_context: fidl::encoding::Context) -> usize {
10381 16
10382 }
10383 }
10384
10385 unsafe impl
10386 fidl::encoding::Encode<
10387 SuiteControllerWatchEventsResponse,
10388 fidl::encoding::DefaultFuchsiaResourceDialect,
10389 > for &mut SuiteControllerWatchEventsResponse
10390 {
10391 #[inline]
10392 unsafe fn encode(
10393 self,
10394 encoder: &mut fidl::encoding::Encoder<
10395 '_,
10396 fidl::encoding::DefaultFuchsiaResourceDialect,
10397 >,
10398 offset: usize,
10399 _depth: fidl::encoding::Depth,
10400 ) -> fidl::Result<()> {
10401 encoder.debug_check_bounds::<SuiteControllerWatchEventsResponse>(offset);
10402 fidl::encoding::Encode::<SuiteControllerWatchEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10404 (
10405 <fidl::encoding::Vector<Event, 1024> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
10406 ),
10407 encoder, offset, _depth
10408 )
10409 }
10410 }
10411 unsafe impl<
10412 T0: fidl::encoding::Encode<
10413 fidl::encoding::Vector<Event, 1024>,
10414 fidl::encoding::DefaultFuchsiaResourceDialect,
10415 >,
10416 >
10417 fidl::encoding::Encode<
10418 SuiteControllerWatchEventsResponse,
10419 fidl::encoding::DefaultFuchsiaResourceDialect,
10420 > for (T0,)
10421 {
10422 #[inline]
10423 unsafe fn encode(
10424 self,
10425 encoder: &mut fidl::encoding::Encoder<
10426 '_,
10427 fidl::encoding::DefaultFuchsiaResourceDialect,
10428 >,
10429 offset: usize,
10430 depth: fidl::encoding::Depth,
10431 ) -> fidl::Result<()> {
10432 encoder.debug_check_bounds::<SuiteControllerWatchEventsResponse>(offset);
10433 self.0.encode(encoder, offset + 0, depth)?;
10437 Ok(())
10438 }
10439 }
10440
10441 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10442 for SuiteControllerWatchEventsResponse
10443 {
10444 #[inline(always)]
10445 fn new_empty() -> Self {
10446 Self {
10447 events: fidl::new_empty!(fidl::encoding::Vector<Event, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect),
10448 }
10449 }
10450
10451 #[inline]
10452 unsafe fn decode(
10453 &mut self,
10454 decoder: &mut fidl::encoding::Decoder<
10455 '_,
10456 fidl::encoding::DefaultFuchsiaResourceDialect,
10457 >,
10458 offset: usize,
10459 _depth: fidl::encoding::Depth,
10460 ) -> fidl::Result<()> {
10461 decoder.debug_check_bounds::<Self>(offset);
10462 fidl::decode!(fidl::encoding::Vector<Event, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.events, decoder, offset + 0, _depth)?;
10464 Ok(())
10465 }
10466 }
10467
10468 impl fidl::encoding::ResourceTypeMarker for SuiteRunnerRunRequest {
10469 type Borrowed<'a> = &'a mut Self;
10470 fn take_or_borrow<'a>(
10471 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10472 ) -> Self::Borrowed<'a> {
10473 value
10474 }
10475 }
10476
10477 unsafe impl fidl::encoding::TypeMarker for SuiteRunnerRunRequest {
10478 type Owned = Self;
10479
10480 #[inline(always)]
10481 fn inline_align(_context: fidl::encoding::Context) -> usize {
10482 8
10483 }
10484
10485 #[inline(always)]
10486 fn inline_size(_context: fidl::encoding::Context) -> usize {
10487 40
10488 }
10489 }
10490
10491 unsafe impl
10492 fidl::encoding::Encode<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10493 for &mut SuiteRunnerRunRequest
10494 {
10495 #[inline]
10496 unsafe fn encode(
10497 self,
10498 encoder: &mut fidl::encoding::Encoder<
10499 '_,
10500 fidl::encoding::DefaultFuchsiaResourceDialect,
10501 >,
10502 offset: usize,
10503 _depth: fidl::encoding::Depth,
10504 ) -> fidl::Result<()> {
10505 encoder.debug_check_bounds::<SuiteRunnerRunRequest>(offset);
10506 fidl::encoding::Encode::<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10508 (
10509 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_suite_url),
10510 <RunSuiteOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.options),
10511 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
10512 ),
10513 encoder, offset, _depth
10514 )
10515 }
10516 }
10517 unsafe impl<
10518 T0: fidl::encoding::Encode<
10519 fidl::encoding::BoundedString<4096>,
10520 fidl::encoding::DefaultFuchsiaResourceDialect,
10521 >,
10522 T1: fidl::encoding::Encode<RunSuiteOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
10523 T2: fidl::encoding::Encode<
10524 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
10525 fidl::encoding::DefaultFuchsiaResourceDialect,
10526 >,
10527 >
10528 fidl::encoding::Encode<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10529 for (T0, T1, T2)
10530 {
10531 #[inline]
10532 unsafe fn encode(
10533 self,
10534 encoder: &mut fidl::encoding::Encoder<
10535 '_,
10536 fidl::encoding::DefaultFuchsiaResourceDialect,
10537 >,
10538 offset: usize,
10539 depth: fidl::encoding::Depth,
10540 ) -> fidl::Result<()> {
10541 encoder.debug_check_bounds::<SuiteRunnerRunRequest>(offset);
10542 unsafe {
10545 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
10546 (ptr as *mut u64).write_unaligned(0);
10547 }
10548 self.0.encode(encoder, offset + 0, depth)?;
10550 self.1.encode(encoder, offset + 16, depth)?;
10551 self.2.encode(encoder, offset + 32, depth)?;
10552 Ok(())
10553 }
10554 }
10555
10556 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10557 for SuiteRunnerRunRequest
10558 {
10559 #[inline(always)]
10560 fn new_empty() -> Self {
10561 Self {
10562 test_suite_url: fidl::new_empty!(
10563 fidl::encoding::BoundedString<4096>,
10564 fidl::encoding::DefaultFuchsiaResourceDialect
10565 ),
10566 options: fidl::new_empty!(
10567 RunSuiteOptions,
10568 fidl::encoding::DefaultFuchsiaResourceDialect
10569 ),
10570 controller: fidl::new_empty!(
10571 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
10572 fidl::encoding::DefaultFuchsiaResourceDialect
10573 ),
10574 }
10575 }
10576
10577 #[inline]
10578 unsafe fn decode(
10579 &mut self,
10580 decoder: &mut fidl::encoding::Decoder<
10581 '_,
10582 fidl::encoding::DefaultFuchsiaResourceDialect,
10583 >,
10584 offset: usize,
10585 _depth: fidl::encoding::Depth,
10586 ) -> fidl::Result<()> {
10587 decoder.debug_check_bounds::<Self>(offset);
10588 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
10590 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10591 let mask = 0xffffffff00000000u64;
10592 let maskedval = padval & mask;
10593 if maskedval != 0 {
10594 return Err(fidl::Error::NonZeroPadding {
10595 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
10596 });
10597 }
10598 fidl::decode!(
10599 fidl::encoding::BoundedString<4096>,
10600 fidl::encoding::DefaultFuchsiaResourceDialect,
10601 &mut self.test_suite_url,
10602 decoder,
10603 offset + 0,
10604 _depth
10605 )?;
10606 fidl::decode!(
10607 RunSuiteOptions,
10608 fidl::encoding::DefaultFuchsiaResourceDialect,
10609 &mut self.options,
10610 decoder,
10611 offset + 16,
10612 _depth
10613 )?;
10614 fidl::decode!(
10615 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
10616 fidl::encoding::DefaultFuchsiaResourceDialect,
10617 &mut self.controller,
10618 decoder,
10619 offset + 32,
10620 _depth
10621 )?;
10622 Ok(())
10623 }
10624 }
10625
10626 impl fidl::encoding::ValueTypeMarker for SuiteStarted {
10627 type Borrowed<'a> = &'a Self;
10628 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10629 value
10630 }
10631 }
10632
10633 unsafe impl fidl::encoding::TypeMarker for SuiteStarted {
10634 type Owned = Self;
10635
10636 #[inline(always)]
10637 fn inline_align(_context: fidl::encoding::Context) -> usize {
10638 1
10639 }
10640
10641 #[inline(always)]
10642 fn inline_size(_context: fidl::encoding::Context) -> usize {
10643 1
10644 }
10645 }
10646
10647 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStarted, D>
10648 for &SuiteStarted
10649 {
10650 #[inline]
10651 unsafe fn encode(
10652 self,
10653 encoder: &mut fidl::encoding::Encoder<'_, D>,
10654 offset: usize,
10655 _depth: fidl::encoding::Depth,
10656 ) -> fidl::Result<()> {
10657 encoder.debug_check_bounds::<SuiteStarted>(offset);
10658 encoder.write_num(0u8, offset);
10659 Ok(())
10660 }
10661 }
10662
10663 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStarted {
10664 #[inline(always)]
10665 fn new_empty() -> Self {
10666 Self
10667 }
10668
10669 #[inline]
10670 unsafe fn decode(
10671 &mut self,
10672 decoder: &mut fidl::encoding::Decoder<'_, D>,
10673 offset: usize,
10674 _depth: fidl::encoding::Depth,
10675 ) -> fidl::Result<()> {
10676 decoder.debug_check_bounds::<Self>(offset);
10677 match decoder.read_num::<u8>(offset) {
10678 0 => Ok(()),
10679 _ => Err(fidl::Error::Invalid),
10680 }
10681 }
10682 }
10683
10684 impl fidl::encoding::ValueTypeMarker for SuiteStopped {
10685 type Borrowed<'a> = &'a Self;
10686 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10687 value
10688 }
10689 }
10690
10691 unsafe impl fidl::encoding::TypeMarker for SuiteStopped {
10692 type Owned = Self;
10693
10694 #[inline(always)]
10695 fn inline_align(_context: fidl::encoding::Context) -> usize {
10696 4
10697 }
10698
10699 #[inline(always)]
10700 fn inline_size(_context: fidl::encoding::Context) -> usize {
10701 4
10702 }
10703 }
10704
10705 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SuiteStopped, D>
10706 for &SuiteStopped
10707 {
10708 #[inline]
10709 unsafe fn encode(
10710 self,
10711 encoder: &mut fidl::encoding::Encoder<'_, D>,
10712 offset: usize,
10713 _depth: fidl::encoding::Depth,
10714 ) -> fidl::Result<()> {
10715 encoder.debug_check_bounds::<SuiteStopped>(offset);
10716 fidl::encoding::Encode::<SuiteStopped, D>::encode(
10718 (<SuiteStatus as fidl::encoding::ValueTypeMarker>::borrow(&self.status),),
10719 encoder,
10720 offset,
10721 _depth,
10722 )
10723 }
10724 }
10725 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<SuiteStatus, D>>
10726 fidl::encoding::Encode<SuiteStopped, D> for (T0,)
10727 {
10728 #[inline]
10729 unsafe fn encode(
10730 self,
10731 encoder: &mut fidl::encoding::Encoder<'_, D>,
10732 offset: usize,
10733 depth: fidl::encoding::Depth,
10734 ) -> fidl::Result<()> {
10735 encoder.debug_check_bounds::<SuiteStopped>(offset);
10736 self.0.encode(encoder, offset + 0, depth)?;
10740 Ok(())
10741 }
10742 }
10743
10744 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SuiteStopped {
10745 #[inline(always)]
10746 fn new_empty() -> Self {
10747 Self { status: fidl::new_empty!(SuiteStatus, D) }
10748 }
10749
10750 #[inline]
10751 unsafe fn decode(
10752 &mut self,
10753 decoder: &mut fidl::encoding::Decoder<'_, D>,
10754 offset: usize,
10755 _depth: fidl::encoding::Depth,
10756 ) -> fidl::Result<()> {
10757 decoder.debug_check_bounds::<Self>(offset);
10758 fidl::decode!(SuiteStatus, D, &mut self.status, decoder, offset + 0, _depth)?;
10760 Ok(())
10761 }
10762 }
10763
10764 impl fidl::encoding::ResourceTypeMarker for TestCaseEnumeratorEnumerateRequest {
10765 type Borrowed<'a> = &'a mut Self;
10766 fn take_or_borrow<'a>(
10767 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10768 ) -> Self::Borrowed<'a> {
10769 value
10770 }
10771 }
10772
10773 unsafe impl fidl::encoding::TypeMarker for TestCaseEnumeratorEnumerateRequest {
10774 type Owned = Self;
10775
10776 #[inline(always)]
10777 fn inline_align(_context: fidl::encoding::Context) -> usize {
10778 8
10779 }
10780
10781 #[inline(always)]
10782 fn inline_size(_context: fidl::encoding::Context) -> usize {
10783 40
10784 }
10785 }
10786
10787 unsafe impl
10788 fidl::encoding::Encode<
10789 TestCaseEnumeratorEnumerateRequest,
10790 fidl::encoding::DefaultFuchsiaResourceDialect,
10791 > for &mut TestCaseEnumeratorEnumerateRequest
10792 {
10793 #[inline]
10794 unsafe fn encode(
10795 self,
10796 encoder: &mut fidl::encoding::Encoder<
10797 '_,
10798 fidl::encoding::DefaultFuchsiaResourceDialect,
10799 >,
10800 offset: usize,
10801 _depth: fidl::encoding::Depth,
10802 ) -> fidl::Result<()> {
10803 encoder.debug_check_bounds::<TestCaseEnumeratorEnumerateRequest>(offset);
10804 fidl::encoding::Encode::<TestCaseEnumeratorEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10806 (
10807 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_suite_url),
10808 <EnumerateTestCasesOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.options),
10809 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
10810 ),
10811 encoder, offset, _depth
10812 )
10813 }
10814 }
10815 unsafe impl<
10816 T0: fidl::encoding::Encode<
10817 fidl::encoding::BoundedString<4096>,
10818 fidl::encoding::DefaultFuchsiaResourceDialect,
10819 >,
10820 T1: fidl::encoding::Encode<
10821 EnumerateTestCasesOptions,
10822 fidl::encoding::DefaultFuchsiaResourceDialect,
10823 >,
10824 T2: fidl::encoding::Encode<
10825 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
10826 fidl::encoding::DefaultFuchsiaResourceDialect,
10827 >,
10828 >
10829 fidl::encoding::Encode<
10830 TestCaseEnumeratorEnumerateRequest,
10831 fidl::encoding::DefaultFuchsiaResourceDialect,
10832 > for (T0, T1, T2)
10833 {
10834 #[inline]
10835 unsafe fn encode(
10836 self,
10837 encoder: &mut fidl::encoding::Encoder<
10838 '_,
10839 fidl::encoding::DefaultFuchsiaResourceDialect,
10840 >,
10841 offset: usize,
10842 depth: fidl::encoding::Depth,
10843 ) -> fidl::Result<()> {
10844 encoder.debug_check_bounds::<TestCaseEnumeratorEnumerateRequest>(offset);
10845 unsafe {
10848 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
10849 (ptr as *mut u64).write_unaligned(0);
10850 }
10851 self.0.encode(encoder, offset + 0, depth)?;
10853 self.1.encode(encoder, offset + 16, depth)?;
10854 self.2.encode(encoder, offset + 32, depth)?;
10855 Ok(())
10856 }
10857 }
10858
10859 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10860 for TestCaseEnumeratorEnumerateRequest
10861 {
10862 #[inline(always)]
10863 fn new_empty() -> Self {
10864 Self {
10865 test_suite_url: fidl::new_empty!(
10866 fidl::encoding::BoundedString<4096>,
10867 fidl::encoding::DefaultFuchsiaResourceDialect
10868 ),
10869 options: fidl::new_empty!(
10870 EnumerateTestCasesOptions,
10871 fidl::encoding::DefaultFuchsiaResourceDialect
10872 ),
10873 iterator: fidl::new_empty!(
10874 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
10875 fidl::encoding::DefaultFuchsiaResourceDialect
10876 ),
10877 }
10878 }
10879
10880 #[inline]
10881 unsafe fn decode(
10882 &mut self,
10883 decoder: &mut fidl::encoding::Decoder<
10884 '_,
10885 fidl::encoding::DefaultFuchsiaResourceDialect,
10886 >,
10887 offset: usize,
10888 _depth: fidl::encoding::Depth,
10889 ) -> fidl::Result<()> {
10890 decoder.debug_check_bounds::<Self>(offset);
10891 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
10893 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10894 let mask = 0xffffffff00000000u64;
10895 let maskedval = padval & mask;
10896 if maskedval != 0 {
10897 return Err(fidl::Error::NonZeroPadding {
10898 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
10899 });
10900 }
10901 fidl::decode!(
10902 fidl::encoding::BoundedString<4096>,
10903 fidl::encoding::DefaultFuchsiaResourceDialect,
10904 &mut self.test_suite_url,
10905 decoder,
10906 offset + 0,
10907 _depth
10908 )?;
10909 fidl::decode!(
10910 EnumerateTestCasesOptions,
10911 fidl::encoding::DefaultFuchsiaResourceDialect,
10912 &mut self.options,
10913 decoder,
10914 offset + 16,
10915 _depth
10916 )?;
10917 fidl::decode!(
10918 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
10919 fidl::encoding::DefaultFuchsiaResourceDialect,
10920 &mut self.iterator,
10921 decoder,
10922 offset + 32,
10923 _depth
10924 )?;
10925 Ok(())
10926 }
10927 }
10928
10929 impl fidl::encoding::ValueTypeMarker for TestCaseIteratorGetNextResponse {
10930 type Borrowed<'a> = &'a Self;
10931 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
10932 value
10933 }
10934 }
10935
10936 unsafe impl fidl::encoding::TypeMarker for TestCaseIteratorGetNextResponse {
10937 type Owned = Self;
10938
10939 #[inline(always)]
10940 fn inline_align(_context: fidl::encoding::Context) -> usize {
10941 8
10942 }
10943
10944 #[inline(always)]
10945 fn inline_size(_context: fidl::encoding::Context) -> usize {
10946 16
10947 }
10948 }
10949
10950 unsafe impl<D: fidl::encoding::ResourceDialect>
10951 fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D>
10952 for &TestCaseIteratorGetNextResponse
10953 {
10954 #[inline]
10955 unsafe fn encode(
10956 self,
10957 encoder: &mut fidl::encoding::Encoder<'_, D>,
10958 offset: usize,
10959 _depth: fidl::encoding::Depth,
10960 ) -> fidl::Result<()> {
10961 encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
10962 fidl::encoding::Encode::<TestCaseIteratorGetNextResponse, D>::encode(
10964 (
10965 <fidl::encoding::Vector<TestCase, 1024> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_cases),
10966 ),
10967 encoder, offset, _depth
10968 )
10969 }
10970 }
10971 unsafe impl<
10972 D: fidl::encoding::ResourceDialect,
10973 T0: fidl::encoding::Encode<fidl::encoding::Vector<TestCase, 1024>, D>,
10974 > fidl::encoding::Encode<TestCaseIteratorGetNextResponse, D> for (T0,)
10975 {
10976 #[inline]
10977 unsafe fn encode(
10978 self,
10979 encoder: &mut fidl::encoding::Encoder<'_, D>,
10980 offset: usize,
10981 depth: fidl::encoding::Depth,
10982 ) -> fidl::Result<()> {
10983 encoder.debug_check_bounds::<TestCaseIteratorGetNextResponse>(offset);
10984 self.0.encode(encoder, offset + 0, depth)?;
10988 Ok(())
10989 }
10990 }
10991
10992 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
10993 for TestCaseIteratorGetNextResponse
10994 {
10995 #[inline(always)]
10996 fn new_empty() -> Self {
10997 Self { test_cases: fidl::new_empty!(fidl::encoding::Vector<TestCase, 1024>, D) }
10998 }
10999
11000 #[inline]
11001 unsafe fn decode(
11002 &mut self,
11003 decoder: &mut fidl::encoding::Decoder<'_, D>,
11004 offset: usize,
11005 _depth: fidl::encoding::Depth,
11006 ) -> fidl::Result<()> {
11007 decoder.debug_check_bounds::<Self>(offset);
11008 fidl::decode!(fidl::encoding::Vector<TestCase, 1024>, D, &mut self.test_cases, decoder, offset + 0, _depth)?;
11010 Ok(())
11011 }
11012 }
11013
11014 impl Case {
11015 #[inline(always)]
11016 fn max_ordinal_present(&self) -> u64 {
11017 if let Some(_) = self.name {
11018 return 1;
11019 }
11020 0
11021 }
11022 }
11023
11024 impl fidl::encoding::ValueTypeMarker for Case {
11025 type Borrowed<'a> = &'a Self;
11026 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
11027 value
11028 }
11029 }
11030
11031 unsafe impl fidl::encoding::TypeMarker for Case {
11032 type Owned = Self;
11033
11034 #[inline(always)]
11035 fn inline_align(_context: fidl::encoding::Context) -> usize {
11036 8
11037 }
11038
11039 #[inline(always)]
11040 fn inline_size(_context: fidl::encoding::Context) -> usize {
11041 16
11042 }
11043 }
11044
11045 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Case, D> for &Case {
11046 unsafe fn encode(
11047 self,
11048 encoder: &mut fidl::encoding::Encoder<'_, D>,
11049 offset: usize,
11050 mut depth: fidl::encoding::Depth,
11051 ) -> fidl::Result<()> {
11052 encoder.debug_check_bounds::<Case>(offset);
11053 let max_ordinal: u64 = self.max_ordinal_present();
11055 encoder.write_num(max_ordinal, offset);
11056 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11057 if max_ordinal == 0 {
11059 return Ok(());
11060 }
11061 depth.increment()?;
11062 let envelope_size = 8;
11063 let bytes_len = max_ordinal as usize * envelope_size;
11064 #[allow(unused_variables)]
11065 let offset = encoder.out_of_line_offset(bytes_len);
11066 let mut _prev_end_offset: usize = 0;
11067 if 1 > max_ordinal {
11068 return Ok(());
11069 }
11070
11071 let cur_offset: usize = (1 - 1) * envelope_size;
11074
11075 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11077
11078 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
11083 self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
11084 encoder, offset + cur_offset, depth
11085 )?;
11086
11087 _prev_end_offset = cur_offset + envelope_size;
11088
11089 Ok(())
11090 }
11091 }
11092
11093 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Case {
11094 #[inline(always)]
11095 fn new_empty() -> Self {
11096 Self::default()
11097 }
11098
11099 unsafe fn decode(
11100 &mut self,
11101 decoder: &mut fidl::encoding::Decoder<'_, D>,
11102 offset: usize,
11103 mut depth: fidl::encoding::Depth,
11104 ) -> fidl::Result<()> {
11105 decoder.debug_check_bounds::<Self>(offset);
11106 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11107 None => return Err(fidl::Error::NotNullable),
11108 Some(len) => len,
11109 };
11110 if len == 0 {
11112 return Ok(());
11113 };
11114 depth.increment()?;
11115 let envelope_size = 8;
11116 let bytes_len = len * envelope_size;
11117 let offset = decoder.out_of_line_offset(bytes_len)?;
11118 let mut _next_ordinal_to_read = 0;
11120 let mut next_offset = offset;
11121 let end_offset = offset + bytes_len;
11122 _next_ordinal_to_read += 1;
11123 if next_offset >= end_offset {
11124 return Ok(());
11125 }
11126
11127 while _next_ordinal_to_read < 1 {
11129 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11130 _next_ordinal_to_read += 1;
11131 next_offset += envelope_size;
11132 }
11133
11134 let next_out_of_line = decoder.next_out_of_line();
11135 let handles_before = decoder.remaining_handles();
11136 if let Some((inlined, num_bytes, num_handles)) =
11137 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11138 {
11139 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11140 if inlined != (member_inline_size <= 4) {
11141 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11142 }
11143 let inner_offset;
11144 let mut inner_depth = depth.clone();
11145 if inlined {
11146 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11147 inner_offset = next_offset;
11148 } else {
11149 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11150 inner_depth.increment()?;
11151 }
11152 let val_ref = self.name.get_or_insert_with(|| {
11153 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
11154 });
11155 fidl::decode!(
11156 fidl::encoding::BoundedString<2048>,
11157 D,
11158 val_ref,
11159 decoder,
11160 inner_offset,
11161 inner_depth
11162 )?;
11163 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11164 {
11165 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11166 }
11167 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11168 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11169 }
11170 }
11171
11172 next_offset += envelope_size;
11173
11174 while next_offset < end_offset {
11176 _next_ordinal_to_read += 1;
11177 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11178 next_offset += envelope_size;
11179 }
11180
11181 Ok(())
11182 }
11183 }
11184
11185 impl CustomArtifact {
11186 #[inline(always)]
11187 fn max_ordinal_present(&self) -> u64 {
11188 if let Some(_) = self.directory_and_token {
11189 return 2;
11190 }
11191 if let Some(_) = self.component_moniker {
11192 return 1;
11193 }
11194 0
11195 }
11196 }
11197
11198 impl fidl::encoding::ResourceTypeMarker for CustomArtifact {
11199 type Borrowed<'a> = &'a mut Self;
11200 fn take_or_borrow<'a>(
11201 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11202 ) -> Self::Borrowed<'a> {
11203 value
11204 }
11205 }
11206
11207 unsafe impl fidl::encoding::TypeMarker for CustomArtifact {
11208 type Owned = Self;
11209
11210 #[inline(always)]
11211 fn inline_align(_context: fidl::encoding::Context) -> usize {
11212 8
11213 }
11214
11215 #[inline(always)]
11216 fn inline_size(_context: fidl::encoding::Context) -> usize {
11217 16
11218 }
11219 }
11220
11221 unsafe impl
11222 fidl::encoding::Encode<CustomArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
11223 for &mut CustomArtifact
11224 {
11225 unsafe fn encode(
11226 self,
11227 encoder: &mut fidl::encoding::Encoder<
11228 '_,
11229 fidl::encoding::DefaultFuchsiaResourceDialect,
11230 >,
11231 offset: usize,
11232 mut depth: fidl::encoding::Depth,
11233 ) -> fidl::Result<()> {
11234 encoder.debug_check_bounds::<CustomArtifact>(offset);
11235 let max_ordinal: u64 = self.max_ordinal_present();
11237 encoder.write_num(max_ordinal, offset);
11238 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11239 if max_ordinal == 0 {
11241 return Ok(());
11242 }
11243 depth.increment()?;
11244 let envelope_size = 8;
11245 let bytes_len = max_ordinal as usize * envelope_size;
11246 #[allow(unused_variables)]
11247 let offset = encoder.out_of_line_offset(bytes_len);
11248 let mut _prev_end_offset: usize = 0;
11249 if 1 > max_ordinal {
11250 return Ok(());
11251 }
11252
11253 let cur_offset: usize = (1 - 1) * envelope_size;
11256
11257 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11259
11260 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, fidl::encoding::DefaultFuchsiaResourceDialect>(
11265 self.component_moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
11266 encoder, offset + cur_offset, depth
11267 )?;
11268
11269 _prev_end_offset = cur_offset + envelope_size;
11270 if 2 > max_ordinal {
11271 return Ok(());
11272 }
11273
11274 let cur_offset: usize = (2 - 1) * envelope_size;
11277
11278 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11280
11281 fidl::encoding::encode_in_envelope_optional::<
11286 DirectoryAndToken,
11287 fidl::encoding::DefaultFuchsiaResourceDialect,
11288 >(
11289 self.directory_and_token
11290 .as_mut()
11291 .map(<DirectoryAndToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11292 encoder,
11293 offset + cur_offset,
11294 depth,
11295 )?;
11296
11297 _prev_end_offset = cur_offset + envelope_size;
11298
11299 Ok(())
11300 }
11301 }
11302
11303 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11304 for CustomArtifact
11305 {
11306 #[inline(always)]
11307 fn new_empty() -> Self {
11308 Self::default()
11309 }
11310
11311 unsafe fn decode(
11312 &mut self,
11313 decoder: &mut fidl::encoding::Decoder<
11314 '_,
11315 fidl::encoding::DefaultFuchsiaResourceDialect,
11316 >,
11317 offset: usize,
11318 mut depth: fidl::encoding::Depth,
11319 ) -> fidl::Result<()> {
11320 decoder.debug_check_bounds::<Self>(offset);
11321 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11322 None => return Err(fidl::Error::NotNullable),
11323 Some(len) => len,
11324 };
11325 if len == 0 {
11327 return Ok(());
11328 };
11329 depth.increment()?;
11330 let envelope_size = 8;
11331 let bytes_len = len * envelope_size;
11332 let offset = decoder.out_of_line_offset(bytes_len)?;
11333 let mut _next_ordinal_to_read = 0;
11335 let mut next_offset = offset;
11336 let end_offset = offset + bytes_len;
11337 _next_ordinal_to_read += 1;
11338 if next_offset >= end_offset {
11339 return Ok(());
11340 }
11341
11342 while _next_ordinal_to_read < 1 {
11344 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11345 _next_ordinal_to_read += 1;
11346 next_offset += envelope_size;
11347 }
11348
11349 let next_out_of_line = decoder.next_out_of_line();
11350 let handles_before = decoder.remaining_handles();
11351 if let Some((inlined, num_bytes, num_handles)) =
11352 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11353 {
11354 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11355 if inlined != (member_inline_size <= 4) {
11356 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11357 }
11358 let inner_offset;
11359 let mut inner_depth = depth.clone();
11360 if inlined {
11361 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11362 inner_offset = next_offset;
11363 } else {
11364 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11365 inner_depth.increment()?;
11366 }
11367 let val_ref = self.component_moniker.get_or_insert_with(|| {
11368 fidl::new_empty!(
11369 fidl::encoding::BoundedString<4096>,
11370 fidl::encoding::DefaultFuchsiaResourceDialect
11371 )
11372 });
11373 fidl::decode!(
11374 fidl::encoding::BoundedString<4096>,
11375 fidl::encoding::DefaultFuchsiaResourceDialect,
11376 val_ref,
11377 decoder,
11378 inner_offset,
11379 inner_depth
11380 )?;
11381 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11382 {
11383 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11384 }
11385 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11386 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11387 }
11388 }
11389
11390 next_offset += envelope_size;
11391 _next_ordinal_to_read += 1;
11392 if next_offset >= end_offset {
11393 return Ok(());
11394 }
11395
11396 while _next_ordinal_to_read < 2 {
11398 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11399 _next_ordinal_to_read += 1;
11400 next_offset += envelope_size;
11401 }
11402
11403 let next_out_of_line = decoder.next_out_of_line();
11404 let handles_before = decoder.remaining_handles();
11405 if let Some((inlined, num_bytes, num_handles)) =
11406 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11407 {
11408 let member_inline_size =
11409 <DirectoryAndToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11410 if inlined != (member_inline_size <= 4) {
11411 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11412 }
11413 let inner_offset;
11414 let mut inner_depth = depth.clone();
11415 if inlined {
11416 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11417 inner_offset = next_offset;
11418 } else {
11419 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11420 inner_depth.increment()?;
11421 }
11422 let val_ref = self.directory_and_token.get_or_insert_with(|| {
11423 fidl::new_empty!(
11424 DirectoryAndToken,
11425 fidl::encoding::DefaultFuchsiaResourceDialect
11426 )
11427 });
11428 fidl::decode!(
11429 DirectoryAndToken,
11430 fidl::encoding::DefaultFuchsiaResourceDialect,
11431 val_ref,
11432 decoder,
11433 inner_offset,
11434 inner_depth
11435 )?;
11436 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11437 {
11438 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11439 }
11440 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11441 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11442 }
11443 }
11444
11445 next_offset += envelope_size;
11446
11447 while next_offset < end_offset {
11449 _next_ordinal_to_read += 1;
11450 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11451 next_offset += envelope_size;
11452 }
11453
11454 Ok(())
11455 }
11456 }
11457
11458 impl DebugData {
11459 #[inline(always)]
11460 fn max_ordinal_present(&self) -> u64 {
11461 if let Some(_) = self.socket {
11462 return 2;
11463 }
11464 if let Some(_) = self.name {
11465 return 1;
11466 }
11467 0
11468 }
11469 }
11470
11471 impl fidl::encoding::ResourceTypeMarker for DebugData {
11472 type Borrowed<'a> = &'a mut Self;
11473 fn take_or_borrow<'a>(
11474 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11475 ) -> Self::Borrowed<'a> {
11476 value
11477 }
11478 }
11479
11480 unsafe impl fidl::encoding::TypeMarker for DebugData {
11481 type Owned = Self;
11482
11483 #[inline(always)]
11484 fn inline_align(_context: fidl::encoding::Context) -> usize {
11485 8
11486 }
11487
11488 #[inline(always)]
11489 fn inline_size(_context: fidl::encoding::Context) -> usize {
11490 16
11491 }
11492 }
11493
11494 unsafe impl fidl::encoding::Encode<DebugData, fidl::encoding::DefaultFuchsiaResourceDialect>
11495 for &mut DebugData
11496 {
11497 unsafe fn encode(
11498 self,
11499 encoder: &mut fidl::encoding::Encoder<
11500 '_,
11501 fidl::encoding::DefaultFuchsiaResourceDialect,
11502 >,
11503 offset: usize,
11504 mut depth: fidl::encoding::Depth,
11505 ) -> fidl::Result<()> {
11506 encoder.debug_check_bounds::<DebugData>(offset);
11507 let max_ordinal: u64 = self.max_ordinal_present();
11509 encoder.write_num(max_ordinal, offset);
11510 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11511 if max_ordinal == 0 {
11513 return Ok(());
11514 }
11515 depth.increment()?;
11516 let envelope_size = 8;
11517 let bytes_len = max_ordinal as usize * envelope_size;
11518 #[allow(unused_variables)]
11519 let offset = encoder.out_of_line_offset(bytes_len);
11520 let mut _prev_end_offset: usize = 0;
11521 if 1 > max_ordinal {
11522 return Ok(());
11523 }
11524
11525 let cur_offset: usize = (1 - 1) * envelope_size;
11528
11529 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11531
11532 fidl::encoding::encode_in_envelope_optional::<
11537 fidl::encoding::BoundedString<512>,
11538 fidl::encoding::DefaultFuchsiaResourceDialect,
11539 >(
11540 self.name.as_ref().map(
11541 <fidl::encoding::BoundedString<512> as fidl::encoding::ValueTypeMarker>::borrow,
11542 ),
11543 encoder,
11544 offset + cur_offset,
11545 depth,
11546 )?;
11547
11548 _prev_end_offset = cur_offset + envelope_size;
11549 if 2 > max_ordinal {
11550 return Ok(());
11551 }
11552
11553 let cur_offset: usize = (2 - 1) * envelope_size;
11556
11557 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11559
11560 fidl::encoding::encode_in_envelope_optional::<
11565 fidl::encoding::HandleType<
11566 fidl::Socket,
11567 { fidl::ObjectType::SOCKET.into_raw() },
11568 2147483648,
11569 >,
11570 fidl::encoding::DefaultFuchsiaResourceDialect,
11571 >(
11572 self.socket.as_mut().map(
11573 <fidl::encoding::HandleType<
11574 fidl::Socket,
11575 { fidl::ObjectType::SOCKET.into_raw() },
11576 2147483648,
11577 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
11578 ),
11579 encoder,
11580 offset + cur_offset,
11581 depth,
11582 )?;
11583
11584 _prev_end_offset = cur_offset + envelope_size;
11585
11586 Ok(())
11587 }
11588 }
11589
11590 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DebugData {
11591 #[inline(always)]
11592 fn new_empty() -> Self {
11593 Self::default()
11594 }
11595
11596 unsafe fn decode(
11597 &mut self,
11598 decoder: &mut fidl::encoding::Decoder<
11599 '_,
11600 fidl::encoding::DefaultFuchsiaResourceDialect,
11601 >,
11602 offset: usize,
11603 mut depth: fidl::encoding::Depth,
11604 ) -> fidl::Result<()> {
11605 decoder.debug_check_bounds::<Self>(offset);
11606 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11607 None => return Err(fidl::Error::NotNullable),
11608 Some(len) => len,
11609 };
11610 if len == 0 {
11612 return Ok(());
11613 };
11614 depth.increment()?;
11615 let envelope_size = 8;
11616 let bytes_len = len * envelope_size;
11617 let offset = decoder.out_of_line_offset(bytes_len)?;
11618 let mut _next_ordinal_to_read = 0;
11620 let mut next_offset = offset;
11621 let end_offset = offset + bytes_len;
11622 _next_ordinal_to_read += 1;
11623 if next_offset >= end_offset {
11624 return Ok(());
11625 }
11626
11627 while _next_ordinal_to_read < 1 {
11629 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11630 _next_ordinal_to_read += 1;
11631 next_offset += envelope_size;
11632 }
11633
11634 let next_out_of_line = decoder.next_out_of_line();
11635 let handles_before = decoder.remaining_handles();
11636 if let Some((inlined, num_bytes, num_handles)) =
11637 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11638 {
11639 let member_inline_size =
11640 <fidl::encoding::BoundedString<512> as fidl::encoding::TypeMarker>::inline_size(
11641 decoder.context,
11642 );
11643 if inlined != (member_inline_size <= 4) {
11644 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11645 }
11646 let inner_offset;
11647 let mut inner_depth = depth.clone();
11648 if inlined {
11649 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11650 inner_offset = next_offset;
11651 } else {
11652 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11653 inner_depth.increment()?;
11654 }
11655 let val_ref = self.name.get_or_insert_with(|| {
11656 fidl::new_empty!(
11657 fidl::encoding::BoundedString<512>,
11658 fidl::encoding::DefaultFuchsiaResourceDialect
11659 )
11660 });
11661 fidl::decode!(
11662 fidl::encoding::BoundedString<512>,
11663 fidl::encoding::DefaultFuchsiaResourceDialect,
11664 val_ref,
11665 decoder,
11666 inner_offset,
11667 inner_depth
11668 )?;
11669 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11670 {
11671 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11672 }
11673 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11674 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11675 }
11676 }
11677
11678 next_offset += envelope_size;
11679 _next_ordinal_to_read += 1;
11680 if next_offset >= end_offset {
11681 return Ok(());
11682 }
11683
11684 while _next_ordinal_to_read < 2 {
11686 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11687 _next_ordinal_to_read += 1;
11688 next_offset += envelope_size;
11689 }
11690
11691 let next_out_of_line = decoder.next_out_of_line();
11692 let handles_before = decoder.remaining_handles();
11693 if let Some((inlined, num_bytes, num_handles)) =
11694 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11695 {
11696 let member_inline_size = <fidl::encoding::HandleType<
11697 fidl::Socket,
11698 { fidl::ObjectType::SOCKET.into_raw() },
11699 2147483648,
11700 > as fidl::encoding::TypeMarker>::inline_size(
11701 decoder.context
11702 );
11703 if inlined != (member_inline_size <= 4) {
11704 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11705 }
11706 let inner_offset;
11707 let mut inner_depth = depth.clone();
11708 if inlined {
11709 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11710 inner_offset = next_offset;
11711 } else {
11712 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11713 inner_depth.increment()?;
11714 }
11715 let val_ref =
11716 self.socket.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
11717 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11718 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11719 {
11720 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11721 }
11722 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11723 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11724 }
11725 }
11726
11727 next_offset += envelope_size;
11728
11729 while next_offset < end_offset {
11731 _next_ordinal_to_read += 1;
11732 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11733 next_offset += envelope_size;
11734 }
11735
11736 Ok(())
11737 }
11738 }
11739
11740 impl EnumerateTestCasesOptions {
11741 #[inline(always)]
11742 fn max_ordinal_present(&self) -> u64 {
11743 if let Some(_) = self.realm_options {
11744 return 1;
11745 }
11746 0
11747 }
11748 }
11749
11750 impl fidl::encoding::ResourceTypeMarker for EnumerateTestCasesOptions {
11751 type Borrowed<'a> = &'a mut Self;
11752 fn take_or_borrow<'a>(
11753 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11754 ) -> Self::Borrowed<'a> {
11755 value
11756 }
11757 }
11758
11759 unsafe impl fidl::encoding::TypeMarker for EnumerateTestCasesOptions {
11760 type Owned = Self;
11761
11762 #[inline(always)]
11763 fn inline_align(_context: fidl::encoding::Context) -> usize {
11764 8
11765 }
11766
11767 #[inline(always)]
11768 fn inline_size(_context: fidl::encoding::Context) -> usize {
11769 16
11770 }
11771 }
11772
11773 unsafe impl
11774 fidl::encoding::Encode<
11775 EnumerateTestCasesOptions,
11776 fidl::encoding::DefaultFuchsiaResourceDialect,
11777 > for &mut EnumerateTestCasesOptions
11778 {
11779 unsafe fn encode(
11780 self,
11781 encoder: &mut fidl::encoding::Encoder<
11782 '_,
11783 fidl::encoding::DefaultFuchsiaResourceDialect,
11784 >,
11785 offset: usize,
11786 mut depth: fidl::encoding::Depth,
11787 ) -> fidl::Result<()> {
11788 encoder.debug_check_bounds::<EnumerateTestCasesOptions>(offset);
11789 let max_ordinal: u64 = self.max_ordinal_present();
11791 encoder.write_num(max_ordinal, offset);
11792 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11793 if max_ordinal == 0 {
11795 return Ok(());
11796 }
11797 depth.increment()?;
11798 let envelope_size = 8;
11799 let bytes_len = max_ordinal as usize * envelope_size;
11800 #[allow(unused_variables)]
11801 let offset = encoder.out_of_line_offset(bytes_len);
11802 let mut _prev_end_offset: usize = 0;
11803 if 1 > max_ordinal {
11804 return Ok(());
11805 }
11806
11807 let cur_offset: usize = (1 - 1) * envelope_size;
11810
11811 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11813
11814 fidl::encoding::encode_in_envelope_optional::<
11819 RealmOptions,
11820 fidl::encoding::DefaultFuchsiaResourceDialect,
11821 >(
11822 self.realm_options
11823 .as_mut()
11824 .map(<RealmOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11825 encoder,
11826 offset + cur_offset,
11827 depth,
11828 )?;
11829
11830 _prev_end_offset = cur_offset + envelope_size;
11831
11832 Ok(())
11833 }
11834 }
11835
11836 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11837 for EnumerateTestCasesOptions
11838 {
11839 #[inline(always)]
11840 fn new_empty() -> Self {
11841 Self::default()
11842 }
11843
11844 unsafe fn decode(
11845 &mut self,
11846 decoder: &mut fidl::encoding::Decoder<
11847 '_,
11848 fidl::encoding::DefaultFuchsiaResourceDialect,
11849 >,
11850 offset: usize,
11851 mut depth: fidl::encoding::Depth,
11852 ) -> fidl::Result<()> {
11853 decoder.debug_check_bounds::<Self>(offset);
11854 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11855 None => return Err(fidl::Error::NotNullable),
11856 Some(len) => len,
11857 };
11858 if len == 0 {
11860 return Ok(());
11861 };
11862 depth.increment()?;
11863 let envelope_size = 8;
11864 let bytes_len = len * envelope_size;
11865 let offset = decoder.out_of_line_offset(bytes_len)?;
11866 let mut _next_ordinal_to_read = 0;
11868 let mut next_offset = offset;
11869 let end_offset = offset + bytes_len;
11870 _next_ordinal_to_read += 1;
11871 if next_offset >= end_offset {
11872 return Ok(());
11873 }
11874
11875 while _next_ordinal_to_read < 1 {
11877 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11878 _next_ordinal_to_read += 1;
11879 next_offset += envelope_size;
11880 }
11881
11882 let next_out_of_line = decoder.next_out_of_line();
11883 let handles_before = decoder.remaining_handles();
11884 if let Some((inlined, num_bytes, num_handles)) =
11885 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11886 {
11887 let member_inline_size =
11888 <RealmOptions as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11889 if inlined != (member_inline_size <= 4) {
11890 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11891 }
11892 let inner_offset;
11893 let mut inner_depth = depth.clone();
11894 if inlined {
11895 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11896 inner_offset = next_offset;
11897 } else {
11898 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11899 inner_depth.increment()?;
11900 }
11901 let val_ref = self.realm_options.get_or_insert_with(|| {
11902 fidl::new_empty!(RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect)
11903 });
11904 fidl::decode!(
11905 RealmOptions,
11906 fidl::encoding::DefaultFuchsiaResourceDialect,
11907 val_ref,
11908 decoder,
11909 inner_offset,
11910 inner_depth
11911 )?;
11912 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11913 {
11914 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11915 }
11916 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11917 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11918 }
11919 }
11920
11921 next_offset += envelope_size;
11922
11923 while next_offset < end_offset {
11925 _next_ordinal_to_read += 1;
11926 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11927 next_offset += envelope_size;
11928 }
11929
11930 Ok(())
11931 }
11932 }
11933
11934 impl Event {
11935 #[inline(always)]
11936 fn max_ordinal_present(&self) -> u64 {
11937 if let Some(_) = self.details {
11938 return 2;
11939 }
11940 if let Some(_) = self.timestamp {
11941 return 1;
11942 }
11943 0
11944 }
11945 }
11946
11947 impl fidl::encoding::ResourceTypeMarker for Event {
11948 type Borrowed<'a> = &'a mut Self;
11949 fn take_or_borrow<'a>(
11950 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11951 ) -> Self::Borrowed<'a> {
11952 value
11953 }
11954 }
11955
11956 unsafe impl fidl::encoding::TypeMarker for Event {
11957 type Owned = Self;
11958
11959 #[inline(always)]
11960 fn inline_align(_context: fidl::encoding::Context) -> usize {
11961 8
11962 }
11963
11964 #[inline(always)]
11965 fn inline_size(_context: fidl::encoding::Context) -> usize {
11966 16
11967 }
11968 }
11969
11970 unsafe impl fidl::encoding::Encode<Event, fidl::encoding::DefaultFuchsiaResourceDialect>
11971 for &mut Event
11972 {
11973 unsafe fn encode(
11974 self,
11975 encoder: &mut fidl::encoding::Encoder<
11976 '_,
11977 fidl::encoding::DefaultFuchsiaResourceDialect,
11978 >,
11979 offset: usize,
11980 mut depth: fidl::encoding::Depth,
11981 ) -> fidl::Result<()> {
11982 encoder.debug_check_bounds::<Event>(offset);
11983 let max_ordinal: u64 = self.max_ordinal_present();
11985 encoder.write_num(max_ordinal, offset);
11986 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11987 if max_ordinal == 0 {
11989 return Ok(());
11990 }
11991 depth.increment()?;
11992 let envelope_size = 8;
11993 let bytes_len = max_ordinal as usize * envelope_size;
11994 #[allow(unused_variables)]
11995 let offset = encoder.out_of_line_offset(bytes_len);
11996 let mut _prev_end_offset: usize = 0;
11997 if 1 > max_ordinal {
11998 return Ok(());
11999 }
12000
12001 let cur_offset: usize = (1 - 1) * envelope_size;
12004
12005 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12007
12008 fidl::encoding::encode_in_envelope_optional::<
12013 i64,
12014 fidl::encoding::DefaultFuchsiaResourceDialect,
12015 >(
12016 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
12017 encoder,
12018 offset + cur_offset,
12019 depth,
12020 )?;
12021
12022 _prev_end_offset = cur_offset + envelope_size;
12023 if 2 > max_ordinal {
12024 return Ok(());
12025 }
12026
12027 let cur_offset: usize = (2 - 1) * envelope_size;
12030
12031 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12033
12034 fidl::encoding::encode_in_envelope_optional::<
12039 EventDetails,
12040 fidl::encoding::DefaultFuchsiaResourceDialect,
12041 >(
12042 self.details
12043 .as_mut()
12044 .map(<EventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12045 encoder,
12046 offset + cur_offset,
12047 depth,
12048 )?;
12049
12050 _prev_end_offset = cur_offset + envelope_size;
12051
12052 Ok(())
12053 }
12054 }
12055
12056 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Event {
12057 #[inline(always)]
12058 fn new_empty() -> Self {
12059 Self::default()
12060 }
12061
12062 unsafe fn decode(
12063 &mut self,
12064 decoder: &mut fidl::encoding::Decoder<
12065 '_,
12066 fidl::encoding::DefaultFuchsiaResourceDialect,
12067 >,
12068 offset: usize,
12069 mut depth: fidl::encoding::Depth,
12070 ) -> fidl::Result<()> {
12071 decoder.debug_check_bounds::<Self>(offset);
12072 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12073 None => return Err(fidl::Error::NotNullable),
12074 Some(len) => len,
12075 };
12076 if len == 0 {
12078 return Ok(());
12079 };
12080 depth.increment()?;
12081 let envelope_size = 8;
12082 let bytes_len = len * envelope_size;
12083 let offset = decoder.out_of_line_offset(bytes_len)?;
12084 let mut _next_ordinal_to_read = 0;
12086 let mut next_offset = offset;
12087 let end_offset = offset + bytes_len;
12088 _next_ordinal_to_read += 1;
12089 if next_offset >= end_offset {
12090 return Ok(());
12091 }
12092
12093 while _next_ordinal_to_read < 1 {
12095 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12096 _next_ordinal_to_read += 1;
12097 next_offset += envelope_size;
12098 }
12099
12100 let next_out_of_line = decoder.next_out_of_line();
12101 let handles_before = decoder.remaining_handles();
12102 if let Some((inlined, num_bytes, num_handles)) =
12103 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12104 {
12105 let member_inline_size =
12106 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12107 if inlined != (member_inline_size <= 4) {
12108 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12109 }
12110 let inner_offset;
12111 let mut inner_depth = depth.clone();
12112 if inlined {
12113 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12114 inner_offset = next_offset;
12115 } else {
12116 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12117 inner_depth.increment()?;
12118 }
12119 let val_ref = self.timestamp.get_or_insert_with(|| {
12120 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
12121 });
12122 fidl::decode!(
12123 i64,
12124 fidl::encoding::DefaultFuchsiaResourceDialect,
12125 val_ref,
12126 decoder,
12127 inner_offset,
12128 inner_depth
12129 )?;
12130 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12131 {
12132 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12133 }
12134 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12135 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12136 }
12137 }
12138
12139 next_offset += envelope_size;
12140 _next_ordinal_to_read += 1;
12141 if next_offset >= end_offset {
12142 return Ok(());
12143 }
12144
12145 while _next_ordinal_to_read < 2 {
12147 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12148 _next_ordinal_to_read += 1;
12149 next_offset += envelope_size;
12150 }
12151
12152 let next_out_of_line = decoder.next_out_of_line();
12153 let handles_before = decoder.remaining_handles();
12154 if let Some((inlined, num_bytes, num_handles)) =
12155 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12156 {
12157 let member_inline_size =
12158 <EventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12159 if inlined != (member_inline_size <= 4) {
12160 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12161 }
12162 let inner_offset;
12163 let mut inner_depth = depth.clone();
12164 if inlined {
12165 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12166 inner_offset = next_offset;
12167 } else {
12168 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12169 inner_depth.increment()?;
12170 }
12171 let val_ref = self.details.get_or_insert_with(|| {
12172 fidl::new_empty!(EventDetails, fidl::encoding::DefaultFuchsiaResourceDialect)
12173 });
12174 fidl::decode!(
12175 EventDetails,
12176 fidl::encoding::DefaultFuchsiaResourceDialect,
12177 val_ref,
12178 decoder,
12179 inner_offset,
12180 inner_depth
12181 )?;
12182 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12183 {
12184 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12185 }
12186 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12187 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12188 }
12189 }
12190
12191 next_offset += envelope_size;
12192
12193 while next_offset < end_offset {
12195 _next_ordinal_to_read += 1;
12196 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12197 next_offset += envelope_size;
12198 }
12199
12200 Ok(())
12201 }
12202 }
12203
12204 impl RealmOptions {
12205 #[inline(always)]
12206 fn max_ordinal_present(&self) -> u64 {
12207 if let Some(_) = self.test_collection {
12208 return 3;
12209 }
12210 if let Some(_) = self.offers {
12211 return 2;
12212 }
12213 if let Some(_) = self.realm {
12214 return 1;
12215 }
12216 0
12217 }
12218 }
12219
12220 impl fidl::encoding::ResourceTypeMarker for RealmOptions {
12221 type Borrowed<'a> = &'a mut Self;
12222 fn take_or_borrow<'a>(
12223 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12224 ) -> Self::Borrowed<'a> {
12225 value
12226 }
12227 }
12228
12229 unsafe impl fidl::encoding::TypeMarker for RealmOptions {
12230 type Owned = Self;
12231
12232 #[inline(always)]
12233 fn inline_align(_context: fidl::encoding::Context) -> usize {
12234 8
12235 }
12236
12237 #[inline(always)]
12238 fn inline_size(_context: fidl::encoding::Context) -> usize {
12239 16
12240 }
12241 }
12242
12243 unsafe impl fidl::encoding::Encode<RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect>
12244 for &mut RealmOptions
12245 {
12246 unsafe fn encode(
12247 self,
12248 encoder: &mut fidl::encoding::Encoder<
12249 '_,
12250 fidl::encoding::DefaultFuchsiaResourceDialect,
12251 >,
12252 offset: usize,
12253 mut depth: fidl::encoding::Depth,
12254 ) -> fidl::Result<()> {
12255 encoder.debug_check_bounds::<RealmOptions>(offset);
12256 let max_ordinal: u64 = self.max_ordinal_present();
12258 encoder.write_num(max_ordinal, offset);
12259 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12260 if max_ordinal == 0 {
12262 return Ok(());
12263 }
12264 depth.increment()?;
12265 let envelope_size = 8;
12266 let bytes_len = max_ordinal as usize * envelope_size;
12267 #[allow(unused_variables)]
12268 let offset = encoder.out_of_line_offset(bytes_len);
12269 let mut _prev_end_offset: usize = 0;
12270 if 1 > max_ordinal {
12271 return Ok(());
12272 }
12273
12274 let cur_offset: usize = (1 - 1) * envelope_size;
12277
12278 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12280
12281 fidl::encoding::encode_in_envelope_optional::<
12286 fidl::encoding::Endpoint<
12287 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
12288 >,
12289 fidl::encoding::DefaultFuchsiaResourceDialect,
12290 >(
12291 self.realm.as_mut().map(
12292 <fidl::encoding::Endpoint<
12293 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
12294 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
12295 ),
12296 encoder,
12297 offset + cur_offset,
12298 depth,
12299 )?;
12300
12301 _prev_end_offset = cur_offset + envelope_size;
12302 if 2 > max_ordinal {
12303 return Ok(());
12304 }
12305
12306 let cur_offset: usize = (2 - 1) * envelope_size;
12309
12310 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12312
12313 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect>(
12318 self.offers.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024> as fidl::encoding::ValueTypeMarker>::borrow),
12319 encoder, offset + cur_offset, depth
12320 )?;
12321
12322 _prev_end_offset = cur_offset + envelope_size;
12323 if 3 > max_ordinal {
12324 return Ok(());
12325 }
12326
12327 let cur_offset: usize = (3 - 1) * envelope_size;
12330
12331 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12333
12334 fidl::encoding::encode_in_envelope_optional::<
12339 fidl::encoding::BoundedString<255>,
12340 fidl::encoding::DefaultFuchsiaResourceDialect,
12341 >(
12342 self.test_collection.as_ref().map(
12343 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow,
12344 ),
12345 encoder,
12346 offset + cur_offset,
12347 depth,
12348 )?;
12349
12350 _prev_end_offset = cur_offset + envelope_size;
12351
12352 Ok(())
12353 }
12354 }
12355
12356 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RealmOptions {
12357 #[inline(always)]
12358 fn new_empty() -> Self {
12359 Self::default()
12360 }
12361
12362 unsafe fn decode(
12363 &mut self,
12364 decoder: &mut fidl::encoding::Decoder<
12365 '_,
12366 fidl::encoding::DefaultFuchsiaResourceDialect,
12367 >,
12368 offset: usize,
12369 mut depth: fidl::encoding::Depth,
12370 ) -> fidl::Result<()> {
12371 decoder.debug_check_bounds::<Self>(offset);
12372 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12373 None => return Err(fidl::Error::NotNullable),
12374 Some(len) => len,
12375 };
12376 if len == 0 {
12378 return Ok(());
12379 };
12380 depth.increment()?;
12381 let envelope_size = 8;
12382 let bytes_len = len * envelope_size;
12383 let offset = decoder.out_of_line_offset(bytes_len)?;
12384 let mut _next_ordinal_to_read = 0;
12386 let mut next_offset = offset;
12387 let end_offset = offset + bytes_len;
12388 _next_ordinal_to_read += 1;
12389 if next_offset >= end_offset {
12390 return Ok(());
12391 }
12392
12393 while _next_ordinal_to_read < 1 {
12395 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12396 _next_ordinal_to_read += 1;
12397 next_offset += envelope_size;
12398 }
12399
12400 let next_out_of_line = decoder.next_out_of_line();
12401 let handles_before = decoder.remaining_handles();
12402 if let Some((inlined, num_bytes, num_handles)) =
12403 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12404 {
12405 let member_inline_size = <fidl::encoding::Endpoint<
12406 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
12407 > as fidl::encoding::TypeMarker>::inline_size(
12408 decoder.context
12409 );
12410 if inlined != (member_inline_size <= 4) {
12411 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12412 }
12413 let inner_offset;
12414 let mut inner_depth = depth.clone();
12415 if inlined {
12416 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12417 inner_offset = next_offset;
12418 } else {
12419 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12420 inner_depth.increment()?;
12421 }
12422 let val_ref = self.realm.get_or_insert_with(|| {
12423 fidl::new_empty!(
12424 fidl::encoding::Endpoint<
12425 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
12426 >,
12427 fidl::encoding::DefaultFuchsiaResourceDialect
12428 )
12429 });
12430 fidl::decode!(
12431 fidl::encoding::Endpoint<
12432 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
12433 >,
12434 fidl::encoding::DefaultFuchsiaResourceDialect,
12435 val_ref,
12436 decoder,
12437 inner_offset,
12438 inner_depth
12439 )?;
12440 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12441 {
12442 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12443 }
12444 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12445 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12446 }
12447 }
12448
12449 next_offset += envelope_size;
12450 _next_ordinal_to_read += 1;
12451 if next_offset >= end_offset {
12452 return Ok(());
12453 }
12454
12455 while _next_ordinal_to_read < 2 {
12457 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12458 _next_ordinal_to_read += 1;
12459 next_offset += envelope_size;
12460 }
12461
12462 let next_out_of_line = decoder.next_out_of_line();
12463 let handles_before = decoder.remaining_handles();
12464 if let Some((inlined, num_bytes, num_handles)) =
12465 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12466 {
12467 let member_inline_size = <fidl::encoding::Vector<
12468 fidl_fuchsia_component_decl::Offer,
12469 1024,
12470 > as fidl::encoding::TypeMarker>::inline_size(
12471 decoder.context
12472 );
12473 if inlined != (member_inline_size <= 4) {
12474 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12475 }
12476 let inner_offset;
12477 let mut inner_depth = depth.clone();
12478 if inlined {
12479 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12480 inner_offset = next_offset;
12481 } else {
12482 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12483 inner_depth.increment()?;
12484 }
12485 let val_ref =
12486 self.offers.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect));
12487 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
12488 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12489 {
12490 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12491 }
12492 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12493 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12494 }
12495 }
12496
12497 next_offset += envelope_size;
12498 _next_ordinal_to_read += 1;
12499 if next_offset >= end_offset {
12500 return Ok(());
12501 }
12502
12503 while _next_ordinal_to_read < 3 {
12505 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12506 _next_ordinal_to_read += 1;
12507 next_offset += envelope_size;
12508 }
12509
12510 let next_out_of_line = decoder.next_out_of_line();
12511 let handles_before = decoder.remaining_handles();
12512 if let Some((inlined, num_bytes, num_handles)) =
12513 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12514 {
12515 let member_inline_size =
12516 <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
12517 decoder.context,
12518 );
12519 if inlined != (member_inline_size <= 4) {
12520 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12521 }
12522 let inner_offset;
12523 let mut inner_depth = depth.clone();
12524 if inlined {
12525 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12526 inner_offset = next_offset;
12527 } else {
12528 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12529 inner_depth.increment()?;
12530 }
12531 let val_ref = self.test_collection.get_or_insert_with(|| {
12532 fidl::new_empty!(
12533 fidl::encoding::BoundedString<255>,
12534 fidl::encoding::DefaultFuchsiaResourceDialect
12535 )
12536 });
12537 fidl::decode!(
12538 fidl::encoding::BoundedString<255>,
12539 fidl::encoding::DefaultFuchsiaResourceDialect,
12540 val_ref,
12541 decoder,
12542 inner_offset,
12543 inner_depth
12544 )?;
12545 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12546 {
12547 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12548 }
12549 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12550 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12551 }
12552 }
12553
12554 next_offset += envelope_size;
12555
12556 while next_offset < end_offset {
12558 _next_ordinal_to_read += 1;
12559 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12560 next_offset += envelope_size;
12561 }
12562
12563 Ok(())
12564 }
12565 }
12566
12567 impl RunEvent {
12568 #[inline(always)]
12569 fn max_ordinal_present(&self) -> u64 {
12570 if let Some(_) = self.payload {
12571 return 2;
12572 }
12573 if let Some(_) = self.timestamp {
12574 return 1;
12575 }
12576 0
12577 }
12578 }
12579
12580 impl fidl::encoding::ResourceTypeMarker for RunEvent {
12581 type Borrowed<'a> = &'a mut Self;
12582 fn take_or_borrow<'a>(
12583 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12584 ) -> Self::Borrowed<'a> {
12585 value
12586 }
12587 }
12588
12589 unsafe impl fidl::encoding::TypeMarker for RunEvent {
12590 type Owned = Self;
12591
12592 #[inline(always)]
12593 fn inline_align(_context: fidl::encoding::Context) -> usize {
12594 8
12595 }
12596
12597 #[inline(always)]
12598 fn inline_size(_context: fidl::encoding::Context) -> usize {
12599 16
12600 }
12601 }
12602
12603 unsafe impl fidl::encoding::Encode<RunEvent, fidl::encoding::DefaultFuchsiaResourceDialect>
12604 for &mut RunEvent
12605 {
12606 unsafe fn encode(
12607 self,
12608 encoder: &mut fidl::encoding::Encoder<
12609 '_,
12610 fidl::encoding::DefaultFuchsiaResourceDialect,
12611 >,
12612 offset: usize,
12613 mut depth: fidl::encoding::Depth,
12614 ) -> fidl::Result<()> {
12615 encoder.debug_check_bounds::<RunEvent>(offset);
12616 let max_ordinal: u64 = self.max_ordinal_present();
12618 encoder.write_num(max_ordinal, offset);
12619 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12620 if max_ordinal == 0 {
12622 return Ok(());
12623 }
12624 depth.increment()?;
12625 let envelope_size = 8;
12626 let bytes_len = max_ordinal as usize * envelope_size;
12627 #[allow(unused_variables)]
12628 let offset = encoder.out_of_line_offset(bytes_len);
12629 let mut _prev_end_offset: usize = 0;
12630 if 1 > max_ordinal {
12631 return Ok(());
12632 }
12633
12634 let cur_offset: usize = (1 - 1) * envelope_size;
12637
12638 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12640
12641 fidl::encoding::encode_in_envelope_optional::<
12646 i64,
12647 fidl::encoding::DefaultFuchsiaResourceDialect,
12648 >(
12649 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
12650 encoder,
12651 offset + cur_offset,
12652 depth,
12653 )?;
12654
12655 _prev_end_offset = cur_offset + envelope_size;
12656 if 2 > max_ordinal {
12657 return Ok(());
12658 }
12659
12660 let cur_offset: usize = (2 - 1) * envelope_size;
12663
12664 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12666
12667 fidl::encoding::encode_in_envelope_optional::<
12672 RunEventPayload,
12673 fidl::encoding::DefaultFuchsiaResourceDialect,
12674 >(
12675 self.payload
12676 .as_mut()
12677 .map(<RunEventPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12678 encoder,
12679 offset + cur_offset,
12680 depth,
12681 )?;
12682
12683 _prev_end_offset = cur_offset + envelope_size;
12684
12685 Ok(())
12686 }
12687 }
12688
12689 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RunEvent {
12690 #[inline(always)]
12691 fn new_empty() -> Self {
12692 Self::default()
12693 }
12694
12695 unsafe fn decode(
12696 &mut self,
12697 decoder: &mut fidl::encoding::Decoder<
12698 '_,
12699 fidl::encoding::DefaultFuchsiaResourceDialect,
12700 >,
12701 offset: usize,
12702 mut depth: fidl::encoding::Depth,
12703 ) -> fidl::Result<()> {
12704 decoder.debug_check_bounds::<Self>(offset);
12705 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12706 None => return Err(fidl::Error::NotNullable),
12707 Some(len) => len,
12708 };
12709 if len == 0 {
12711 return Ok(());
12712 };
12713 depth.increment()?;
12714 let envelope_size = 8;
12715 let bytes_len = len * envelope_size;
12716 let offset = decoder.out_of_line_offset(bytes_len)?;
12717 let mut _next_ordinal_to_read = 0;
12719 let mut next_offset = offset;
12720 let end_offset = offset + bytes_len;
12721 _next_ordinal_to_read += 1;
12722 if next_offset >= end_offset {
12723 return Ok(());
12724 }
12725
12726 while _next_ordinal_to_read < 1 {
12728 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12729 _next_ordinal_to_read += 1;
12730 next_offset += envelope_size;
12731 }
12732
12733 let next_out_of_line = decoder.next_out_of_line();
12734 let handles_before = decoder.remaining_handles();
12735 if let Some((inlined, num_bytes, num_handles)) =
12736 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12737 {
12738 let member_inline_size =
12739 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12740 if inlined != (member_inline_size <= 4) {
12741 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12742 }
12743 let inner_offset;
12744 let mut inner_depth = depth.clone();
12745 if inlined {
12746 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12747 inner_offset = next_offset;
12748 } else {
12749 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12750 inner_depth.increment()?;
12751 }
12752 let val_ref = self.timestamp.get_or_insert_with(|| {
12753 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
12754 });
12755 fidl::decode!(
12756 i64,
12757 fidl::encoding::DefaultFuchsiaResourceDialect,
12758 val_ref,
12759 decoder,
12760 inner_offset,
12761 inner_depth
12762 )?;
12763 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12764 {
12765 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12766 }
12767 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12768 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12769 }
12770 }
12771
12772 next_offset += envelope_size;
12773 _next_ordinal_to_read += 1;
12774 if next_offset >= end_offset {
12775 return Ok(());
12776 }
12777
12778 while _next_ordinal_to_read < 2 {
12780 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12781 _next_ordinal_to_read += 1;
12782 next_offset += envelope_size;
12783 }
12784
12785 let next_out_of_line = decoder.next_out_of_line();
12786 let handles_before = decoder.remaining_handles();
12787 if let Some((inlined, num_bytes, num_handles)) =
12788 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12789 {
12790 let member_inline_size =
12791 <RunEventPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12792 if inlined != (member_inline_size <= 4) {
12793 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12794 }
12795 let inner_offset;
12796 let mut inner_depth = depth.clone();
12797 if inlined {
12798 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12799 inner_offset = next_offset;
12800 } else {
12801 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12802 inner_depth.increment()?;
12803 }
12804 let val_ref = self.payload.get_or_insert_with(|| {
12805 fidl::new_empty!(RunEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect)
12806 });
12807 fidl::decode!(
12808 RunEventPayload,
12809 fidl::encoding::DefaultFuchsiaResourceDialect,
12810 val_ref,
12811 decoder,
12812 inner_offset,
12813 inner_depth
12814 )?;
12815 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12816 {
12817 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12818 }
12819 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12820 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12821 }
12822 }
12823
12824 next_offset += envelope_size;
12825
12826 while next_offset < end_offset {
12828 _next_ordinal_to_read += 1;
12829 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12830 next_offset += envelope_size;
12831 }
12832
12833 Ok(())
12834 }
12835 }
12836
12837 impl RunOptions {
12838 #[inline(always)]
12839 fn max_ordinal_present(&self) -> u64 {
12840 if let Some(_) = self.no_exception_channel {
12841 return 9;
12842 }
12843 if let Some(_) = self.break_on_failure {
12844 return 8;
12845 }
12846 if let Some(_) = self.log_interest {
12847 return 7;
12848 }
12849 if let Some(_) = self.log_iterator {
12850 return 6;
12851 }
12852 if let Some(_) = self.case_filters_to_run {
12853 return 5;
12854 }
12855 if let Some(_) = self.timeout {
12856 return 4;
12857 }
12858 if let Some(_) = self.arguments {
12859 return 3;
12860 }
12861 if let Some(_) = self.parallel {
12862 return 2;
12863 }
12864 if let Some(_) = self.run_disabled_tests {
12865 return 1;
12866 }
12867 0
12868 }
12869 }
12870
12871 impl fidl::encoding::ValueTypeMarker for RunOptions {
12872 type Borrowed<'a> = &'a Self;
12873 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
12874 value
12875 }
12876 }
12877
12878 unsafe impl fidl::encoding::TypeMarker for RunOptions {
12879 type Owned = Self;
12880
12881 #[inline(always)]
12882 fn inline_align(_context: fidl::encoding::Context) -> usize {
12883 8
12884 }
12885
12886 #[inline(always)]
12887 fn inline_size(_context: fidl::encoding::Context) -> usize {
12888 16
12889 }
12890 }
12891
12892 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<RunOptions, D>
12893 for &RunOptions
12894 {
12895 unsafe fn encode(
12896 self,
12897 encoder: &mut fidl::encoding::Encoder<'_, D>,
12898 offset: usize,
12899 mut depth: fidl::encoding::Depth,
12900 ) -> fidl::Result<()> {
12901 encoder.debug_check_bounds::<RunOptions>(offset);
12902 let max_ordinal: u64 = self.max_ordinal_present();
12904 encoder.write_num(max_ordinal, offset);
12905 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12906 if max_ordinal == 0 {
12908 return Ok(());
12909 }
12910 depth.increment()?;
12911 let envelope_size = 8;
12912 let bytes_len = max_ordinal as usize * envelope_size;
12913 #[allow(unused_variables)]
12914 let offset = encoder.out_of_line_offset(bytes_len);
12915 let mut _prev_end_offset: usize = 0;
12916 if 1 > max_ordinal {
12917 return Ok(());
12918 }
12919
12920 let cur_offset: usize = (1 - 1) * envelope_size;
12923
12924 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12926
12927 fidl::encoding::encode_in_envelope_optional::<bool, D>(
12932 self.run_disabled_tests
12933 .as_ref()
12934 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
12935 encoder,
12936 offset + cur_offset,
12937 depth,
12938 )?;
12939
12940 _prev_end_offset = cur_offset + envelope_size;
12941 if 2 > max_ordinal {
12942 return Ok(());
12943 }
12944
12945 let cur_offset: usize = (2 - 1) * envelope_size;
12948
12949 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12951
12952 fidl::encoding::encode_in_envelope_optional::<u16, D>(
12957 self.parallel.as_ref().map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
12958 encoder,
12959 offset + cur_offset,
12960 depth,
12961 )?;
12962
12963 _prev_end_offset = cur_offset + envelope_size;
12964 if 3 > max_ordinal {
12965 return Ok(());
12966 }
12967
12968 let cur_offset: usize = (3 - 1) * envelope_size;
12971
12972 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12974
12975 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
12980 self.arguments.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
12981 encoder, offset + cur_offset, depth
12982 )?;
12983
12984 _prev_end_offset = cur_offset + envelope_size;
12985 if 4 > max_ordinal {
12986 return Ok(());
12987 }
12988
12989 let cur_offset: usize = (4 - 1) * envelope_size;
12992
12993 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12995
12996 fidl::encoding::encode_in_envelope_optional::<i64, D>(
13001 self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
13002 encoder,
13003 offset + cur_offset,
13004 depth,
13005 )?;
13006
13007 _prev_end_offset = cur_offset + envelope_size;
13008 if 5 > max_ordinal {
13009 return Ok(());
13010 }
13011
13012 let cur_offset: usize = (5 - 1) * envelope_size;
13015
13016 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13018
13019 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>(
13024 self.case_filters_to_run.as_ref().map(<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow),
13025 encoder, offset + cur_offset, depth
13026 )?;
13027
13028 _prev_end_offset = cur_offset + envelope_size;
13029 if 6 > max_ordinal {
13030 return Ok(());
13031 }
13032
13033 let cur_offset: usize = (6 - 1) * envelope_size;
13036
13037 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13039
13040 fidl::encoding::encode_in_envelope_optional::<LogsIteratorOption, D>(
13045 self.log_iterator
13046 .as_ref()
13047 .map(<LogsIteratorOption as fidl::encoding::ValueTypeMarker>::borrow),
13048 encoder,
13049 offset + cur_offset,
13050 depth,
13051 )?;
13052
13053 _prev_end_offset = cur_offset + envelope_size;
13054 if 7 > max_ordinal {
13055 return Ok(());
13056 }
13057
13058 let cur_offset: usize = (7 - 1) * envelope_size;
13061
13062 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13064
13065 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D>(
13070 self.log_interest.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64> as fidl::encoding::ValueTypeMarker>::borrow),
13071 encoder, offset + cur_offset, depth
13072 )?;
13073
13074 _prev_end_offset = cur_offset + envelope_size;
13075 if 8 > max_ordinal {
13076 return Ok(());
13077 }
13078
13079 let cur_offset: usize = (8 - 1) * envelope_size;
13082
13083 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13085
13086 fidl::encoding::encode_in_envelope_optional::<bool, D>(
13091 self.break_on_failure
13092 .as_ref()
13093 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13094 encoder,
13095 offset + cur_offset,
13096 depth,
13097 )?;
13098
13099 _prev_end_offset = cur_offset + envelope_size;
13100 if 9 > max_ordinal {
13101 return Ok(());
13102 }
13103
13104 let cur_offset: usize = (9 - 1) * envelope_size;
13107
13108 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13110
13111 fidl::encoding::encode_in_envelope_optional::<bool, D>(
13116 self.no_exception_channel
13117 .as_ref()
13118 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13119 encoder,
13120 offset + cur_offset,
13121 depth,
13122 )?;
13123
13124 _prev_end_offset = cur_offset + envelope_size;
13125
13126 Ok(())
13127 }
13128 }
13129
13130 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for RunOptions {
13131 #[inline(always)]
13132 fn new_empty() -> Self {
13133 Self::default()
13134 }
13135
13136 unsafe fn decode(
13137 &mut self,
13138 decoder: &mut fidl::encoding::Decoder<'_, D>,
13139 offset: usize,
13140 mut depth: fidl::encoding::Depth,
13141 ) -> fidl::Result<()> {
13142 decoder.debug_check_bounds::<Self>(offset);
13143 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13144 None => return Err(fidl::Error::NotNullable),
13145 Some(len) => len,
13146 };
13147 if len == 0 {
13149 return Ok(());
13150 };
13151 depth.increment()?;
13152 let envelope_size = 8;
13153 let bytes_len = len * envelope_size;
13154 let offset = decoder.out_of_line_offset(bytes_len)?;
13155 let mut _next_ordinal_to_read = 0;
13157 let mut next_offset = offset;
13158 let end_offset = offset + bytes_len;
13159 _next_ordinal_to_read += 1;
13160 if next_offset >= end_offset {
13161 return Ok(());
13162 }
13163
13164 while _next_ordinal_to_read < 1 {
13166 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13167 _next_ordinal_to_read += 1;
13168 next_offset += envelope_size;
13169 }
13170
13171 let next_out_of_line = decoder.next_out_of_line();
13172 let handles_before = decoder.remaining_handles();
13173 if let Some((inlined, num_bytes, num_handles)) =
13174 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13175 {
13176 let member_inline_size =
13177 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13178 if inlined != (member_inline_size <= 4) {
13179 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13180 }
13181 let inner_offset;
13182 let mut inner_depth = depth.clone();
13183 if inlined {
13184 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13185 inner_offset = next_offset;
13186 } else {
13187 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13188 inner_depth.increment()?;
13189 }
13190 let val_ref =
13191 self.run_disabled_tests.get_or_insert_with(|| fidl::new_empty!(bool, D));
13192 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
13193 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13194 {
13195 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13196 }
13197 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13198 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13199 }
13200 }
13201
13202 next_offset += envelope_size;
13203 _next_ordinal_to_read += 1;
13204 if next_offset >= end_offset {
13205 return Ok(());
13206 }
13207
13208 while _next_ordinal_to_read < 2 {
13210 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13211 _next_ordinal_to_read += 1;
13212 next_offset += envelope_size;
13213 }
13214
13215 let next_out_of_line = decoder.next_out_of_line();
13216 let handles_before = decoder.remaining_handles();
13217 if let Some((inlined, num_bytes, num_handles)) =
13218 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13219 {
13220 let member_inline_size =
13221 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13222 if inlined != (member_inline_size <= 4) {
13223 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13224 }
13225 let inner_offset;
13226 let mut inner_depth = depth.clone();
13227 if inlined {
13228 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13229 inner_offset = next_offset;
13230 } else {
13231 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13232 inner_depth.increment()?;
13233 }
13234 let val_ref = self.parallel.get_or_insert_with(|| fidl::new_empty!(u16, D));
13235 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
13236 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13237 {
13238 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13239 }
13240 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13241 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13242 }
13243 }
13244
13245 next_offset += envelope_size;
13246 _next_ordinal_to_read += 1;
13247 if next_offset >= end_offset {
13248 return Ok(());
13249 }
13250
13251 while _next_ordinal_to_read < 3 {
13253 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13254 _next_ordinal_to_read += 1;
13255 next_offset += envelope_size;
13256 }
13257
13258 let next_out_of_line = decoder.next_out_of_line();
13259 let handles_before = decoder.remaining_handles();
13260 if let Some((inlined, num_bytes, num_handles)) =
13261 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13262 {
13263 let member_inline_size = <fidl::encoding::UnboundedVector<
13264 fidl::encoding::UnboundedString,
13265 > as fidl::encoding::TypeMarker>::inline_size(
13266 decoder.context
13267 );
13268 if inlined != (member_inline_size <= 4) {
13269 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13270 }
13271 let inner_offset;
13272 let mut inner_depth = depth.clone();
13273 if inlined {
13274 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13275 inner_offset = next_offset;
13276 } else {
13277 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13278 inner_depth.increment()?;
13279 }
13280 let val_ref = self.arguments.get_or_insert_with(|| {
13281 fidl::new_empty!(
13282 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13283 D
13284 )
13285 });
13286 fidl::decode!(
13287 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13288 D,
13289 val_ref,
13290 decoder,
13291 inner_offset,
13292 inner_depth
13293 )?;
13294 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13295 {
13296 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13297 }
13298 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13299 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13300 }
13301 }
13302
13303 next_offset += envelope_size;
13304 _next_ordinal_to_read += 1;
13305 if next_offset >= end_offset {
13306 return Ok(());
13307 }
13308
13309 while _next_ordinal_to_read < 4 {
13311 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13312 _next_ordinal_to_read += 1;
13313 next_offset += envelope_size;
13314 }
13315
13316 let next_out_of_line = decoder.next_out_of_line();
13317 let handles_before = decoder.remaining_handles();
13318 if let Some((inlined, num_bytes, num_handles)) =
13319 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13320 {
13321 let member_inline_size =
13322 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13323 if inlined != (member_inline_size <= 4) {
13324 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13325 }
13326 let inner_offset;
13327 let mut inner_depth = depth.clone();
13328 if inlined {
13329 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13330 inner_offset = next_offset;
13331 } else {
13332 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13333 inner_depth.increment()?;
13334 }
13335 let val_ref = self.timeout.get_or_insert_with(|| fidl::new_empty!(i64, D));
13336 fidl::decode!(i64, D, val_ref, decoder, inner_offset, inner_depth)?;
13337 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13338 {
13339 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13340 }
13341 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13342 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13343 }
13344 }
13345
13346 next_offset += envelope_size;
13347 _next_ordinal_to_read += 1;
13348 if next_offset >= end_offset {
13349 return Ok(());
13350 }
13351
13352 while _next_ordinal_to_read < 5 {
13354 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13355 _next_ordinal_to_read += 1;
13356 next_offset += envelope_size;
13357 }
13358
13359 let next_out_of_line = decoder.next_out_of_line();
13360 let handles_before = decoder.remaining_handles();
13361 if let Some((inlined, num_bytes, num_handles)) =
13362 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13363 {
13364 let member_inline_size = <fidl::encoding::UnboundedVector<
13365 fidl::encoding::UnboundedString,
13366 > as fidl::encoding::TypeMarker>::inline_size(
13367 decoder.context
13368 );
13369 if inlined != (member_inline_size <= 4) {
13370 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13371 }
13372 let inner_offset;
13373 let mut inner_depth = depth.clone();
13374 if inlined {
13375 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13376 inner_offset = next_offset;
13377 } else {
13378 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13379 inner_depth.increment()?;
13380 }
13381 let val_ref = self.case_filters_to_run.get_or_insert_with(|| {
13382 fidl::new_empty!(
13383 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13384 D
13385 )
13386 });
13387 fidl::decode!(
13388 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
13389 D,
13390 val_ref,
13391 decoder,
13392 inner_offset,
13393 inner_depth
13394 )?;
13395 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13396 {
13397 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13398 }
13399 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13400 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13401 }
13402 }
13403
13404 next_offset += envelope_size;
13405 _next_ordinal_to_read += 1;
13406 if next_offset >= end_offset {
13407 return Ok(());
13408 }
13409
13410 while _next_ordinal_to_read < 6 {
13412 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13413 _next_ordinal_to_read += 1;
13414 next_offset += envelope_size;
13415 }
13416
13417 let next_out_of_line = decoder.next_out_of_line();
13418 let handles_before = decoder.remaining_handles();
13419 if let Some((inlined, num_bytes, num_handles)) =
13420 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13421 {
13422 let member_inline_size =
13423 <LogsIteratorOption as fidl::encoding::TypeMarker>::inline_size(
13424 decoder.context,
13425 );
13426 if inlined != (member_inline_size <= 4) {
13427 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13428 }
13429 let inner_offset;
13430 let mut inner_depth = depth.clone();
13431 if inlined {
13432 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13433 inner_offset = next_offset;
13434 } else {
13435 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13436 inner_depth.increment()?;
13437 }
13438 let val_ref = self
13439 .log_iterator
13440 .get_or_insert_with(|| fidl::new_empty!(LogsIteratorOption, D));
13441 fidl::decode!(LogsIteratorOption, D, val_ref, decoder, inner_offset, inner_depth)?;
13442 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13443 {
13444 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13445 }
13446 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13447 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13448 }
13449 }
13450
13451 next_offset += envelope_size;
13452 _next_ordinal_to_read += 1;
13453 if next_offset >= end_offset {
13454 return Ok(());
13455 }
13456
13457 while _next_ordinal_to_read < 7 {
13459 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13460 _next_ordinal_to_read += 1;
13461 next_offset += envelope_size;
13462 }
13463
13464 let next_out_of_line = decoder.next_out_of_line();
13465 let handles_before = decoder.remaining_handles();
13466 if let Some((inlined, num_bytes, num_handles)) =
13467 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13468 {
13469 let member_inline_size = <fidl::encoding::Vector<
13470 fidl_fuchsia_diagnostics::LogInterestSelector,
13471 64,
13472 > as fidl::encoding::TypeMarker>::inline_size(
13473 decoder.context
13474 );
13475 if inlined != (member_inline_size <= 4) {
13476 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13477 }
13478 let inner_offset;
13479 let mut inner_depth = depth.clone();
13480 if inlined {
13481 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13482 inner_offset = next_offset;
13483 } else {
13484 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13485 inner_depth.increment()?;
13486 }
13487 let val_ref =
13488 self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D));
13489 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, D, val_ref, decoder, inner_offset, inner_depth)?;
13490 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13491 {
13492 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13493 }
13494 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13495 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13496 }
13497 }
13498
13499 next_offset += envelope_size;
13500 _next_ordinal_to_read += 1;
13501 if next_offset >= end_offset {
13502 return Ok(());
13503 }
13504
13505 while _next_ordinal_to_read < 8 {
13507 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13508 _next_ordinal_to_read += 1;
13509 next_offset += envelope_size;
13510 }
13511
13512 let next_out_of_line = decoder.next_out_of_line();
13513 let handles_before = decoder.remaining_handles();
13514 if let Some((inlined, num_bytes, num_handles)) =
13515 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13516 {
13517 let member_inline_size =
13518 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13519 if inlined != (member_inline_size <= 4) {
13520 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13521 }
13522 let inner_offset;
13523 let mut inner_depth = depth.clone();
13524 if inlined {
13525 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13526 inner_offset = next_offset;
13527 } else {
13528 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13529 inner_depth.increment()?;
13530 }
13531 let val_ref =
13532 self.break_on_failure.get_or_insert_with(|| fidl::new_empty!(bool, D));
13533 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
13534 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13535 {
13536 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13537 }
13538 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13539 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13540 }
13541 }
13542
13543 next_offset += envelope_size;
13544 _next_ordinal_to_read += 1;
13545 if next_offset >= end_offset {
13546 return Ok(());
13547 }
13548
13549 while _next_ordinal_to_read < 9 {
13551 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13552 _next_ordinal_to_read += 1;
13553 next_offset += envelope_size;
13554 }
13555
13556 let next_out_of_line = decoder.next_out_of_line();
13557 let handles_before = decoder.remaining_handles();
13558 if let Some((inlined, num_bytes, num_handles)) =
13559 fidl::encoding::decode_envelope_header(decoder, next_offset)?
13560 {
13561 let member_inline_size =
13562 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
13563 if inlined != (member_inline_size <= 4) {
13564 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13565 }
13566 let inner_offset;
13567 let mut inner_depth = depth.clone();
13568 if inlined {
13569 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
13570 inner_offset = next_offset;
13571 } else {
13572 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13573 inner_depth.increment()?;
13574 }
13575 let val_ref =
13576 self.no_exception_channel.get_or_insert_with(|| fidl::new_empty!(bool, D));
13577 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
13578 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
13579 {
13580 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13581 }
13582 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13583 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13584 }
13585 }
13586
13587 next_offset += envelope_size;
13588
13589 while next_offset < end_offset {
13591 _next_ordinal_to_read += 1;
13592 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13593 next_offset += envelope_size;
13594 }
13595
13596 Ok(())
13597 }
13598 }
13599
13600 impl RunSuiteOptions {
13601 #[inline(always)]
13602 fn max_ordinal_present(&self) -> u64 {
13603 if let Some(_) = self.no_exception_channel {
13604 return 10;
13605 }
13606 if let Some(_) = self.accumulate_debug_data {
13607 return 9;
13608 }
13609 if let Some(_) = self.log_interest {
13610 return 8;
13611 }
13612 if let Some(_) = self.logs_iterator_type {
13613 return 7;
13614 }
13615 if let Some(_) = self.test_case_filters {
13616 return 6;
13617 }
13618 if let Some(_) = self.timeout {
13619 return 5;
13620 }
13621 if let Some(_) = self.arguments {
13622 return 4;
13623 }
13624 if let Some(_) = self.max_concurrent_test_case_runs {
13625 return 3;
13626 }
13627 if let Some(_) = self.run_disabled_tests {
13628 return 2;
13629 }
13630 if let Some(_) = self.realm_options {
13631 return 1;
13632 }
13633 0
13634 }
13635 }
13636
13637 impl fidl::encoding::ResourceTypeMarker for RunSuiteOptions {
13638 type Borrowed<'a> = &'a mut Self;
13639 fn take_or_borrow<'a>(
13640 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13641 ) -> Self::Borrowed<'a> {
13642 value
13643 }
13644 }
13645
13646 unsafe impl fidl::encoding::TypeMarker for RunSuiteOptions {
13647 type Owned = Self;
13648
13649 #[inline(always)]
13650 fn inline_align(_context: fidl::encoding::Context) -> usize {
13651 8
13652 }
13653
13654 #[inline(always)]
13655 fn inline_size(_context: fidl::encoding::Context) -> usize {
13656 16
13657 }
13658 }
13659
13660 unsafe impl
13661 fidl::encoding::Encode<RunSuiteOptions, fidl::encoding::DefaultFuchsiaResourceDialect>
13662 for &mut RunSuiteOptions
13663 {
13664 unsafe fn encode(
13665 self,
13666 encoder: &mut fidl::encoding::Encoder<
13667 '_,
13668 fidl::encoding::DefaultFuchsiaResourceDialect,
13669 >,
13670 offset: usize,
13671 mut depth: fidl::encoding::Depth,
13672 ) -> fidl::Result<()> {
13673 encoder.debug_check_bounds::<RunSuiteOptions>(offset);
13674 let max_ordinal: u64 = self.max_ordinal_present();
13676 encoder.write_num(max_ordinal, offset);
13677 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
13678 if max_ordinal == 0 {
13680 return Ok(());
13681 }
13682 depth.increment()?;
13683 let envelope_size = 8;
13684 let bytes_len = max_ordinal as usize * envelope_size;
13685 #[allow(unused_variables)]
13686 let offset = encoder.out_of_line_offset(bytes_len);
13687 let mut _prev_end_offset: usize = 0;
13688 if 1 > max_ordinal {
13689 return Ok(());
13690 }
13691
13692 let cur_offset: usize = (1 - 1) * envelope_size;
13695
13696 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13698
13699 fidl::encoding::encode_in_envelope_optional::<
13704 RealmOptions,
13705 fidl::encoding::DefaultFuchsiaResourceDialect,
13706 >(
13707 self.realm_options
13708 .as_mut()
13709 .map(<RealmOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
13710 encoder,
13711 offset + cur_offset,
13712 depth,
13713 )?;
13714
13715 _prev_end_offset = cur_offset + envelope_size;
13716 if 2 > max_ordinal {
13717 return Ok(());
13718 }
13719
13720 let cur_offset: usize = (2 - 1) * envelope_size;
13723
13724 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13726
13727 fidl::encoding::encode_in_envelope_optional::<
13732 bool,
13733 fidl::encoding::DefaultFuchsiaResourceDialect,
13734 >(
13735 self.run_disabled_tests
13736 .as_ref()
13737 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13738 encoder,
13739 offset + cur_offset,
13740 depth,
13741 )?;
13742
13743 _prev_end_offset = cur_offset + envelope_size;
13744 if 3 > max_ordinal {
13745 return Ok(());
13746 }
13747
13748 let cur_offset: usize = (3 - 1) * envelope_size;
13751
13752 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13754
13755 fidl::encoding::encode_in_envelope_optional::<
13760 u16,
13761 fidl::encoding::DefaultFuchsiaResourceDialect,
13762 >(
13763 self.max_concurrent_test_case_runs
13764 .as_ref()
13765 .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
13766 encoder,
13767 offset + cur_offset,
13768 depth,
13769 )?;
13770
13771 _prev_end_offset = cur_offset + envelope_size;
13772 if 4 > max_ordinal {
13773 return Ok(());
13774 }
13775
13776 let cur_offset: usize = (4 - 1) * envelope_size;
13779
13780 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13782
13783 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13788 self.arguments.as_ref().map(<fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095> as fidl::encoding::ValueTypeMarker>::borrow),
13789 encoder, offset + cur_offset, depth
13790 )?;
13791
13792 _prev_end_offset = cur_offset + envelope_size;
13793 if 5 > max_ordinal {
13794 return Ok(());
13795 }
13796
13797 let cur_offset: usize = (5 - 1) * envelope_size;
13800
13801 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13803
13804 fidl::encoding::encode_in_envelope_optional::<
13809 i64,
13810 fidl::encoding::DefaultFuchsiaResourceDialect,
13811 >(
13812 self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
13813 encoder,
13814 offset + cur_offset,
13815 depth,
13816 )?;
13817
13818 _prev_end_offset = cur_offset + envelope_size;
13819 if 6 > max_ordinal {
13820 return Ok(());
13821 }
13822
13823 let cur_offset: usize = (6 - 1) * envelope_size;
13826
13827 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13829
13830 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13835 self.test_case_filters.as_ref().map(<fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024> as fidl::encoding::ValueTypeMarker>::borrow),
13836 encoder, offset + cur_offset, depth
13837 )?;
13838
13839 _prev_end_offset = cur_offset + envelope_size;
13840 if 7 > max_ordinal {
13841 return Ok(());
13842 }
13843
13844 let cur_offset: usize = (7 - 1) * envelope_size;
13847
13848 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13850
13851 fidl::encoding::encode_in_envelope_optional::<
13856 LogsIteratorType,
13857 fidl::encoding::DefaultFuchsiaResourceDialect,
13858 >(
13859 self.logs_iterator_type
13860 .as_ref()
13861 .map(<LogsIteratorType as fidl::encoding::ValueTypeMarker>::borrow),
13862 encoder,
13863 offset + cur_offset,
13864 depth,
13865 )?;
13866
13867 _prev_end_offset = cur_offset + envelope_size;
13868 if 8 > max_ordinal {
13869 return Ok(());
13870 }
13871
13872 let cur_offset: usize = (8 - 1) * envelope_size;
13875
13876 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13878
13879 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect>(
13884 self.log_interest.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64> as fidl::encoding::ValueTypeMarker>::borrow),
13885 encoder, offset + cur_offset, depth
13886 )?;
13887
13888 _prev_end_offset = cur_offset + envelope_size;
13889 if 9 > max_ordinal {
13890 return Ok(());
13891 }
13892
13893 let cur_offset: usize = (9 - 1) * envelope_size;
13896
13897 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13899
13900 fidl::encoding::encode_in_envelope_optional::<
13905 bool,
13906 fidl::encoding::DefaultFuchsiaResourceDialect,
13907 >(
13908 self.accumulate_debug_data
13909 .as_ref()
13910 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13911 encoder,
13912 offset + cur_offset,
13913 depth,
13914 )?;
13915
13916 _prev_end_offset = cur_offset + envelope_size;
13917 if 10 > max_ordinal {
13918 return Ok(());
13919 }
13920
13921 let cur_offset: usize = (10 - 1) * envelope_size;
13924
13925 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
13927
13928 fidl::encoding::encode_in_envelope_optional::<
13933 bool,
13934 fidl::encoding::DefaultFuchsiaResourceDialect,
13935 >(
13936 self.no_exception_channel
13937 .as_ref()
13938 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
13939 encoder,
13940 offset + cur_offset,
13941 depth,
13942 )?;
13943
13944 _prev_end_offset = cur_offset + envelope_size;
13945
13946 Ok(())
13947 }
13948 }
13949
13950 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13951 for RunSuiteOptions
13952 {
13953 #[inline(always)]
13954 fn new_empty() -> Self {
13955 Self::default()
13956 }
13957
13958 unsafe fn decode(
13959 &mut self,
13960 decoder: &mut fidl::encoding::Decoder<
13961 '_,
13962 fidl::encoding::DefaultFuchsiaResourceDialect,
13963 >,
13964 offset: usize,
13965 mut depth: fidl::encoding::Depth,
13966 ) -> fidl::Result<()> {
13967 decoder.debug_check_bounds::<Self>(offset);
13968 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
13969 None => return Err(fidl::Error::NotNullable),
13970 Some(len) => len,
13971 };
13972 if len == 0 {
13974 return Ok(());
13975 };
13976 depth.increment()?;
13977 let envelope_size = 8;
13978 let bytes_len = len * envelope_size;
13979 let offset = decoder.out_of_line_offset(bytes_len)?;
13980 let mut _next_ordinal_to_read = 0;
13982 let mut next_offset = offset;
13983 let end_offset = offset + bytes_len;
13984 _next_ordinal_to_read += 1;
13985 if next_offset >= end_offset {
13986 return Ok(());
13987 }
13988
13989 while _next_ordinal_to_read < 1 {
13991 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
13992 _next_ordinal_to_read += 1;
13993 next_offset += envelope_size;
13994 }
13995
13996 let next_out_of_line = decoder.next_out_of_line();
13997 let handles_before = decoder.remaining_handles();
13998 if let Some((inlined, num_bytes, num_handles)) =
13999 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14000 {
14001 let member_inline_size =
14002 <RealmOptions as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14003 if inlined != (member_inline_size <= 4) {
14004 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14005 }
14006 let inner_offset;
14007 let mut inner_depth = depth.clone();
14008 if inlined {
14009 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14010 inner_offset = next_offset;
14011 } else {
14012 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14013 inner_depth.increment()?;
14014 }
14015 let val_ref = self.realm_options.get_or_insert_with(|| {
14016 fidl::new_empty!(RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect)
14017 });
14018 fidl::decode!(
14019 RealmOptions,
14020 fidl::encoding::DefaultFuchsiaResourceDialect,
14021 val_ref,
14022 decoder,
14023 inner_offset,
14024 inner_depth
14025 )?;
14026 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14027 {
14028 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14029 }
14030 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14031 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14032 }
14033 }
14034
14035 next_offset += envelope_size;
14036 _next_ordinal_to_read += 1;
14037 if next_offset >= end_offset {
14038 return Ok(());
14039 }
14040
14041 while _next_ordinal_to_read < 2 {
14043 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14044 _next_ordinal_to_read += 1;
14045 next_offset += envelope_size;
14046 }
14047
14048 let next_out_of_line = decoder.next_out_of_line();
14049 let handles_before = decoder.remaining_handles();
14050 if let Some((inlined, num_bytes, num_handles)) =
14051 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14052 {
14053 let member_inline_size =
14054 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14055 if inlined != (member_inline_size <= 4) {
14056 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14057 }
14058 let inner_offset;
14059 let mut inner_depth = depth.clone();
14060 if inlined {
14061 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14062 inner_offset = next_offset;
14063 } else {
14064 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14065 inner_depth.increment()?;
14066 }
14067 let val_ref = self.run_disabled_tests.get_or_insert_with(|| {
14068 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
14069 });
14070 fidl::decode!(
14071 bool,
14072 fidl::encoding::DefaultFuchsiaResourceDialect,
14073 val_ref,
14074 decoder,
14075 inner_offset,
14076 inner_depth
14077 )?;
14078 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14079 {
14080 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14081 }
14082 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14083 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14084 }
14085 }
14086
14087 next_offset += envelope_size;
14088 _next_ordinal_to_read += 1;
14089 if next_offset >= end_offset {
14090 return Ok(());
14091 }
14092
14093 while _next_ordinal_to_read < 3 {
14095 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14096 _next_ordinal_to_read += 1;
14097 next_offset += envelope_size;
14098 }
14099
14100 let next_out_of_line = decoder.next_out_of_line();
14101 let handles_before = decoder.remaining_handles();
14102 if let Some((inlined, num_bytes, num_handles)) =
14103 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14104 {
14105 let member_inline_size =
14106 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14107 if inlined != (member_inline_size <= 4) {
14108 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14109 }
14110 let inner_offset;
14111 let mut inner_depth = depth.clone();
14112 if inlined {
14113 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14114 inner_offset = next_offset;
14115 } else {
14116 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14117 inner_depth.increment()?;
14118 }
14119 let val_ref = self.max_concurrent_test_case_runs.get_or_insert_with(|| {
14120 fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect)
14121 });
14122 fidl::decode!(
14123 u16,
14124 fidl::encoding::DefaultFuchsiaResourceDialect,
14125 val_ref,
14126 decoder,
14127 inner_offset,
14128 inner_depth
14129 )?;
14130 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14131 {
14132 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14133 }
14134 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14135 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14136 }
14137 }
14138
14139 next_offset += envelope_size;
14140 _next_ordinal_to_read += 1;
14141 if next_offset >= end_offset {
14142 return Ok(());
14143 }
14144
14145 while _next_ordinal_to_read < 4 {
14147 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14148 _next_ordinal_to_read += 1;
14149 next_offset += envelope_size;
14150 }
14151
14152 let next_out_of_line = decoder.next_out_of_line();
14153 let handles_before = decoder.remaining_handles();
14154 if let Some((inlined, num_bytes, num_handles)) =
14155 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14156 {
14157 let member_inline_size = <fidl::encoding::Vector<
14158 fidl::encoding::BoundedString<1024>,
14159 4095,
14160 > as fidl::encoding::TypeMarker>::inline_size(
14161 decoder.context
14162 );
14163 if inlined != (member_inline_size <= 4) {
14164 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14165 }
14166 let inner_offset;
14167 let mut inner_depth = depth.clone();
14168 if inlined {
14169 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14170 inner_offset = next_offset;
14171 } else {
14172 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14173 inner_depth.increment()?;
14174 }
14175 let val_ref = self.arguments.get_or_insert_with(|| {
14176 fidl::new_empty!(
14177 fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>,
14178 fidl::encoding::DefaultFuchsiaResourceDialect
14179 )
14180 });
14181 fidl::decode!(
14182 fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>,
14183 fidl::encoding::DefaultFuchsiaResourceDialect,
14184 val_ref,
14185 decoder,
14186 inner_offset,
14187 inner_depth
14188 )?;
14189 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14190 {
14191 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14192 }
14193 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14194 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14195 }
14196 }
14197
14198 next_offset += envelope_size;
14199 _next_ordinal_to_read += 1;
14200 if next_offset >= end_offset {
14201 return Ok(());
14202 }
14203
14204 while _next_ordinal_to_read < 5 {
14206 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14207 _next_ordinal_to_read += 1;
14208 next_offset += envelope_size;
14209 }
14210
14211 let next_out_of_line = decoder.next_out_of_line();
14212 let handles_before = decoder.remaining_handles();
14213 if let Some((inlined, num_bytes, num_handles)) =
14214 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14215 {
14216 let member_inline_size =
14217 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14218 if inlined != (member_inline_size <= 4) {
14219 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14220 }
14221 let inner_offset;
14222 let mut inner_depth = depth.clone();
14223 if inlined {
14224 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14225 inner_offset = next_offset;
14226 } else {
14227 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14228 inner_depth.increment()?;
14229 }
14230 let val_ref = self.timeout.get_or_insert_with(|| {
14231 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
14232 });
14233 fidl::decode!(
14234 i64,
14235 fidl::encoding::DefaultFuchsiaResourceDialect,
14236 val_ref,
14237 decoder,
14238 inner_offset,
14239 inner_depth
14240 )?;
14241 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14242 {
14243 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14244 }
14245 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14246 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14247 }
14248 }
14249
14250 next_offset += envelope_size;
14251 _next_ordinal_to_read += 1;
14252 if next_offset >= end_offset {
14253 return Ok(());
14254 }
14255
14256 while _next_ordinal_to_read < 6 {
14258 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14259 _next_ordinal_to_read += 1;
14260 next_offset += envelope_size;
14261 }
14262
14263 let next_out_of_line = decoder.next_out_of_line();
14264 let handles_before = decoder.remaining_handles();
14265 if let Some((inlined, num_bytes, num_handles)) =
14266 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14267 {
14268 let member_inline_size = <fidl::encoding::Vector<
14269 fidl::encoding::BoundedString<4096>,
14270 1024,
14271 > as fidl::encoding::TypeMarker>::inline_size(
14272 decoder.context
14273 );
14274 if inlined != (member_inline_size <= 4) {
14275 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14276 }
14277 let inner_offset;
14278 let mut inner_depth = depth.clone();
14279 if inlined {
14280 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14281 inner_offset = next_offset;
14282 } else {
14283 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14284 inner_depth.increment()?;
14285 }
14286 let val_ref = self.test_case_filters.get_or_insert_with(|| {
14287 fidl::new_empty!(
14288 fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>,
14289 fidl::encoding::DefaultFuchsiaResourceDialect
14290 )
14291 });
14292 fidl::decode!(
14293 fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>,
14294 fidl::encoding::DefaultFuchsiaResourceDialect,
14295 val_ref,
14296 decoder,
14297 inner_offset,
14298 inner_depth
14299 )?;
14300 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14301 {
14302 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14303 }
14304 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14305 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14306 }
14307 }
14308
14309 next_offset += envelope_size;
14310 _next_ordinal_to_read += 1;
14311 if next_offset >= end_offset {
14312 return Ok(());
14313 }
14314
14315 while _next_ordinal_to_read < 7 {
14317 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14318 _next_ordinal_to_read += 1;
14319 next_offset += envelope_size;
14320 }
14321
14322 let next_out_of_line = decoder.next_out_of_line();
14323 let handles_before = decoder.remaining_handles();
14324 if let Some((inlined, num_bytes, num_handles)) =
14325 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14326 {
14327 let member_inline_size =
14328 <LogsIteratorType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14329 if inlined != (member_inline_size <= 4) {
14330 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14331 }
14332 let inner_offset;
14333 let mut inner_depth = depth.clone();
14334 if inlined {
14335 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14336 inner_offset = next_offset;
14337 } else {
14338 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14339 inner_depth.increment()?;
14340 }
14341 let val_ref = self.logs_iterator_type.get_or_insert_with(|| {
14342 fidl::new_empty!(
14343 LogsIteratorType,
14344 fidl::encoding::DefaultFuchsiaResourceDialect
14345 )
14346 });
14347 fidl::decode!(
14348 LogsIteratorType,
14349 fidl::encoding::DefaultFuchsiaResourceDialect,
14350 val_ref,
14351 decoder,
14352 inner_offset,
14353 inner_depth
14354 )?;
14355 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14356 {
14357 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14358 }
14359 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14360 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14361 }
14362 }
14363
14364 next_offset += envelope_size;
14365 _next_ordinal_to_read += 1;
14366 if next_offset >= end_offset {
14367 return Ok(());
14368 }
14369
14370 while _next_ordinal_to_read < 8 {
14372 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14373 _next_ordinal_to_read += 1;
14374 next_offset += envelope_size;
14375 }
14376
14377 let next_out_of_line = decoder.next_out_of_line();
14378 let handles_before = decoder.remaining_handles();
14379 if let Some((inlined, num_bytes, num_handles)) =
14380 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14381 {
14382 let member_inline_size = <fidl::encoding::Vector<
14383 fidl_fuchsia_diagnostics::LogInterestSelector,
14384 64,
14385 > as fidl::encoding::TypeMarker>::inline_size(
14386 decoder.context
14387 );
14388 if inlined != (member_inline_size <= 4) {
14389 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14390 }
14391 let inner_offset;
14392 let mut inner_depth = depth.clone();
14393 if inlined {
14394 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14395 inner_offset = next_offset;
14396 } else {
14397 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14398 inner_depth.increment()?;
14399 }
14400 let val_ref =
14401 self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect));
14402 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
14403 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14404 {
14405 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14406 }
14407 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14408 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14409 }
14410 }
14411
14412 next_offset += envelope_size;
14413 _next_ordinal_to_read += 1;
14414 if next_offset >= end_offset {
14415 return Ok(());
14416 }
14417
14418 while _next_ordinal_to_read < 9 {
14420 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14421 _next_ordinal_to_read += 1;
14422 next_offset += envelope_size;
14423 }
14424
14425 let next_out_of_line = decoder.next_out_of_line();
14426 let handles_before = decoder.remaining_handles();
14427 if let Some((inlined, num_bytes, num_handles)) =
14428 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14429 {
14430 let member_inline_size =
14431 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14432 if inlined != (member_inline_size <= 4) {
14433 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14434 }
14435 let inner_offset;
14436 let mut inner_depth = depth.clone();
14437 if inlined {
14438 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14439 inner_offset = next_offset;
14440 } else {
14441 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14442 inner_depth.increment()?;
14443 }
14444 let val_ref = self.accumulate_debug_data.get_or_insert_with(|| {
14445 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
14446 });
14447 fidl::decode!(
14448 bool,
14449 fidl::encoding::DefaultFuchsiaResourceDialect,
14450 val_ref,
14451 decoder,
14452 inner_offset,
14453 inner_depth
14454 )?;
14455 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14456 {
14457 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14458 }
14459 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14460 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14461 }
14462 }
14463
14464 next_offset += envelope_size;
14465 _next_ordinal_to_read += 1;
14466 if next_offset >= end_offset {
14467 return Ok(());
14468 }
14469
14470 while _next_ordinal_to_read < 10 {
14472 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14473 _next_ordinal_to_read += 1;
14474 next_offset += envelope_size;
14475 }
14476
14477 let next_out_of_line = decoder.next_out_of_line();
14478 let handles_before = decoder.remaining_handles();
14479 if let Some((inlined, num_bytes, num_handles)) =
14480 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14481 {
14482 let member_inline_size =
14483 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14484 if inlined != (member_inline_size <= 4) {
14485 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14486 }
14487 let inner_offset;
14488 let mut inner_depth = depth.clone();
14489 if inlined {
14490 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14491 inner_offset = next_offset;
14492 } else {
14493 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14494 inner_depth.increment()?;
14495 }
14496 let val_ref = self.no_exception_channel.get_or_insert_with(|| {
14497 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
14498 });
14499 fidl::decode!(
14500 bool,
14501 fidl::encoding::DefaultFuchsiaResourceDialect,
14502 val_ref,
14503 decoder,
14504 inner_offset,
14505 inner_depth
14506 )?;
14507 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14508 {
14509 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14510 }
14511 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14512 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14513 }
14514 }
14515
14516 next_offset += envelope_size;
14517
14518 while next_offset < end_offset {
14520 _next_ordinal_to_read += 1;
14521 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14522 next_offset += envelope_size;
14523 }
14524
14525 Ok(())
14526 }
14527 }
14528
14529 impl SchedulingOptions {
14530 #[inline(always)]
14531 fn max_ordinal_present(&self) -> u64 {
14532 if let Some(_) = self.accumulate_debug_data {
14533 return 2;
14534 }
14535 if let Some(_) = self.max_parallel_suites {
14536 return 1;
14537 }
14538 0
14539 }
14540 }
14541
14542 impl fidl::encoding::ValueTypeMarker for SchedulingOptions {
14543 type Borrowed<'a> = &'a Self;
14544 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
14545 value
14546 }
14547 }
14548
14549 unsafe impl fidl::encoding::TypeMarker for SchedulingOptions {
14550 type Owned = Self;
14551
14552 #[inline(always)]
14553 fn inline_align(_context: fidl::encoding::Context) -> usize {
14554 8
14555 }
14556
14557 #[inline(always)]
14558 fn inline_size(_context: fidl::encoding::Context) -> usize {
14559 16
14560 }
14561 }
14562
14563 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<SchedulingOptions, D>
14564 for &SchedulingOptions
14565 {
14566 unsafe fn encode(
14567 self,
14568 encoder: &mut fidl::encoding::Encoder<'_, D>,
14569 offset: usize,
14570 mut depth: fidl::encoding::Depth,
14571 ) -> fidl::Result<()> {
14572 encoder.debug_check_bounds::<SchedulingOptions>(offset);
14573 let max_ordinal: u64 = self.max_ordinal_present();
14575 encoder.write_num(max_ordinal, offset);
14576 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14577 if max_ordinal == 0 {
14579 return Ok(());
14580 }
14581 depth.increment()?;
14582 let envelope_size = 8;
14583 let bytes_len = max_ordinal as usize * envelope_size;
14584 #[allow(unused_variables)]
14585 let offset = encoder.out_of_line_offset(bytes_len);
14586 let mut _prev_end_offset: usize = 0;
14587 if 1 > max_ordinal {
14588 return Ok(());
14589 }
14590
14591 let cur_offset: usize = (1 - 1) * envelope_size;
14594
14595 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14597
14598 fidl::encoding::encode_in_envelope_optional::<u16, D>(
14603 self.max_parallel_suites
14604 .as_ref()
14605 .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
14606 encoder,
14607 offset + cur_offset,
14608 depth,
14609 )?;
14610
14611 _prev_end_offset = cur_offset + envelope_size;
14612 if 2 > max_ordinal {
14613 return Ok(());
14614 }
14615
14616 let cur_offset: usize = (2 - 1) * envelope_size;
14619
14620 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14622
14623 fidl::encoding::encode_in_envelope_optional::<bool, D>(
14628 self.accumulate_debug_data
14629 .as_ref()
14630 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
14631 encoder,
14632 offset + cur_offset,
14633 depth,
14634 )?;
14635
14636 _prev_end_offset = cur_offset + envelope_size;
14637
14638 Ok(())
14639 }
14640 }
14641
14642 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for SchedulingOptions {
14643 #[inline(always)]
14644 fn new_empty() -> Self {
14645 Self::default()
14646 }
14647
14648 unsafe fn decode(
14649 &mut self,
14650 decoder: &mut fidl::encoding::Decoder<'_, D>,
14651 offset: usize,
14652 mut depth: fidl::encoding::Depth,
14653 ) -> fidl::Result<()> {
14654 decoder.debug_check_bounds::<Self>(offset);
14655 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14656 None => return Err(fidl::Error::NotNullable),
14657 Some(len) => len,
14658 };
14659 if len == 0 {
14661 return Ok(());
14662 };
14663 depth.increment()?;
14664 let envelope_size = 8;
14665 let bytes_len = len * envelope_size;
14666 let offset = decoder.out_of_line_offset(bytes_len)?;
14667 let mut _next_ordinal_to_read = 0;
14669 let mut next_offset = offset;
14670 let end_offset = offset + bytes_len;
14671 _next_ordinal_to_read += 1;
14672 if next_offset >= end_offset {
14673 return Ok(());
14674 }
14675
14676 while _next_ordinal_to_read < 1 {
14678 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14679 _next_ordinal_to_read += 1;
14680 next_offset += envelope_size;
14681 }
14682
14683 let next_out_of_line = decoder.next_out_of_line();
14684 let handles_before = decoder.remaining_handles();
14685 if let Some((inlined, num_bytes, num_handles)) =
14686 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14687 {
14688 let member_inline_size =
14689 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14690 if inlined != (member_inline_size <= 4) {
14691 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14692 }
14693 let inner_offset;
14694 let mut inner_depth = depth.clone();
14695 if inlined {
14696 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14697 inner_offset = next_offset;
14698 } else {
14699 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14700 inner_depth.increment()?;
14701 }
14702 let val_ref =
14703 self.max_parallel_suites.get_or_insert_with(|| fidl::new_empty!(u16, D));
14704 fidl::decode!(u16, D, val_ref, decoder, inner_offset, inner_depth)?;
14705 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14706 {
14707 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14708 }
14709 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14710 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14711 }
14712 }
14713
14714 next_offset += envelope_size;
14715 _next_ordinal_to_read += 1;
14716 if next_offset >= end_offset {
14717 return Ok(());
14718 }
14719
14720 while _next_ordinal_to_read < 2 {
14722 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14723 _next_ordinal_to_read += 1;
14724 next_offset += envelope_size;
14725 }
14726
14727 let next_out_of_line = decoder.next_out_of_line();
14728 let handles_before = decoder.remaining_handles();
14729 if let Some((inlined, num_bytes, num_handles)) =
14730 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14731 {
14732 let member_inline_size =
14733 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14734 if inlined != (member_inline_size <= 4) {
14735 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14736 }
14737 let inner_offset;
14738 let mut inner_depth = depth.clone();
14739 if inlined {
14740 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14741 inner_offset = next_offset;
14742 } else {
14743 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14744 inner_depth.increment()?;
14745 }
14746 let val_ref =
14747 self.accumulate_debug_data.get_or_insert_with(|| fidl::new_empty!(bool, D));
14748 fidl::decode!(bool, D, val_ref, decoder, inner_offset, inner_depth)?;
14749 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14750 {
14751 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14752 }
14753 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14754 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14755 }
14756 }
14757
14758 next_offset += envelope_size;
14759
14760 while next_offset < end_offset {
14762 _next_ordinal_to_read += 1;
14763 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14764 next_offset += envelope_size;
14765 }
14766
14767 Ok(())
14768 }
14769 }
14770
14771 impl SuiteArtifactGeneratedEventDetails {
14772 #[inline(always)]
14773 fn max_ordinal_present(&self) -> u64 {
14774 if let Some(_) = self.artifact {
14775 return 1;
14776 }
14777 0
14778 }
14779 }
14780
14781 impl fidl::encoding::ResourceTypeMarker for SuiteArtifactGeneratedEventDetails {
14782 type Borrowed<'a> = &'a mut Self;
14783 fn take_or_borrow<'a>(
14784 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14785 ) -> Self::Borrowed<'a> {
14786 value
14787 }
14788 }
14789
14790 unsafe impl fidl::encoding::TypeMarker for SuiteArtifactGeneratedEventDetails {
14791 type Owned = Self;
14792
14793 #[inline(always)]
14794 fn inline_align(_context: fidl::encoding::Context) -> usize {
14795 8
14796 }
14797
14798 #[inline(always)]
14799 fn inline_size(_context: fidl::encoding::Context) -> usize {
14800 16
14801 }
14802 }
14803
14804 unsafe impl
14805 fidl::encoding::Encode<
14806 SuiteArtifactGeneratedEventDetails,
14807 fidl::encoding::DefaultFuchsiaResourceDialect,
14808 > for &mut SuiteArtifactGeneratedEventDetails
14809 {
14810 unsafe fn encode(
14811 self,
14812 encoder: &mut fidl::encoding::Encoder<
14813 '_,
14814 fidl::encoding::DefaultFuchsiaResourceDialect,
14815 >,
14816 offset: usize,
14817 mut depth: fidl::encoding::Depth,
14818 ) -> fidl::Result<()> {
14819 encoder.debug_check_bounds::<SuiteArtifactGeneratedEventDetails>(offset);
14820 let max_ordinal: u64 = self.max_ordinal_present();
14822 encoder.write_num(max_ordinal, offset);
14823 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
14824 if max_ordinal == 0 {
14826 return Ok(());
14827 }
14828 depth.increment()?;
14829 let envelope_size = 8;
14830 let bytes_len = max_ordinal as usize * envelope_size;
14831 #[allow(unused_variables)]
14832 let offset = encoder.out_of_line_offset(bytes_len);
14833 let mut _prev_end_offset: usize = 0;
14834 if 1 > max_ordinal {
14835 return Ok(());
14836 }
14837
14838 let cur_offset: usize = (1 - 1) * envelope_size;
14841
14842 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
14844
14845 fidl::encoding::encode_in_envelope_optional::<
14850 Artifact,
14851 fidl::encoding::DefaultFuchsiaResourceDialect,
14852 >(
14853 self.artifact
14854 .as_mut()
14855 .map(<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
14856 encoder,
14857 offset + cur_offset,
14858 depth,
14859 )?;
14860
14861 _prev_end_offset = cur_offset + envelope_size;
14862
14863 Ok(())
14864 }
14865 }
14866
14867 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
14868 for SuiteArtifactGeneratedEventDetails
14869 {
14870 #[inline(always)]
14871 fn new_empty() -> Self {
14872 Self::default()
14873 }
14874
14875 unsafe fn decode(
14876 &mut self,
14877 decoder: &mut fidl::encoding::Decoder<
14878 '_,
14879 fidl::encoding::DefaultFuchsiaResourceDialect,
14880 >,
14881 offset: usize,
14882 mut depth: fidl::encoding::Depth,
14883 ) -> fidl::Result<()> {
14884 decoder.debug_check_bounds::<Self>(offset);
14885 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
14886 None => return Err(fidl::Error::NotNullable),
14887 Some(len) => len,
14888 };
14889 if len == 0 {
14891 return Ok(());
14892 };
14893 depth.increment()?;
14894 let envelope_size = 8;
14895 let bytes_len = len * envelope_size;
14896 let offset = decoder.out_of_line_offset(bytes_len)?;
14897 let mut _next_ordinal_to_read = 0;
14899 let mut next_offset = offset;
14900 let end_offset = offset + bytes_len;
14901 _next_ordinal_to_read += 1;
14902 if next_offset >= end_offset {
14903 return Ok(());
14904 }
14905
14906 while _next_ordinal_to_read < 1 {
14908 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14909 _next_ordinal_to_read += 1;
14910 next_offset += envelope_size;
14911 }
14912
14913 let next_out_of_line = decoder.next_out_of_line();
14914 let handles_before = decoder.remaining_handles();
14915 if let Some((inlined, num_bytes, num_handles)) =
14916 fidl::encoding::decode_envelope_header(decoder, next_offset)?
14917 {
14918 let member_inline_size =
14919 <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context);
14920 if inlined != (member_inline_size <= 4) {
14921 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14922 }
14923 let inner_offset;
14924 let mut inner_depth = depth.clone();
14925 if inlined {
14926 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
14927 inner_offset = next_offset;
14928 } else {
14929 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14930 inner_depth.increment()?;
14931 }
14932 let val_ref = self.artifact.get_or_insert_with(|| {
14933 fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect)
14934 });
14935 fidl::decode!(
14936 Artifact,
14937 fidl::encoding::DefaultFuchsiaResourceDialect,
14938 val_ref,
14939 decoder,
14940 inner_offset,
14941 inner_depth
14942 )?;
14943 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
14944 {
14945 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14946 }
14947 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14948 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14949 }
14950 }
14951
14952 next_offset += envelope_size;
14953
14954 while next_offset < end_offset {
14956 _next_ordinal_to_read += 1;
14957 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
14958 next_offset += envelope_size;
14959 }
14960
14961 Ok(())
14962 }
14963 }
14964
14965 impl SuiteEvent {
14966 #[inline(always)]
14967 fn max_ordinal_present(&self) -> u64 {
14968 if let Some(_) = self.payload {
14969 return 2;
14970 }
14971 if let Some(_) = self.timestamp {
14972 return 1;
14973 }
14974 0
14975 }
14976 }
14977
14978 impl fidl::encoding::ResourceTypeMarker for SuiteEvent {
14979 type Borrowed<'a> = &'a mut Self;
14980 fn take_or_borrow<'a>(
14981 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
14982 ) -> Self::Borrowed<'a> {
14983 value
14984 }
14985 }
14986
14987 unsafe impl fidl::encoding::TypeMarker for SuiteEvent {
14988 type Owned = Self;
14989
14990 #[inline(always)]
14991 fn inline_align(_context: fidl::encoding::Context) -> usize {
14992 8
14993 }
14994
14995 #[inline(always)]
14996 fn inline_size(_context: fidl::encoding::Context) -> usize {
14997 16
14998 }
14999 }
15000
15001 unsafe impl fidl::encoding::Encode<SuiteEvent, fidl::encoding::DefaultFuchsiaResourceDialect>
15002 for &mut SuiteEvent
15003 {
15004 unsafe fn encode(
15005 self,
15006 encoder: &mut fidl::encoding::Encoder<
15007 '_,
15008 fidl::encoding::DefaultFuchsiaResourceDialect,
15009 >,
15010 offset: usize,
15011 mut depth: fidl::encoding::Depth,
15012 ) -> fidl::Result<()> {
15013 encoder.debug_check_bounds::<SuiteEvent>(offset);
15014 let max_ordinal: u64 = self.max_ordinal_present();
15016 encoder.write_num(max_ordinal, offset);
15017 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15018 if max_ordinal == 0 {
15020 return Ok(());
15021 }
15022 depth.increment()?;
15023 let envelope_size = 8;
15024 let bytes_len = max_ordinal as usize * envelope_size;
15025 #[allow(unused_variables)]
15026 let offset = encoder.out_of_line_offset(bytes_len);
15027 let mut _prev_end_offset: usize = 0;
15028 if 1 > max_ordinal {
15029 return Ok(());
15030 }
15031
15032 let cur_offset: usize = (1 - 1) * envelope_size;
15035
15036 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15038
15039 fidl::encoding::encode_in_envelope_optional::<
15044 i64,
15045 fidl::encoding::DefaultFuchsiaResourceDialect,
15046 >(
15047 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
15048 encoder,
15049 offset + cur_offset,
15050 depth,
15051 )?;
15052
15053 _prev_end_offset = cur_offset + envelope_size;
15054 if 2 > max_ordinal {
15055 return Ok(());
15056 }
15057
15058 let cur_offset: usize = (2 - 1) * envelope_size;
15061
15062 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15064
15065 fidl::encoding::encode_in_envelope_optional::<
15070 SuiteEventPayload,
15071 fidl::encoding::DefaultFuchsiaResourceDialect,
15072 >(
15073 self.payload
15074 .as_mut()
15075 .map(<SuiteEventPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
15076 encoder,
15077 offset + cur_offset,
15078 depth,
15079 )?;
15080
15081 _prev_end_offset = cur_offset + envelope_size;
15082
15083 Ok(())
15084 }
15085 }
15086
15087 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEvent {
15088 #[inline(always)]
15089 fn new_empty() -> Self {
15090 Self::default()
15091 }
15092
15093 unsafe fn decode(
15094 &mut self,
15095 decoder: &mut fidl::encoding::Decoder<
15096 '_,
15097 fidl::encoding::DefaultFuchsiaResourceDialect,
15098 >,
15099 offset: usize,
15100 mut depth: fidl::encoding::Depth,
15101 ) -> fidl::Result<()> {
15102 decoder.debug_check_bounds::<Self>(offset);
15103 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15104 None => return Err(fidl::Error::NotNullable),
15105 Some(len) => len,
15106 };
15107 if len == 0 {
15109 return Ok(());
15110 };
15111 depth.increment()?;
15112 let envelope_size = 8;
15113 let bytes_len = len * envelope_size;
15114 let offset = decoder.out_of_line_offset(bytes_len)?;
15115 let mut _next_ordinal_to_read = 0;
15117 let mut next_offset = offset;
15118 let end_offset = offset + bytes_len;
15119 _next_ordinal_to_read += 1;
15120 if next_offset >= end_offset {
15121 return Ok(());
15122 }
15123
15124 while _next_ordinal_to_read < 1 {
15126 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15127 _next_ordinal_to_read += 1;
15128 next_offset += envelope_size;
15129 }
15130
15131 let next_out_of_line = decoder.next_out_of_line();
15132 let handles_before = decoder.remaining_handles();
15133 if let Some((inlined, num_bytes, num_handles)) =
15134 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15135 {
15136 let member_inline_size =
15137 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15138 if inlined != (member_inline_size <= 4) {
15139 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15140 }
15141 let inner_offset;
15142 let mut inner_depth = depth.clone();
15143 if inlined {
15144 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15145 inner_offset = next_offset;
15146 } else {
15147 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15148 inner_depth.increment()?;
15149 }
15150 let val_ref = self.timestamp.get_or_insert_with(|| {
15151 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
15152 });
15153 fidl::decode!(
15154 i64,
15155 fidl::encoding::DefaultFuchsiaResourceDialect,
15156 val_ref,
15157 decoder,
15158 inner_offset,
15159 inner_depth
15160 )?;
15161 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15162 {
15163 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15164 }
15165 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15166 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15167 }
15168 }
15169
15170 next_offset += envelope_size;
15171 _next_ordinal_to_read += 1;
15172 if next_offset >= end_offset {
15173 return Ok(());
15174 }
15175
15176 while _next_ordinal_to_read < 2 {
15178 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15179 _next_ordinal_to_read += 1;
15180 next_offset += envelope_size;
15181 }
15182
15183 let next_out_of_line = decoder.next_out_of_line();
15184 let handles_before = decoder.remaining_handles();
15185 if let Some((inlined, num_bytes, num_handles)) =
15186 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15187 {
15188 let member_inline_size =
15189 <SuiteEventPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15190 if inlined != (member_inline_size <= 4) {
15191 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15192 }
15193 let inner_offset;
15194 let mut inner_depth = depth.clone();
15195 if inlined {
15196 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15197 inner_offset = next_offset;
15198 } else {
15199 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15200 inner_depth.increment()?;
15201 }
15202 let val_ref = self.payload.get_or_insert_with(|| {
15203 fidl::new_empty!(
15204 SuiteEventPayload,
15205 fidl::encoding::DefaultFuchsiaResourceDialect
15206 )
15207 });
15208 fidl::decode!(
15209 SuiteEventPayload,
15210 fidl::encoding::DefaultFuchsiaResourceDialect,
15211 val_ref,
15212 decoder,
15213 inner_offset,
15214 inner_depth
15215 )?;
15216 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15217 {
15218 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15219 }
15220 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15221 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15222 }
15223 }
15224
15225 next_offset += envelope_size;
15226
15227 while next_offset < end_offset {
15229 _next_ordinal_to_read += 1;
15230 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15231 next_offset += envelope_size;
15232 }
15233
15234 Ok(())
15235 }
15236 }
15237
15238 impl SuiteStartedEventDetails {
15239 #[inline(always)]
15240 fn max_ordinal_present(&self) -> u64 {
15241 0
15242 }
15243 }
15244
15245 impl fidl::encoding::ValueTypeMarker for SuiteStartedEventDetails {
15246 type Borrowed<'a> = &'a Self;
15247 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15248 value
15249 }
15250 }
15251
15252 unsafe impl fidl::encoding::TypeMarker for SuiteStartedEventDetails {
15253 type Owned = Self;
15254
15255 #[inline(always)]
15256 fn inline_align(_context: fidl::encoding::Context) -> usize {
15257 8
15258 }
15259
15260 #[inline(always)]
15261 fn inline_size(_context: fidl::encoding::Context) -> usize {
15262 16
15263 }
15264 }
15265
15266 unsafe impl<D: fidl::encoding::ResourceDialect>
15267 fidl::encoding::Encode<SuiteStartedEventDetails, D> for &SuiteStartedEventDetails
15268 {
15269 unsafe fn encode(
15270 self,
15271 encoder: &mut fidl::encoding::Encoder<'_, D>,
15272 offset: usize,
15273 mut depth: fidl::encoding::Depth,
15274 ) -> fidl::Result<()> {
15275 encoder.debug_check_bounds::<SuiteStartedEventDetails>(offset);
15276 let max_ordinal: u64 = self.max_ordinal_present();
15278 encoder.write_num(max_ordinal, offset);
15279 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15280 if max_ordinal == 0 {
15282 return Ok(());
15283 }
15284 depth.increment()?;
15285 let envelope_size = 8;
15286 let bytes_len = max_ordinal as usize * envelope_size;
15287 #[allow(unused_variables)]
15288 let offset = encoder.out_of_line_offset(bytes_len);
15289 let mut _prev_end_offset: usize = 0;
15290
15291 Ok(())
15292 }
15293 }
15294
15295 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15296 for SuiteStartedEventDetails
15297 {
15298 #[inline(always)]
15299 fn new_empty() -> Self {
15300 Self::default()
15301 }
15302
15303 unsafe fn decode(
15304 &mut self,
15305 decoder: &mut fidl::encoding::Decoder<'_, D>,
15306 offset: usize,
15307 mut depth: fidl::encoding::Depth,
15308 ) -> fidl::Result<()> {
15309 decoder.debug_check_bounds::<Self>(offset);
15310 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15311 None => return Err(fidl::Error::NotNullable),
15312 Some(len) => len,
15313 };
15314 if len == 0 {
15316 return Ok(());
15317 };
15318 depth.increment()?;
15319 let envelope_size = 8;
15320 let bytes_len = len * envelope_size;
15321 let offset = decoder.out_of_line_offset(bytes_len)?;
15322 let mut _next_ordinal_to_read = 0;
15324 let mut next_offset = offset;
15325 let end_offset = offset + bytes_len;
15326
15327 while next_offset < end_offset {
15329 _next_ordinal_to_read += 1;
15330 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15331 next_offset += envelope_size;
15332 }
15333
15334 Ok(())
15335 }
15336 }
15337
15338 impl SuiteStoppedEventDetails {
15339 #[inline(always)]
15340 fn max_ordinal_present(&self) -> u64 {
15341 if let Some(_) = self.result {
15342 return 1;
15343 }
15344 0
15345 }
15346 }
15347
15348 impl fidl::encoding::ValueTypeMarker for SuiteStoppedEventDetails {
15349 type Borrowed<'a> = &'a Self;
15350 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15351 value
15352 }
15353 }
15354
15355 unsafe impl fidl::encoding::TypeMarker for SuiteStoppedEventDetails {
15356 type Owned = Self;
15357
15358 #[inline(always)]
15359 fn inline_align(_context: fidl::encoding::Context) -> usize {
15360 8
15361 }
15362
15363 #[inline(always)]
15364 fn inline_size(_context: fidl::encoding::Context) -> usize {
15365 16
15366 }
15367 }
15368
15369 unsafe impl<D: fidl::encoding::ResourceDialect>
15370 fidl::encoding::Encode<SuiteStoppedEventDetails, D> for &SuiteStoppedEventDetails
15371 {
15372 unsafe fn encode(
15373 self,
15374 encoder: &mut fidl::encoding::Encoder<'_, D>,
15375 offset: usize,
15376 mut depth: fidl::encoding::Depth,
15377 ) -> fidl::Result<()> {
15378 encoder.debug_check_bounds::<SuiteStoppedEventDetails>(offset);
15379 let max_ordinal: u64 = self.max_ordinal_present();
15381 encoder.write_num(max_ordinal, offset);
15382 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15383 if max_ordinal == 0 {
15385 return Ok(());
15386 }
15387 depth.increment()?;
15388 let envelope_size = 8;
15389 let bytes_len = max_ordinal as usize * envelope_size;
15390 #[allow(unused_variables)]
15391 let offset = encoder.out_of_line_offset(bytes_len);
15392 let mut _prev_end_offset: usize = 0;
15393 if 1 > max_ordinal {
15394 return Ok(());
15395 }
15396
15397 let cur_offset: usize = (1 - 1) * envelope_size;
15400
15401 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15403
15404 fidl::encoding::encode_in_envelope_optional::<SuiteResult, D>(
15409 self.result.as_ref().map(<SuiteResult as fidl::encoding::ValueTypeMarker>::borrow),
15410 encoder,
15411 offset + cur_offset,
15412 depth,
15413 )?;
15414
15415 _prev_end_offset = cur_offset + envelope_size;
15416
15417 Ok(())
15418 }
15419 }
15420
15421 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
15422 for SuiteStoppedEventDetails
15423 {
15424 #[inline(always)]
15425 fn new_empty() -> Self {
15426 Self::default()
15427 }
15428
15429 unsafe fn decode(
15430 &mut self,
15431 decoder: &mut fidl::encoding::Decoder<'_, D>,
15432 offset: usize,
15433 mut depth: fidl::encoding::Depth,
15434 ) -> fidl::Result<()> {
15435 decoder.debug_check_bounds::<Self>(offset);
15436 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15437 None => return Err(fidl::Error::NotNullable),
15438 Some(len) => len,
15439 };
15440 if len == 0 {
15442 return Ok(());
15443 };
15444 depth.increment()?;
15445 let envelope_size = 8;
15446 let bytes_len = len * envelope_size;
15447 let offset = decoder.out_of_line_offset(bytes_len)?;
15448 let mut _next_ordinal_to_read = 0;
15450 let mut next_offset = offset;
15451 let end_offset = offset + bytes_len;
15452 _next_ordinal_to_read += 1;
15453 if next_offset >= end_offset {
15454 return Ok(());
15455 }
15456
15457 while _next_ordinal_to_read < 1 {
15459 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15460 _next_ordinal_to_read += 1;
15461 next_offset += envelope_size;
15462 }
15463
15464 let next_out_of_line = decoder.next_out_of_line();
15465 let handles_before = decoder.remaining_handles();
15466 if let Some((inlined, num_bytes, num_handles)) =
15467 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15468 {
15469 let member_inline_size =
15470 <SuiteResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15471 if inlined != (member_inline_size <= 4) {
15472 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15473 }
15474 let inner_offset;
15475 let mut inner_depth = depth.clone();
15476 if inlined {
15477 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15478 inner_offset = next_offset;
15479 } else {
15480 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15481 inner_depth.increment()?;
15482 }
15483 let val_ref = self.result.get_or_insert_with(|| fidl::new_empty!(SuiteResult, D));
15484 fidl::decode!(SuiteResult, D, val_ref, decoder, inner_offset, inner_depth)?;
15485 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15486 {
15487 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15488 }
15489 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15490 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15491 }
15492 }
15493
15494 next_offset += envelope_size;
15495
15496 while next_offset < end_offset {
15498 _next_ordinal_to_read += 1;
15499 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15500 next_offset += envelope_size;
15501 }
15502
15503 Ok(())
15504 }
15505 }
15506
15507 impl TestCase {
15508 #[inline(always)]
15509 fn max_ordinal_present(&self) -> u64 {
15510 if let Some(_) = self.name {
15511 return 1;
15512 }
15513 0
15514 }
15515 }
15516
15517 impl fidl::encoding::ValueTypeMarker for TestCase {
15518 type Borrowed<'a> = &'a Self;
15519 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15520 value
15521 }
15522 }
15523
15524 unsafe impl fidl::encoding::TypeMarker for TestCase {
15525 type Owned = Self;
15526
15527 #[inline(always)]
15528 fn inline_align(_context: fidl::encoding::Context) -> usize {
15529 8
15530 }
15531
15532 #[inline(always)]
15533 fn inline_size(_context: fidl::encoding::Context) -> usize {
15534 16
15535 }
15536 }
15537
15538 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<TestCase, D> for &TestCase {
15539 unsafe fn encode(
15540 self,
15541 encoder: &mut fidl::encoding::Encoder<'_, D>,
15542 offset: usize,
15543 mut depth: fidl::encoding::Depth,
15544 ) -> fidl::Result<()> {
15545 encoder.debug_check_bounds::<TestCase>(offset);
15546 let max_ordinal: u64 = self.max_ordinal_present();
15548 encoder.write_num(max_ordinal, offset);
15549 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15550 if max_ordinal == 0 {
15552 return Ok(());
15553 }
15554 depth.increment()?;
15555 let envelope_size = 8;
15556 let bytes_len = max_ordinal as usize * envelope_size;
15557 #[allow(unused_variables)]
15558 let offset = encoder.out_of_line_offset(bytes_len);
15559 let mut _prev_end_offset: usize = 0;
15560 if 1 > max_ordinal {
15561 return Ok(());
15562 }
15563
15564 let cur_offset: usize = (1 - 1) * envelope_size;
15567
15568 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15570
15571 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
15576 self.name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
15577 encoder, offset + cur_offset, depth
15578 )?;
15579
15580 _prev_end_offset = cur_offset + envelope_size;
15581
15582 Ok(())
15583 }
15584 }
15585
15586 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for TestCase {
15587 #[inline(always)]
15588 fn new_empty() -> Self {
15589 Self::default()
15590 }
15591
15592 unsafe fn decode(
15593 &mut self,
15594 decoder: &mut fidl::encoding::Decoder<'_, D>,
15595 offset: usize,
15596 mut depth: fidl::encoding::Depth,
15597 ) -> fidl::Result<()> {
15598 decoder.debug_check_bounds::<Self>(offset);
15599 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15600 None => return Err(fidl::Error::NotNullable),
15601 Some(len) => len,
15602 };
15603 if len == 0 {
15605 return Ok(());
15606 };
15607 depth.increment()?;
15608 let envelope_size = 8;
15609 let bytes_len = len * envelope_size;
15610 let offset = decoder.out_of_line_offset(bytes_len)?;
15611 let mut _next_ordinal_to_read = 0;
15613 let mut next_offset = offset;
15614 let end_offset = offset + bytes_len;
15615 _next_ordinal_to_read += 1;
15616 if next_offset >= end_offset {
15617 return Ok(());
15618 }
15619
15620 while _next_ordinal_to_read < 1 {
15622 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15623 _next_ordinal_to_read += 1;
15624 next_offset += envelope_size;
15625 }
15626
15627 let next_out_of_line = decoder.next_out_of_line();
15628 let handles_before = decoder.remaining_handles();
15629 if let Some((inlined, num_bytes, num_handles)) =
15630 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15631 {
15632 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15633 if inlined != (member_inline_size <= 4) {
15634 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15635 }
15636 let inner_offset;
15637 let mut inner_depth = depth.clone();
15638 if inlined {
15639 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15640 inner_offset = next_offset;
15641 } else {
15642 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15643 inner_depth.increment()?;
15644 }
15645 let val_ref = self.name.get_or_insert_with(|| {
15646 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
15647 });
15648 fidl::decode!(
15649 fidl::encoding::BoundedString<2048>,
15650 D,
15651 val_ref,
15652 decoder,
15653 inner_offset,
15654 inner_depth
15655 )?;
15656 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15657 {
15658 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15659 }
15660 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15661 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15662 }
15663 }
15664
15665 next_offset += envelope_size;
15666
15667 while next_offset < end_offset {
15669 _next_ordinal_to_read += 1;
15670 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15671 next_offset += envelope_size;
15672 }
15673
15674 Ok(())
15675 }
15676 }
15677
15678 impl TestCaseArtifactGeneratedEventDetails {
15679 #[inline(always)]
15680 fn max_ordinal_present(&self) -> u64 {
15681 if let Some(_) = self.artifact {
15682 return 2;
15683 }
15684 if let Some(_) = self.test_case_id {
15685 return 1;
15686 }
15687 0
15688 }
15689 }
15690
15691 impl fidl::encoding::ResourceTypeMarker for TestCaseArtifactGeneratedEventDetails {
15692 type Borrowed<'a> = &'a mut Self;
15693 fn take_or_borrow<'a>(
15694 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
15695 ) -> Self::Borrowed<'a> {
15696 value
15697 }
15698 }
15699
15700 unsafe impl fidl::encoding::TypeMarker for TestCaseArtifactGeneratedEventDetails {
15701 type Owned = Self;
15702
15703 #[inline(always)]
15704 fn inline_align(_context: fidl::encoding::Context) -> usize {
15705 8
15706 }
15707
15708 #[inline(always)]
15709 fn inline_size(_context: fidl::encoding::Context) -> usize {
15710 16
15711 }
15712 }
15713
15714 unsafe impl
15715 fidl::encoding::Encode<
15716 TestCaseArtifactGeneratedEventDetails,
15717 fidl::encoding::DefaultFuchsiaResourceDialect,
15718 > for &mut TestCaseArtifactGeneratedEventDetails
15719 {
15720 unsafe fn encode(
15721 self,
15722 encoder: &mut fidl::encoding::Encoder<
15723 '_,
15724 fidl::encoding::DefaultFuchsiaResourceDialect,
15725 >,
15726 offset: usize,
15727 mut depth: fidl::encoding::Depth,
15728 ) -> fidl::Result<()> {
15729 encoder.debug_check_bounds::<TestCaseArtifactGeneratedEventDetails>(offset);
15730 let max_ordinal: u64 = self.max_ordinal_present();
15732 encoder.write_num(max_ordinal, offset);
15733 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15734 if max_ordinal == 0 {
15736 return Ok(());
15737 }
15738 depth.increment()?;
15739 let envelope_size = 8;
15740 let bytes_len = max_ordinal as usize * envelope_size;
15741 #[allow(unused_variables)]
15742 let offset = encoder.out_of_line_offset(bytes_len);
15743 let mut _prev_end_offset: usize = 0;
15744 if 1 > max_ordinal {
15745 return Ok(());
15746 }
15747
15748 let cur_offset: usize = (1 - 1) * envelope_size;
15751
15752 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15754
15755 fidl::encoding::encode_in_envelope_optional::<
15760 u32,
15761 fidl::encoding::DefaultFuchsiaResourceDialect,
15762 >(
15763 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
15764 encoder,
15765 offset + cur_offset,
15766 depth,
15767 )?;
15768
15769 _prev_end_offset = cur_offset + envelope_size;
15770 if 2 > max_ordinal {
15771 return Ok(());
15772 }
15773
15774 let cur_offset: usize = (2 - 1) * envelope_size;
15777
15778 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
15780
15781 fidl::encoding::encode_in_envelope_optional::<
15786 Artifact,
15787 fidl::encoding::DefaultFuchsiaResourceDialect,
15788 >(
15789 self.artifact
15790 .as_mut()
15791 .map(<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
15792 encoder,
15793 offset + cur_offset,
15794 depth,
15795 )?;
15796
15797 _prev_end_offset = cur_offset + envelope_size;
15798
15799 Ok(())
15800 }
15801 }
15802
15803 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
15804 for TestCaseArtifactGeneratedEventDetails
15805 {
15806 #[inline(always)]
15807 fn new_empty() -> Self {
15808 Self::default()
15809 }
15810
15811 unsafe fn decode(
15812 &mut self,
15813 decoder: &mut fidl::encoding::Decoder<
15814 '_,
15815 fidl::encoding::DefaultFuchsiaResourceDialect,
15816 >,
15817 offset: usize,
15818 mut depth: fidl::encoding::Depth,
15819 ) -> fidl::Result<()> {
15820 decoder.debug_check_bounds::<Self>(offset);
15821 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
15822 None => return Err(fidl::Error::NotNullable),
15823 Some(len) => len,
15824 };
15825 if len == 0 {
15827 return Ok(());
15828 };
15829 depth.increment()?;
15830 let envelope_size = 8;
15831 let bytes_len = len * envelope_size;
15832 let offset = decoder.out_of_line_offset(bytes_len)?;
15833 let mut _next_ordinal_to_read = 0;
15835 let mut next_offset = offset;
15836 let end_offset = offset + bytes_len;
15837 _next_ordinal_to_read += 1;
15838 if next_offset >= end_offset {
15839 return Ok(());
15840 }
15841
15842 while _next_ordinal_to_read < 1 {
15844 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15845 _next_ordinal_to_read += 1;
15846 next_offset += envelope_size;
15847 }
15848
15849 let next_out_of_line = decoder.next_out_of_line();
15850 let handles_before = decoder.remaining_handles();
15851 if let Some((inlined, num_bytes, num_handles)) =
15852 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15853 {
15854 let member_inline_size =
15855 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15856 if inlined != (member_inline_size <= 4) {
15857 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15858 }
15859 let inner_offset;
15860 let mut inner_depth = depth.clone();
15861 if inlined {
15862 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15863 inner_offset = next_offset;
15864 } else {
15865 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15866 inner_depth.increment()?;
15867 }
15868 let val_ref = self.test_case_id.get_or_insert_with(|| {
15869 fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect)
15870 });
15871 fidl::decode!(
15872 u32,
15873 fidl::encoding::DefaultFuchsiaResourceDialect,
15874 val_ref,
15875 decoder,
15876 inner_offset,
15877 inner_depth
15878 )?;
15879 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15880 {
15881 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15882 }
15883 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15884 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15885 }
15886 }
15887
15888 next_offset += envelope_size;
15889 _next_ordinal_to_read += 1;
15890 if next_offset >= end_offset {
15891 return Ok(());
15892 }
15893
15894 while _next_ordinal_to_read < 2 {
15896 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15897 _next_ordinal_to_read += 1;
15898 next_offset += envelope_size;
15899 }
15900
15901 let next_out_of_line = decoder.next_out_of_line();
15902 let handles_before = decoder.remaining_handles();
15903 if let Some((inlined, num_bytes, num_handles)) =
15904 fidl::encoding::decode_envelope_header(decoder, next_offset)?
15905 {
15906 let member_inline_size =
15907 <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context);
15908 if inlined != (member_inline_size <= 4) {
15909 return Err(fidl::Error::InvalidInlineBitInEnvelope);
15910 }
15911 let inner_offset;
15912 let mut inner_depth = depth.clone();
15913 if inlined {
15914 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
15915 inner_offset = next_offset;
15916 } else {
15917 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
15918 inner_depth.increment()?;
15919 }
15920 let val_ref = self.artifact.get_or_insert_with(|| {
15921 fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect)
15922 });
15923 fidl::decode!(
15924 Artifact,
15925 fidl::encoding::DefaultFuchsiaResourceDialect,
15926 val_ref,
15927 decoder,
15928 inner_offset,
15929 inner_depth
15930 )?;
15931 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
15932 {
15933 return Err(fidl::Error::InvalidNumBytesInEnvelope);
15934 }
15935 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
15936 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
15937 }
15938 }
15939
15940 next_offset += envelope_size;
15941
15942 while next_offset < end_offset {
15944 _next_ordinal_to_read += 1;
15945 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
15946 next_offset += envelope_size;
15947 }
15948
15949 Ok(())
15950 }
15951 }
15952
15953 impl TestCaseFinishedEventDetails {
15954 #[inline(always)]
15955 fn max_ordinal_present(&self) -> u64 {
15956 if let Some(_) = self.test_case_id {
15957 return 1;
15958 }
15959 0
15960 }
15961 }
15962
15963 impl fidl::encoding::ValueTypeMarker for TestCaseFinishedEventDetails {
15964 type Borrowed<'a> = &'a Self;
15965 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
15966 value
15967 }
15968 }
15969
15970 unsafe impl fidl::encoding::TypeMarker for TestCaseFinishedEventDetails {
15971 type Owned = Self;
15972
15973 #[inline(always)]
15974 fn inline_align(_context: fidl::encoding::Context) -> usize {
15975 8
15976 }
15977
15978 #[inline(always)]
15979 fn inline_size(_context: fidl::encoding::Context) -> usize {
15980 16
15981 }
15982 }
15983
15984 unsafe impl<D: fidl::encoding::ResourceDialect>
15985 fidl::encoding::Encode<TestCaseFinishedEventDetails, D> for &TestCaseFinishedEventDetails
15986 {
15987 unsafe fn encode(
15988 self,
15989 encoder: &mut fidl::encoding::Encoder<'_, D>,
15990 offset: usize,
15991 mut depth: fidl::encoding::Depth,
15992 ) -> fidl::Result<()> {
15993 encoder.debug_check_bounds::<TestCaseFinishedEventDetails>(offset);
15994 let max_ordinal: u64 = self.max_ordinal_present();
15996 encoder.write_num(max_ordinal, offset);
15997 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
15998 if max_ordinal == 0 {
16000 return Ok(());
16001 }
16002 depth.increment()?;
16003 let envelope_size = 8;
16004 let bytes_len = max_ordinal as usize * envelope_size;
16005 #[allow(unused_variables)]
16006 let offset = encoder.out_of_line_offset(bytes_len);
16007 let mut _prev_end_offset: usize = 0;
16008 if 1 > max_ordinal {
16009 return Ok(());
16010 }
16011
16012 let cur_offset: usize = (1 - 1) * envelope_size;
16015
16016 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16018
16019 fidl::encoding::encode_in_envelope_optional::<u32, D>(
16024 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
16025 encoder,
16026 offset + cur_offset,
16027 depth,
16028 )?;
16029
16030 _prev_end_offset = cur_offset + envelope_size;
16031
16032 Ok(())
16033 }
16034 }
16035
16036 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16037 for TestCaseFinishedEventDetails
16038 {
16039 #[inline(always)]
16040 fn new_empty() -> Self {
16041 Self::default()
16042 }
16043
16044 unsafe fn decode(
16045 &mut self,
16046 decoder: &mut fidl::encoding::Decoder<'_, D>,
16047 offset: usize,
16048 mut depth: fidl::encoding::Depth,
16049 ) -> fidl::Result<()> {
16050 decoder.debug_check_bounds::<Self>(offset);
16051 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16052 None => return Err(fidl::Error::NotNullable),
16053 Some(len) => len,
16054 };
16055 if len == 0 {
16057 return Ok(());
16058 };
16059 depth.increment()?;
16060 let envelope_size = 8;
16061 let bytes_len = len * envelope_size;
16062 let offset = decoder.out_of_line_offset(bytes_len)?;
16063 let mut _next_ordinal_to_read = 0;
16065 let mut next_offset = offset;
16066 let end_offset = offset + bytes_len;
16067 _next_ordinal_to_read += 1;
16068 if next_offset >= end_offset {
16069 return Ok(());
16070 }
16071
16072 while _next_ordinal_to_read < 1 {
16074 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16075 _next_ordinal_to_read += 1;
16076 next_offset += envelope_size;
16077 }
16078
16079 let next_out_of_line = decoder.next_out_of_line();
16080 let handles_before = decoder.remaining_handles();
16081 if let Some((inlined, num_bytes, num_handles)) =
16082 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16083 {
16084 let member_inline_size =
16085 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16086 if inlined != (member_inline_size <= 4) {
16087 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16088 }
16089 let inner_offset;
16090 let mut inner_depth = depth.clone();
16091 if inlined {
16092 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16093 inner_offset = next_offset;
16094 } else {
16095 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16096 inner_depth.increment()?;
16097 }
16098 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
16099 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
16100 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16101 {
16102 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16103 }
16104 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16105 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16106 }
16107 }
16108
16109 next_offset += envelope_size;
16110
16111 while next_offset < end_offset {
16113 _next_ordinal_to_read += 1;
16114 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16115 next_offset += envelope_size;
16116 }
16117
16118 Ok(())
16119 }
16120 }
16121
16122 impl TestCaseFoundEventDetails {
16123 #[inline(always)]
16124 fn max_ordinal_present(&self) -> u64 {
16125 if let Some(_) = self.test_case_id {
16126 return 2;
16127 }
16128 if let Some(_) = self.test_case_name {
16129 return 1;
16130 }
16131 0
16132 }
16133 }
16134
16135 impl fidl::encoding::ValueTypeMarker for TestCaseFoundEventDetails {
16136 type Borrowed<'a> = &'a Self;
16137 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16138 value
16139 }
16140 }
16141
16142 unsafe impl fidl::encoding::TypeMarker for TestCaseFoundEventDetails {
16143 type Owned = Self;
16144
16145 #[inline(always)]
16146 fn inline_align(_context: fidl::encoding::Context) -> usize {
16147 8
16148 }
16149
16150 #[inline(always)]
16151 fn inline_size(_context: fidl::encoding::Context) -> usize {
16152 16
16153 }
16154 }
16155
16156 unsafe impl<D: fidl::encoding::ResourceDialect>
16157 fidl::encoding::Encode<TestCaseFoundEventDetails, D> for &TestCaseFoundEventDetails
16158 {
16159 unsafe fn encode(
16160 self,
16161 encoder: &mut fidl::encoding::Encoder<'_, D>,
16162 offset: usize,
16163 mut depth: fidl::encoding::Depth,
16164 ) -> fidl::Result<()> {
16165 encoder.debug_check_bounds::<TestCaseFoundEventDetails>(offset);
16166 let max_ordinal: u64 = self.max_ordinal_present();
16168 encoder.write_num(max_ordinal, offset);
16169 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16170 if max_ordinal == 0 {
16172 return Ok(());
16173 }
16174 depth.increment()?;
16175 let envelope_size = 8;
16176 let bytes_len = max_ordinal as usize * envelope_size;
16177 #[allow(unused_variables)]
16178 let offset = encoder.out_of_line_offset(bytes_len);
16179 let mut _prev_end_offset: usize = 0;
16180 if 1 > max_ordinal {
16181 return Ok(());
16182 }
16183
16184 let cur_offset: usize = (1 - 1) * envelope_size;
16187
16188 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16190
16191 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<2048>, D>(
16196 self.test_case_name.as_ref().map(<fidl::encoding::BoundedString<2048> as fidl::encoding::ValueTypeMarker>::borrow),
16197 encoder, offset + cur_offset, depth
16198 )?;
16199
16200 _prev_end_offset = cur_offset + envelope_size;
16201 if 2 > max_ordinal {
16202 return Ok(());
16203 }
16204
16205 let cur_offset: usize = (2 - 1) * envelope_size;
16208
16209 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16211
16212 fidl::encoding::encode_in_envelope_optional::<u32, D>(
16217 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
16218 encoder,
16219 offset + cur_offset,
16220 depth,
16221 )?;
16222
16223 _prev_end_offset = cur_offset + envelope_size;
16224
16225 Ok(())
16226 }
16227 }
16228
16229 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16230 for TestCaseFoundEventDetails
16231 {
16232 #[inline(always)]
16233 fn new_empty() -> Self {
16234 Self::default()
16235 }
16236
16237 unsafe fn decode(
16238 &mut self,
16239 decoder: &mut fidl::encoding::Decoder<'_, D>,
16240 offset: usize,
16241 mut depth: fidl::encoding::Depth,
16242 ) -> fidl::Result<()> {
16243 decoder.debug_check_bounds::<Self>(offset);
16244 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16245 None => return Err(fidl::Error::NotNullable),
16246 Some(len) => len,
16247 };
16248 if len == 0 {
16250 return Ok(());
16251 };
16252 depth.increment()?;
16253 let envelope_size = 8;
16254 let bytes_len = len * envelope_size;
16255 let offset = decoder.out_of_line_offset(bytes_len)?;
16256 let mut _next_ordinal_to_read = 0;
16258 let mut next_offset = offset;
16259 let end_offset = offset + bytes_len;
16260 _next_ordinal_to_read += 1;
16261 if next_offset >= end_offset {
16262 return Ok(());
16263 }
16264
16265 while _next_ordinal_to_read < 1 {
16267 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16268 _next_ordinal_to_read += 1;
16269 next_offset += envelope_size;
16270 }
16271
16272 let next_out_of_line = decoder.next_out_of_line();
16273 let handles_before = decoder.remaining_handles();
16274 if let Some((inlined, num_bytes, num_handles)) =
16275 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16276 {
16277 let member_inline_size = <fidl::encoding::BoundedString<2048> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16278 if inlined != (member_inline_size <= 4) {
16279 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16280 }
16281 let inner_offset;
16282 let mut inner_depth = depth.clone();
16283 if inlined {
16284 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16285 inner_offset = next_offset;
16286 } else {
16287 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16288 inner_depth.increment()?;
16289 }
16290 let val_ref = self.test_case_name.get_or_insert_with(|| {
16291 fidl::new_empty!(fidl::encoding::BoundedString<2048>, D)
16292 });
16293 fidl::decode!(
16294 fidl::encoding::BoundedString<2048>,
16295 D,
16296 val_ref,
16297 decoder,
16298 inner_offset,
16299 inner_depth
16300 )?;
16301 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16302 {
16303 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16304 }
16305 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16306 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16307 }
16308 }
16309
16310 next_offset += envelope_size;
16311 _next_ordinal_to_read += 1;
16312 if next_offset >= end_offset {
16313 return Ok(());
16314 }
16315
16316 while _next_ordinal_to_read < 2 {
16318 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16319 _next_ordinal_to_read += 1;
16320 next_offset += envelope_size;
16321 }
16322
16323 let next_out_of_line = decoder.next_out_of_line();
16324 let handles_before = decoder.remaining_handles();
16325 if let Some((inlined, num_bytes, num_handles)) =
16326 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16327 {
16328 let member_inline_size =
16329 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16330 if inlined != (member_inline_size <= 4) {
16331 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16332 }
16333 let inner_offset;
16334 let mut inner_depth = depth.clone();
16335 if inlined {
16336 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16337 inner_offset = next_offset;
16338 } else {
16339 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16340 inner_depth.increment()?;
16341 }
16342 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
16343 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
16344 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16345 {
16346 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16347 }
16348 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16349 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16350 }
16351 }
16352
16353 next_offset += envelope_size;
16354
16355 while next_offset < end_offset {
16357 _next_ordinal_to_read += 1;
16358 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16359 next_offset += envelope_size;
16360 }
16361
16362 Ok(())
16363 }
16364 }
16365
16366 impl TestCaseStartedEventDetails {
16367 #[inline(always)]
16368 fn max_ordinal_present(&self) -> u64 {
16369 if let Some(_) = self.test_case_id {
16370 return 1;
16371 }
16372 0
16373 }
16374 }
16375
16376 impl fidl::encoding::ValueTypeMarker for TestCaseStartedEventDetails {
16377 type Borrowed<'a> = &'a Self;
16378 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16379 value
16380 }
16381 }
16382
16383 unsafe impl fidl::encoding::TypeMarker for TestCaseStartedEventDetails {
16384 type Owned = Self;
16385
16386 #[inline(always)]
16387 fn inline_align(_context: fidl::encoding::Context) -> usize {
16388 8
16389 }
16390
16391 #[inline(always)]
16392 fn inline_size(_context: fidl::encoding::Context) -> usize {
16393 16
16394 }
16395 }
16396
16397 unsafe impl<D: fidl::encoding::ResourceDialect>
16398 fidl::encoding::Encode<TestCaseStartedEventDetails, D> for &TestCaseStartedEventDetails
16399 {
16400 unsafe fn encode(
16401 self,
16402 encoder: &mut fidl::encoding::Encoder<'_, D>,
16403 offset: usize,
16404 mut depth: fidl::encoding::Depth,
16405 ) -> fidl::Result<()> {
16406 encoder.debug_check_bounds::<TestCaseStartedEventDetails>(offset);
16407 let max_ordinal: u64 = self.max_ordinal_present();
16409 encoder.write_num(max_ordinal, offset);
16410 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16411 if max_ordinal == 0 {
16413 return Ok(());
16414 }
16415 depth.increment()?;
16416 let envelope_size = 8;
16417 let bytes_len = max_ordinal as usize * envelope_size;
16418 #[allow(unused_variables)]
16419 let offset = encoder.out_of_line_offset(bytes_len);
16420 let mut _prev_end_offset: usize = 0;
16421 if 1 > max_ordinal {
16422 return Ok(());
16423 }
16424
16425 let cur_offset: usize = (1 - 1) * envelope_size;
16428
16429 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16431
16432 fidl::encoding::encode_in_envelope_optional::<u32, D>(
16437 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
16438 encoder,
16439 offset + cur_offset,
16440 depth,
16441 )?;
16442
16443 _prev_end_offset = cur_offset + envelope_size;
16444
16445 Ok(())
16446 }
16447 }
16448
16449 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16450 for TestCaseStartedEventDetails
16451 {
16452 #[inline(always)]
16453 fn new_empty() -> Self {
16454 Self::default()
16455 }
16456
16457 unsafe fn decode(
16458 &mut self,
16459 decoder: &mut fidl::encoding::Decoder<'_, D>,
16460 offset: usize,
16461 mut depth: fidl::encoding::Depth,
16462 ) -> fidl::Result<()> {
16463 decoder.debug_check_bounds::<Self>(offset);
16464 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16465 None => return Err(fidl::Error::NotNullable),
16466 Some(len) => len,
16467 };
16468 if len == 0 {
16470 return Ok(());
16471 };
16472 depth.increment()?;
16473 let envelope_size = 8;
16474 let bytes_len = len * envelope_size;
16475 let offset = decoder.out_of_line_offset(bytes_len)?;
16476 let mut _next_ordinal_to_read = 0;
16478 let mut next_offset = offset;
16479 let end_offset = offset + bytes_len;
16480 _next_ordinal_to_read += 1;
16481 if next_offset >= end_offset {
16482 return Ok(());
16483 }
16484
16485 while _next_ordinal_to_read < 1 {
16487 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16488 _next_ordinal_to_read += 1;
16489 next_offset += envelope_size;
16490 }
16491
16492 let next_out_of_line = decoder.next_out_of_line();
16493 let handles_before = decoder.remaining_handles();
16494 if let Some((inlined, num_bytes, num_handles)) =
16495 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16496 {
16497 let member_inline_size =
16498 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16499 if inlined != (member_inline_size <= 4) {
16500 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16501 }
16502 let inner_offset;
16503 let mut inner_depth = depth.clone();
16504 if inlined {
16505 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16506 inner_offset = next_offset;
16507 } else {
16508 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16509 inner_depth.increment()?;
16510 }
16511 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
16512 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
16513 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16514 {
16515 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16516 }
16517 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16518 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16519 }
16520 }
16521
16522 next_offset += envelope_size;
16523
16524 while next_offset < end_offset {
16526 _next_ordinal_to_read += 1;
16527 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16528 next_offset += envelope_size;
16529 }
16530
16531 Ok(())
16532 }
16533 }
16534
16535 impl TestCaseStoppedEventDetails {
16536 #[inline(always)]
16537 fn max_ordinal_present(&self) -> u64 {
16538 if let Some(_) = self.result {
16539 return 2;
16540 }
16541 if let Some(_) = self.test_case_id {
16542 return 1;
16543 }
16544 0
16545 }
16546 }
16547
16548 impl fidl::encoding::ValueTypeMarker for TestCaseStoppedEventDetails {
16549 type Borrowed<'a> = &'a Self;
16550 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
16551 value
16552 }
16553 }
16554
16555 unsafe impl fidl::encoding::TypeMarker for TestCaseStoppedEventDetails {
16556 type Owned = Self;
16557
16558 #[inline(always)]
16559 fn inline_align(_context: fidl::encoding::Context) -> usize {
16560 8
16561 }
16562
16563 #[inline(always)]
16564 fn inline_size(_context: fidl::encoding::Context) -> usize {
16565 16
16566 }
16567 }
16568
16569 unsafe impl<D: fidl::encoding::ResourceDialect>
16570 fidl::encoding::Encode<TestCaseStoppedEventDetails, D> for &TestCaseStoppedEventDetails
16571 {
16572 unsafe fn encode(
16573 self,
16574 encoder: &mut fidl::encoding::Encoder<'_, D>,
16575 offset: usize,
16576 mut depth: fidl::encoding::Depth,
16577 ) -> fidl::Result<()> {
16578 encoder.debug_check_bounds::<TestCaseStoppedEventDetails>(offset);
16579 let max_ordinal: u64 = self.max_ordinal_present();
16581 encoder.write_num(max_ordinal, offset);
16582 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
16583 if max_ordinal == 0 {
16585 return Ok(());
16586 }
16587 depth.increment()?;
16588 let envelope_size = 8;
16589 let bytes_len = max_ordinal as usize * envelope_size;
16590 #[allow(unused_variables)]
16591 let offset = encoder.out_of_line_offset(bytes_len);
16592 let mut _prev_end_offset: usize = 0;
16593 if 1 > max_ordinal {
16594 return Ok(());
16595 }
16596
16597 let cur_offset: usize = (1 - 1) * envelope_size;
16600
16601 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16603
16604 fidl::encoding::encode_in_envelope_optional::<u32, D>(
16609 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
16610 encoder,
16611 offset + cur_offset,
16612 depth,
16613 )?;
16614
16615 _prev_end_offset = cur_offset + envelope_size;
16616 if 2 > max_ordinal {
16617 return Ok(());
16618 }
16619
16620 let cur_offset: usize = (2 - 1) * envelope_size;
16623
16624 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
16626
16627 fidl::encoding::encode_in_envelope_optional::<TestCaseResult, D>(
16632 self.result
16633 .as_ref()
16634 .map(<TestCaseResult as fidl::encoding::ValueTypeMarker>::borrow),
16635 encoder,
16636 offset + cur_offset,
16637 depth,
16638 )?;
16639
16640 _prev_end_offset = cur_offset + envelope_size;
16641
16642 Ok(())
16643 }
16644 }
16645
16646 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
16647 for TestCaseStoppedEventDetails
16648 {
16649 #[inline(always)]
16650 fn new_empty() -> Self {
16651 Self::default()
16652 }
16653
16654 unsafe fn decode(
16655 &mut self,
16656 decoder: &mut fidl::encoding::Decoder<'_, D>,
16657 offset: usize,
16658 mut depth: fidl::encoding::Depth,
16659 ) -> fidl::Result<()> {
16660 decoder.debug_check_bounds::<Self>(offset);
16661 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
16662 None => return Err(fidl::Error::NotNullable),
16663 Some(len) => len,
16664 };
16665 if len == 0 {
16667 return Ok(());
16668 };
16669 depth.increment()?;
16670 let envelope_size = 8;
16671 let bytes_len = len * envelope_size;
16672 let offset = decoder.out_of_line_offset(bytes_len)?;
16673 let mut _next_ordinal_to_read = 0;
16675 let mut next_offset = offset;
16676 let end_offset = offset + bytes_len;
16677 _next_ordinal_to_read += 1;
16678 if next_offset >= end_offset {
16679 return Ok(());
16680 }
16681
16682 while _next_ordinal_to_read < 1 {
16684 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16685 _next_ordinal_to_read += 1;
16686 next_offset += envelope_size;
16687 }
16688
16689 let next_out_of_line = decoder.next_out_of_line();
16690 let handles_before = decoder.remaining_handles();
16691 if let Some((inlined, num_bytes, num_handles)) =
16692 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16693 {
16694 let member_inline_size =
16695 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16696 if inlined != (member_inline_size <= 4) {
16697 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16698 }
16699 let inner_offset;
16700 let mut inner_depth = depth.clone();
16701 if inlined {
16702 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16703 inner_offset = next_offset;
16704 } else {
16705 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16706 inner_depth.increment()?;
16707 }
16708 let val_ref = self.test_case_id.get_or_insert_with(|| fidl::new_empty!(u32, D));
16709 fidl::decode!(u32, D, val_ref, decoder, inner_offset, inner_depth)?;
16710 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16711 {
16712 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16713 }
16714 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16715 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16716 }
16717 }
16718
16719 next_offset += envelope_size;
16720 _next_ordinal_to_read += 1;
16721 if next_offset >= end_offset {
16722 return Ok(());
16723 }
16724
16725 while _next_ordinal_to_read < 2 {
16727 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16728 _next_ordinal_to_read += 1;
16729 next_offset += envelope_size;
16730 }
16731
16732 let next_out_of_line = decoder.next_out_of_line();
16733 let handles_before = decoder.remaining_handles();
16734 if let Some((inlined, num_bytes, num_handles)) =
16735 fidl::encoding::decode_envelope_header(decoder, next_offset)?
16736 {
16737 let member_inline_size =
16738 <TestCaseResult as fidl::encoding::TypeMarker>::inline_size(decoder.context);
16739 if inlined != (member_inline_size <= 4) {
16740 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16741 }
16742 let inner_offset;
16743 let mut inner_depth = depth.clone();
16744 if inlined {
16745 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
16746 inner_offset = next_offset;
16747 } else {
16748 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16749 inner_depth.increment()?;
16750 }
16751 let val_ref =
16752 self.result.get_or_insert_with(|| fidl::new_empty!(TestCaseResult, D));
16753 fidl::decode!(TestCaseResult, D, val_ref, decoder, inner_offset, inner_depth)?;
16754 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
16755 {
16756 return Err(fidl::Error::InvalidNumBytesInEnvelope);
16757 }
16758 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
16759 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
16760 }
16761 }
16762
16763 next_offset += envelope_size;
16764
16765 while next_offset < end_offset {
16767 _next_ordinal_to_read += 1;
16768 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
16769 next_offset += envelope_size;
16770 }
16771
16772 Ok(())
16773 }
16774 }
16775
16776 impl fidl::encoding::ResourceTypeMarker for Artifact {
16777 type Borrowed<'a> = &'a mut Self;
16778 fn take_or_borrow<'a>(
16779 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
16780 ) -> Self::Borrowed<'a> {
16781 value
16782 }
16783 }
16784
16785 unsafe impl fidl::encoding::TypeMarker for Artifact {
16786 type Owned = Self;
16787
16788 #[inline(always)]
16789 fn inline_align(_context: fidl::encoding::Context) -> usize {
16790 8
16791 }
16792
16793 #[inline(always)]
16794 fn inline_size(_context: fidl::encoding::Context) -> usize {
16795 16
16796 }
16797 }
16798
16799 unsafe impl fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
16800 for &mut Artifact
16801 {
16802 #[inline]
16803 unsafe fn encode(
16804 self,
16805 encoder: &mut fidl::encoding::Encoder<
16806 '_,
16807 fidl::encoding::DefaultFuchsiaResourceDialect,
16808 >,
16809 offset: usize,
16810 _depth: fidl::encoding::Depth,
16811 ) -> fidl::Result<()> {
16812 encoder.debug_check_bounds::<Artifact>(offset);
16813 encoder.write_num::<u64>(self.ordinal(), offset);
16814 match self {
16815 Artifact::Stdout(ref mut val) => fidl::encoding::encode_in_envelope::<
16816 fidl::encoding::HandleType<
16817 fidl::Socket,
16818 { fidl::ObjectType::SOCKET.into_raw() },
16819 2147483648,
16820 >,
16821 fidl::encoding::DefaultFuchsiaResourceDialect,
16822 >(
16823 <fidl::encoding::HandleType<
16824 fidl::Socket,
16825 { fidl::ObjectType::SOCKET.into_raw() },
16826 2147483648,
16827 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
16828 val
16829 ),
16830 encoder,
16831 offset + 8,
16832 _depth,
16833 ),
16834 Artifact::Stderr(ref mut val) => fidl::encoding::encode_in_envelope::<
16835 fidl::encoding::HandleType<
16836 fidl::Socket,
16837 { fidl::ObjectType::SOCKET.into_raw() },
16838 2147483648,
16839 >,
16840 fidl::encoding::DefaultFuchsiaResourceDialect,
16841 >(
16842 <fidl::encoding::HandleType<
16843 fidl::Socket,
16844 { fidl::ObjectType::SOCKET.into_raw() },
16845 2147483648,
16846 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
16847 val
16848 ),
16849 encoder,
16850 offset + 8,
16851 _depth,
16852 ),
16853 Artifact::Log(ref mut val) => fidl::encoding::encode_in_envelope::<
16854 Syslog,
16855 fidl::encoding::DefaultFuchsiaResourceDialect,
16856 >(
16857 <Syslog as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
16858 encoder,
16859 offset + 8,
16860 _depth,
16861 ),
16862 Artifact::Custom(ref mut val) => fidl::encoding::encode_in_envelope::<
16863 CustomArtifact,
16864 fidl::encoding::DefaultFuchsiaResourceDialect,
16865 >(
16866 <CustomArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
16867 encoder,
16868 offset + 8,
16869 _depth,
16870 ),
16871 Artifact::DebugData(ref mut val) => {
16872 fidl::encoding::encode_in_envelope::<
16873 fidl::encoding::Endpoint<
16874 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
16875 >,
16876 fidl::encoding::DefaultFuchsiaResourceDialect,
16877 >(
16878 <fidl::encoding::Endpoint<
16879 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
16880 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
16881 val
16882 ),
16883 encoder,
16884 offset + 8,
16885 _depth,
16886 )
16887 }
16888 Artifact::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
16889 }
16890 }
16891 }
16892
16893 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {
16894 #[inline(always)]
16895 fn new_empty() -> Self {
16896 Self::__SourceBreaking { unknown_ordinal: 0 }
16897 }
16898
16899 #[inline]
16900 unsafe fn decode(
16901 &mut self,
16902 decoder: &mut fidl::encoding::Decoder<
16903 '_,
16904 fidl::encoding::DefaultFuchsiaResourceDialect,
16905 >,
16906 offset: usize,
16907 mut depth: fidl::encoding::Depth,
16908 ) -> fidl::Result<()> {
16909 decoder.debug_check_bounds::<Self>(offset);
16910 #[allow(unused_variables)]
16911 let next_out_of_line = decoder.next_out_of_line();
16912 let handles_before = decoder.remaining_handles();
16913 let (ordinal, inlined, num_bytes, num_handles) =
16914 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
16915
16916 let member_inline_size =
16917 match ordinal {
16918 1 => <fidl::encoding::HandleType<
16919 fidl::Socket,
16920 { fidl::ObjectType::SOCKET.into_raw() },
16921 2147483648,
16922 > as fidl::encoding::TypeMarker>::inline_size(
16923 decoder.context
16924 ),
16925 2 => <fidl::encoding::HandleType<
16926 fidl::Socket,
16927 { fidl::ObjectType::SOCKET.into_raw() },
16928 2147483648,
16929 > as fidl::encoding::TypeMarker>::inline_size(
16930 decoder.context
16931 ),
16932 3 => <Syslog as fidl::encoding::TypeMarker>::inline_size(decoder.context),
16933 4 => {
16934 <CustomArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context)
16935 }
16936 5 => <fidl::encoding::Endpoint<
16937 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
16938 > as fidl::encoding::TypeMarker>::inline_size(
16939 decoder.context
16940 ),
16941 0 => return Err(fidl::Error::UnknownUnionTag),
16942 _ => num_bytes as usize,
16943 };
16944
16945 if inlined != (member_inline_size <= 4) {
16946 return Err(fidl::Error::InvalidInlineBitInEnvelope);
16947 }
16948 let _inner_offset;
16949 if inlined {
16950 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
16951 _inner_offset = offset + 8;
16952 } else {
16953 depth.increment()?;
16954 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
16955 }
16956 match ordinal {
16957 1 => {
16958 #[allow(irrefutable_let_patterns)]
16959 if let Artifact::Stdout(_) = self {
16960 } else {
16962 *self = Artifact::Stdout(
16964 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
16965 );
16966 }
16967 #[allow(irrefutable_let_patterns)]
16968 if let Artifact::Stdout(ref mut val) = self {
16969 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
16970 } else {
16971 unreachable!()
16972 }
16973 }
16974 2 => {
16975 #[allow(irrefutable_let_patterns)]
16976 if let Artifact::Stderr(_) = self {
16977 } else {
16979 *self = Artifact::Stderr(
16981 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
16982 );
16983 }
16984 #[allow(irrefutable_let_patterns)]
16985 if let Artifact::Stderr(ref mut val) = self {
16986 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
16987 } else {
16988 unreachable!()
16989 }
16990 }
16991 3 => {
16992 #[allow(irrefutable_let_patterns)]
16993 if let Artifact::Log(_) = self {
16994 } else {
16996 *self = Artifact::Log(fidl::new_empty!(
16998 Syslog,
16999 fidl::encoding::DefaultFuchsiaResourceDialect
17000 ));
17001 }
17002 #[allow(irrefutable_let_patterns)]
17003 if let Artifact::Log(ref mut val) = self {
17004 fidl::decode!(
17005 Syslog,
17006 fidl::encoding::DefaultFuchsiaResourceDialect,
17007 val,
17008 decoder,
17009 _inner_offset,
17010 depth
17011 )?;
17012 } else {
17013 unreachable!()
17014 }
17015 }
17016 4 => {
17017 #[allow(irrefutable_let_patterns)]
17018 if let Artifact::Custom(_) = self {
17019 } else {
17021 *self = Artifact::Custom(fidl::new_empty!(
17023 CustomArtifact,
17024 fidl::encoding::DefaultFuchsiaResourceDialect
17025 ));
17026 }
17027 #[allow(irrefutable_let_patterns)]
17028 if let Artifact::Custom(ref mut val) = self {
17029 fidl::decode!(
17030 CustomArtifact,
17031 fidl::encoding::DefaultFuchsiaResourceDialect,
17032 val,
17033 decoder,
17034 _inner_offset,
17035 depth
17036 )?;
17037 } else {
17038 unreachable!()
17039 }
17040 }
17041 5 => {
17042 #[allow(irrefutable_let_patterns)]
17043 if let Artifact::DebugData(_) = self {
17044 } else {
17046 *self = Artifact::DebugData(fidl::new_empty!(
17048 fidl::encoding::Endpoint<
17049 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
17050 >,
17051 fidl::encoding::DefaultFuchsiaResourceDialect
17052 ));
17053 }
17054 #[allow(irrefutable_let_patterns)]
17055 if let Artifact::DebugData(ref mut val) = self {
17056 fidl::decode!(
17057 fidl::encoding::Endpoint<
17058 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
17059 >,
17060 fidl::encoding::DefaultFuchsiaResourceDialect,
17061 val,
17062 decoder,
17063 _inner_offset,
17064 depth
17065 )?;
17066 } else {
17067 unreachable!()
17068 }
17069 }
17070 #[allow(deprecated)]
17071 ordinal => {
17072 for _ in 0..num_handles {
17073 decoder.drop_next_handle()?;
17074 }
17075 *self = Artifact::__SourceBreaking { unknown_ordinal: ordinal };
17076 }
17077 }
17078 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
17079 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17080 }
17081 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17082 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17083 }
17084 Ok(())
17085 }
17086 }
17087
17088 impl fidl::encoding::ResourceTypeMarker for EventDetails {
17089 type Borrowed<'a> = &'a mut Self;
17090 fn take_or_borrow<'a>(
17091 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17092 ) -> Self::Borrowed<'a> {
17093 value
17094 }
17095 }
17096
17097 unsafe impl fidl::encoding::TypeMarker for EventDetails {
17098 type Owned = Self;
17099
17100 #[inline(always)]
17101 fn inline_align(_context: fidl::encoding::Context) -> usize {
17102 8
17103 }
17104
17105 #[inline(always)]
17106 fn inline_size(_context: fidl::encoding::Context) -> usize {
17107 16
17108 }
17109 }
17110
17111 unsafe impl fidl::encoding::Encode<EventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>
17112 for &mut EventDetails
17113 {
17114 #[inline]
17115 unsafe fn encode(
17116 self,
17117 encoder: &mut fidl::encoding::Encoder<
17118 '_,
17119 fidl::encoding::DefaultFuchsiaResourceDialect,
17120 >,
17121 offset: usize,
17122 _depth: fidl::encoding::Depth,
17123 ) -> fidl::Result<()> {
17124 encoder.debug_check_bounds::<EventDetails>(offset);
17125 encoder.write_num::<u64>(self.ordinal(), offset);
17126 match self {
17127 EventDetails::SuiteStarted(ref val) => {
17128 fidl::encoding::encode_in_envelope::<SuiteStartedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17129 <SuiteStartedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17130 encoder, offset + 8, _depth
17131 )
17132 }
17133 EventDetails::TestCaseFound(ref val) => {
17134 fidl::encoding::encode_in_envelope::<TestCaseFoundEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17135 <TestCaseFoundEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17136 encoder, offset + 8, _depth
17137 )
17138 }
17139 EventDetails::TestCaseStarted(ref val) => {
17140 fidl::encoding::encode_in_envelope::<TestCaseStartedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17141 <TestCaseStartedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17142 encoder, offset + 8, _depth
17143 )
17144 }
17145 EventDetails::TestCaseArtifactGenerated(ref mut val) => {
17146 fidl::encoding::encode_in_envelope::<TestCaseArtifactGeneratedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17147 <TestCaseArtifactGeneratedEventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
17148 encoder, offset + 8, _depth
17149 )
17150 }
17151 EventDetails::TestCaseStopped(ref val) => {
17152 fidl::encoding::encode_in_envelope::<TestCaseStoppedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17153 <TestCaseStoppedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17154 encoder, offset + 8, _depth
17155 )
17156 }
17157 EventDetails::TestCaseFinished(ref val) => {
17158 fidl::encoding::encode_in_envelope::<TestCaseFinishedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17159 <TestCaseFinishedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17160 encoder, offset + 8, _depth
17161 )
17162 }
17163 EventDetails::SuiteArtifactGenerated(ref mut val) => {
17164 fidl::encoding::encode_in_envelope::<SuiteArtifactGeneratedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17165 <SuiteArtifactGeneratedEventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
17166 encoder, offset + 8, _depth
17167 )
17168 }
17169 EventDetails::SuiteStopped(ref val) => {
17170 fidl::encoding::encode_in_envelope::<SuiteStoppedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
17171 <SuiteStoppedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
17172 encoder, offset + 8, _depth
17173 )
17174 }
17175 EventDetails::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
17176 }
17177 }
17178 }
17179
17180 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for EventDetails {
17181 #[inline(always)]
17182 fn new_empty() -> Self {
17183 Self::__SourceBreaking { unknown_ordinal: 0 }
17184 }
17185
17186 #[inline]
17187 unsafe fn decode(
17188 &mut self,
17189 decoder: &mut fidl::encoding::Decoder<
17190 '_,
17191 fidl::encoding::DefaultFuchsiaResourceDialect,
17192 >,
17193 offset: usize,
17194 mut depth: fidl::encoding::Depth,
17195 ) -> fidl::Result<()> {
17196 decoder.debug_check_bounds::<Self>(offset);
17197 #[allow(unused_variables)]
17198 let next_out_of_line = decoder.next_out_of_line();
17199 let handles_before = decoder.remaining_handles();
17200 let (ordinal, inlined, num_bytes, num_handles) =
17201 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
17202
17203 let member_inline_size = match ordinal {
17204 1 => <SuiteStartedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17205 2 => <TestCaseFoundEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17206 3 => <TestCaseStartedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17207 4 => <TestCaseArtifactGeneratedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17208 5 => <TestCaseStoppedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17209 6 => <TestCaseFinishedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17210 7 => <SuiteArtifactGeneratedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17211 8 => <SuiteStoppedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17212 0 => return Err(fidl::Error::UnknownUnionTag),
17213 _ => num_bytes as usize,
17214 };
17215
17216 if inlined != (member_inline_size <= 4) {
17217 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17218 }
17219 let _inner_offset;
17220 if inlined {
17221 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
17222 _inner_offset = offset + 8;
17223 } else {
17224 depth.increment()?;
17225 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17226 }
17227 match ordinal {
17228 1 => {
17229 #[allow(irrefutable_let_patterns)]
17230 if let EventDetails::SuiteStarted(_) = self {
17231 } else {
17233 *self = EventDetails::SuiteStarted(fidl::new_empty!(
17235 SuiteStartedEventDetails,
17236 fidl::encoding::DefaultFuchsiaResourceDialect
17237 ));
17238 }
17239 #[allow(irrefutable_let_patterns)]
17240 if let EventDetails::SuiteStarted(ref mut val) = self {
17241 fidl::decode!(
17242 SuiteStartedEventDetails,
17243 fidl::encoding::DefaultFuchsiaResourceDialect,
17244 val,
17245 decoder,
17246 _inner_offset,
17247 depth
17248 )?;
17249 } else {
17250 unreachable!()
17251 }
17252 }
17253 2 => {
17254 #[allow(irrefutable_let_patterns)]
17255 if let EventDetails::TestCaseFound(_) = self {
17256 } else {
17258 *self = EventDetails::TestCaseFound(fidl::new_empty!(
17260 TestCaseFoundEventDetails,
17261 fidl::encoding::DefaultFuchsiaResourceDialect
17262 ));
17263 }
17264 #[allow(irrefutable_let_patterns)]
17265 if let EventDetails::TestCaseFound(ref mut val) = self {
17266 fidl::decode!(
17267 TestCaseFoundEventDetails,
17268 fidl::encoding::DefaultFuchsiaResourceDialect,
17269 val,
17270 decoder,
17271 _inner_offset,
17272 depth
17273 )?;
17274 } else {
17275 unreachable!()
17276 }
17277 }
17278 3 => {
17279 #[allow(irrefutable_let_patterns)]
17280 if let EventDetails::TestCaseStarted(_) = self {
17281 } else {
17283 *self = EventDetails::TestCaseStarted(fidl::new_empty!(
17285 TestCaseStartedEventDetails,
17286 fidl::encoding::DefaultFuchsiaResourceDialect
17287 ));
17288 }
17289 #[allow(irrefutable_let_patterns)]
17290 if let EventDetails::TestCaseStarted(ref mut val) = self {
17291 fidl::decode!(
17292 TestCaseStartedEventDetails,
17293 fidl::encoding::DefaultFuchsiaResourceDialect,
17294 val,
17295 decoder,
17296 _inner_offset,
17297 depth
17298 )?;
17299 } else {
17300 unreachable!()
17301 }
17302 }
17303 4 => {
17304 #[allow(irrefutable_let_patterns)]
17305 if let EventDetails::TestCaseArtifactGenerated(_) = self {
17306 } else {
17308 *self = EventDetails::TestCaseArtifactGenerated(fidl::new_empty!(
17310 TestCaseArtifactGeneratedEventDetails,
17311 fidl::encoding::DefaultFuchsiaResourceDialect
17312 ));
17313 }
17314 #[allow(irrefutable_let_patterns)]
17315 if let EventDetails::TestCaseArtifactGenerated(ref mut val) = self {
17316 fidl::decode!(
17317 TestCaseArtifactGeneratedEventDetails,
17318 fidl::encoding::DefaultFuchsiaResourceDialect,
17319 val,
17320 decoder,
17321 _inner_offset,
17322 depth
17323 )?;
17324 } else {
17325 unreachable!()
17326 }
17327 }
17328 5 => {
17329 #[allow(irrefutable_let_patterns)]
17330 if let EventDetails::TestCaseStopped(_) = self {
17331 } else {
17333 *self = EventDetails::TestCaseStopped(fidl::new_empty!(
17335 TestCaseStoppedEventDetails,
17336 fidl::encoding::DefaultFuchsiaResourceDialect
17337 ));
17338 }
17339 #[allow(irrefutable_let_patterns)]
17340 if let EventDetails::TestCaseStopped(ref mut val) = self {
17341 fidl::decode!(
17342 TestCaseStoppedEventDetails,
17343 fidl::encoding::DefaultFuchsiaResourceDialect,
17344 val,
17345 decoder,
17346 _inner_offset,
17347 depth
17348 )?;
17349 } else {
17350 unreachable!()
17351 }
17352 }
17353 6 => {
17354 #[allow(irrefutable_let_patterns)]
17355 if let EventDetails::TestCaseFinished(_) = self {
17356 } else {
17358 *self = EventDetails::TestCaseFinished(fidl::new_empty!(
17360 TestCaseFinishedEventDetails,
17361 fidl::encoding::DefaultFuchsiaResourceDialect
17362 ));
17363 }
17364 #[allow(irrefutable_let_patterns)]
17365 if let EventDetails::TestCaseFinished(ref mut val) = self {
17366 fidl::decode!(
17367 TestCaseFinishedEventDetails,
17368 fidl::encoding::DefaultFuchsiaResourceDialect,
17369 val,
17370 decoder,
17371 _inner_offset,
17372 depth
17373 )?;
17374 } else {
17375 unreachable!()
17376 }
17377 }
17378 7 => {
17379 #[allow(irrefutable_let_patterns)]
17380 if let EventDetails::SuiteArtifactGenerated(_) = self {
17381 } else {
17383 *self = EventDetails::SuiteArtifactGenerated(fidl::new_empty!(
17385 SuiteArtifactGeneratedEventDetails,
17386 fidl::encoding::DefaultFuchsiaResourceDialect
17387 ));
17388 }
17389 #[allow(irrefutable_let_patterns)]
17390 if let EventDetails::SuiteArtifactGenerated(ref mut val) = self {
17391 fidl::decode!(
17392 SuiteArtifactGeneratedEventDetails,
17393 fidl::encoding::DefaultFuchsiaResourceDialect,
17394 val,
17395 decoder,
17396 _inner_offset,
17397 depth
17398 )?;
17399 } else {
17400 unreachable!()
17401 }
17402 }
17403 8 => {
17404 #[allow(irrefutable_let_patterns)]
17405 if let EventDetails::SuiteStopped(_) = self {
17406 } else {
17408 *self = EventDetails::SuiteStopped(fidl::new_empty!(
17410 SuiteStoppedEventDetails,
17411 fidl::encoding::DefaultFuchsiaResourceDialect
17412 ));
17413 }
17414 #[allow(irrefutable_let_patterns)]
17415 if let EventDetails::SuiteStopped(ref mut val) = self {
17416 fidl::decode!(
17417 SuiteStoppedEventDetails,
17418 fidl::encoding::DefaultFuchsiaResourceDialect,
17419 val,
17420 decoder,
17421 _inner_offset,
17422 depth
17423 )?;
17424 } else {
17425 unreachable!()
17426 }
17427 }
17428 #[allow(deprecated)]
17429 ordinal => {
17430 for _ in 0..num_handles {
17431 decoder.drop_next_handle()?;
17432 }
17433 *self = EventDetails::__SourceBreaking { unknown_ordinal: ordinal };
17434 }
17435 }
17436 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
17437 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17438 }
17439 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17440 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17441 }
17442 Ok(())
17443 }
17444 }
17445
17446 impl fidl::encoding::ResourceTypeMarker for LogsIterator {
17447 type Borrowed<'a> = &'a mut Self;
17448 fn take_or_borrow<'a>(
17449 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17450 ) -> Self::Borrowed<'a> {
17451 value
17452 }
17453 }
17454
17455 unsafe impl fidl::encoding::TypeMarker for LogsIterator {
17456 type Owned = Self;
17457
17458 #[inline(always)]
17459 fn inline_align(_context: fidl::encoding::Context) -> usize {
17460 8
17461 }
17462
17463 #[inline(always)]
17464 fn inline_size(_context: fidl::encoding::Context) -> usize {
17465 16
17466 }
17467 }
17468
17469 unsafe impl fidl::encoding::Encode<LogsIterator, fidl::encoding::DefaultFuchsiaResourceDialect>
17470 for &mut LogsIterator
17471 {
17472 #[inline]
17473 unsafe fn encode(
17474 self,
17475 encoder: &mut fidl::encoding::Encoder<
17476 '_,
17477 fidl::encoding::DefaultFuchsiaResourceDialect,
17478 >,
17479 offset: usize,
17480 _depth: fidl::encoding::Depth,
17481 ) -> fidl::Result<()> {
17482 encoder.debug_check_bounds::<LogsIterator>(offset);
17483 encoder.write_num::<u64>(self.ordinal(), offset);
17484 match self {
17485 LogsIterator::Batch(ref mut val) => fidl::encoding::encode_in_envelope::<
17486 fidl::encoding::Endpoint<
17487 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
17488 >,
17489 fidl::encoding::DefaultFuchsiaResourceDialect,
17490 >(
17491 <fidl::encoding::Endpoint<
17492 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
17493 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17494 val
17495 ),
17496 encoder,
17497 offset + 8,
17498 _depth,
17499 ),
17500 LogsIterator::Stream(ref mut val) => fidl::encoding::encode_in_envelope::<
17501 fidl::encoding::HandleType<
17502 fidl::Socket,
17503 { fidl::ObjectType::SOCKET.into_raw() },
17504 16392,
17505 >,
17506 fidl::encoding::DefaultFuchsiaResourceDialect,
17507 >(
17508 <fidl::encoding::HandleType<
17509 fidl::Socket,
17510 { fidl::ObjectType::SOCKET.into_raw() },
17511 16392,
17512 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
17513 val
17514 ),
17515 encoder,
17516 offset + 8,
17517 _depth,
17518 ),
17519 LogsIterator::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
17520 }
17521 }
17522 }
17523
17524 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LogsIterator {
17525 #[inline(always)]
17526 fn new_empty() -> Self {
17527 Self::__SourceBreaking { unknown_ordinal: 0 }
17528 }
17529
17530 #[inline]
17531 unsafe fn decode(
17532 &mut self,
17533 decoder: &mut fidl::encoding::Decoder<
17534 '_,
17535 fidl::encoding::DefaultFuchsiaResourceDialect,
17536 >,
17537 offset: usize,
17538 mut depth: fidl::encoding::Depth,
17539 ) -> fidl::Result<()> {
17540 decoder.debug_check_bounds::<Self>(offset);
17541 #[allow(unused_variables)]
17542 let next_out_of_line = decoder.next_out_of_line();
17543 let handles_before = decoder.remaining_handles();
17544 let (ordinal, inlined, num_bytes, num_handles) =
17545 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
17546
17547 let member_inline_size = match ordinal {
17548 2 => <fidl::encoding::Endpoint<
17549 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
17550 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17551 3 => <fidl::encoding::HandleType<
17552 fidl::Socket,
17553 { fidl::ObjectType::SOCKET.into_raw() },
17554 16392,
17555 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17556 0 => return Err(fidl::Error::UnknownUnionTag),
17557 _ => num_bytes as usize,
17558 };
17559
17560 if inlined != (member_inline_size <= 4) {
17561 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17562 }
17563 let _inner_offset;
17564 if inlined {
17565 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
17566 _inner_offset = offset + 8;
17567 } else {
17568 depth.increment()?;
17569 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17570 }
17571 match ordinal {
17572 2 => {
17573 #[allow(irrefutable_let_patterns)]
17574 if let LogsIterator::Batch(_) = self {
17575 } else {
17577 *self = LogsIterator::Batch(fidl::new_empty!(
17579 fidl::encoding::Endpoint<
17580 fidl::endpoints::ServerEnd<
17581 fidl_fuchsia_diagnostics::BatchIteratorMarker,
17582 >,
17583 >,
17584 fidl::encoding::DefaultFuchsiaResourceDialect
17585 ));
17586 }
17587 #[allow(irrefutable_let_patterns)]
17588 if let LogsIterator::Batch(ref mut val) = self {
17589 fidl::decode!(
17590 fidl::encoding::Endpoint<
17591 fidl::endpoints::ServerEnd<
17592 fidl_fuchsia_diagnostics::BatchIteratorMarker,
17593 >,
17594 >,
17595 fidl::encoding::DefaultFuchsiaResourceDialect,
17596 val,
17597 decoder,
17598 _inner_offset,
17599 depth
17600 )?;
17601 } else {
17602 unreachable!()
17603 }
17604 }
17605 3 => {
17606 #[allow(irrefutable_let_patterns)]
17607 if let LogsIterator::Stream(_) = self {
17608 } else {
17610 *self = LogsIterator::Stream(
17612 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect),
17613 );
17614 }
17615 #[allow(irrefutable_let_patterns)]
17616 if let LogsIterator::Stream(ref mut val) = self {
17617 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
17618 } else {
17619 unreachable!()
17620 }
17621 }
17622 #[allow(deprecated)]
17623 ordinal => {
17624 for _ in 0..num_handles {
17625 decoder.drop_next_handle()?;
17626 }
17627 *self = LogsIterator::__SourceBreaking { unknown_ordinal: ordinal };
17628 }
17629 }
17630 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
17631 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17632 }
17633 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17634 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17635 }
17636 Ok(())
17637 }
17638 }
17639
17640 impl fidl::encoding::ResourceTypeMarker for RunEventPayload {
17641 type Borrowed<'a> = &'a mut Self;
17642 fn take_or_borrow<'a>(
17643 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17644 ) -> Self::Borrowed<'a> {
17645 value
17646 }
17647 }
17648
17649 unsafe impl fidl::encoding::TypeMarker for RunEventPayload {
17650 type Owned = Self;
17651
17652 #[inline(always)]
17653 fn inline_align(_context: fidl::encoding::Context) -> usize {
17654 8
17655 }
17656
17657 #[inline(always)]
17658 fn inline_size(_context: fidl::encoding::Context) -> usize {
17659 16
17660 }
17661 }
17662
17663 unsafe impl
17664 fidl::encoding::Encode<RunEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
17665 for &mut RunEventPayload
17666 {
17667 #[inline]
17668 unsafe fn encode(
17669 self,
17670 encoder: &mut fidl::encoding::Encoder<
17671 '_,
17672 fidl::encoding::DefaultFuchsiaResourceDialect,
17673 >,
17674 offset: usize,
17675 _depth: fidl::encoding::Depth,
17676 ) -> fidl::Result<()> {
17677 encoder.debug_check_bounds::<RunEventPayload>(offset);
17678 encoder.write_num::<u64>(self.ordinal(), offset);
17679 match self {
17680 RunEventPayload::RunStarted(ref val) => fidl::encoding::encode_in_envelope::<
17681 RunStarted,
17682 fidl::encoding::DefaultFuchsiaResourceDialect,
17683 >(
17684 <RunStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
17685 encoder,
17686 offset + 8,
17687 _depth,
17688 ),
17689 RunEventPayload::RunStopped(ref val) => fidl::encoding::encode_in_envelope::<
17690 RunStopped,
17691 fidl::encoding::DefaultFuchsiaResourceDialect,
17692 >(
17693 <RunStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
17694 encoder,
17695 offset + 8,
17696 _depth,
17697 ),
17698 RunEventPayload::Artifact(ref mut val) => fidl::encoding::encode_in_envelope::<
17699 Artifact,
17700 fidl::encoding::DefaultFuchsiaResourceDialect,
17701 >(
17702 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
17703 encoder,
17704 offset + 8,
17705 _depth,
17706 ),
17707 RunEventPayload::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
17708 }
17709 }
17710 }
17711
17712 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
17713 for RunEventPayload
17714 {
17715 #[inline(always)]
17716 fn new_empty() -> Self {
17717 Self::__SourceBreaking { unknown_ordinal: 0 }
17718 }
17719
17720 #[inline]
17721 unsafe fn decode(
17722 &mut self,
17723 decoder: &mut fidl::encoding::Decoder<
17724 '_,
17725 fidl::encoding::DefaultFuchsiaResourceDialect,
17726 >,
17727 offset: usize,
17728 mut depth: fidl::encoding::Depth,
17729 ) -> fidl::Result<()> {
17730 decoder.debug_check_bounds::<Self>(offset);
17731 #[allow(unused_variables)]
17732 let next_out_of_line = decoder.next_out_of_line();
17733 let handles_before = decoder.remaining_handles();
17734 let (ordinal, inlined, num_bytes, num_handles) =
17735 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
17736
17737 let member_inline_size = match ordinal {
17738 1 => <RunStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17739 2 => <RunStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17740 3 => <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17741 0 => return Err(fidl::Error::UnknownUnionTag),
17742 _ => num_bytes as usize,
17743 };
17744
17745 if inlined != (member_inline_size <= 4) {
17746 return Err(fidl::Error::InvalidInlineBitInEnvelope);
17747 }
17748 let _inner_offset;
17749 if inlined {
17750 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
17751 _inner_offset = offset + 8;
17752 } else {
17753 depth.increment()?;
17754 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
17755 }
17756 match ordinal {
17757 1 => {
17758 #[allow(irrefutable_let_patterns)]
17759 if let RunEventPayload::RunStarted(_) = self {
17760 } else {
17762 *self = RunEventPayload::RunStarted(fidl::new_empty!(
17764 RunStarted,
17765 fidl::encoding::DefaultFuchsiaResourceDialect
17766 ));
17767 }
17768 #[allow(irrefutable_let_patterns)]
17769 if let RunEventPayload::RunStarted(ref mut val) = self {
17770 fidl::decode!(
17771 RunStarted,
17772 fidl::encoding::DefaultFuchsiaResourceDialect,
17773 val,
17774 decoder,
17775 _inner_offset,
17776 depth
17777 )?;
17778 } else {
17779 unreachable!()
17780 }
17781 }
17782 2 => {
17783 #[allow(irrefutable_let_patterns)]
17784 if let RunEventPayload::RunStopped(_) = self {
17785 } else {
17787 *self = RunEventPayload::RunStopped(fidl::new_empty!(
17789 RunStopped,
17790 fidl::encoding::DefaultFuchsiaResourceDialect
17791 ));
17792 }
17793 #[allow(irrefutable_let_patterns)]
17794 if let RunEventPayload::RunStopped(ref mut val) = self {
17795 fidl::decode!(
17796 RunStopped,
17797 fidl::encoding::DefaultFuchsiaResourceDialect,
17798 val,
17799 decoder,
17800 _inner_offset,
17801 depth
17802 )?;
17803 } else {
17804 unreachable!()
17805 }
17806 }
17807 3 => {
17808 #[allow(irrefutable_let_patterns)]
17809 if let RunEventPayload::Artifact(_) = self {
17810 } else {
17812 *self = RunEventPayload::Artifact(fidl::new_empty!(
17814 Artifact,
17815 fidl::encoding::DefaultFuchsiaResourceDialect
17816 ));
17817 }
17818 #[allow(irrefutable_let_patterns)]
17819 if let RunEventPayload::Artifact(ref mut val) = self {
17820 fidl::decode!(
17821 Artifact,
17822 fidl::encoding::DefaultFuchsiaResourceDialect,
17823 val,
17824 decoder,
17825 _inner_offset,
17826 depth
17827 )?;
17828 } else {
17829 unreachable!()
17830 }
17831 }
17832 #[allow(deprecated)]
17833 ordinal => {
17834 for _ in 0..num_handles {
17835 decoder.drop_next_handle()?;
17836 }
17837 *self = RunEventPayload::__SourceBreaking { unknown_ordinal: ordinal };
17838 }
17839 }
17840 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
17841 return Err(fidl::Error::InvalidNumBytesInEnvelope);
17842 }
17843 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
17844 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
17845 }
17846 Ok(())
17847 }
17848 }
17849
17850 impl fidl::encoding::ResourceTypeMarker for SuiteEventPayload {
17851 type Borrowed<'a> = &'a mut Self;
17852 fn take_or_borrow<'a>(
17853 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
17854 ) -> Self::Borrowed<'a> {
17855 value
17856 }
17857 }
17858
17859 unsafe impl fidl::encoding::TypeMarker for SuiteEventPayload {
17860 type Owned = Self;
17861
17862 #[inline(always)]
17863 fn inline_align(_context: fidl::encoding::Context) -> usize {
17864 8
17865 }
17866
17867 #[inline(always)]
17868 fn inline_size(_context: fidl::encoding::Context) -> usize {
17869 16
17870 }
17871 }
17872
17873 unsafe impl
17874 fidl::encoding::Encode<SuiteEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
17875 for &mut SuiteEventPayload
17876 {
17877 #[inline]
17878 unsafe fn encode(
17879 self,
17880 encoder: &mut fidl::encoding::Encoder<
17881 '_,
17882 fidl::encoding::DefaultFuchsiaResourceDialect,
17883 >,
17884 offset: usize,
17885 _depth: fidl::encoding::Depth,
17886 ) -> fidl::Result<()> {
17887 encoder.debug_check_bounds::<SuiteEventPayload>(offset);
17888 encoder.write_num::<u64>(self.ordinal(), offset);
17889 match self {
17890 SuiteEventPayload::CaseFound(ref val) => fidl::encoding::encode_in_envelope::<
17891 CaseFound,
17892 fidl::encoding::DefaultFuchsiaResourceDialect,
17893 >(
17894 <CaseFound as fidl::encoding::ValueTypeMarker>::borrow(val),
17895 encoder,
17896 offset + 8,
17897 _depth,
17898 ),
17899 SuiteEventPayload::CaseStarted(ref val) => fidl::encoding::encode_in_envelope::<
17900 CaseStarted,
17901 fidl::encoding::DefaultFuchsiaResourceDialect,
17902 >(
17903 <CaseStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
17904 encoder,
17905 offset + 8,
17906 _depth,
17907 ),
17908 SuiteEventPayload::CaseStopped(ref val) => fidl::encoding::encode_in_envelope::<
17909 CaseStopped,
17910 fidl::encoding::DefaultFuchsiaResourceDialect,
17911 >(
17912 <CaseStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
17913 encoder,
17914 offset + 8,
17915 _depth,
17916 ),
17917 SuiteEventPayload::CaseFinished(ref val) => fidl::encoding::encode_in_envelope::<
17918 CaseFinished,
17919 fidl::encoding::DefaultFuchsiaResourceDialect,
17920 >(
17921 <CaseFinished as fidl::encoding::ValueTypeMarker>::borrow(val),
17922 encoder,
17923 offset + 8,
17924 _depth,
17925 ),
17926 SuiteEventPayload::CaseArtifact(ref mut val) => {
17927 fidl::encoding::encode_in_envelope::<
17928 CaseArtifact,
17929 fidl::encoding::DefaultFuchsiaResourceDialect,
17930 >(
17931 <CaseArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
17932 encoder,
17933 offset + 8,
17934 _depth,
17935 )
17936 }
17937 SuiteEventPayload::SuiteArtifact(ref mut val) => {
17938 fidl::encoding::encode_in_envelope::<
17939 SuiteArtifact,
17940 fidl::encoding::DefaultFuchsiaResourceDialect,
17941 >(
17942 <SuiteArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
17943 encoder,
17944 offset + 8,
17945 _depth,
17946 )
17947 }
17948 SuiteEventPayload::SuiteStarted(ref val) => fidl::encoding::encode_in_envelope::<
17949 SuiteStarted,
17950 fidl::encoding::DefaultFuchsiaResourceDialect,
17951 >(
17952 <SuiteStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
17953 encoder,
17954 offset + 8,
17955 _depth,
17956 ),
17957 SuiteEventPayload::SuiteStopped(ref val) => fidl::encoding::encode_in_envelope::<
17958 SuiteStopped,
17959 fidl::encoding::DefaultFuchsiaResourceDialect,
17960 >(
17961 <SuiteStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
17962 encoder,
17963 offset + 8,
17964 _depth,
17965 ),
17966 SuiteEventPayload::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
17967 }
17968 }
17969 }
17970
17971 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
17972 for SuiteEventPayload
17973 {
17974 #[inline(always)]
17975 fn new_empty() -> Self {
17976 Self::__SourceBreaking { unknown_ordinal: 0 }
17977 }
17978
17979 #[inline]
17980 unsafe fn decode(
17981 &mut self,
17982 decoder: &mut fidl::encoding::Decoder<
17983 '_,
17984 fidl::encoding::DefaultFuchsiaResourceDialect,
17985 >,
17986 offset: usize,
17987 mut depth: fidl::encoding::Depth,
17988 ) -> fidl::Result<()> {
17989 decoder.debug_check_bounds::<Self>(offset);
17990 #[allow(unused_variables)]
17991 let next_out_of_line = decoder.next_out_of_line();
17992 let handles_before = decoder.remaining_handles();
17993 let (ordinal, inlined, num_bytes, num_handles) =
17994 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
17995
17996 let member_inline_size = match ordinal {
17997 1 => <CaseFound as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17998 2 => <CaseStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
17999 3 => <CaseStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18000 4 => <CaseFinished as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18001 5 => <CaseArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18002 6 => <SuiteArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18003 7 => <SuiteStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18004 8 => <SuiteStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18005 0 => return Err(fidl::Error::UnknownUnionTag),
18006 _ => num_bytes as usize,
18007 };
18008
18009 if inlined != (member_inline_size <= 4) {
18010 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18011 }
18012 let _inner_offset;
18013 if inlined {
18014 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18015 _inner_offset = offset + 8;
18016 } else {
18017 depth.increment()?;
18018 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18019 }
18020 match ordinal {
18021 1 => {
18022 #[allow(irrefutable_let_patterns)]
18023 if let SuiteEventPayload::CaseFound(_) = self {
18024 } else {
18026 *self = SuiteEventPayload::CaseFound(fidl::new_empty!(
18028 CaseFound,
18029 fidl::encoding::DefaultFuchsiaResourceDialect
18030 ));
18031 }
18032 #[allow(irrefutable_let_patterns)]
18033 if let SuiteEventPayload::CaseFound(ref mut val) = self {
18034 fidl::decode!(
18035 CaseFound,
18036 fidl::encoding::DefaultFuchsiaResourceDialect,
18037 val,
18038 decoder,
18039 _inner_offset,
18040 depth
18041 )?;
18042 } else {
18043 unreachable!()
18044 }
18045 }
18046 2 => {
18047 #[allow(irrefutable_let_patterns)]
18048 if let SuiteEventPayload::CaseStarted(_) = self {
18049 } else {
18051 *self = SuiteEventPayload::CaseStarted(fidl::new_empty!(
18053 CaseStarted,
18054 fidl::encoding::DefaultFuchsiaResourceDialect
18055 ));
18056 }
18057 #[allow(irrefutable_let_patterns)]
18058 if let SuiteEventPayload::CaseStarted(ref mut val) = self {
18059 fidl::decode!(
18060 CaseStarted,
18061 fidl::encoding::DefaultFuchsiaResourceDialect,
18062 val,
18063 decoder,
18064 _inner_offset,
18065 depth
18066 )?;
18067 } else {
18068 unreachable!()
18069 }
18070 }
18071 3 => {
18072 #[allow(irrefutable_let_patterns)]
18073 if let SuiteEventPayload::CaseStopped(_) = self {
18074 } else {
18076 *self = SuiteEventPayload::CaseStopped(fidl::new_empty!(
18078 CaseStopped,
18079 fidl::encoding::DefaultFuchsiaResourceDialect
18080 ));
18081 }
18082 #[allow(irrefutable_let_patterns)]
18083 if let SuiteEventPayload::CaseStopped(ref mut val) = self {
18084 fidl::decode!(
18085 CaseStopped,
18086 fidl::encoding::DefaultFuchsiaResourceDialect,
18087 val,
18088 decoder,
18089 _inner_offset,
18090 depth
18091 )?;
18092 } else {
18093 unreachable!()
18094 }
18095 }
18096 4 => {
18097 #[allow(irrefutable_let_patterns)]
18098 if let SuiteEventPayload::CaseFinished(_) = self {
18099 } else {
18101 *self = SuiteEventPayload::CaseFinished(fidl::new_empty!(
18103 CaseFinished,
18104 fidl::encoding::DefaultFuchsiaResourceDialect
18105 ));
18106 }
18107 #[allow(irrefutable_let_patterns)]
18108 if let SuiteEventPayload::CaseFinished(ref mut val) = self {
18109 fidl::decode!(
18110 CaseFinished,
18111 fidl::encoding::DefaultFuchsiaResourceDialect,
18112 val,
18113 decoder,
18114 _inner_offset,
18115 depth
18116 )?;
18117 } else {
18118 unreachable!()
18119 }
18120 }
18121 5 => {
18122 #[allow(irrefutable_let_patterns)]
18123 if let SuiteEventPayload::CaseArtifact(_) = self {
18124 } else {
18126 *self = SuiteEventPayload::CaseArtifact(fidl::new_empty!(
18128 CaseArtifact,
18129 fidl::encoding::DefaultFuchsiaResourceDialect
18130 ));
18131 }
18132 #[allow(irrefutable_let_patterns)]
18133 if let SuiteEventPayload::CaseArtifact(ref mut val) = self {
18134 fidl::decode!(
18135 CaseArtifact,
18136 fidl::encoding::DefaultFuchsiaResourceDialect,
18137 val,
18138 decoder,
18139 _inner_offset,
18140 depth
18141 )?;
18142 } else {
18143 unreachable!()
18144 }
18145 }
18146 6 => {
18147 #[allow(irrefutable_let_patterns)]
18148 if let SuiteEventPayload::SuiteArtifact(_) = self {
18149 } else {
18151 *self = SuiteEventPayload::SuiteArtifact(fidl::new_empty!(
18153 SuiteArtifact,
18154 fidl::encoding::DefaultFuchsiaResourceDialect
18155 ));
18156 }
18157 #[allow(irrefutable_let_patterns)]
18158 if let SuiteEventPayload::SuiteArtifact(ref mut val) = self {
18159 fidl::decode!(
18160 SuiteArtifact,
18161 fidl::encoding::DefaultFuchsiaResourceDialect,
18162 val,
18163 decoder,
18164 _inner_offset,
18165 depth
18166 )?;
18167 } else {
18168 unreachable!()
18169 }
18170 }
18171 7 => {
18172 #[allow(irrefutable_let_patterns)]
18173 if let SuiteEventPayload::SuiteStarted(_) = self {
18174 } else {
18176 *self = SuiteEventPayload::SuiteStarted(fidl::new_empty!(
18178 SuiteStarted,
18179 fidl::encoding::DefaultFuchsiaResourceDialect
18180 ));
18181 }
18182 #[allow(irrefutable_let_patterns)]
18183 if let SuiteEventPayload::SuiteStarted(ref mut val) = self {
18184 fidl::decode!(
18185 SuiteStarted,
18186 fidl::encoding::DefaultFuchsiaResourceDialect,
18187 val,
18188 decoder,
18189 _inner_offset,
18190 depth
18191 )?;
18192 } else {
18193 unreachable!()
18194 }
18195 }
18196 8 => {
18197 #[allow(irrefutable_let_patterns)]
18198 if let SuiteEventPayload::SuiteStopped(_) = self {
18199 } else {
18201 *self = SuiteEventPayload::SuiteStopped(fidl::new_empty!(
18203 SuiteStopped,
18204 fidl::encoding::DefaultFuchsiaResourceDialect
18205 ));
18206 }
18207 #[allow(irrefutable_let_patterns)]
18208 if let SuiteEventPayload::SuiteStopped(ref mut val) = self {
18209 fidl::decode!(
18210 SuiteStopped,
18211 fidl::encoding::DefaultFuchsiaResourceDialect,
18212 val,
18213 decoder,
18214 _inner_offset,
18215 depth
18216 )?;
18217 } else {
18218 unreachable!()
18219 }
18220 }
18221 #[allow(deprecated)]
18222 ordinal => {
18223 for _ in 0..num_handles {
18224 decoder.drop_next_handle()?;
18225 }
18226 *self = SuiteEventPayload::__SourceBreaking { unknown_ordinal: ordinal };
18227 }
18228 }
18229 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18230 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18231 }
18232 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18233 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18234 }
18235 Ok(())
18236 }
18237 }
18238
18239 impl fidl::encoding::ResourceTypeMarker for Syslog {
18240 type Borrowed<'a> = &'a mut Self;
18241 fn take_or_borrow<'a>(
18242 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
18243 ) -> Self::Borrowed<'a> {
18244 value
18245 }
18246 }
18247
18248 unsafe impl fidl::encoding::TypeMarker for Syslog {
18249 type Owned = Self;
18250
18251 #[inline(always)]
18252 fn inline_align(_context: fidl::encoding::Context) -> usize {
18253 8
18254 }
18255
18256 #[inline(always)]
18257 fn inline_size(_context: fidl::encoding::Context) -> usize {
18258 16
18259 }
18260 }
18261
18262 unsafe impl fidl::encoding::Encode<Syslog, fidl::encoding::DefaultFuchsiaResourceDialect>
18263 for &mut Syslog
18264 {
18265 #[inline]
18266 unsafe fn encode(
18267 self,
18268 encoder: &mut fidl::encoding::Encoder<
18269 '_,
18270 fidl::encoding::DefaultFuchsiaResourceDialect,
18271 >,
18272 offset: usize,
18273 _depth: fidl::encoding::Depth,
18274 ) -> fidl::Result<()> {
18275 encoder.debug_check_bounds::<Syslog>(offset);
18276 encoder.write_num::<u64>(self.ordinal(), offset);
18277 match self {
18278 Syslog::Batch(ref mut val) => fidl::encoding::encode_in_envelope::<
18279 fidl::encoding::Endpoint<
18280 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
18281 >,
18282 fidl::encoding::DefaultFuchsiaResourceDialect,
18283 >(
18284 <fidl::encoding::Endpoint<
18285 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
18286 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18287 val
18288 ),
18289 encoder,
18290 offset + 8,
18291 _depth,
18292 ),
18293 Syslog::Stream(ref mut val) => fidl::encoding::encode_in_envelope::<
18294 fidl::encoding::HandleType<
18295 fidl::Socket,
18296 { fidl::ObjectType::SOCKET.into_raw() },
18297 2147483648,
18298 >,
18299 fidl::encoding::DefaultFuchsiaResourceDialect,
18300 >(
18301 <fidl::encoding::HandleType<
18302 fidl::Socket,
18303 { fidl::ObjectType::SOCKET.into_raw() },
18304 2147483648,
18305 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
18306 val
18307 ),
18308 encoder,
18309 offset + 8,
18310 _depth,
18311 ),
18312 Syslog::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
18313 }
18314 }
18315 }
18316
18317 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Syslog {
18318 #[inline(always)]
18319 fn new_empty() -> Self {
18320 Self::__SourceBreaking { unknown_ordinal: 0 }
18321 }
18322
18323 #[inline]
18324 unsafe fn decode(
18325 &mut self,
18326 decoder: &mut fidl::encoding::Decoder<
18327 '_,
18328 fidl::encoding::DefaultFuchsiaResourceDialect,
18329 >,
18330 offset: usize,
18331 mut depth: fidl::encoding::Depth,
18332 ) -> fidl::Result<()> {
18333 decoder.debug_check_bounds::<Self>(offset);
18334 #[allow(unused_variables)]
18335 let next_out_of_line = decoder.next_out_of_line();
18336 let handles_before = decoder.remaining_handles();
18337 let (ordinal, inlined, num_bytes, num_handles) =
18338 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
18339
18340 let member_inline_size = match ordinal {
18341 2 => <fidl::encoding::Endpoint<
18342 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
18343 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18344 3 => <fidl::encoding::HandleType<
18345 fidl::Socket,
18346 { fidl::ObjectType::SOCKET.into_raw() },
18347 2147483648,
18348 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
18349 0 => return Err(fidl::Error::UnknownUnionTag),
18350 _ => num_bytes as usize,
18351 };
18352
18353 if inlined != (member_inline_size <= 4) {
18354 return Err(fidl::Error::InvalidInlineBitInEnvelope);
18355 }
18356 let _inner_offset;
18357 if inlined {
18358 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
18359 _inner_offset = offset + 8;
18360 } else {
18361 depth.increment()?;
18362 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
18363 }
18364 match ordinal {
18365 2 => {
18366 #[allow(irrefutable_let_patterns)]
18367 if let Syslog::Batch(_) = self {
18368 } else {
18370 *self = Syslog::Batch(fidl::new_empty!(
18372 fidl::encoding::Endpoint<
18373 fidl::endpoints::ClientEnd<
18374 fidl_fuchsia_diagnostics::BatchIteratorMarker,
18375 >,
18376 >,
18377 fidl::encoding::DefaultFuchsiaResourceDialect
18378 ));
18379 }
18380 #[allow(irrefutable_let_patterns)]
18381 if let Syslog::Batch(ref mut val) = self {
18382 fidl::decode!(
18383 fidl::encoding::Endpoint<
18384 fidl::endpoints::ClientEnd<
18385 fidl_fuchsia_diagnostics::BatchIteratorMarker,
18386 >,
18387 >,
18388 fidl::encoding::DefaultFuchsiaResourceDialect,
18389 val,
18390 decoder,
18391 _inner_offset,
18392 depth
18393 )?;
18394 } else {
18395 unreachable!()
18396 }
18397 }
18398 3 => {
18399 #[allow(irrefutable_let_patterns)]
18400 if let Syslog::Stream(_) = self {
18401 } else {
18403 *self = Syslog::Stream(
18405 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
18406 );
18407 }
18408 #[allow(irrefutable_let_patterns)]
18409 if let Syslog::Stream(ref mut val) = self {
18410 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
18411 } else {
18412 unreachable!()
18413 }
18414 }
18415 #[allow(deprecated)]
18416 ordinal => {
18417 for _ in 0..num_handles {
18418 decoder.drop_next_handle()?;
18419 }
18420 *self = Syslog::__SourceBreaking { unknown_ordinal: ordinal };
18421 }
18422 }
18423 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
18424 return Err(fidl::Error::InvalidNumBytesInEnvelope);
18425 }
18426 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
18427 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
18428 }
18429 Ok(())
18430 }
18431 }
18432}