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 _};
10pub use fidl_fuchsia_test_manager__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, PartialEq)]
15pub struct CaseArtifact {
16 pub identifier: u32,
17 pub artifact: Artifact,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CaseArtifact {}
21
22#[derive(Debug, PartialEq)]
23pub struct DebugDataIteratorGetNextCompressedResponse {
24 pub data: Vec<DebugData>,
25}
26
27impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
28 for DebugDataIteratorGetNextCompressedResponse
29{
30}
31
32#[derive(Debug, PartialEq)]
33pub struct DebugDataIteratorGetNextResponse {
34 pub data: Vec<DebugData>,
35}
36
37impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
38 for DebugDataIteratorGetNextResponse
39{
40}
41
42#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
48pub struct DirectoryAndToken {
49 pub directory: fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
52 pub token: fidl::EventPair,
55}
56
57impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DirectoryAndToken {}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct EarlyBootProfileRegisterWatcherRequest {
61 pub iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
62}
63
64impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
65 for EarlyBootProfileRegisterWatcherRequest
66{
67}
68
69#[derive(Debug, PartialEq)]
70pub struct QueryEnumerateInRealmRequest {
71 pub test_url: String,
72 pub realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
74 pub offers: Vec<fidl_fuchsia_component_decl::Offer>,
76 pub test_collection: String,
78 pub iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
79}
80
81impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
82 for QueryEnumerateInRealmRequest
83{
84}
85
86#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
87pub struct QueryEnumerateRequest {
88 pub test_url: String,
89 pub iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
90}
91
92impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for QueryEnumerateRequest {}
93
94#[derive(Debug, PartialEq)]
95pub struct RunBuilderAddSuiteInRealmRequest {
96 pub realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
98 pub offers: Vec<fidl_fuchsia_component_decl::Offer>,
100 pub test_collection: String,
102 pub test_url: String,
103 pub options: RunOptions,
104 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
105}
106
107impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
108 for RunBuilderAddSuiteInRealmRequest
109{
110}
111
112#[derive(Debug, PartialEq)]
113pub struct RunBuilderAddSuiteRequest {
114 pub test_url: String,
115 pub options: RunOptions,
116 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
117}
118
119impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunBuilderAddSuiteRequest {}
120
121#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
122pub struct RunBuilderBuildRequest {
123 pub controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
124}
125
126impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunBuilderBuildRequest {}
127
128#[derive(Debug, PartialEq)]
129pub struct RunControllerGetEventsResponse {
130 pub events: Vec<RunEvent>,
131}
132
133impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
134 for RunControllerGetEventsResponse
135{
136}
137
138#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
139pub struct Stderr {
140 pub socket: fidl::Socket,
141}
142
143impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Stderr {}
144
145#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
146pub struct Stdout {
147 pub socket: fidl::Socket,
148}
149
150impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Stdout {}
151
152#[derive(Debug, PartialEq)]
153pub struct SuiteArtifact {
154 pub artifact: Artifact,
155}
156
157impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteArtifact {}
158
159#[derive(Debug, PartialEq)]
160pub struct SuiteControllerGetEventsResponse {
161 pub events: Vec<SuiteEvent>,
162}
163
164impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
165 for SuiteControllerGetEventsResponse
166{
167}
168
169#[derive(Debug, PartialEq)]
170pub struct SuiteControllerWatchEventsResponse {
171 pub events: Vec<Event>,
172}
173
174impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
175 for SuiteControllerWatchEventsResponse
176{
177}
178
179#[derive(Debug, PartialEq)]
180pub struct SuiteRunnerRunRequest {
181 pub test_suite_url: String,
183 pub options: RunSuiteOptions,
185 pub controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
188}
189
190impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteRunnerRunRequest {}
191
192#[derive(Debug, PartialEq)]
193pub struct TestCaseEnumeratorEnumerateRequest {
194 pub test_suite_url: String,
196 pub options: EnumerateTestCasesOptions,
198 pub iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
200}
201
202impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
203 for TestCaseEnumeratorEnumerateRequest
204{
205}
206
207#[derive(Debug, Default, PartialEq)]
209pub struct CustomArtifact {
210 pub component_moniker: Option<String>,
213 pub directory_and_token: Option<DirectoryAndToken>,
215 #[doc(hidden)]
216 pub __source_breaking: fidl::marker::SourceBreaking,
217}
218
219impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CustomArtifact {}
220
221#[derive(Debug, Default, PartialEq)]
223pub struct DebugData {
224 pub name: Option<String>,
226 pub socket: Option<fidl::Socket>,
228 #[doc(hidden)]
229 pub __source_breaking: fidl::marker::SourceBreaking,
230}
231
232impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DebugData {}
233
234#[derive(Debug, Default, PartialEq)]
236pub struct EnumerateTestCasesOptions {
237 pub realm_options: Option<RealmOptions>,
241 #[doc(hidden)]
242 pub __source_breaking: fidl::marker::SourceBreaking,
243}
244
245impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EnumerateTestCasesOptions {}
246
247#[derive(Debug, Default, PartialEq)]
249pub struct Event {
250 pub timestamp: Option<i64>,
252 pub details: Option<EventDetails>,
254 #[doc(hidden)]
255 pub __source_breaking: fidl::marker::SourceBreaking,
256}
257
258impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Event {}
259
260#[derive(Debug, Default, PartialEq)]
266pub struct RealmOptions {
267 pub realm: Option<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>>,
269 pub offers: Option<Vec<fidl_fuchsia_component_decl::Offer>>,
271 pub test_collection: Option<String>,
273 #[doc(hidden)]
274 pub __source_breaking: fidl::marker::SourceBreaking,
275}
276
277impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RealmOptions {}
278
279#[derive(Debug, Default, PartialEq)]
280pub struct RunEvent {
281 pub timestamp: Option<i64>,
282 pub payload: Option<RunEventPayload>,
283 #[doc(hidden)]
284 pub __source_breaking: fidl::marker::SourceBreaking,
285}
286
287impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunEvent {}
288
289#[derive(Debug, Default, PartialEq)]
291pub struct RunSuiteOptions {
292 pub realm_options: Option<RealmOptions>,
296 pub run_disabled_tests: Option<bool>,
299 pub max_concurrent_test_case_runs: Option<u16>,
302 pub arguments: Option<Vec<String>>,
305 pub timeout: Option<i64>,
308 pub test_case_filters: Option<Vec<String>>,
322 pub logs_iterator_type: Option<LogsIteratorType>,
325 pub log_interest: Option<Vec<fidl_fuchsia_diagnostics::LogInterestSelector>>,
328 pub accumulate_debug_data: Option<bool>,
335 pub no_exception_channel: Option<bool>,
339 pub break_on_failure: Option<bool>,
344 #[doc(hidden)]
345 pub __source_breaking: fidl::marker::SourceBreaking,
346}
347
348impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunSuiteOptions {}
349
350#[derive(Debug, Default, PartialEq)]
352pub struct SuiteArtifactGeneratedEventDetails {
353 pub artifact: Option<Artifact>,
355 #[doc(hidden)]
356 pub __source_breaking: fidl::marker::SourceBreaking,
357}
358
359impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
360 for SuiteArtifactGeneratedEventDetails
361{
362}
363
364#[derive(Debug, Default, PartialEq)]
365pub struct SuiteEvent {
366 pub timestamp: Option<i64>,
367 pub payload: Option<SuiteEventPayload>,
368 #[doc(hidden)]
369 pub __source_breaking: fidl::marker::SourceBreaking,
370}
371
372impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEvent {}
373
374#[derive(Debug, Default, PartialEq)]
376pub struct TestCaseArtifactGeneratedEventDetails {
377 pub test_case_id: Option<u32>,
380 pub artifact: Option<Artifact>,
382 #[doc(hidden)]
383 pub __source_breaking: fidl::marker::SourceBreaking,
384}
385
386impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
387 for TestCaseArtifactGeneratedEventDetails
388{
389}
390
391#[derive(Debug)]
393pub enum Artifact {
394 Stdout(fidl::Socket),
397 Stderr(fidl::Socket),
400 Log(Syslog),
403 Custom(CustomArtifact),
405 DebugData(fidl::endpoints::ClientEnd<DebugDataIteratorMarker>),
407 #[doc(hidden)]
408 __SourceBreaking { unknown_ordinal: u64 },
409}
410
411#[macro_export]
413macro_rules! ArtifactUnknown {
414 () => {
415 _
416 };
417}
418
419impl PartialEq for Artifact {
421 fn eq(&self, other: &Self) -> bool {
422 match (self, other) {
423 (Self::Stdout(x), Self::Stdout(y)) => *x == *y,
424 (Self::Stderr(x), Self::Stderr(y)) => *x == *y,
425 (Self::Log(x), Self::Log(y)) => *x == *y,
426 (Self::Custom(x), Self::Custom(y)) => *x == *y,
427 (Self::DebugData(x), Self::DebugData(y)) => *x == *y,
428 _ => false,
429 }
430 }
431}
432
433impl Artifact {
434 #[inline]
435 pub fn ordinal(&self) -> u64 {
436 match *self {
437 Self::Stdout(_) => 1,
438 Self::Stderr(_) => 2,
439 Self::Log(_) => 3,
440 Self::Custom(_) => 4,
441 Self::DebugData(_) => 5,
442 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
443 }
444 }
445
446 #[inline]
447 pub fn unknown_variant_for_testing() -> Self {
448 Self::__SourceBreaking { unknown_ordinal: 0 }
449 }
450
451 #[inline]
452 pub fn is_unknown(&self) -> bool {
453 match self {
454 Self::__SourceBreaking { .. } => true,
455 _ => false,
456 }
457 }
458}
459
460impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {}
461
462#[derive(Debug)]
485pub enum EventDetails {
486 SuiteStarted(SuiteStartedEventDetails),
488 TestCaseFound(TestCaseFoundEventDetails),
490 TestCaseStarted(TestCaseStartedEventDetails),
494 TestCaseArtifactGenerated(TestCaseArtifactGeneratedEventDetails),
497 TestCaseStopped(TestCaseStoppedEventDetails),
500 TestCaseFinished(TestCaseFinishedEventDetails),
503 SuiteArtifactGenerated(SuiteArtifactGeneratedEventDetails),
505 SuiteStopped(SuiteStoppedEventDetails),
508 #[doc(hidden)]
509 __SourceBreaking { unknown_ordinal: u64 },
510}
511
512#[macro_export]
514macro_rules! EventDetailsUnknown {
515 () => {
516 _
517 };
518}
519
520impl PartialEq for EventDetails {
522 fn eq(&self, other: &Self) -> bool {
523 match (self, other) {
524 (Self::SuiteStarted(x), Self::SuiteStarted(y)) => *x == *y,
525 (Self::TestCaseFound(x), Self::TestCaseFound(y)) => *x == *y,
526 (Self::TestCaseStarted(x), Self::TestCaseStarted(y)) => *x == *y,
527 (Self::TestCaseArtifactGenerated(x), Self::TestCaseArtifactGenerated(y)) => *x == *y,
528 (Self::TestCaseStopped(x), Self::TestCaseStopped(y)) => *x == *y,
529 (Self::TestCaseFinished(x), Self::TestCaseFinished(y)) => *x == *y,
530 (Self::SuiteArtifactGenerated(x), Self::SuiteArtifactGenerated(y)) => *x == *y,
531 (Self::SuiteStopped(x), Self::SuiteStopped(y)) => *x == *y,
532 _ => false,
533 }
534 }
535}
536
537impl EventDetails {
538 #[inline]
539 pub fn ordinal(&self) -> u64 {
540 match *self {
541 Self::SuiteStarted(_) => 1,
542 Self::TestCaseFound(_) => 2,
543 Self::TestCaseStarted(_) => 3,
544 Self::TestCaseArtifactGenerated(_) => 4,
545 Self::TestCaseStopped(_) => 5,
546 Self::TestCaseFinished(_) => 6,
547 Self::SuiteArtifactGenerated(_) => 7,
548 Self::SuiteStopped(_) => 8,
549 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
550 }
551 }
552
553 #[inline]
554 pub fn unknown_variant_for_testing() -> Self {
555 Self::__SourceBreaking { unknown_ordinal: 0 }
556 }
557
558 #[inline]
559 pub fn is_unknown(&self) -> bool {
560 match self {
561 Self::__SourceBreaking { .. } => true,
562 _ => false,
563 }
564 }
565}
566
567impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for EventDetails {}
568
569#[derive(Debug)]
571pub enum LogsIterator {
572 Batch(fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>),
574 Stream(fidl::Socket),
577 #[doc(hidden)]
578 __SourceBreaking { unknown_ordinal: u64 },
579}
580
581#[macro_export]
583macro_rules! LogsIteratorUnknown {
584 () => {
585 _
586 };
587}
588
589impl PartialEq for LogsIterator {
591 fn eq(&self, other: &Self) -> bool {
592 match (self, other) {
593 (Self::Batch(x), Self::Batch(y)) => *x == *y,
594 (Self::Stream(x), Self::Stream(y)) => *x == *y,
595 _ => false,
596 }
597 }
598}
599
600impl LogsIterator {
601 #[inline]
602 pub fn ordinal(&self) -> u64 {
603 match *self {
604 Self::Batch(_) => 2,
605 Self::Stream(_) => 3,
606 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
607 }
608 }
609
610 #[inline]
611 pub fn unknown_variant_for_testing() -> Self {
612 Self::__SourceBreaking { unknown_ordinal: 0 }
613 }
614
615 #[inline]
616 pub fn is_unknown(&self) -> bool {
617 match self {
618 Self::__SourceBreaking { .. } => true,
619 _ => false,
620 }
621 }
622}
623
624impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for LogsIterator {}
625
626#[derive(Debug)]
630pub enum RunEventPayload {
631 RunStarted(RunStarted),
633 RunStopped(RunStopped),
635 Artifact(Artifact),
637 #[doc(hidden)]
638 __SourceBreaking { unknown_ordinal: u64 },
639}
640
641#[macro_export]
643macro_rules! RunEventPayloadUnknown {
644 () => {
645 _
646 };
647}
648
649impl PartialEq for RunEventPayload {
651 fn eq(&self, other: &Self) -> bool {
652 match (self, other) {
653 (Self::RunStarted(x), Self::RunStarted(y)) => *x == *y,
654 (Self::RunStopped(x), Self::RunStopped(y)) => *x == *y,
655 (Self::Artifact(x), Self::Artifact(y)) => *x == *y,
656 _ => false,
657 }
658 }
659}
660
661impl RunEventPayload {
662 #[inline]
663 pub fn ordinal(&self) -> u64 {
664 match *self {
665 Self::RunStarted(_) => 1,
666 Self::RunStopped(_) => 2,
667 Self::Artifact(_) => 3,
668 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
669 }
670 }
671
672 #[inline]
673 pub fn unknown_variant_for_testing() -> Self {
674 Self::__SourceBreaking { unknown_ordinal: 0 }
675 }
676
677 #[inline]
678 pub fn is_unknown(&self) -> bool {
679 match self {
680 Self::__SourceBreaking { .. } => true,
681 _ => false,
682 }
683 }
684}
685
686impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RunEventPayload {}
687
688#[derive(Debug)]
701pub enum SuiteEventPayload {
702 CaseFound(CaseFound),
704 CaseStarted(CaseStarted),
706 CaseStopped(CaseStopped),
710 CaseFinished(CaseFinished),
713 CaseArtifact(CaseArtifact),
715 SuiteArtifact(SuiteArtifact),
717 SuiteStarted(SuiteStarted),
719 SuiteStopped(SuiteStopped),
723 #[doc(hidden)]
724 __SourceBreaking { unknown_ordinal: u64 },
725}
726
727#[macro_export]
729macro_rules! SuiteEventPayloadUnknown {
730 () => {
731 _
732 };
733}
734
735impl PartialEq for SuiteEventPayload {
737 fn eq(&self, other: &Self) -> bool {
738 match (self, other) {
739 (Self::CaseFound(x), Self::CaseFound(y)) => *x == *y,
740 (Self::CaseStarted(x), Self::CaseStarted(y)) => *x == *y,
741 (Self::CaseStopped(x), Self::CaseStopped(y)) => *x == *y,
742 (Self::CaseFinished(x), Self::CaseFinished(y)) => *x == *y,
743 (Self::CaseArtifact(x), Self::CaseArtifact(y)) => *x == *y,
744 (Self::SuiteArtifact(x), Self::SuiteArtifact(y)) => *x == *y,
745 (Self::SuiteStarted(x), Self::SuiteStarted(y)) => *x == *y,
746 (Self::SuiteStopped(x), Self::SuiteStopped(y)) => *x == *y,
747 _ => false,
748 }
749 }
750}
751
752impl SuiteEventPayload {
753 #[inline]
754 pub fn ordinal(&self) -> u64 {
755 match *self {
756 Self::CaseFound(_) => 1,
757 Self::CaseStarted(_) => 2,
758 Self::CaseStopped(_) => 3,
759 Self::CaseFinished(_) => 4,
760 Self::CaseArtifact(_) => 5,
761 Self::SuiteArtifact(_) => 6,
762 Self::SuiteStarted(_) => 7,
763 Self::SuiteStopped(_) => 8,
764 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
765 }
766 }
767
768 #[inline]
769 pub fn unknown_variant_for_testing() -> Self {
770 Self::__SourceBreaking { unknown_ordinal: 0 }
771 }
772
773 #[inline]
774 pub fn is_unknown(&self) -> bool {
775 match self {
776 Self::__SourceBreaking { .. } => true,
777 _ => false,
778 }
779 }
780}
781
782impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEventPayload {}
783
784#[derive(Debug)]
786pub enum Syslog {
787 Batch(fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>),
789 Stream(fidl::Socket),
791 #[doc(hidden)]
792 __SourceBreaking { unknown_ordinal: u64 },
793}
794
795#[macro_export]
797macro_rules! SyslogUnknown {
798 () => {
799 _
800 };
801}
802
803impl PartialEq for Syslog {
805 fn eq(&self, other: &Self) -> bool {
806 match (self, other) {
807 (Self::Batch(x), Self::Batch(y)) => *x == *y,
808 (Self::Stream(x), Self::Stream(y)) => *x == *y,
809 _ => false,
810 }
811 }
812}
813
814impl Syslog {
815 #[inline]
816 pub fn ordinal(&self) -> u64 {
817 match *self {
818 Self::Batch(_) => 2,
819 Self::Stream(_) => 3,
820 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
821 }
822 }
823
824 #[inline]
825 pub fn unknown_variant_for_testing() -> Self {
826 Self::__SourceBreaking { unknown_ordinal: 0 }
827 }
828
829 #[inline]
830 pub fn is_unknown(&self) -> bool {
831 match self {
832 Self::__SourceBreaking { .. } => true,
833 _ => false,
834 }
835 }
836}
837
838impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Syslog {}
839
840#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
841pub struct CaseIteratorMarker;
842
843impl fidl::endpoints::ProtocolMarker for CaseIteratorMarker {
844 type Proxy = CaseIteratorProxy;
845 type RequestStream = CaseIteratorRequestStream;
846 #[cfg(target_os = "fuchsia")]
847 type SynchronousProxy = CaseIteratorSynchronousProxy;
848
849 const DEBUG_NAME: &'static str = "(anonymous) CaseIterator";
850}
851
852pub trait CaseIteratorProxyInterface: Send + Sync {
853 type GetNextResponseFut: std::future::Future<Output = Result<Vec<Case>, fidl::Error>> + Send;
854 fn r#get_next(&self) -> Self::GetNextResponseFut;
855}
856#[derive(Debug)]
857#[cfg(target_os = "fuchsia")]
858pub struct CaseIteratorSynchronousProxy {
859 client: fidl::client::sync::Client,
860}
861
862#[cfg(target_os = "fuchsia")]
863impl fidl::endpoints::SynchronousProxy for CaseIteratorSynchronousProxy {
864 type Proxy = CaseIteratorProxy;
865 type Protocol = CaseIteratorMarker;
866
867 fn from_channel(inner: fidl::Channel) -> Self {
868 Self::new(inner)
869 }
870
871 fn into_channel(self) -> fidl::Channel {
872 self.client.into_channel()
873 }
874
875 fn as_channel(&self) -> &fidl::Channel {
876 self.client.as_channel()
877 }
878}
879
880#[cfg(target_os = "fuchsia")]
881impl CaseIteratorSynchronousProxy {
882 pub fn new(channel: fidl::Channel) -> Self {
883 let protocol_name = <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
884 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
885 }
886
887 pub fn into_channel(self) -> fidl::Channel {
888 self.client.into_channel()
889 }
890
891 pub fn wait_for_event(
894 &self,
895 deadline: zx::MonotonicInstant,
896 ) -> Result<CaseIteratorEvent, fidl::Error> {
897 CaseIteratorEvent::decode(self.client.wait_for_event(deadline)?)
898 }
899
900 pub fn r#get_next(&self, ___deadline: zx::MonotonicInstant) -> Result<Vec<Case>, fidl::Error> {
903 let _response =
904 self.client.send_query::<fidl::encoding::EmptyPayload, CaseIteratorGetNextResponse>(
905 (),
906 0x7583f97b7486467c,
907 fidl::encoding::DynamicFlags::empty(),
908 ___deadline,
909 )?;
910 Ok(_response.cases)
911 }
912}
913
914#[cfg(target_os = "fuchsia")]
915impl From<CaseIteratorSynchronousProxy> for zx::Handle {
916 fn from(value: CaseIteratorSynchronousProxy) -> Self {
917 value.into_channel().into()
918 }
919}
920
921#[cfg(target_os = "fuchsia")]
922impl From<fidl::Channel> for CaseIteratorSynchronousProxy {
923 fn from(value: fidl::Channel) -> Self {
924 Self::new(value)
925 }
926}
927
928#[cfg(target_os = "fuchsia")]
929impl fidl::endpoints::FromClient for CaseIteratorSynchronousProxy {
930 type Protocol = CaseIteratorMarker;
931
932 fn from_client(value: fidl::endpoints::ClientEnd<CaseIteratorMarker>) -> Self {
933 Self::new(value.into_channel())
934 }
935}
936
937#[derive(Debug, Clone)]
938pub struct CaseIteratorProxy {
939 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
940}
941
942impl fidl::endpoints::Proxy for CaseIteratorProxy {
943 type Protocol = CaseIteratorMarker;
944
945 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
946 Self::new(inner)
947 }
948
949 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
950 self.client.into_channel().map_err(|client| Self { client })
951 }
952
953 fn as_channel(&self) -> &::fidl::AsyncChannel {
954 self.client.as_channel()
955 }
956}
957
958impl CaseIteratorProxy {
959 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
961 let protocol_name = <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
962 Self { client: fidl::client::Client::new(channel, protocol_name) }
963 }
964
965 pub fn take_event_stream(&self) -> CaseIteratorEventStream {
971 CaseIteratorEventStream { event_receiver: self.client.take_event_receiver() }
972 }
973
974 pub fn r#get_next(
977 &self,
978 ) -> fidl::client::QueryResponseFut<Vec<Case>, fidl::encoding::DefaultFuchsiaResourceDialect>
979 {
980 CaseIteratorProxyInterface::r#get_next(self)
981 }
982}
983
984impl CaseIteratorProxyInterface for CaseIteratorProxy {
985 type GetNextResponseFut =
986 fidl::client::QueryResponseFut<Vec<Case>, fidl::encoding::DefaultFuchsiaResourceDialect>;
987 fn r#get_next(&self) -> Self::GetNextResponseFut {
988 fn _decode(
989 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
990 ) -> Result<Vec<Case>, fidl::Error> {
991 let _response = fidl::client::decode_transaction_body::<
992 CaseIteratorGetNextResponse,
993 fidl::encoding::DefaultFuchsiaResourceDialect,
994 0x7583f97b7486467c,
995 >(_buf?)?;
996 Ok(_response.cases)
997 }
998 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<Case>>(
999 (),
1000 0x7583f97b7486467c,
1001 fidl::encoding::DynamicFlags::empty(),
1002 _decode,
1003 )
1004 }
1005}
1006
1007pub struct CaseIteratorEventStream {
1008 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1009}
1010
1011impl std::marker::Unpin for CaseIteratorEventStream {}
1012
1013impl futures::stream::FusedStream for CaseIteratorEventStream {
1014 fn is_terminated(&self) -> bool {
1015 self.event_receiver.is_terminated()
1016 }
1017}
1018
1019impl futures::Stream for CaseIteratorEventStream {
1020 type Item = Result<CaseIteratorEvent, fidl::Error>;
1021
1022 fn poll_next(
1023 mut self: std::pin::Pin<&mut Self>,
1024 cx: &mut std::task::Context<'_>,
1025 ) -> std::task::Poll<Option<Self::Item>> {
1026 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1027 &mut self.event_receiver,
1028 cx
1029 )?) {
1030 Some(buf) => std::task::Poll::Ready(Some(CaseIteratorEvent::decode(buf))),
1031 None => std::task::Poll::Ready(None),
1032 }
1033 }
1034}
1035
1036#[derive(Debug)]
1037pub enum CaseIteratorEvent {}
1038
1039impl CaseIteratorEvent {
1040 fn decode(
1042 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1043 ) -> Result<CaseIteratorEvent, fidl::Error> {
1044 let (bytes, _handles) = buf.split_mut();
1045 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1046 debug_assert_eq!(tx_header.tx_id, 0);
1047 match tx_header.ordinal {
1048 _ => Err(fidl::Error::UnknownOrdinal {
1049 ordinal: tx_header.ordinal,
1050 protocol_name: <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1051 }),
1052 }
1053 }
1054}
1055
1056pub struct CaseIteratorRequestStream {
1058 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1059 is_terminated: bool,
1060}
1061
1062impl std::marker::Unpin for CaseIteratorRequestStream {}
1063
1064impl futures::stream::FusedStream for CaseIteratorRequestStream {
1065 fn is_terminated(&self) -> bool {
1066 self.is_terminated
1067 }
1068}
1069
1070impl fidl::endpoints::RequestStream for CaseIteratorRequestStream {
1071 type Protocol = CaseIteratorMarker;
1072 type ControlHandle = CaseIteratorControlHandle;
1073
1074 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1075 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1076 }
1077
1078 fn control_handle(&self) -> Self::ControlHandle {
1079 CaseIteratorControlHandle { inner: self.inner.clone() }
1080 }
1081
1082 fn into_inner(
1083 self,
1084 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1085 {
1086 (self.inner, self.is_terminated)
1087 }
1088
1089 fn from_inner(
1090 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1091 is_terminated: bool,
1092 ) -> Self {
1093 Self { inner, is_terminated }
1094 }
1095}
1096
1097impl futures::Stream for CaseIteratorRequestStream {
1098 type Item = Result<CaseIteratorRequest, fidl::Error>;
1099
1100 fn poll_next(
1101 mut self: std::pin::Pin<&mut Self>,
1102 cx: &mut std::task::Context<'_>,
1103 ) -> std::task::Poll<Option<Self::Item>> {
1104 let this = &mut *self;
1105 if this.inner.check_shutdown(cx) {
1106 this.is_terminated = true;
1107 return std::task::Poll::Ready(None);
1108 }
1109 if this.is_terminated {
1110 panic!("polled CaseIteratorRequestStream after completion");
1111 }
1112 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1113 |bytes, handles| {
1114 match this.inner.channel().read_etc(cx, bytes, handles) {
1115 std::task::Poll::Ready(Ok(())) => {}
1116 std::task::Poll::Pending => return std::task::Poll::Pending,
1117 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1118 this.is_terminated = true;
1119 return std::task::Poll::Ready(None);
1120 }
1121 std::task::Poll::Ready(Err(e)) => {
1122 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1123 e.into(),
1124 ))))
1125 }
1126 }
1127
1128 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1130
1131 std::task::Poll::Ready(Some(match header.ordinal {
1132 0x7583f97b7486467c => {
1133 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1134 let mut req = fidl::new_empty!(
1135 fidl::encoding::EmptyPayload,
1136 fidl::encoding::DefaultFuchsiaResourceDialect
1137 );
1138 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1139 let control_handle =
1140 CaseIteratorControlHandle { inner: this.inner.clone() };
1141 Ok(CaseIteratorRequest::GetNext {
1142 responder: CaseIteratorGetNextResponder {
1143 control_handle: std::mem::ManuallyDrop::new(control_handle),
1144 tx_id: header.tx_id,
1145 },
1146 })
1147 }
1148 _ => Err(fidl::Error::UnknownOrdinal {
1149 ordinal: header.ordinal,
1150 protocol_name:
1151 <CaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1152 }),
1153 }))
1154 },
1155 )
1156 }
1157}
1158
1159#[derive(Debug)]
1161pub enum CaseIteratorRequest {
1162 GetNext { responder: CaseIteratorGetNextResponder },
1165}
1166
1167impl CaseIteratorRequest {
1168 #[allow(irrefutable_let_patterns)]
1169 pub fn into_get_next(self) -> Option<(CaseIteratorGetNextResponder)> {
1170 if let CaseIteratorRequest::GetNext { responder } = self {
1171 Some((responder))
1172 } else {
1173 None
1174 }
1175 }
1176
1177 pub fn method_name(&self) -> &'static str {
1179 match *self {
1180 CaseIteratorRequest::GetNext { .. } => "get_next",
1181 }
1182 }
1183}
1184
1185#[derive(Debug, Clone)]
1186pub struct CaseIteratorControlHandle {
1187 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1188}
1189
1190impl fidl::endpoints::ControlHandle for CaseIteratorControlHandle {
1191 fn shutdown(&self) {
1192 self.inner.shutdown()
1193 }
1194 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1195 self.inner.shutdown_with_epitaph(status)
1196 }
1197
1198 fn is_closed(&self) -> bool {
1199 self.inner.channel().is_closed()
1200 }
1201 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1202 self.inner.channel().on_closed()
1203 }
1204
1205 #[cfg(target_os = "fuchsia")]
1206 fn signal_peer(
1207 &self,
1208 clear_mask: zx::Signals,
1209 set_mask: zx::Signals,
1210 ) -> Result<(), zx_status::Status> {
1211 use fidl::Peered;
1212 self.inner.channel().signal_peer(clear_mask, set_mask)
1213 }
1214}
1215
1216impl CaseIteratorControlHandle {}
1217
1218#[must_use = "FIDL methods require a response to be sent"]
1219#[derive(Debug)]
1220pub struct CaseIteratorGetNextResponder {
1221 control_handle: std::mem::ManuallyDrop<CaseIteratorControlHandle>,
1222 tx_id: u32,
1223}
1224
1225impl std::ops::Drop for CaseIteratorGetNextResponder {
1229 fn drop(&mut self) {
1230 self.control_handle.shutdown();
1231 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1233 }
1234}
1235
1236impl fidl::endpoints::Responder for CaseIteratorGetNextResponder {
1237 type ControlHandle = CaseIteratorControlHandle;
1238
1239 fn control_handle(&self) -> &CaseIteratorControlHandle {
1240 &self.control_handle
1241 }
1242
1243 fn drop_without_shutdown(mut self) {
1244 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1246 std::mem::forget(self);
1248 }
1249}
1250
1251impl CaseIteratorGetNextResponder {
1252 pub fn send(self, mut cases: &[Case]) -> Result<(), fidl::Error> {
1256 let _result = self.send_raw(cases);
1257 if _result.is_err() {
1258 self.control_handle.shutdown();
1259 }
1260 self.drop_without_shutdown();
1261 _result
1262 }
1263
1264 pub fn send_no_shutdown_on_err(self, mut cases: &[Case]) -> Result<(), fidl::Error> {
1266 let _result = self.send_raw(cases);
1267 self.drop_without_shutdown();
1268 _result
1269 }
1270
1271 fn send_raw(&self, mut cases: &[Case]) -> Result<(), fidl::Error> {
1272 self.control_handle.inner.send::<CaseIteratorGetNextResponse>(
1273 (cases,),
1274 self.tx_id,
1275 0x7583f97b7486467c,
1276 fidl::encoding::DynamicFlags::empty(),
1277 )
1278 }
1279}
1280
1281#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1282pub struct DebugDataIteratorMarker;
1283
1284impl fidl::endpoints::ProtocolMarker for DebugDataIteratorMarker {
1285 type Proxy = DebugDataIteratorProxy;
1286 type RequestStream = DebugDataIteratorRequestStream;
1287 #[cfg(target_os = "fuchsia")]
1288 type SynchronousProxy = DebugDataIteratorSynchronousProxy;
1289
1290 const DEBUG_NAME: &'static str = "(anonymous) DebugDataIterator";
1291}
1292
1293pub trait DebugDataIteratorProxyInterface: Send + Sync {
1294 type GetNextResponseFut: std::future::Future<Output = Result<Vec<DebugData>, fidl::Error>>
1295 + Send;
1296 fn r#get_next(&self) -> Self::GetNextResponseFut;
1297 type GetNextCompressedResponseFut: std::future::Future<Output = Result<Vec<DebugData>, fidl::Error>>
1298 + Send;
1299 fn r#get_next_compressed(&self) -> Self::GetNextCompressedResponseFut;
1300}
1301#[derive(Debug)]
1302#[cfg(target_os = "fuchsia")]
1303pub struct DebugDataIteratorSynchronousProxy {
1304 client: fidl::client::sync::Client,
1305}
1306
1307#[cfg(target_os = "fuchsia")]
1308impl fidl::endpoints::SynchronousProxy for DebugDataIteratorSynchronousProxy {
1309 type Proxy = DebugDataIteratorProxy;
1310 type Protocol = DebugDataIteratorMarker;
1311
1312 fn from_channel(inner: fidl::Channel) -> Self {
1313 Self::new(inner)
1314 }
1315
1316 fn into_channel(self) -> fidl::Channel {
1317 self.client.into_channel()
1318 }
1319
1320 fn as_channel(&self) -> &fidl::Channel {
1321 self.client.as_channel()
1322 }
1323}
1324
1325#[cfg(target_os = "fuchsia")]
1326impl DebugDataIteratorSynchronousProxy {
1327 pub fn new(channel: fidl::Channel) -> Self {
1328 let protocol_name =
1329 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1330 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1331 }
1332
1333 pub fn into_channel(self) -> fidl::Channel {
1334 self.client.into_channel()
1335 }
1336
1337 pub fn wait_for_event(
1340 &self,
1341 deadline: zx::MonotonicInstant,
1342 ) -> Result<DebugDataIteratorEvent, fidl::Error> {
1343 DebugDataIteratorEvent::decode(self.client.wait_for_event(deadline)?)
1344 }
1345
1346 pub fn r#get_next(
1350 &self,
1351 ___deadline: zx::MonotonicInstant,
1352 ) -> Result<Vec<DebugData>, fidl::Error> {
1353 let _response = self
1354 .client
1355 .send_query::<fidl::encoding::EmptyPayload, DebugDataIteratorGetNextResponse>(
1356 (),
1357 0x9ef24c823f5ad60,
1358 fidl::encoding::DynamicFlags::empty(),
1359 ___deadline,
1360 )?;
1361 Ok(_response.data)
1362 }
1363
1364 pub fn r#get_next_compressed(
1368 &self,
1369 ___deadline: zx::MonotonicInstant,
1370 ) -> Result<Vec<DebugData>, fidl::Error> {
1371 let _response = self
1372 .client
1373 .send_query::<fidl::encoding::EmptyPayload, DebugDataIteratorGetNextCompressedResponse>(
1374 (),
1375 0x6765e9cb918301f4,
1376 fidl::encoding::DynamicFlags::empty(),
1377 ___deadline,
1378 )?;
1379 Ok(_response.data)
1380 }
1381}
1382
1383#[cfg(target_os = "fuchsia")]
1384impl From<DebugDataIteratorSynchronousProxy> for zx::Handle {
1385 fn from(value: DebugDataIteratorSynchronousProxy) -> Self {
1386 value.into_channel().into()
1387 }
1388}
1389
1390#[cfg(target_os = "fuchsia")]
1391impl From<fidl::Channel> for DebugDataIteratorSynchronousProxy {
1392 fn from(value: fidl::Channel) -> Self {
1393 Self::new(value)
1394 }
1395}
1396
1397#[cfg(target_os = "fuchsia")]
1398impl fidl::endpoints::FromClient for DebugDataIteratorSynchronousProxy {
1399 type Protocol = DebugDataIteratorMarker;
1400
1401 fn from_client(value: fidl::endpoints::ClientEnd<DebugDataIteratorMarker>) -> Self {
1402 Self::new(value.into_channel())
1403 }
1404}
1405
1406#[derive(Debug, Clone)]
1407pub struct DebugDataIteratorProxy {
1408 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1409}
1410
1411impl fidl::endpoints::Proxy for DebugDataIteratorProxy {
1412 type Protocol = DebugDataIteratorMarker;
1413
1414 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1415 Self::new(inner)
1416 }
1417
1418 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1419 self.client.into_channel().map_err(|client| Self { client })
1420 }
1421
1422 fn as_channel(&self) -> &::fidl::AsyncChannel {
1423 self.client.as_channel()
1424 }
1425}
1426
1427impl DebugDataIteratorProxy {
1428 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1430 let protocol_name =
1431 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1432 Self { client: fidl::client::Client::new(channel, protocol_name) }
1433 }
1434
1435 pub fn take_event_stream(&self) -> DebugDataIteratorEventStream {
1441 DebugDataIteratorEventStream { event_receiver: self.client.take_event_receiver() }
1442 }
1443
1444 pub fn r#get_next(
1448 &self,
1449 ) -> fidl::client::QueryResponseFut<Vec<DebugData>, fidl::encoding::DefaultFuchsiaResourceDialect>
1450 {
1451 DebugDataIteratorProxyInterface::r#get_next(self)
1452 }
1453
1454 pub fn r#get_next_compressed(
1458 &self,
1459 ) -> fidl::client::QueryResponseFut<Vec<DebugData>, fidl::encoding::DefaultFuchsiaResourceDialect>
1460 {
1461 DebugDataIteratorProxyInterface::r#get_next_compressed(self)
1462 }
1463}
1464
1465impl DebugDataIteratorProxyInterface for DebugDataIteratorProxy {
1466 type GetNextResponseFut = fidl::client::QueryResponseFut<
1467 Vec<DebugData>,
1468 fidl::encoding::DefaultFuchsiaResourceDialect,
1469 >;
1470 fn r#get_next(&self) -> Self::GetNextResponseFut {
1471 fn _decode(
1472 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1473 ) -> Result<Vec<DebugData>, fidl::Error> {
1474 let _response = fidl::client::decode_transaction_body::<
1475 DebugDataIteratorGetNextResponse,
1476 fidl::encoding::DefaultFuchsiaResourceDialect,
1477 0x9ef24c823f5ad60,
1478 >(_buf?)?;
1479 Ok(_response.data)
1480 }
1481 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DebugData>>(
1482 (),
1483 0x9ef24c823f5ad60,
1484 fidl::encoding::DynamicFlags::empty(),
1485 _decode,
1486 )
1487 }
1488
1489 type GetNextCompressedResponseFut = fidl::client::QueryResponseFut<
1490 Vec<DebugData>,
1491 fidl::encoding::DefaultFuchsiaResourceDialect,
1492 >;
1493 fn r#get_next_compressed(&self) -> Self::GetNextCompressedResponseFut {
1494 fn _decode(
1495 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1496 ) -> Result<Vec<DebugData>, fidl::Error> {
1497 let _response = fidl::client::decode_transaction_body::<
1498 DebugDataIteratorGetNextCompressedResponse,
1499 fidl::encoding::DefaultFuchsiaResourceDialect,
1500 0x6765e9cb918301f4,
1501 >(_buf?)?;
1502 Ok(_response.data)
1503 }
1504 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<DebugData>>(
1505 (),
1506 0x6765e9cb918301f4,
1507 fidl::encoding::DynamicFlags::empty(),
1508 _decode,
1509 )
1510 }
1511}
1512
1513pub struct DebugDataIteratorEventStream {
1514 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1515}
1516
1517impl std::marker::Unpin for DebugDataIteratorEventStream {}
1518
1519impl futures::stream::FusedStream for DebugDataIteratorEventStream {
1520 fn is_terminated(&self) -> bool {
1521 self.event_receiver.is_terminated()
1522 }
1523}
1524
1525impl futures::Stream for DebugDataIteratorEventStream {
1526 type Item = Result<DebugDataIteratorEvent, fidl::Error>;
1527
1528 fn poll_next(
1529 mut self: std::pin::Pin<&mut Self>,
1530 cx: &mut std::task::Context<'_>,
1531 ) -> std::task::Poll<Option<Self::Item>> {
1532 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1533 &mut self.event_receiver,
1534 cx
1535 )?) {
1536 Some(buf) => std::task::Poll::Ready(Some(DebugDataIteratorEvent::decode(buf))),
1537 None => std::task::Poll::Ready(None),
1538 }
1539 }
1540}
1541
1542#[derive(Debug)]
1543pub enum DebugDataIteratorEvent {}
1544
1545impl DebugDataIteratorEvent {
1546 fn decode(
1548 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1549 ) -> Result<DebugDataIteratorEvent, fidl::Error> {
1550 let (bytes, _handles) = buf.split_mut();
1551 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1552 debug_assert_eq!(tx_header.tx_id, 0);
1553 match tx_header.ordinal {
1554 _ => Err(fidl::Error::UnknownOrdinal {
1555 ordinal: tx_header.ordinal,
1556 protocol_name:
1557 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1558 }),
1559 }
1560 }
1561}
1562
1563pub struct DebugDataIteratorRequestStream {
1565 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1566 is_terminated: bool,
1567}
1568
1569impl std::marker::Unpin for DebugDataIteratorRequestStream {}
1570
1571impl futures::stream::FusedStream for DebugDataIteratorRequestStream {
1572 fn is_terminated(&self) -> bool {
1573 self.is_terminated
1574 }
1575}
1576
1577impl fidl::endpoints::RequestStream for DebugDataIteratorRequestStream {
1578 type Protocol = DebugDataIteratorMarker;
1579 type ControlHandle = DebugDataIteratorControlHandle;
1580
1581 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1582 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1583 }
1584
1585 fn control_handle(&self) -> Self::ControlHandle {
1586 DebugDataIteratorControlHandle { inner: self.inner.clone() }
1587 }
1588
1589 fn into_inner(
1590 self,
1591 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1592 {
1593 (self.inner, self.is_terminated)
1594 }
1595
1596 fn from_inner(
1597 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1598 is_terminated: bool,
1599 ) -> Self {
1600 Self { inner, is_terminated }
1601 }
1602}
1603
1604impl futures::Stream for DebugDataIteratorRequestStream {
1605 type Item = Result<DebugDataIteratorRequest, fidl::Error>;
1606
1607 fn poll_next(
1608 mut self: std::pin::Pin<&mut Self>,
1609 cx: &mut std::task::Context<'_>,
1610 ) -> std::task::Poll<Option<Self::Item>> {
1611 let this = &mut *self;
1612 if this.inner.check_shutdown(cx) {
1613 this.is_terminated = true;
1614 return std::task::Poll::Ready(None);
1615 }
1616 if this.is_terminated {
1617 panic!("polled DebugDataIteratorRequestStream after completion");
1618 }
1619 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1620 |bytes, handles| {
1621 match this.inner.channel().read_etc(cx, bytes, handles) {
1622 std::task::Poll::Ready(Ok(())) => {}
1623 std::task::Poll::Pending => return std::task::Poll::Pending,
1624 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1625 this.is_terminated = true;
1626 return std::task::Poll::Ready(None);
1627 }
1628 std::task::Poll::Ready(Err(e)) => {
1629 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1630 e.into(),
1631 ))))
1632 }
1633 }
1634
1635 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1637
1638 std::task::Poll::Ready(Some(match header.ordinal {
1639 0x9ef24c823f5ad60 => {
1640 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1641 let mut req = fidl::new_empty!(
1642 fidl::encoding::EmptyPayload,
1643 fidl::encoding::DefaultFuchsiaResourceDialect
1644 );
1645 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1646 let control_handle =
1647 DebugDataIteratorControlHandle { inner: this.inner.clone() };
1648 Ok(DebugDataIteratorRequest::GetNext {
1649 responder: DebugDataIteratorGetNextResponder {
1650 control_handle: std::mem::ManuallyDrop::new(control_handle),
1651 tx_id: header.tx_id,
1652 },
1653 })
1654 }
1655 0x6765e9cb918301f4 => {
1656 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1657 let mut req = fidl::new_empty!(
1658 fidl::encoding::EmptyPayload,
1659 fidl::encoding::DefaultFuchsiaResourceDialect
1660 );
1661 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1662 let control_handle =
1663 DebugDataIteratorControlHandle { inner: this.inner.clone() };
1664 Ok(DebugDataIteratorRequest::GetNextCompressed {
1665 responder: DebugDataIteratorGetNextCompressedResponder {
1666 control_handle: std::mem::ManuallyDrop::new(control_handle),
1667 tx_id: header.tx_id,
1668 },
1669 })
1670 }
1671 _ => Err(fidl::Error::UnknownOrdinal {
1672 ordinal: header.ordinal,
1673 protocol_name:
1674 <DebugDataIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1675 }),
1676 }))
1677 },
1678 )
1679 }
1680}
1681
1682#[derive(Debug)]
1684pub enum DebugDataIteratorRequest {
1685 GetNext { responder: DebugDataIteratorGetNextResponder },
1689 GetNextCompressed { responder: DebugDataIteratorGetNextCompressedResponder },
1693}
1694
1695impl DebugDataIteratorRequest {
1696 #[allow(irrefutable_let_patterns)]
1697 pub fn into_get_next(self) -> Option<(DebugDataIteratorGetNextResponder)> {
1698 if let DebugDataIteratorRequest::GetNext { responder } = self {
1699 Some((responder))
1700 } else {
1701 None
1702 }
1703 }
1704
1705 #[allow(irrefutable_let_patterns)]
1706 pub fn into_get_next_compressed(self) -> Option<(DebugDataIteratorGetNextCompressedResponder)> {
1707 if let DebugDataIteratorRequest::GetNextCompressed { responder } = self {
1708 Some((responder))
1709 } else {
1710 None
1711 }
1712 }
1713
1714 pub fn method_name(&self) -> &'static str {
1716 match *self {
1717 DebugDataIteratorRequest::GetNext { .. } => "get_next",
1718 DebugDataIteratorRequest::GetNextCompressed { .. } => "get_next_compressed",
1719 }
1720 }
1721}
1722
1723#[derive(Debug, Clone)]
1724pub struct DebugDataIteratorControlHandle {
1725 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1726}
1727
1728impl fidl::endpoints::ControlHandle for DebugDataIteratorControlHandle {
1729 fn shutdown(&self) {
1730 self.inner.shutdown()
1731 }
1732 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1733 self.inner.shutdown_with_epitaph(status)
1734 }
1735
1736 fn is_closed(&self) -> bool {
1737 self.inner.channel().is_closed()
1738 }
1739 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1740 self.inner.channel().on_closed()
1741 }
1742
1743 #[cfg(target_os = "fuchsia")]
1744 fn signal_peer(
1745 &self,
1746 clear_mask: zx::Signals,
1747 set_mask: zx::Signals,
1748 ) -> Result<(), zx_status::Status> {
1749 use fidl::Peered;
1750 self.inner.channel().signal_peer(clear_mask, set_mask)
1751 }
1752}
1753
1754impl DebugDataIteratorControlHandle {}
1755
1756#[must_use = "FIDL methods require a response to be sent"]
1757#[derive(Debug)]
1758pub struct DebugDataIteratorGetNextResponder {
1759 control_handle: std::mem::ManuallyDrop<DebugDataIteratorControlHandle>,
1760 tx_id: u32,
1761}
1762
1763impl std::ops::Drop for DebugDataIteratorGetNextResponder {
1767 fn drop(&mut self) {
1768 self.control_handle.shutdown();
1769 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1771 }
1772}
1773
1774impl fidl::endpoints::Responder for DebugDataIteratorGetNextResponder {
1775 type ControlHandle = DebugDataIteratorControlHandle;
1776
1777 fn control_handle(&self) -> &DebugDataIteratorControlHandle {
1778 &self.control_handle
1779 }
1780
1781 fn drop_without_shutdown(mut self) {
1782 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1784 std::mem::forget(self);
1786 }
1787}
1788
1789impl DebugDataIteratorGetNextResponder {
1790 pub fn send(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1794 let _result = self.send_raw(data);
1795 if _result.is_err() {
1796 self.control_handle.shutdown();
1797 }
1798 self.drop_without_shutdown();
1799 _result
1800 }
1801
1802 pub fn send_no_shutdown_on_err(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1804 let _result = self.send_raw(data);
1805 self.drop_without_shutdown();
1806 _result
1807 }
1808
1809 fn send_raw(&self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1810 self.control_handle.inner.send::<DebugDataIteratorGetNextResponse>(
1811 (data.as_mut(),),
1812 self.tx_id,
1813 0x9ef24c823f5ad60,
1814 fidl::encoding::DynamicFlags::empty(),
1815 )
1816 }
1817}
1818
1819#[must_use = "FIDL methods require a response to be sent"]
1820#[derive(Debug)]
1821pub struct DebugDataIteratorGetNextCompressedResponder {
1822 control_handle: std::mem::ManuallyDrop<DebugDataIteratorControlHandle>,
1823 tx_id: u32,
1824}
1825
1826impl std::ops::Drop for DebugDataIteratorGetNextCompressedResponder {
1830 fn drop(&mut self) {
1831 self.control_handle.shutdown();
1832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1834 }
1835}
1836
1837impl fidl::endpoints::Responder for DebugDataIteratorGetNextCompressedResponder {
1838 type ControlHandle = DebugDataIteratorControlHandle;
1839
1840 fn control_handle(&self) -> &DebugDataIteratorControlHandle {
1841 &self.control_handle
1842 }
1843
1844 fn drop_without_shutdown(mut self) {
1845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1847 std::mem::forget(self);
1849 }
1850}
1851
1852impl DebugDataIteratorGetNextCompressedResponder {
1853 pub fn send(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1857 let _result = self.send_raw(data);
1858 if _result.is_err() {
1859 self.control_handle.shutdown();
1860 }
1861 self.drop_without_shutdown();
1862 _result
1863 }
1864
1865 pub fn send_no_shutdown_on_err(self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1867 let _result = self.send_raw(data);
1868 self.drop_without_shutdown();
1869 _result
1870 }
1871
1872 fn send_raw(&self, mut data: Vec<DebugData>) -> Result<(), fidl::Error> {
1873 self.control_handle.inner.send::<DebugDataIteratorGetNextCompressedResponse>(
1874 (data.as_mut(),),
1875 self.tx_id,
1876 0x6765e9cb918301f4,
1877 fidl::encoding::DynamicFlags::empty(),
1878 )
1879 }
1880}
1881
1882#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1883pub struct EarlyBootProfileMarker;
1884
1885impl fidl::endpoints::ProtocolMarker for EarlyBootProfileMarker {
1886 type Proxy = EarlyBootProfileProxy;
1887 type RequestStream = EarlyBootProfileRequestStream;
1888 #[cfg(target_os = "fuchsia")]
1889 type SynchronousProxy = EarlyBootProfileSynchronousProxy;
1890
1891 const DEBUG_NAME: &'static str = "fuchsia.test.manager.EarlyBootProfile";
1892}
1893impl fidl::endpoints::DiscoverableProtocolMarker for EarlyBootProfileMarker {}
1894
1895pub trait EarlyBootProfileProxyInterface: Send + Sync {
1896 fn r#register_watcher(
1897 &self,
1898 iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
1899 ) -> Result<(), fidl::Error>;
1900}
1901#[derive(Debug)]
1902#[cfg(target_os = "fuchsia")]
1903pub struct EarlyBootProfileSynchronousProxy {
1904 client: fidl::client::sync::Client,
1905}
1906
1907#[cfg(target_os = "fuchsia")]
1908impl fidl::endpoints::SynchronousProxy for EarlyBootProfileSynchronousProxy {
1909 type Proxy = EarlyBootProfileProxy;
1910 type Protocol = EarlyBootProfileMarker;
1911
1912 fn from_channel(inner: fidl::Channel) -> Self {
1913 Self::new(inner)
1914 }
1915
1916 fn into_channel(self) -> fidl::Channel {
1917 self.client.into_channel()
1918 }
1919
1920 fn as_channel(&self) -> &fidl::Channel {
1921 self.client.as_channel()
1922 }
1923}
1924
1925#[cfg(target_os = "fuchsia")]
1926impl EarlyBootProfileSynchronousProxy {
1927 pub fn new(channel: fidl::Channel) -> Self {
1928 let protocol_name = <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1929 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1930 }
1931
1932 pub fn into_channel(self) -> fidl::Channel {
1933 self.client.into_channel()
1934 }
1935
1936 pub fn wait_for_event(
1939 &self,
1940 deadline: zx::MonotonicInstant,
1941 ) -> Result<EarlyBootProfileEvent, fidl::Error> {
1942 EarlyBootProfileEvent::decode(self.client.wait_for_event(deadline)?)
1943 }
1944
1945 pub fn r#register_watcher(
1947 &self,
1948 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
1949 ) -> Result<(), fidl::Error> {
1950 self.client.send::<EarlyBootProfileRegisterWatcherRequest>(
1951 (iterator,),
1952 0x6bd6b03803b93715,
1953 fidl::encoding::DynamicFlags::empty(),
1954 )
1955 }
1956}
1957
1958#[cfg(target_os = "fuchsia")]
1959impl From<EarlyBootProfileSynchronousProxy> for zx::Handle {
1960 fn from(value: EarlyBootProfileSynchronousProxy) -> Self {
1961 value.into_channel().into()
1962 }
1963}
1964
1965#[cfg(target_os = "fuchsia")]
1966impl From<fidl::Channel> for EarlyBootProfileSynchronousProxy {
1967 fn from(value: fidl::Channel) -> Self {
1968 Self::new(value)
1969 }
1970}
1971
1972#[cfg(target_os = "fuchsia")]
1973impl fidl::endpoints::FromClient for EarlyBootProfileSynchronousProxy {
1974 type Protocol = EarlyBootProfileMarker;
1975
1976 fn from_client(value: fidl::endpoints::ClientEnd<EarlyBootProfileMarker>) -> Self {
1977 Self::new(value.into_channel())
1978 }
1979}
1980
1981#[derive(Debug, Clone)]
1982pub struct EarlyBootProfileProxy {
1983 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1984}
1985
1986impl fidl::endpoints::Proxy for EarlyBootProfileProxy {
1987 type Protocol = EarlyBootProfileMarker;
1988
1989 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1990 Self::new(inner)
1991 }
1992
1993 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1994 self.client.into_channel().map_err(|client| Self { client })
1995 }
1996
1997 fn as_channel(&self) -> &::fidl::AsyncChannel {
1998 self.client.as_channel()
1999 }
2000}
2001
2002impl EarlyBootProfileProxy {
2003 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2005 let protocol_name = <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2006 Self { client: fidl::client::Client::new(channel, protocol_name) }
2007 }
2008
2009 pub fn take_event_stream(&self) -> EarlyBootProfileEventStream {
2015 EarlyBootProfileEventStream { event_receiver: self.client.take_event_receiver() }
2016 }
2017
2018 pub fn r#register_watcher(
2020 &self,
2021 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2022 ) -> Result<(), fidl::Error> {
2023 EarlyBootProfileProxyInterface::r#register_watcher(self, iterator)
2024 }
2025}
2026
2027impl EarlyBootProfileProxyInterface for EarlyBootProfileProxy {
2028 fn r#register_watcher(
2029 &self,
2030 mut iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2031 ) -> Result<(), fidl::Error> {
2032 self.client.send::<EarlyBootProfileRegisterWatcherRequest>(
2033 (iterator,),
2034 0x6bd6b03803b93715,
2035 fidl::encoding::DynamicFlags::empty(),
2036 )
2037 }
2038}
2039
2040pub struct EarlyBootProfileEventStream {
2041 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2042}
2043
2044impl std::marker::Unpin for EarlyBootProfileEventStream {}
2045
2046impl futures::stream::FusedStream for EarlyBootProfileEventStream {
2047 fn is_terminated(&self) -> bool {
2048 self.event_receiver.is_terminated()
2049 }
2050}
2051
2052impl futures::Stream for EarlyBootProfileEventStream {
2053 type Item = Result<EarlyBootProfileEvent, fidl::Error>;
2054
2055 fn poll_next(
2056 mut self: std::pin::Pin<&mut Self>,
2057 cx: &mut std::task::Context<'_>,
2058 ) -> std::task::Poll<Option<Self::Item>> {
2059 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2060 &mut self.event_receiver,
2061 cx
2062 )?) {
2063 Some(buf) => std::task::Poll::Ready(Some(EarlyBootProfileEvent::decode(buf))),
2064 None => std::task::Poll::Ready(None),
2065 }
2066 }
2067}
2068
2069#[derive(Debug)]
2070pub enum EarlyBootProfileEvent {
2071 #[non_exhaustive]
2072 _UnknownEvent {
2073 ordinal: u64,
2075 },
2076}
2077
2078impl EarlyBootProfileEvent {
2079 fn decode(
2081 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2082 ) -> Result<EarlyBootProfileEvent, fidl::Error> {
2083 let (bytes, _handles) = buf.split_mut();
2084 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2085 debug_assert_eq!(tx_header.tx_id, 0);
2086 match tx_header.ordinal {
2087 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2088 Ok(EarlyBootProfileEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2089 }
2090 _ => Err(fidl::Error::UnknownOrdinal {
2091 ordinal: tx_header.ordinal,
2092 protocol_name:
2093 <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2094 }),
2095 }
2096 }
2097}
2098
2099pub struct EarlyBootProfileRequestStream {
2101 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2102 is_terminated: bool,
2103}
2104
2105impl std::marker::Unpin for EarlyBootProfileRequestStream {}
2106
2107impl futures::stream::FusedStream for EarlyBootProfileRequestStream {
2108 fn is_terminated(&self) -> bool {
2109 self.is_terminated
2110 }
2111}
2112
2113impl fidl::endpoints::RequestStream for EarlyBootProfileRequestStream {
2114 type Protocol = EarlyBootProfileMarker;
2115 type ControlHandle = EarlyBootProfileControlHandle;
2116
2117 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2118 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2119 }
2120
2121 fn control_handle(&self) -> Self::ControlHandle {
2122 EarlyBootProfileControlHandle { inner: self.inner.clone() }
2123 }
2124
2125 fn into_inner(
2126 self,
2127 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2128 {
2129 (self.inner, self.is_terminated)
2130 }
2131
2132 fn from_inner(
2133 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2134 is_terminated: bool,
2135 ) -> Self {
2136 Self { inner, is_terminated }
2137 }
2138}
2139
2140impl futures::Stream for EarlyBootProfileRequestStream {
2141 type Item = Result<EarlyBootProfileRequest, fidl::Error>;
2142
2143 fn poll_next(
2144 mut self: std::pin::Pin<&mut Self>,
2145 cx: &mut std::task::Context<'_>,
2146 ) -> std::task::Poll<Option<Self::Item>> {
2147 let this = &mut *self;
2148 if this.inner.check_shutdown(cx) {
2149 this.is_terminated = true;
2150 return std::task::Poll::Ready(None);
2151 }
2152 if this.is_terminated {
2153 panic!("polled EarlyBootProfileRequestStream after completion");
2154 }
2155 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2156 |bytes, handles| {
2157 match this.inner.channel().read_etc(cx, bytes, handles) {
2158 std::task::Poll::Ready(Ok(())) => {}
2159 std::task::Poll::Pending => return std::task::Poll::Pending,
2160 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2161 this.is_terminated = true;
2162 return std::task::Poll::Ready(None);
2163 }
2164 std::task::Poll::Ready(Err(e)) => {
2165 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2166 e.into(),
2167 ))))
2168 }
2169 }
2170
2171 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2173
2174 std::task::Poll::Ready(Some(match header.ordinal {
2175 0x6bd6b03803b93715 => {
2176 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
2177 let mut req = fidl::new_empty!(
2178 EarlyBootProfileRegisterWatcherRequest,
2179 fidl::encoding::DefaultFuchsiaResourceDialect
2180 );
2181 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<EarlyBootProfileRegisterWatcherRequest>(&header, _body_bytes, handles, &mut req)?;
2182 let control_handle =
2183 EarlyBootProfileControlHandle { inner: this.inner.clone() };
2184 Ok(EarlyBootProfileRequest::RegisterWatcher {
2185 iterator: req.iterator,
2186
2187 control_handle,
2188 })
2189 }
2190 _ if header.tx_id == 0
2191 && header
2192 .dynamic_flags()
2193 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2194 {
2195 Ok(EarlyBootProfileRequest::_UnknownMethod {
2196 ordinal: header.ordinal,
2197 control_handle: EarlyBootProfileControlHandle {
2198 inner: this.inner.clone(),
2199 },
2200 method_type: fidl::MethodType::OneWay,
2201 })
2202 }
2203 _ if header
2204 .dynamic_flags()
2205 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2206 {
2207 this.inner.send_framework_err(
2208 fidl::encoding::FrameworkErr::UnknownMethod,
2209 header.tx_id,
2210 header.ordinal,
2211 header.dynamic_flags(),
2212 (bytes, handles),
2213 )?;
2214 Ok(EarlyBootProfileRequest::_UnknownMethod {
2215 ordinal: header.ordinal,
2216 control_handle: EarlyBootProfileControlHandle {
2217 inner: this.inner.clone(),
2218 },
2219 method_type: fidl::MethodType::TwoWay,
2220 })
2221 }
2222 _ => Err(fidl::Error::UnknownOrdinal {
2223 ordinal: header.ordinal,
2224 protocol_name:
2225 <EarlyBootProfileMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2226 }),
2227 }))
2228 },
2229 )
2230 }
2231}
2232
2233#[derive(Debug)]
2236pub enum EarlyBootProfileRequest {
2237 RegisterWatcher {
2239 iterator: fidl::endpoints::ServerEnd<DebugDataIteratorMarker>,
2240 control_handle: EarlyBootProfileControlHandle,
2241 },
2242 #[non_exhaustive]
2244 _UnknownMethod {
2245 ordinal: u64,
2247 control_handle: EarlyBootProfileControlHandle,
2248 method_type: fidl::MethodType,
2249 },
2250}
2251
2252impl EarlyBootProfileRequest {
2253 #[allow(irrefutable_let_patterns)]
2254 pub fn into_register_watcher(
2255 self,
2256 ) -> Option<(fidl::endpoints::ServerEnd<DebugDataIteratorMarker>, EarlyBootProfileControlHandle)>
2257 {
2258 if let EarlyBootProfileRequest::RegisterWatcher { iterator, control_handle } = self {
2259 Some((iterator, control_handle))
2260 } else {
2261 None
2262 }
2263 }
2264
2265 pub fn method_name(&self) -> &'static str {
2267 match *self {
2268 EarlyBootProfileRequest::RegisterWatcher { .. } => "register_watcher",
2269 EarlyBootProfileRequest::_UnknownMethod {
2270 method_type: fidl::MethodType::OneWay,
2271 ..
2272 } => "unknown one-way method",
2273 EarlyBootProfileRequest::_UnknownMethod {
2274 method_type: fidl::MethodType::TwoWay,
2275 ..
2276 } => "unknown two-way method",
2277 }
2278 }
2279}
2280
2281#[derive(Debug, Clone)]
2282pub struct EarlyBootProfileControlHandle {
2283 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2284}
2285
2286impl fidl::endpoints::ControlHandle for EarlyBootProfileControlHandle {
2287 fn shutdown(&self) {
2288 self.inner.shutdown()
2289 }
2290 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2291 self.inner.shutdown_with_epitaph(status)
2292 }
2293
2294 fn is_closed(&self) -> bool {
2295 self.inner.channel().is_closed()
2296 }
2297 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2298 self.inner.channel().on_closed()
2299 }
2300
2301 #[cfg(target_os = "fuchsia")]
2302 fn signal_peer(
2303 &self,
2304 clear_mask: zx::Signals,
2305 set_mask: zx::Signals,
2306 ) -> Result<(), zx_status::Status> {
2307 use fidl::Peered;
2308 self.inner.channel().signal_peer(clear_mask, set_mask)
2309 }
2310}
2311
2312impl EarlyBootProfileControlHandle {}
2313
2314#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2315pub struct QueryMarker;
2316
2317impl fidl::endpoints::ProtocolMarker for QueryMarker {
2318 type Proxy = QueryProxy;
2319 type RequestStream = QueryRequestStream;
2320 #[cfg(target_os = "fuchsia")]
2321 type SynchronousProxy = QuerySynchronousProxy;
2322
2323 const DEBUG_NAME: &'static str = "fuchsia.test.manager.Query";
2324}
2325impl fidl::endpoints::DiscoverableProtocolMarker for QueryMarker {}
2326pub type QueryEnumerateResult = Result<(), LaunchError>;
2327pub type QueryEnumerateInRealmResult = Result<(), LaunchError>;
2328
2329pub trait QueryProxyInterface: Send + Sync {
2330 type EnumerateResponseFut: std::future::Future<Output = Result<QueryEnumerateResult, fidl::Error>>
2331 + Send;
2332 fn r#enumerate(
2333 &self,
2334 test_url: &str,
2335 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2336 ) -> Self::EnumerateResponseFut;
2337 type EnumerateInRealmResponseFut: std::future::Future<Output = Result<QueryEnumerateInRealmResult, fidl::Error>>
2338 + Send;
2339 fn r#enumerate_in_realm(
2340 &self,
2341 test_url: &str,
2342 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2343 offers: &[fidl_fuchsia_component_decl::Offer],
2344 test_collection: &str,
2345 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2346 ) -> Self::EnumerateInRealmResponseFut;
2347}
2348#[derive(Debug)]
2349#[cfg(target_os = "fuchsia")]
2350pub struct QuerySynchronousProxy {
2351 client: fidl::client::sync::Client,
2352}
2353
2354#[cfg(target_os = "fuchsia")]
2355impl fidl::endpoints::SynchronousProxy for QuerySynchronousProxy {
2356 type Proxy = QueryProxy;
2357 type Protocol = QueryMarker;
2358
2359 fn from_channel(inner: fidl::Channel) -> Self {
2360 Self::new(inner)
2361 }
2362
2363 fn into_channel(self) -> fidl::Channel {
2364 self.client.into_channel()
2365 }
2366
2367 fn as_channel(&self) -> &fidl::Channel {
2368 self.client.as_channel()
2369 }
2370}
2371
2372#[cfg(target_os = "fuchsia")]
2373impl QuerySynchronousProxy {
2374 pub fn new(channel: fidl::Channel) -> Self {
2375 let protocol_name = <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2376 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2377 }
2378
2379 pub fn into_channel(self) -> fidl::Channel {
2380 self.client.into_channel()
2381 }
2382
2383 pub fn wait_for_event(
2386 &self,
2387 deadline: zx::MonotonicInstant,
2388 ) -> Result<QueryEvent, fidl::Error> {
2389 QueryEvent::decode(self.client.wait_for_event(deadline)?)
2390 }
2391
2392 pub fn r#enumerate(
2394 &self,
2395 mut test_url: &str,
2396 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2397 ___deadline: zx::MonotonicInstant,
2398 ) -> Result<QueryEnumerateResult, fidl::Error> {
2399 let _response = self.client.send_query::<
2400 QueryEnumerateRequest,
2401 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
2402 >(
2403 (test_url, iterator,),
2404 0x6cd89c1f2728d418,
2405 fidl::encoding::DynamicFlags::empty(),
2406 ___deadline,
2407 )?;
2408 Ok(_response.map(|x| x))
2409 }
2410
2411 pub fn r#enumerate_in_realm(
2413 &self,
2414 mut test_url: &str,
2415 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2416 mut offers: &[fidl_fuchsia_component_decl::Offer],
2417 mut test_collection: &str,
2418 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2419 ___deadline: zx::MonotonicInstant,
2420 ) -> Result<QueryEnumerateInRealmResult, fidl::Error> {
2421 let _response = self.client.send_query::<
2422 QueryEnumerateInRealmRequest,
2423 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
2424 >(
2425 (test_url, realm, offers, test_collection, iterator,),
2426 0x7f7f533194a51ec5,
2427 fidl::encoding::DynamicFlags::empty(),
2428 ___deadline,
2429 )?;
2430 Ok(_response.map(|x| x))
2431 }
2432}
2433
2434#[cfg(target_os = "fuchsia")]
2435impl From<QuerySynchronousProxy> for zx::Handle {
2436 fn from(value: QuerySynchronousProxy) -> Self {
2437 value.into_channel().into()
2438 }
2439}
2440
2441#[cfg(target_os = "fuchsia")]
2442impl From<fidl::Channel> for QuerySynchronousProxy {
2443 fn from(value: fidl::Channel) -> Self {
2444 Self::new(value)
2445 }
2446}
2447
2448#[cfg(target_os = "fuchsia")]
2449impl fidl::endpoints::FromClient for QuerySynchronousProxy {
2450 type Protocol = QueryMarker;
2451
2452 fn from_client(value: fidl::endpoints::ClientEnd<QueryMarker>) -> Self {
2453 Self::new(value.into_channel())
2454 }
2455}
2456
2457#[derive(Debug, Clone)]
2458pub struct QueryProxy {
2459 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2460}
2461
2462impl fidl::endpoints::Proxy for QueryProxy {
2463 type Protocol = QueryMarker;
2464
2465 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2466 Self::new(inner)
2467 }
2468
2469 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2470 self.client.into_channel().map_err(|client| Self { client })
2471 }
2472
2473 fn as_channel(&self) -> &::fidl::AsyncChannel {
2474 self.client.as_channel()
2475 }
2476}
2477
2478impl QueryProxy {
2479 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2481 let protocol_name = <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2482 Self { client: fidl::client::Client::new(channel, protocol_name) }
2483 }
2484
2485 pub fn take_event_stream(&self) -> QueryEventStream {
2491 QueryEventStream { event_receiver: self.client.take_event_receiver() }
2492 }
2493
2494 pub fn r#enumerate(
2496 &self,
2497 mut test_url: &str,
2498 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2499 ) -> fidl::client::QueryResponseFut<
2500 QueryEnumerateResult,
2501 fidl::encoding::DefaultFuchsiaResourceDialect,
2502 > {
2503 QueryProxyInterface::r#enumerate(self, test_url, iterator)
2504 }
2505
2506 pub fn r#enumerate_in_realm(
2508 &self,
2509 mut test_url: &str,
2510 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2511 mut offers: &[fidl_fuchsia_component_decl::Offer],
2512 mut test_collection: &str,
2513 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2514 ) -> fidl::client::QueryResponseFut<
2515 QueryEnumerateInRealmResult,
2516 fidl::encoding::DefaultFuchsiaResourceDialect,
2517 > {
2518 QueryProxyInterface::r#enumerate_in_realm(
2519 self,
2520 test_url,
2521 realm,
2522 offers,
2523 test_collection,
2524 iterator,
2525 )
2526 }
2527}
2528
2529impl QueryProxyInterface for QueryProxy {
2530 type EnumerateResponseFut = fidl::client::QueryResponseFut<
2531 QueryEnumerateResult,
2532 fidl::encoding::DefaultFuchsiaResourceDialect,
2533 >;
2534 fn r#enumerate(
2535 &self,
2536 mut test_url: &str,
2537 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2538 ) -> Self::EnumerateResponseFut {
2539 fn _decode(
2540 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2541 ) -> Result<QueryEnumerateResult, fidl::Error> {
2542 let _response = fidl::client::decode_transaction_body::<
2543 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
2544 fidl::encoding::DefaultFuchsiaResourceDialect,
2545 0x6cd89c1f2728d418,
2546 >(_buf?)?;
2547 Ok(_response.map(|x| x))
2548 }
2549 self.client.send_query_and_decode::<QueryEnumerateRequest, QueryEnumerateResult>(
2550 (test_url, iterator),
2551 0x6cd89c1f2728d418,
2552 fidl::encoding::DynamicFlags::empty(),
2553 _decode,
2554 )
2555 }
2556
2557 type EnumerateInRealmResponseFut = fidl::client::QueryResponseFut<
2558 QueryEnumerateInRealmResult,
2559 fidl::encoding::DefaultFuchsiaResourceDialect,
2560 >;
2561 fn r#enumerate_in_realm(
2562 &self,
2563 mut test_url: &str,
2564 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2565 mut offers: &[fidl_fuchsia_component_decl::Offer],
2566 mut test_collection: &str,
2567 mut iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2568 ) -> Self::EnumerateInRealmResponseFut {
2569 fn _decode(
2570 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2571 ) -> Result<QueryEnumerateInRealmResult, fidl::Error> {
2572 let _response = fidl::client::decode_transaction_body::<
2573 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, LaunchError>,
2574 fidl::encoding::DefaultFuchsiaResourceDialect,
2575 0x7f7f533194a51ec5,
2576 >(_buf?)?;
2577 Ok(_response.map(|x| x))
2578 }
2579 self.client
2580 .send_query_and_decode::<QueryEnumerateInRealmRequest, QueryEnumerateInRealmResult>(
2581 (test_url, realm, offers, test_collection, iterator),
2582 0x7f7f533194a51ec5,
2583 fidl::encoding::DynamicFlags::empty(),
2584 _decode,
2585 )
2586 }
2587}
2588
2589pub struct QueryEventStream {
2590 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2591}
2592
2593impl std::marker::Unpin for QueryEventStream {}
2594
2595impl futures::stream::FusedStream for QueryEventStream {
2596 fn is_terminated(&self) -> bool {
2597 self.event_receiver.is_terminated()
2598 }
2599}
2600
2601impl futures::Stream for QueryEventStream {
2602 type Item = Result<QueryEvent, fidl::Error>;
2603
2604 fn poll_next(
2605 mut self: std::pin::Pin<&mut Self>,
2606 cx: &mut std::task::Context<'_>,
2607 ) -> std::task::Poll<Option<Self::Item>> {
2608 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2609 &mut self.event_receiver,
2610 cx
2611 )?) {
2612 Some(buf) => std::task::Poll::Ready(Some(QueryEvent::decode(buf))),
2613 None => std::task::Poll::Ready(None),
2614 }
2615 }
2616}
2617
2618#[derive(Debug)]
2619pub enum QueryEvent {
2620 #[non_exhaustive]
2621 _UnknownEvent {
2622 ordinal: u64,
2624 },
2625}
2626
2627impl QueryEvent {
2628 fn decode(
2630 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2631 ) -> Result<QueryEvent, fidl::Error> {
2632 let (bytes, _handles) = buf.split_mut();
2633 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2634 debug_assert_eq!(tx_header.tx_id, 0);
2635 match tx_header.ordinal {
2636 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
2637 Ok(QueryEvent::_UnknownEvent { ordinal: tx_header.ordinal })
2638 }
2639 _ => Err(fidl::Error::UnknownOrdinal {
2640 ordinal: tx_header.ordinal,
2641 protocol_name: <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2642 }),
2643 }
2644 }
2645}
2646
2647pub struct QueryRequestStream {
2649 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2650 is_terminated: bool,
2651}
2652
2653impl std::marker::Unpin for QueryRequestStream {}
2654
2655impl futures::stream::FusedStream for QueryRequestStream {
2656 fn is_terminated(&self) -> bool {
2657 self.is_terminated
2658 }
2659}
2660
2661impl fidl::endpoints::RequestStream for QueryRequestStream {
2662 type Protocol = QueryMarker;
2663 type ControlHandle = QueryControlHandle;
2664
2665 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2666 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2667 }
2668
2669 fn control_handle(&self) -> Self::ControlHandle {
2670 QueryControlHandle { inner: self.inner.clone() }
2671 }
2672
2673 fn into_inner(
2674 self,
2675 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2676 {
2677 (self.inner, self.is_terminated)
2678 }
2679
2680 fn from_inner(
2681 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2682 is_terminated: bool,
2683 ) -> Self {
2684 Self { inner, is_terminated }
2685 }
2686}
2687
2688impl futures::Stream for QueryRequestStream {
2689 type Item = Result<QueryRequest, fidl::Error>;
2690
2691 fn poll_next(
2692 mut self: std::pin::Pin<&mut Self>,
2693 cx: &mut std::task::Context<'_>,
2694 ) -> std::task::Poll<Option<Self::Item>> {
2695 let this = &mut *self;
2696 if this.inner.check_shutdown(cx) {
2697 this.is_terminated = true;
2698 return std::task::Poll::Ready(None);
2699 }
2700 if this.is_terminated {
2701 panic!("polled QueryRequestStream after completion");
2702 }
2703 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2704 |bytes, handles| {
2705 match this.inner.channel().read_etc(cx, bytes, handles) {
2706 std::task::Poll::Ready(Ok(())) => {}
2707 std::task::Poll::Pending => return std::task::Poll::Pending,
2708 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2709 this.is_terminated = true;
2710 return std::task::Poll::Ready(None);
2711 }
2712 std::task::Poll::Ready(Err(e)) => {
2713 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2714 e.into(),
2715 ))))
2716 }
2717 }
2718
2719 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2721
2722 std::task::Poll::Ready(Some(match header.ordinal {
2723 0x6cd89c1f2728d418 => {
2724 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2725 let mut req = fidl::new_empty!(
2726 QueryEnumerateRequest,
2727 fidl::encoding::DefaultFuchsiaResourceDialect
2728 );
2729 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<QueryEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
2730 let control_handle = QueryControlHandle { inner: this.inner.clone() };
2731 Ok(QueryRequest::Enumerate {
2732 test_url: req.test_url,
2733 iterator: req.iterator,
2734
2735 responder: QueryEnumerateResponder {
2736 control_handle: std::mem::ManuallyDrop::new(control_handle),
2737 tx_id: header.tx_id,
2738 },
2739 })
2740 }
2741 0x7f7f533194a51ec5 => {
2742 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2743 let mut req = fidl::new_empty!(
2744 QueryEnumerateInRealmRequest,
2745 fidl::encoding::DefaultFuchsiaResourceDialect
2746 );
2747 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<QueryEnumerateInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
2748 let control_handle = QueryControlHandle { inner: this.inner.clone() };
2749 Ok(QueryRequest::EnumerateInRealm {
2750 test_url: req.test_url,
2751 realm: req.realm,
2752 offers: req.offers,
2753 test_collection: req.test_collection,
2754 iterator: req.iterator,
2755
2756 responder: QueryEnumerateInRealmResponder {
2757 control_handle: std::mem::ManuallyDrop::new(control_handle),
2758 tx_id: header.tx_id,
2759 },
2760 })
2761 }
2762 _ if header.tx_id == 0
2763 && header
2764 .dynamic_flags()
2765 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2766 {
2767 Ok(QueryRequest::_UnknownMethod {
2768 ordinal: header.ordinal,
2769 control_handle: QueryControlHandle { inner: this.inner.clone() },
2770 method_type: fidl::MethodType::OneWay,
2771 })
2772 }
2773 _ if header
2774 .dynamic_flags()
2775 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
2776 {
2777 this.inner.send_framework_err(
2778 fidl::encoding::FrameworkErr::UnknownMethod,
2779 header.tx_id,
2780 header.ordinal,
2781 header.dynamic_flags(),
2782 (bytes, handles),
2783 )?;
2784 Ok(QueryRequest::_UnknownMethod {
2785 ordinal: header.ordinal,
2786 control_handle: QueryControlHandle { inner: this.inner.clone() },
2787 method_type: fidl::MethodType::TwoWay,
2788 })
2789 }
2790 _ => Err(fidl::Error::UnknownOrdinal {
2791 ordinal: header.ordinal,
2792 protocol_name: <QueryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2793 }),
2794 }))
2795 },
2796 )
2797 }
2798}
2799
2800#[derive(Debug)]
2801pub enum QueryRequest {
2802 Enumerate {
2804 test_url: String,
2805 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2806 responder: QueryEnumerateResponder,
2807 },
2808 EnumerateInRealm {
2810 test_url: String,
2811 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2812 offers: Vec<fidl_fuchsia_component_decl::Offer>,
2813 test_collection: String,
2814 iterator: fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2815 responder: QueryEnumerateInRealmResponder,
2816 },
2817 #[non_exhaustive]
2819 _UnknownMethod {
2820 ordinal: u64,
2822 control_handle: QueryControlHandle,
2823 method_type: fidl::MethodType,
2824 },
2825}
2826
2827impl QueryRequest {
2828 #[allow(irrefutable_let_patterns)]
2829 pub fn into_enumerate(
2830 self,
2831 ) -> Option<(String, fidl::endpoints::ServerEnd<CaseIteratorMarker>, QueryEnumerateResponder)>
2832 {
2833 if let QueryRequest::Enumerate { test_url, iterator, responder } = self {
2834 Some((test_url, iterator, responder))
2835 } else {
2836 None
2837 }
2838 }
2839
2840 #[allow(irrefutable_let_patterns)]
2841 pub fn into_enumerate_in_realm(
2842 self,
2843 ) -> Option<(
2844 String,
2845 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
2846 Vec<fidl_fuchsia_component_decl::Offer>,
2847 String,
2848 fidl::endpoints::ServerEnd<CaseIteratorMarker>,
2849 QueryEnumerateInRealmResponder,
2850 )> {
2851 if let QueryRequest::EnumerateInRealm {
2852 test_url,
2853 realm,
2854 offers,
2855 test_collection,
2856 iterator,
2857 responder,
2858 } = self
2859 {
2860 Some((test_url, realm, offers, test_collection, iterator, responder))
2861 } else {
2862 None
2863 }
2864 }
2865
2866 pub fn method_name(&self) -> &'static str {
2868 match *self {
2869 QueryRequest::Enumerate { .. } => "enumerate",
2870 QueryRequest::EnumerateInRealm { .. } => "enumerate_in_realm",
2871 QueryRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
2872 "unknown one-way method"
2873 }
2874 QueryRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
2875 "unknown two-way method"
2876 }
2877 }
2878 }
2879}
2880
2881#[derive(Debug, Clone)]
2882pub struct QueryControlHandle {
2883 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2884}
2885
2886impl fidl::endpoints::ControlHandle for QueryControlHandle {
2887 fn shutdown(&self) {
2888 self.inner.shutdown()
2889 }
2890 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2891 self.inner.shutdown_with_epitaph(status)
2892 }
2893
2894 fn is_closed(&self) -> bool {
2895 self.inner.channel().is_closed()
2896 }
2897 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2898 self.inner.channel().on_closed()
2899 }
2900
2901 #[cfg(target_os = "fuchsia")]
2902 fn signal_peer(
2903 &self,
2904 clear_mask: zx::Signals,
2905 set_mask: zx::Signals,
2906 ) -> Result<(), zx_status::Status> {
2907 use fidl::Peered;
2908 self.inner.channel().signal_peer(clear_mask, set_mask)
2909 }
2910}
2911
2912impl QueryControlHandle {}
2913
2914#[must_use = "FIDL methods require a response to be sent"]
2915#[derive(Debug)]
2916pub struct QueryEnumerateResponder {
2917 control_handle: std::mem::ManuallyDrop<QueryControlHandle>,
2918 tx_id: u32,
2919}
2920
2921impl std::ops::Drop for QueryEnumerateResponder {
2925 fn drop(&mut self) {
2926 self.control_handle.shutdown();
2927 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2929 }
2930}
2931
2932impl fidl::endpoints::Responder for QueryEnumerateResponder {
2933 type ControlHandle = QueryControlHandle;
2934
2935 fn control_handle(&self) -> &QueryControlHandle {
2936 &self.control_handle
2937 }
2938
2939 fn drop_without_shutdown(mut self) {
2940 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2942 std::mem::forget(self);
2944 }
2945}
2946
2947impl QueryEnumerateResponder {
2948 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
2952 let _result = self.send_raw(result);
2953 if _result.is_err() {
2954 self.control_handle.shutdown();
2955 }
2956 self.drop_without_shutdown();
2957 _result
2958 }
2959
2960 pub fn send_no_shutdown_on_err(
2962 self,
2963 mut result: Result<(), LaunchError>,
2964 ) -> Result<(), fidl::Error> {
2965 let _result = self.send_raw(result);
2966 self.drop_without_shutdown();
2967 _result
2968 }
2969
2970 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
2971 self.control_handle.inner.send::<fidl::encoding::ResultType<
2972 fidl::encoding::EmptyStruct,
2973 LaunchError,
2974 >>(
2975 result,
2976 self.tx_id,
2977 0x6cd89c1f2728d418,
2978 fidl::encoding::DynamicFlags::empty(),
2979 )
2980 }
2981}
2982
2983#[must_use = "FIDL methods require a response to be sent"]
2984#[derive(Debug)]
2985pub struct QueryEnumerateInRealmResponder {
2986 control_handle: std::mem::ManuallyDrop<QueryControlHandle>,
2987 tx_id: u32,
2988}
2989
2990impl std::ops::Drop for QueryEnumerateInRealmResponder {
2994 fn drop(&mut self) {
2995 self.control_handle.shutdown();
2996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2998 }
2999}
3000
3001impl fidl::endpoints::Responder for QueryEnumerateInRealmResponder {
3002 type ControlHandle = QueryControlHandle;
3003
3004 fn control_handle(&self) -> &QueryControlHandle {
3005 &self.control_handle
3006 }
3007
3008 fn drop_without_shutdown(mut self) {
3009 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3011 std::mem::forget(self);
3013 }
3014}
3015
3016impl QueryEnumerateInRealmResponder {
3017 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3021 let _result = self.send_raw(result);
3022 if _result.is_err() {
3023 self.control_handle.shutdown();
3024 }
3025 self.drop_without_shutdown();
3026 _result
3027 }
3028
3029 pub fn send_no_shutdown_on_err(
3031 self,
3032 mut result: Result<(), LaunchError>,
3033 ) -> Result<(), fidl::Error> {
3034 let _result = self.send_raw(result);
3035 self.drop_without_shutdown();
3036 _result
3037 }
3038
3039 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
3040 self.control_handle.inner.send::<fidl::encoding::ResultType<
3041 fidl::encoding::EmptyStruct,
3042 LaunchError,
3043 >>(
3044 result,
3045 self.tx_id,
3046 0x7f7f533194a51ec5,
3047 fidl::encoding::DynamicFlags::empty(),
3048 )
3049 }
3050}
3051
3052#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3053pub struct RunBuilderMarker;
3054
3055impl fidl::endpoints::ProtocolMarker for RunBuilderMarker {
3056 type Proxy = RunBuilderProxy;
3057 type RequestStream = RunBuilderRequestStream;
3058 #[cfg(target_os = "fuchsia")]
3059 type SynchronousProxy = RunBuilderSynchronousProxy;
3060
3061 const DEBUG_NAME: &'static str = "fuchsia.test.manager.RunBuilder";
3062}
3063impl fidl::endpoints::DiscoverableProtocolMarker for RunBuilderMarker {}
3064
3065pub trait RunBuilderProxyInterface: Send + Sync {
3066 fn r#add_suite(
3067 &self,
3068 test_url: &str,
3069 options: &RunOptions,
3070 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3071 ) -> Result<(), fidl::Error>;
3072 fn r#add_suite_in_realm(
3073 &self,
3074 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3075 offers: &[fidl_fuchsia_component_decl::Offer],
3076 test_collection: &str,
3077 test_url: &str,
3078 options: &RunOptions,
3079 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3080 ) -> Result<(), fidl::Error>;
3081 fn r#with_scheduling_options(&self, options: &SchedulingOptions) -> Result<(), fidl::Error>;
3082 fn r#build(
3083 &self,
3084 controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3085 ) -> Result<(), fidl::Error>;
3086}
3087#[derive(Debug)]
3088#[cfg(target_os = "fuchsia")]
3089pub struct RunBuilderSynchronousProxy {
3090 client: fidl::client::sync::Client,
3091}
3092
3093#[cfg(target_os = "fuchsia")]
3094impl fidl::endpoints::SynchronousProxy for RunBuilderSynchronousProxy {
3095 type Proxy = RunBuilderProxy;
3096 type Protocol = RunBuilderMarker;
3097
3098 fn from_channel(inner: fidl::Channel) -> Self {
3099 Self::new(inner)
3100 }
3101
3102 fn into_channel(self) -> fidl::Channel {
3103 self.client.into_channel()
3104 }
3105
3106 fn as_channel(&self) -> &fidl::Channel {
3107 self.client.as_channel()
3108 }
3109}
3110
3111#[cfg(target_os = "fuchsia")]
3112impl RunBuilderSynchronousProxy {
3113 pub fn new(channel: fidl::Channel) -> Self {
3114 let protocol_name = <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3115 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3116 }
3117
3118 pub fn into_channel(self) -> fidl::Channel {
3119 self.client.into_channel()
3120 }
3121
3122 pub fn wait_for_event(
3125 &self,
3126 deadline: zx::MonotonicInstant,
3127 ) -> Result<RunBuilderEvent, fidl::Error> {
3128 RunBuilderEvent::decode(self.client.wait_for_event(deadline)?)
3129 }
3130
3131 pub fn r#add_suite(
3136 &self,
3137 mut test_url: &str,
3138 mut options: &RunOptions,
3139 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3140 ) -> Result<(), fidl::Error> {
3141 self.client.send::<RunBuilderAddSuiteRequest>(
3142 (test_url, options, controller),
3143 0x71e7f9a06daac486,
3144 fidl::encoding::DynamicFlags::FLEXIBLE,
3145 )
3146 }
3147
3148 pub fn r#add_suite_in_realm(
3154 &self,
3155 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3156 mut offers: &[fidl_fuchsia_component_decl::Offer],
3157 mut test_collection: &str,
3158 mut test_url: &str,
3159 mut options: &RunOptions,
3160 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3161 ) -> Result<(), fidl::Error> {
3162 self.client.send::<RunBuilderAddSuiteInRealmRequest>(
3163 (realm, offers, test_collection, test_url, options, controller),
3164 0x4d10c582715a8683,
3165 fidl::encoding::DynamicFlags::FLEXIBLE,
3166 )
3167 }
3168
3169 pub fn r#with_scheduling_options(
3171 &self,
3172 mut options: &SchedulingOptions,
3173 ) -> Result<(), fidl::Error> {
3174 self.client.send::<RunBuilderWithSchedulingOptionsRequest>(
3175 (options,),
3176 0x55e73fdbeade0b0b,
3177 fidl::encoding::DynamicFlags::FLEXIBLE,
3178 )
3179 }
3180
3181 pub fn r#build(
3186 &self,
3187 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3188 ) -> Result<(), fidl::Error> {
3189 self.client.send::<RunBuilderBuildRequest>(
3190 (controller,),
3191 0x7879f2360ff1f160,
3192 fidl::encoding::DynamicFlags::FLEXIBLE,
3193 )
3194 }
3195}
3196
3197#[cfg(target_os = "fuchsia")]
3198impl From<RunBuilderSynchronousProxy> for zx::Handle {
3199 fn from(value: RunBuilderSynchronousProxy) -> Self {
3200 value.into_channel().into()
3201 }
3202}
3203
3204#[cfg(target_os = "fuchsia")]
3205impl From<fidl::Channel> for RunBuilderSynchronousProxy {
3206 fn from(value: fidl::Channel) -> Self {
3207 Self::new(value)
3208 }
3209}
3210
3211#[cfg(target_os = "fuchsia")]
3212impl fidl::endpoints::FromClient for RunBuilderSynchronousProxy {
3213 type Protocol = RunBuilderMarker;
3214
3215 fn from_client(value: fidl::endpoints::ClientEnd<RunBuilderMarker>) -> Self {
3216 Self::new(value.into_channel())
3217 }
3218}
3219
3220#[derive(Debug, Clone)]
3221pub struct RunBuilderProxy {
3222 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3223}
3224
3225impl fidl::endpoints::Proxy for RunBuilderProxy {
3226 type Protocol = RunBuilderMarker;
3227
3228 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3229 Self::new(inner)
3230 }
3231
3232 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3233 self.client.into_channel().map_err(|client| Self { client })
3234 }
3235
3236 fn as_channel(&self) -> &::fidl::AsyncChannel {
3237 self.client.as_channel()
3238 }
3239}
3240
3241impl RunBuilderProxy {
3242 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3244 let protocol_name = <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3245 Self { client: fidl::client::Client::new(channel, protocol_name) }
3246 }
3247
3248 pub fn take_event_stream(&self) -> RunBuilderEventStream {
3254 RunBuilderEventStream { event_receiver: self.client.take_event_receiver() }
3255 }
3256
3257 pub fn r#add_suite(
3262 &self,
3263 mut test_url: &str,
3264 mut options: &RunOptions,
3265 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3266 ) -> Result<(), fidl::Error> {
3267 RunBuilderProxyInterface::r#add_suite(self, test_url, options, controller)
3268 }
3269
3270 pub fn r#add_suite_in_realm(
3276 &self,
3277 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3278 mut offers: &[fidl_fuchsia_component_decl::Offer],
3279 mut test_collection: &str,
3280 mut test_url: &str,
3281 mut options: &RunOptions,
3282 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3283 ) -> Result<(), fidl::Error> {
3284 RunBuilderProxyInterface::r#add_suite_in_realm(
3285 self,
3286 realm,
3287 offers,
3288 test_collection,
3289 test_url,
3290 options,
3291 controller,
3292 )
3293 }
3294
3295 pub fn r#with_scheduling_options(
3297 &self,
3298 mut options: &SchedulingOptions,
3299 ) -> Result<(), fidl::Error> {
3300 RunBuilderProxyInterface::r#with_scheduling_options(self, options)
3301 }
3302
3303 pub fn r#build(
3308 &self,
3309 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3310 ) -> Result<(), fidl::Error> {
3311 RunBuilderProxyInterface::r#build(self, controller)
3312 }
3313}
3314
3315impl RunBuilderProxyInterface for RunBuilderProxy {
3316 fn r#add_suite(
3317 &self,
3318 mut test_url: &str,
3319 mut options: &RunOptions,
3320 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3321 ) -> Result<(), fidl::Error> {
3322 self.client.send::<RunBuilderAddSuiteRequest>(
3323 (test_url, options, controller),
3324 0x71e7f9a06daac486,
3325 fidl::encoding::DynamicFlags::FLEXIBLE,
3326 )
3327 }
3328
3329 fn r#add_suite_in_realm(
3330 &self,
3331 mut realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3332 mut offers: &[fidl_fuchsia_component_decl::Offer],
3333 mut test_collection: &str,
3334 mut test_url: &str,
3335 mut options: &RunOptions,
3336 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3337 ) -> Result<(), fidl::Error> {
3338 self.client.send::<RunBuilderAddSuiteInRealmRequest>(
3339 (realm, offers, test_collection, test_url, options, controller),
3340 0x4d10c582715a8683,
3341 fidl::encoding::DynamicFlags::FLEXIBLE,
3342 )
3343 }
3344
3345 fn r#with_scheduling_options(
3346 &self,
3347 mut options: &SchedulingOptions,
3348 ) -> Result<(), fidl::Error> {
3349 self.client.send::<RunBuilderWithSchedulingOptionsRequest>(
3350 (options,),
3351 0x55e73fdbeade0b0b,
3352 fidl::encoding::DynamicFlags::FLEXIBLE,
3353 )
3354 }
3355
3356 fn r#build(
3357 &self,
3358 mut controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3359 ) -> Result<(), fidl::Error> {
3360 self.client.send::<RunBuilderBuildRequest>(
3361 (controller,),
3362 0x7879f2360ff1f160,
3363 fidl::encoding::DynamicFlags::FLEXIBLE,
3364 )
3365 }
3366}
3367
3368pub struct RunBuilderEventStream {
3369 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3370}
3371
3372impl std::marker::Unpin for RunBuilderEventStream {}
3373
3374impl futures::stream::FusedStream for RunBuilderEventStream {
3375 fn is_terminated(&self) -> bool {
3376 self.event_receiver.is_terminated()
3377 }
3378}
3379
3380impl futures::Stream for RunBuilderEventStream {
3381 type Item = Result<RunBuilderEvent, fidl::Error>;
3382
3383 fn poll_next(
3384 mut self: std::pin::Pin<&mut Self>,
3385 cx: &mut std::task::Context<'_>,
3386 ) -> std::task::Poll<Option<Self::Item>> {
3387 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3388 &mut self.event_receiver,
3389 cx
3390 )?) {
3391 Some(buf) => std::task::Poll::Ready(Some(RunBuilderEvent::decode(buf))),
3392 None => std::task::Poll::Ready(None),
3393 }
3394 }
3395}
3396
3397#[derive(Debug)]
3398pub enum RunBuilderEvent {
3399 #[non_exhaustive]
3400 _UnknownEvent {
3401 ordinal: u64,
3403 },
3404}
3405
3406impl RunBuilderEvent {
3407 fn decode(
3409 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3410 ) -> Result<RunBuilderEvent, fidl::Error> {
3411 let (bytes, _handles) = buf.split_mut();
3412 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3413 debug_assert_eq!(tx_header.tx_id, 0);
3414 match tx_header.ordinal {
3415 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
3416 Ok(RunBuilderEvent::_UnknownEvent { ordinal: tx_header.ordinal })
3417 }
3418 _ => Err(fidl::Error::UnknownOrdinal {
3419 ordinal: tx_header.ordinal,
3420 protocol_name: <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3421 }),
3422 }
3423 }
3424}
3425
3426pub struct RunBuilderRequestStream {
3428 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3429 is_terminated: bool,
3430}
3431
3432impl std::marker::Unpin for RunBuilderRequestStream {}
3433
3434impl futures::stream::FusedStream for RunBuilderRequestStream {
3435 fn is_terminated(&self) -> bool {
3436 self.is_terminated
3437 }
3438}
3439
3440impl fidl::endpoints::RequestStream for RunBuilderRequestStream {
3441 type Protocol = RunBuilderMarker;
3442 type ControlHandle = RunBuilderControlHandle;
3443
3444 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3445 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3446 }
3447
3448 fn control_handle(&self) -> Self::ControlHandle {
3449 RunBuilderControlHandle { inner: self.inner.clone() }
3450 }
3451
3452 fn into_inner(
3453 self,
3454 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3455 {
3456 (self.inner, self.is_terminated)
3457 }
3458
3459 fn from_inner(
3460 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3461 is_terminated: bool,
3462 ) -> Self {
3463 Self { inner, is_terminated }
3464 }
3465}
3466
3467impl futures::Stream for RunBuilderRequestStream {
3468 type Item = Result<RunBuilderRequest, fidl::Error>;
3469
3470 fn poll_next(
3471 mut self: std::pin::Pin<&mut Self>,
3472 cx: &mut std::task::Context<'_>,
3473 ) -> std::task::Poll<Option<Self::Item>> {
3474 let this = &mut *self;
3475 if this.inner.check_shutdown(cx) {
3476 this.is_terminated = true;
3477 return std::task::Poll::Ready(None);
3478 }
3479 if this.is_terminated {
3480 panic!("polled RunBuilderRequestStream after completion");
3481 }
3482 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3483 |bytes, handles| {
3484 match this.inner.channel().read_etc(cx, bytes, handles) {
3485 std::task::Poll::Ready(Ok(())) => {}
3486 std::task::Poll::Pending => return std::task::Poll::Pending,
3487 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3488 this.is_terminated = true;
3489 return std::task::Poll::Ready(None);
3490 }
3491 std::task::Poll::Ready(Err(e)) => {
3492 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3493 e.into(),
3494 ))))
3495 }
3496 }
3497
3498 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3500
3501 std::task::Poll::Ready(Some(match header.ordinal {
3502 0x71e7f9a06daac486 => {
3503 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3504 let mut req = fidl::new_empty!(
3505 RunBuilderAddSuiteRequest,
3506 fidl::encoding::DefaultFuchsiaResourceDialect
3507 );
3508 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderAddSuiteRequest>(&header, _body_bytes, handles, &mut req)?;
3509 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
3510 Ok(RunBuilderRequest::AddSuite {
3511 test_url: req.test_url,
3512 options: req.options,
3513 controller: req.controller,
3514
3515 control_handle,
3516 })
3517 }
3518 0x4d10c582715a8683 => {
3519 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3520 let mut req = fidl::new_empty!(
3521 RunBuilderAddSuiteInRealmRequest,
3522 fidl::encoding::DefaultFuchsiaResourceDialect
3523 );
3524 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderAddSuiteInRealmRequest>(&header, _body_bytes, handles, &mut req)?;
3525 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
3526 Ok(RunBuilderRequest::AddSuiteInRealm {
3527 realm: req.realm,
3528 offers: req.offers,
3529 test_collection: req.test_collection,
3530 test_url: req.test_url,
3531 options: req.options,
3532 controller: req.controller,
3533
3534 control_handle,
3535 })
3536 }
3537 0x55e73fdbeade0b0b => {
3538 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3539 let mut req = fidl::new_empty!(
3540 RunBuilderWithSchedulingOptionsRequest,
3541 fidl::encoding::DefaultFuchsiaResourceDialect
3542 );
3543 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderWithSchedulingOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
3544 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
3545 Ok(RunBuilderRequest::WithSchedulingOptions {
3546 options: req.options,
3547
3548 control_handle,
3549 })
3550 }
3551 0x7879f2360ff1f160 => {
3552 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3553 let mut req = fidl::new_empty!(
3554 RunBuilderBuildRequest,
3555 fidl::encoding::DefaultFuchsiaResourceDialect
3556 );
3557 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RunBuilderBuildRequest>(&header, _body_bytes, handles, &mut req)?;
3558 let control_handle = RunBuilderControlHandle { inner: this.inner.clone() };
3559 Ok(RunBuilderRequest::Build { controller: req.controller, control_handle })
3560 }
3561 _ if header.tx_id == 0
3562 && header
3563 .dynamic_flags()
3564 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3565 {
3566 Ok(RunBuilderRequest::_UnknownMethod {
3567 ordinal: header.ordinal,
3568 control_handle: RunBuilderControlHandle { inner: this.inner.clone() },
3569 method_type: fidl::MethodType::OneWay,
3570 })
3571 }
3572 _ if header
3573 .dynamic_flags()
3574 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
3575 {
3576 this.inner.send_framework_err(
3577 fidl::encoding::FrameworkErr::UnknownMethod,
3578 header.tx_id,
3579 header.ordinal,
3580 header.dynamic_flags(),
3581 (bytes, handles),
3582 )?;
3583 Ok(RunBuilderRequest::_UnknownMethod {
3584 ordinal: header.ordinal,
3585 control_handle: RunBuilderControlHandle { inner: this.inner.clone() },
3586 method_type: fidl::MethodType::TwoWay,
3587 })
3588 }
3589 _ => Err(fidl::Error::UnknownOrdinal {
3590 ordinal: header.ordinal,
3591 protocol_name:
3592 <RunBuilderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3593 }),
3594 }))
3595 },
3596 )
3597 }
3598}
3599
3600#[derive(Debug)]
3603pub enum RunBuilderRequest {
3604 AddSuite {
3609 test_url: String,
3610 options: RunOptions,
3611 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3612 control_handle: RunBuilderControlHandle,
3613 },
3614 AddSuiteInRealm {
3620 realm: fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3621 offers: Vec<fidl_fuchsia_component_decl::Offer>,
3622 test_collection: String,
3623 test_url: String,
3624 options: RunOptions,
3625 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3626 control_handle: RunBuilderControlHandle,
3627 },
3628 WithSchedulingOptions { options: SchedulingOptions, control_handle: RunBuilderControlHandle },
3630 Build {
3635 controller: fidl::endpoints::ServerEnd<RunControllerMarker>,
3636 control_handle: RunBuilderControlHandle,
3637 },
3638 #[non_exhaustive]
3640 _UnknownMethod {
3641 ordinal: u64,
3643 control_handle: RunBuilderControlHandle,
3644 method_type: fidl::MethodType,
3645 },
3646}
3647
3648impl RunBuilderRequest {
3649 #[allow(irrefutable_let_patterns)]
3650 pub fn into_add_suite(
3651 self,
3652 ) -> Option<(
3653 String,
3654 RunOptions,
3655 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3656 RunBuilderControlHandle,
3657 )> {
3658 if let RunBuilderRequest::AddSuite { test_url, options, controller, control_handle } = self
3659 {
3660 Some((test_url, options, controller, control_handle))
3661 } else {
3662 None
3663 }
3664 }
3665
3666 #[allow(irrefutable_let_patterns)]
3667 pub fn into_add_suite_in_realm(
3668 self,
3669 ) -> Option<(
3670 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
3671 Vec<fidl_fuchsia_component_decl::Offer>,
3672 String,
3673 String,
3674 RunOptions,
3675 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
3676 RunBuilderControlHandle,
3677 )> {
3678 if let RunBuilderRequest::AddSuiteInRealm {
3679 realm,
3680 offers,
3681 test_collection,
3682 test_url,
3683 options,
3684 controller,
3685 control_handle,
3686 } = self
3687 {
3688 Some((realm, offers, test_collection, test_url, options, controller, control_handle))
3689 } else {
3690 None
3691 }
3692 }
3693
3694 #[allow(irrefutable_let_patterns)]
3695 pub fn into_with_scheduling_options(
3696 self,
3697 ) -> Option<(SchedulingOptions, RunBuilderControlHandle)> {
3698 if let RunBuilderRequest::WithSchedulingOptions { options, control_handle } = self {
3699 Some((options, control_handle))
3700 } else {
3701 None
3702 }
3703 }
3704
3705 #[allow(irrefutable_let_patterns)]
3706 pub fn into_build(
3707 self,
3708 ) -> Option<(fidl::endpoints::ServerEnd<RunControllerMarker>, RunBuilderControlHandle)> {
3709 if let RunBuilderRequest::Build { controller, control_handle } = self {
3710 Some((controller, control_handle))
3711 } else {
3712 None
3713 }
3714 }
3715
3716 pub fn method_name(&self) -> &'static str {
3718 match *self {
3719 RunBuilderRequest::AddSuite { .. } => "add_suite",
3720 RunBuilderRequest::AddSuiteInRealm { .. } => "add_suite_in_realm",
3721 RunBuilderRequest::WithSchedulingOptions { .. } => "with_scheduling_options",
3722 RunBuilderRequest::Build { .. } => "build",
3723 RunBuilderRequest::_UnknownMethod { method_type: fidl::MethodType::OneWay, .. } => {
3724 "unknown one-way method"
3725 }
3726 RunBuilderRequest::_UnknownMethod { method_type: fidl::MethodType::TwoWay, .. } => {
3727 "unknown two-way method"
3728 }
3729 }
3730 }
3731}
3732
3733#[derive(Debug, Clone)]
3734pub struct RunBuilderControlHandle {
3735 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3736}
3737
3738impl fidl::endpoints::ControlHandle for RunBuilderControlHandle {
3739 fn shutdown(&self) {
3740 self.inner.shutdown()
3741 }
3742 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3743 self.inner.shutdown_with_epitaph(status)
3744 }
3745
3746 fn is_closed(&self) -> bool {
3747 self.inner.channel().is_closed()
3748 }
3749 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3750 self.inner.channel().on_closed()
3751 }
3752
3753 #[cfg(target_os = "fuchsia")]
3754 fn signal_peer(
3755 &self,
3756 clear_mask: zx::Signals,
3757 set_mask: zx::Signals,
3758 ) -> Result<(), zx_status::Status> {
3759 use fidl::Peered;
3760 self.inner.channel().signal_peer(clear_mask, set_mask)
3761 }
3762}
3763
3764impl RunBuilderControlHandle {}
3765
3766#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3767pub struct RunControllerMarker;
3768
3769impl fidl::endpoints::ProtocolMarker for RunControllerMarker {
3770 type Proxy = RunControllerProxy;
3771 type RequestStream = RunControllerRequestStream;
3772 #[cfg(target_os = "fuchsia")]
3773 type SynchronousProxy = RunControllerSynchronousProxy;
3774
3775 const DEBUG_NAME: &'static str = "fuchsia.test.manager.RunController";
3776}
3777impl fidl::endpoints::DiscoverableProtocolMarker for RunControllerMarker {}
3778
3779pub trait RunControllerProxyInterface: Send + Sync {
3780 fn r#stop(&self) -> Result<(), fidl::Error>;
3781 fn r#kill(&self) -> Result<(), fidl::Error>;
3782 type GetEventsResponseFut: std::future::Future<Output = Result<Vec<RunEvent>, fidl::Error>>
3783 + Send;
3784 fn r#get_events(&self) -> Self::GetEventsResponseFut;
3785}
3786#[derive(Debug)]
3787#[cfg(target_os = "fuchsia")]
3788pub struct RunControllerSynchronousProxy {
3789 client: fidl::client::sync::Client,
3790}
3791
3792#[cfg(target_os = "fuchsia")]
3793impl fidl::endpoints::SynchronousProxy for RunControllerSynchronousProxy {
3794 type Proxy = RunControllerProxy;
3795 type Protocol = RunControllerMarker;
3796
3797 fn from_channel(inner: fidl::Channel) -> Self {
3798 Self::new(inner)
3799 }
3800
3801 fn into_channel(self) -> fidl::Channel {
3802 self.client.into_channel()
3803 }
3804
3805 fn as_channel(&self) -> &fidl::Channel {
3806 self.client.as_channel()
3807 }
3808}
3809
3810#[cfg(target_os = "fuchsia")]
3811impl RunControllerSynchronousProxy {
3812 pub fn new(channel: fidl::Channel) -> Self {
3813 let protocol_name = <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3814 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3815 }
3816
3817 pub fn into_channel(self) -> fidl::Channel {
3818 self.client.into_channel()
3819 }
3820
3821 pub fn wait_for_event(
3824 &self,
3825 deadline: zx::MonotonicInstant,
3826 ) -> Result<RunControllerEvent, fidl::Error> {
3827 RunControllerEvent::decode(self.client.wait_for_event(deadline)?)
3828 }
3829
3830 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3835 self.client.send::<fidl::encoding::EmptyPayload>(
3836 (),
3837 0x24972633e2cf712d,
3838 fidl::encoding::DynamicFlags::FLEXIBLE,
3839 )
3840 }
3841
3842 pub fn r#kill(&self) -> Result<(), fidl::Error> {
3846 self.client.send::<fidl::encoding::EmptyPayload>(
3847 (),
3848 0x6e62104929fc55c5,
3849 fidl::encoding::DynamicFlags::FLEXIBLE,
3850 )
3851 }
3852
3853 pub fn r#get_events(
3857 &self,
3858 ___deadline: zx::MonotonicInstant,
3859 ) -> Result<Vec<RunEvent>, fidl::Error> {
3860 let _response = self
3861 .client
3862 .send_query::<fidl::encoding::EmptyPayload, RunControllerGetEventsResponse>(
3863 (),
3864 0x273bbd98cfcea4ba,
3865 fidl::encoding::DynamicFlags::empty(),
3866 ___deadline,
3867 )?;
3868 Ok(_response.events)
3869 }
3870}
3871
3872#[cfg(target_os = "fuchsia")]
3873impl From<RunControllerSynchronousProxy> for zx::Handle {
3874 fn from(value: RunControllerSynchronousProxy) -> Self {
3875 value.into_channel().into()
3876 }
3877}
3878
3879#[cfg(target_os = "fuchsia")]
3880impl From<fidl::Channel> for RunControllerSynchronousProxy {
3881 fn from(value: fidl::Channel) -> Self {
3882 Self::new(value)
3883 }
3884}
3885
3886#[cfg(target_os = "fuchsia")]
3887impl fidl::endpoints::FromClient for RunControllerSynchronousProxy {
3888 type Protocol = RunControllerMarker;
3889
3890 fn from_client(value: fidl::endpoints::ClientEnd<RunControllerMarker>) -> Self {
3891 Self::new(value.into_channel())
3892 }
3893}
3894
3895#[derive(Debug, Clone)]
3896pub struct RunControllerProxy {
3897 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3898}
3899
3900impl fidl::endpoints::Proxy for RunControllerProxy {
3901 type Protocol = RunControllerMarker;
3902
3903 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3904 Self::new(inner)
3905 }
3906
3907 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3908 self.client.into_channel().map_err(|client| Self { client })
3909 }
3910
3911 fn as_channel(&self) -> &::fidl::AsyncChannel {
3912 self.client.as_channel()
3913 }
3914}
3915
3916impl RunControllerProxy {
3917 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3919 let protocol_name = <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3920 Self { client: fidl::client::Client::new(channel, protocol_name) }
3921 }
3922
3923 pub fn take_event_stream(&self) -> RunControllerEventStream {
3929 RunControllerEventStream { event_receiver: self.client.take_event_receiver() }
3930 }
3931
3932 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3937 RunControllerProxyInterface::r#stop(self)
3938 }
3939
3940 pub fn r#kill(&self) -> Result<(), fidl::Error> {
3944 RunControllerProxyInterface::r#kill(self)
3945 }
3946
3947 pub fn r#get_events(
3951 &self,
3952 ) -> fidl::client::QueryResponseFut<Vec<RunEvent>, fidl::encoding::DefaultFuchsiaResourceDialect>
3953 {
3954 RunControllerProxyInterface::r#get_events(self)
3955 }
3956}
3957
3958impl RunControllerProxyInterface for RunControllerProxy {
3959 fn r#stop(&self) -> Result<(), fidl::Error> {
3960 self.client.send::<fidl::encoding::EmptyPayload>(
3961 (),
3962 0x24972633e2cf712d,
3963 fidl::encoding::DynamicFlags::FLEXIBLE,
3964 )
3965 }
3966
3967 fn r#kill(&self) -> Result<(), fidl::Error> {
3968 self.client.send::<fidl::encoding::EmptyPayload>(
3969 (),
3970 0x6e62104929fc55c5,
3971 fidl::encoding::DynamicFlags::FLEXIBLE,
3972 )
3973 }
3974
3975 type GetEventsResponseFut = fidl::client::QueryResponseFut<
3976 Vec<RunEvent>,
3977 fidl::encoding::DefaultFuchsiaResourceDialect,
3978 >;
3979 fn r#get_events(&self) -> Self::GetEventsResponseFut {
3980 fn _decode(
3981 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3982 ) -> Result<Vec<RunEvent>, fidl::Error> {
3983 let _response = fidl::client::decode_transaction_body::<
3984 RunControllerGetEventsResponse,
3985 fidl::encoding::DefaultFuchsiaResourceDialect,
3986 0x273bbd98cfcea4ba,
3987 >(_buf?)?;
3988 Ok(_response.events)
3989 }
3990 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<RunEvent>>(
3991 (),
3992 0x273bbd98cfcea4ba,
3993 fidl::encoding::DynamicFlags::empty(),
3994 _decode,
3995 )
3996 }
3997}
3998
3999pub struct RunControllerEventStream {
4000 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4001}
4002
4003impl std::marker::Unpin for RunControllerEventStream {}
4004
4005impl futures::stream::FusedStream for RunControllerEventStream {
4006 fn is_terminated(&self) -> bool {
4007 self.event_receiver.is_terminated()
4008 }
4009}
4010
4011impl futures::Stream for RunControllerEventStream {
4012 type Item = Result<RunControllerEvent, fidl::Error>;
4013
4014 fn poll_next(
4015 mut self: std::pin::Pin<&mut Self>,
4016 cx: &mut std::task::Context<'_>,
4017 ) -> std::task::Poll<Option<Self::Item>> {
4018 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4019 &mut self.event_receiver,
4020 cx
4021 )?) {
4022 Some(buf) => std::task::Poll::Ready(Some(RunControllerEvent::decode(buf))),
4023 None => std::task::Poll::Ready(None),
4024 }
4025 }
4026}
4027
4028#[derive(Debug)]
4029pub enum RunControllerEvent {
4030 #[non_exhaustive]
4031 _UnknownEvent {
4032 ordinal: u64,
4034 },
4035}
4036
4037impl RunControllerEvent {
4038 fn decode(
4040 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4041 ) -> Result<RunControllerEvent, fidl::Error> {
4042 let (bytes, _handles) = buf.split_mut();
4043 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4044 debug_assert_eq!(tx_header.tx_id, 0);
4045 match tx_header.ordinal {
4046 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4047 Ok(RunControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4048 }
4049 _ => Err(fidl::Error::UnknownOrdinal {
4050 ordinal: tx_header.ordinal,
4051 protocol_name: <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4052 }),
4053 }
4054 }
4055}
4056
4057pub struct RunControllerRequestStream {
4059 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4060 is_terminated: bool,
4061}
4062
4063impl std::marker::Unpin for RunControllerRequestStream {}
4064
4065impl futures::stream::FusedStream for RunControllerRequestStream {
4066 fn is_terminated(&self) -> bool {
4067 self.is_terminated
4068 }
4069}
4070
4071impl fidl::endpoints::RequestStream for RunControllerRequestStream {
4072 type Protocol = RunControllerMarker;
4073 type ControlHandle = RunControllerControlHandle;
4074
4075 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4076 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4077 }
4078
4079 fn control_handle(&self) -> Self::ControlHandle {
4080 RunControllerControlHandle { inner: self.inner.clone() }
4081 }
4082
4083 fn into_inner(
4084 self,
4085 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4086 {
4087 (self.inner, self.is_terminated)
4088 }
4089
4090 fn from_inner(
4091 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4092 is_terminated: bool,
4093 ) -> Self {
4094 Self { inner, is_terminated }
4095 }
4096}
4097
4098impl futures::Stream for RunControllerRequestStream {
4099 type Item = Result<RunControllerRequest, fidl::Error>;
4100
4101 fn poll_next(
4102 mut self: std::pin::Pin<&mut Self>,
4103 cx: &mut std::task::Context<'_>,
4104 ) -> std::task::Poll<Option<Self::Item>> {
4105 let this = &mut *self;
4106 if this.inner.check_shutdown(cx) {
4107 this.is_terminated = true;
4108 return std::task::Poll::Ready(None);
4109 }
4110 if this.is_terminated {
4111 panic!("polled RunControllerRequestStream after completion");
4112 }
4113 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4114 |bytes, handles| {
4115 match this.inner.channel().read_etc(cx, bytes, handles) {
4116 std::task::Poll::Ready(Ok(())) => {}
4117 std::task::Poll::Pending => return std::task::Poll::Pending,
4118 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4119 this.is_terminated = true;
4120 return std::task::Poll::Ready(None);
4121 }
4122 std::task::Poll::Ready(Err(e)) => {
4123 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4124 e.into(),
4125 ))))
4126 }
4127 }
4128
4129 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4131
4132 std::task::Poll::Ready(Some(match header.ordinal {
4133 0x24972633e2cf712d => {
4134 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4135 let mut req = fidl::new_empty!(
4136 fidl::encoding::EmptyPayload,
4137 fidl::encoding::DefaultFuchsiaResourceDialect
4138 );
4139 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4140 let control_handle =
4141 RunControllerControlHandle { inner: this.inner.clone() };
4142 Ok(RunControllerRequest::Stop { control_handle })
4143 }
4144 0x6e62104929fc55c5 => {
4145 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4146 let mut req = fidl::new_empty!(
4147 fidl::encoding::EmptyPayload,
4148 fidl::encoding::DefaultFuchsiaResourceDialect
4149 );
4150 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4151 let control_handle =
4152 RunControllerControlHandle { inner: this.inner.clone() };
4153 Ok(RunControllerRequest::Kill { control_handle })
4154 }
4155 0x273bbd98cfcea4ba => {
4156 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4157 let mut req = fidl::new_empty!(
4158 fidl::encoding::EmptyPayload,
4159 fidl::encoding::DefaultFuchsiaResourceDialect
4160 );
4161 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4162 let control_handle =
4163 RunControllerControlHandle { inner: this.inner.clone() };
4164 Ok(RunControllerRequest::GetEvents {
4165 responder: RunControllerGetEventsResponder {
4166 control_handle: std::mem::ManuallyDrop::new(control_handle),
4167 tx_id: header.tx_id,
4168 },
4169 })
4170 }
4171 _ if header.tx_id == 0
4172 && header
4173 .dynamic_flags()
4174 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4175 {
4176 Ok(RunControllerRequest::_UnknownMethod {
4177 ordinal: header.ordinal,
4178 control_handle: RunControllerControlHandle {
4179 inner: this.inner.clone(),
4180 },
4181 method_type: fidl::MethodType::OneWay,
4182 })
4183 }
4184 _ if header
4185 .dynamic_flags()
4186 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4187 {
4188 this.inner.send_framework_err(
4189 fidl::encoding::FrameworkErr::UnknownMethod,
4190 header.tx_id,
4191 header.ordinal,
4192 header.dynamic_flags(),
4193 (bytes, handles),
4194 )?;
4195 Ok(RunControllerRequest::_UnknownMethod {
4196 ordinal: header.ordinal,
4197 control_handle: RunControllerControlHandle {
4198 inner: this.inner.clone(),
4199 },
4200 method_type: fidl::MethodType::TwoWay,
4201 })
4202 }
4203 _ => Err(fidl::Error::UnknownOrdinal {
4204 ordinal: header.ordinal,
4205 protocol_name:
4206 <RunControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4207 }),
4208 }))
4209 },
4210 )
4211 }
4212}
4213
4214#[derive(Debug)]
4219pub enum RunControllerRequest {
4220 Stop { control_handle: RunControllerControlHandle },
4225 Kill { control_handle: RunControllerControlHandle },
4229 GetEvents { responder: RunControllerGetEventsResponder },
4233 #[non_exhaustive]
4235 _UnknownMethod {
4236 ordinal: u64,
4238 control_handle: RunControllerControlHandle,
4239 method_type: fidl::MethodType,
4240 },
4241}
4242
4243impl RunControllerRequest {
4244 #[allow(irrefutable_let_patterns)]
4245 pub fn into_stop(self) -> Option<(RunControllerControlHandle)> {
4246 if let RunControllerRequest::Stop { control_handle } = self {
4247 Some((control_handle))
4248 } else {
4249 None
4250 }
4251 }
4252
4253 #[allow(irrefutable_let_patterns)]
4254 pub fn into_kill(self) -> Option<(RunControllerControlHandle)> {
4255 if let RunControllerRequest::Kill { control_handle } = self {
4256 Some((control_handle))
4257 } else {
4258 None
4259 }
4260 }
4261
4262 #[allow(irrefutable_let_patterns)]
4263 pub fn into_get_events(self) -> Option<(RunControllerGetEventsResponder)> {
4264 if let RunControllerRequest::GetEvents { responder } = self {
4265 Some((responder))
4266 } else {
4267 None
4268 }
4269 }
4270
4271 pub fn method_name(&self) -> &'static str {
4273 match *self {
4274 RunControllerRequest::Stop { .. } => "stop",
4275 RunControllerRequest::Kill { .. } => "kill",
4276 RunControllerRequest::GetEvents { .. } => "get_events",
4277 RunControllerRequest::_UnknownMethod {
4278 method_type: fidl::MethodType::OneWay, ..
4279 } => "unknown one-way method",
4280 RunControllerRequest::_UnknownMethod {
4281 method_type: fidl::MethodType::TwoWay, ..
4282 } => "unknown two-way method",
4283 }
4284 }
4285}
4286
4287#[derive(Debug, Clone)]
4288pub struct RunControllerControlHandle {
4289 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4290}
4291
4292impl fidl::endpoints::ControlHandle for RunControllerControlHandle {
4293 fn shutdown(&self) {
4294 self.inner.shutdown()
4295 }
4296 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4297 self.inner.shutdown_with_epitaph(status)
4298 }
4299
4300 fn is_closed(&self) -> bool {
4301 self.inner.channel().is_closed()
4302 }
4303 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4304 self.inner.channel().on_closed()
4305 }
4306
4307 #[cfg(target_os = "fuchsia")]
4308 fn signal_peer(
4309 &self,
4310 clear_mask: zx::Signals,
4311 set_mask: zx::Signals,
4312 ) -> Result<(), zx_status::Status> {
4313 use fidl::Peered;
4314 self.inner.channel().signal_peer(clear_mask, set_mask)
4315 }
4316}
4317
4318impl RunControllerControlHandle {}
4319
4320#[must_use = "FIDL methods require a response to be sent"]
4321#[derive(Debug)]
4322pub struct RunControllerGetEventsResponder {
4323 control_handle: std::mem::ManuallyDrop<RunControllerControlHandle>,
4324 tx_id: u32,
4325}
4326
4327impl std::ops::Drop for RunControllerGetEventsResponder {
4331 fn drop(&mut self) {
4332 self.control_handle.shutdown();
4333 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4335 }
4336}
4337
4338impl fidl::endpoints::Responder for RunControllerGetEventsResponder {
4339 type ControlHandle = RunControllerControlHandle;
4340
4341 fn control_handle(&self) -> &RunControllerControlHandle {
4342 &self.control_handle
4343 }
4344
4345 fn drop_without_shutdown(mut self) {
4346 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4348 std::mem::forget(self);
4350 }
4351}
4352
4353impl RunControllerGetEventsResponder {
4354 pub fn send(self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
4358 let _result = self.send_raw(events);
4359 if _result.is_err() {
4360 self.control_handle.shutdown();
4361 }
4362 self.drop_without_shutdown();
4363 _result
4364 }
4365
4366 pub fn send_no_shutdown_on_err(self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
4368 let _result = self.send_raw(events);
4369 self.drop_without_shutdown();
4370 _result
4371 }
4372
4373 fn send_raw(&self, mut events: Vec<RunEvent>) -> Result<(), fidl::Error> {
4374 self.control_handle.inner.send::<RunControllerGetEventsResponse>(
4375 (events.as_mut(),),
4376 self.tx_id,
4377 0x273bbd98cfcea4ba,
4378 fidl::encoding::DynamicFlags::empty(),
4379 )
4380 }
4381}
4382
4383#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4384pub struct SuiteControllerMarker;
4385
4386impl fidl::endpoints::ProtocolMarker for SuiteControllerMarker {
4387 type Proxy = SuiteControllerProxy;
4388 type RequestStream = SuiteControllerRequestStream;
4389 #[cfg(target_os = "fuchsia")]
4390 type SynchronousProxy = SuiteControllerSynchronousProxy;
4391
4392 const DEBUG_NAME: &'static str = "(anonymous) SuiteController";
4393}
4394pub type SuiteControllerWatchEventsResult = Result<Vec<Event>, LaunchError>;
4395pub type SuiteControllerGetEventsResult = Result<Vec<SuiteEvent>, LaunchError>;
4396
4397pub trait SuiteControllerProxyInterface: Send + Sync {
4398 fn r#stop(&self) -> Result<(), fidl::Error>;
4399 fn r#kill(&self) -> Result<(), fidl::Error>;
4400 type WatchEventsResponseFut: std::future::Future<Output = Result<SuiteControllerWatchEventsResult, fidl::Error>>
4401 + Send;
4402 fn r#watch_events(&self) -> Self::WatchEventsResponseFut;
4403 type GetEventsResponseFut: std::future::Future<Output = Result<SuiteControllerGetEventsResult, fidl::Error>>
4404 + Send;
4405 fn r#get_events(&self) -> Self::GetEventsResponseFut;
4406}
4407#[derive(Debug)]
4408#[cfg(target_os = "fuchsia")]
4409pub struct SuiteControllerSynchronousProxy {
4410 client: fidl::client::sync::Client,
4411}
4412
4413#[cfg(target_os = "fuchsia")]
4414impl fidl::endpoints::SynchronousProxy for SuiteControllerSynchronousProxy {
4415 type Proxy = SuiteControllerProxy;
4416 type Protocol = SuiteControllerMarker;
4417
4418 fn from_channel(inner: fidl::Channel) -> Self {
4419 Self::new(inner)
4420 }
4421
4422 fn into_channel(self) -> fidl::Channel {
4423 self.client.into_channel()
4424 }
4425
4426 fn as_channel(&self) -> &fidl::Channel {
4427 self.client.as_channel()
4428 }
4429}
4430
4431#[cfg(target_os = "fuchsia")]
4432impl SuiteControllerSynchronousProxy {
4433 pub fn new(channel: fidl::Channel) -> Self {
4434 let protocol_name = <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4435 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4436 }
4437
4438 pub fn into_channel(self) -> fidl::Channel {
4439 self.client.into_channel()
4440 }
4441
4442 pub fn wait_for_event(
4445 &self,
4446 deadline: zx::MonotonicInstant,
4447 ) -> Result<SuiteControllerEvent, fidl::Error> {
4448 SuiteControllerEvent::decode(self.client.wait_for_event(deadline)?)
4449 }
4450
4451 pub fn r#stop(&self) -> Result<(), fidl::Error> {
4454 self.client.send::<fidl::encoding::EmptyPayload>(
4455 (),
4456 0x4675fc6c8f404fef,
4457 fidl::encoding::DynamicFlags::FLEXIBLE,
4458 )
4459 }
4460
4461 pub fn r#kill(&self) -> Result<(), fidl::Error> {
4465 self.client.send::<fidl::encoding::EmptyPayload>(
4466 (),
4467 0x5f813fb72887fc17,
4468 fidl::encoding::DynamicFlags::FLEXIBLE,
4469 )
4470 }
4471
4472 pub fn r#watch_events(
4475 &self,
4476 ___deadline: zx::MonotonicInstant,
4477 ) -> Result<SuiteControllerWatchEventsResult, fidl::Error> {
4478 let _response =
4479 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
4480 SuiteControllerWatchEventsResponse,
4481 LaunchError,
4482 >>(
4483 (),
4484 0x5d1a75b1d06839b4,
4485 fidl::encoding::DynamicFlags::empty(),
4486 ___deadline,
4487 )?;
4488 Ok(_response.map(|x| x.events))
4489 }
4490
4491 pub fn r#get_events(
4495 &self,
4496 ___deadline: zx::MonotonicInstant,
4497 ) -> Result<SuiteControllerGetEventsResult, fidl::Error> {
4498 let _response = self.client.send_query::<
4499 fidl::encoding::EmptyPayload,
4500 fidl::encoding::FlexibleResultType<SuiteControllerGetEventsResponse, LaunchError>,
4501 >(
4502 (),
4503 0x1f2ec93d2236d1db,
4504 fidl::encoding::DynamicFlags::FLEXIBLE,
4505 ___deadline,
4506 )?
4507 .into_result::<SuiteControllerMarker>("get_events")?;
4508 Ok(_response.map(|x| x.events))
4509 }
4510}
4511
4512#[cfg(target_os = "fuchsia")]
4513impl From<SuiteControllerSynchronousProxy> for zx::Handle {
4514 fn from(value: SuiteControllerSynchronousProxy) -> Self {
4515 value.into_channel().into()
4516 }
4517}
4518
4519#[cfg(target_os = "fuchsia")]
4520impl From<fidl::Channel> for SuiteControllerSynchronousProxy {
4521 fn from(value: fidl::Channel) -> Self {
4522 Self::new(value)
4523 }
4524}
4525
4526#[cfg(target_os = "fuchsia")]
4527impl fidl::endpoints::FromClient for SuiteControllerSynchronousProxy {
4528 type Protocol = SuiteControllerMarker;
4529
4530 fn from_client(value: fidl::endpoints::ClientEnd<SuiteControllerMarker>) -> Self {
4531 Self::new(value.into_channel())
4532 }
4533}
4534
4535#[derive(Debug, Clone)]
4536pub struct SuiteControllerProxy {
4537 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4538}
4539
4540impl fidl::endpoints::Proxy for SuiteControllerProxy {
4541 type Protocol = SuiteControllerMarker;
4542
4543 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4544 Self::new(inner)
4545 }
4546
4547 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4548 self.client.into_channel().map_err(|client| Self { client })
4549 }
4550
4551 fn as_channel(&self) -> &::fidl::AsyncChannel {
4552 self.client.as_channel()
4553 }
4554}
4555
4556impl SuiteControllerProxy {
4557 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4559 let protocol_name = <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4560 Self { client: fidl::client::Client::new(channel, protocol_name) }
4561 }
4562
4563 pub fn take_event_stream(&self) -> SuiteControllerEventStream {
4569 SuiteControllerEventStream { event_receiver: self.client.take_event_receiver() }
4570 }
4571
4572 pub fn r#stop(&self) -> Result<(), fidl::Error> {
4575 SuiteControllerProxyInterface::r#stop(self)
4576 }
4577
4578 pub fn r#kill(&self) -> Result<(), fidl::Error> {
4582 SuiteControllerProxyInterface::r#kill(self)
4583 }
4584
4585 pub fn r#watch_events(
4588 &self,
4589 ) -> fidl::client::QueryResponseFut<
4590 SuiteControllerWatchEventsResult,
4591 fidl::encoding::DefaultFuchsiaResourceDialect,
4592 > {
4593 SuiteControllerProxyInterface::r#watch_events(self)
4594 }
4595
4596 pub fn r#get_events(
4600 &self,
4601 ) -> fidl::client::QueryResponseFut<
4602 SuiteControllerGetEventsResult,
4603 fidl::encoding::DefaultFuchsiaResourceDialect,
4604 > {
4605 SuiteControllerProxyInterface::r#get_events(self)
4606 }
4607}
4608
4609impl SuiteControllerProxyInterface for SuiteControllerProxy {
4610 fn r#stop(&self) -> Result<(), fidl::Error> {
4611 self.client.send::<fidl::encoding::EmptyPayload>(
4612 (),
4613 0x4675fc6c8f404fef,
4614 fidl::encoding::DynamicFlags::FLEXIBLE,
4615 )
4616 }
4617
4618 fn r#kill(&self) -> Result<(), fidl::Error> {
4619 self.client.send::<fidl::encoding::EmptyPayload>(
4620 (),
4621 0x5f813fb72887fc17,
4622 fidl::encoding::DynamicFlags::FLEXIBLE,
4623 )
4624 }
4625
4626 type WatchEventsResponseFut = fidl::client::QueryResponseFut<
4627 SuiteControllerWatchEventsResult,
4628 fidl::encoding::DefaultFuchsiaResourceDialect,
4629 >;
4630 fn r#watch_events(&self) -> Self::WatchEventsResponseFut {
4631 fn _decode(
4632 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4633 ) -> Result<SuiteControllerWatchEventsResult, fidl::Error> {
4634 let _response = fidl::client::decode_transaction_body::<
4635 fidl::encoding::ResultType<SuiteControllerWatchEventsResponse, LaunchError>,
4636 fidl::encoding::DefaultFuchsiaResourceDialect,
4637 0x5d1a75b1d06839b4,
4638 >(_buf?)?;
4639 Ok(_response.map(|x| x.events))
4640 }
4641 self.client.send_query_and_decode::<
4642 fidl::encoding::EmptyPayload,
4643 SuiteControllerWatchEventsResult,
4644 >(
4645 (),
4646 0x5d1a75b1d06839b4,
4647 fidl::encoding::DynamicFlags::empty(),
4648 _decode,
4649 )
4650 }
4651
4652 type GetEventsResponseFut = fidl::client::QueryResponseFut<
4653 SuiteControllerGetEventsResult,
4654 fidl::encoding::DefaultFuchsiaResourceDialect,
4655 >;
4656 fn r#get_events(&self) -> Self::GetEventsResponseFut {
4657 fn _decode(
4658 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4659 ) -> Result<SuiteControllerGetEventsResult, fidl::Error> {
4660 let _response = fidl::client::decode_transaction_body::<
4661 fidl::encoding::FlexibleResultType<SuiteControllerGetEventsResponse, LaunchError>,
4662 fidl::encoding::DefaultFuchsiaResourceDialect,
4663 0x1f2ec93d2236d1db,
4664 >(_buf?)?
4665 .into_result::<SuiteControllerMarker>("get_events")?;
4666 Ok(_response.map(|x| x.events))
4667 }
4668 self.client
4669 .send_query_and_decode::<fidl::encoding::EmptyPayload, SuiteControllerGetEventsResult>(
4670 (),
4671 0x1f2ec93d2236d1db,
4672 fidl::encoding::DynamicFlags::FLEXIBLE,
4673 _decode,
4674 )
4675 }
4676}
4677
4678pub struct SuiteControllerEventStream {
4679 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4680}
4681
4682impl std::marker::Unpin for SuiteControllerEventStream {}
4683
4684impl futures::stream::FusedStream for SuiteControllerEventStream {
4685 fn is_terminated(&self) -> bool {
4686 self.event_receiver.is_terminated()
4687 }
4688}
4689
4690impl futures::Stream for SuiteControllerEventStream {
4691 type Item = Result<SuiteControllerEvent, fidl::Error>;
4692
4693 fn poll_next(
4694 mut self: std::pin::Pin<&mut Self>,
4695 cx: &mut std::task::Context<'_>,
4696 ) -> std::task::Poll<Option<Self::Item>> {
4697 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4698 &mut self.event_receiver,
4699 cx
4700 )?) {
4701 Some(buf) => std::task::Poll::Ready(Some(SuiteControllerEvent::decode(buf))),
4702 None => std::task::Poll::Ready(None),
4703 }
4704 }
4705}
4706
4707#[derive(Debug)]
4708pub enum SuiteControllerEvent {
4709 #[non_exhaustive]
4710 _UnknownEvent {
4711 ordinal: u64,
4713 },
4714}
4715
4716impl SuiteControllerEvent {
4717 fn decode(
4719 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4720 ) -> Result<SuiteControllerEvent, fidl::Error> {
4721 let (bytes, _handles) = buf.split_mut();
4722 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4723 debug_assert_eq!(tx_header.tx_id, 0);
4724 match tx_header.ordinal {
4725 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
4726 Ok(SuiteControllerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
4727 }
4728 _ => Err(fidl::Error::UnknownOrdinal {
4729 ordinal: tx_header.ordinal,
4730 protocol_name:
4731 <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4732 }),
4733 }
4734 }
4735}
4736
4737pub struct SuiteControllerRequestStream {
4739 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4740 is_terminated: bool,
4741}
4742
4743impl std::marker::Unpin for SuiteControllerRequestStream {}
4744
4745impl futures::stream::FusedStream for SuiteControllerRequestStream {
4746 fn is_terminated(&self) -> bool {
4747 self.is_terminated
4748 }
4749}
4750
4751impl fidl::endpoints::RequestStream for SuiteControllerRequestStream {
4752 type Protocol = SuiteControllerMarker;
4753 type ControlHandle = SuiteControllerControlHandle;
4754
4755 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4756 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4757 }
4758
4759 fn control_handle(&self) -> Self::ControlHandle {
4760 SuiteControllerControlHandle { inner: self.inner.clone() }
4761 }
4762
4763 fn into_inner(
4764 self,
4765 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4766 {
4767 (self.inner, self.is_terminated)
4768 }
4769
4770 fn from_inner(
4771 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4772 is_terminated: bool,
4773 ) -> Self {
4774 Self { inner, is_terminated }
4775 }
4776}
4777
4778impl futures::Stream for SuiteControllerRequestStream {
4779 type Item = Result<SuiteControllerRequest, fidl::Error>;
4780
4781 fn poll_next(
4782 mut self: std::pin::Pin<&mut Self>,
4783 cx: &mut std::task::Context<'_>,
4784 ) -> std::task::Poll<Option<Self::Item>> {
4785 let this = &mut *self;
4786 if this.inner.check_shutdown(cx) {
4787 this.is_terminated = true;
4788 return std::task::Poll::Ready(None);
4789 }
4790 if this.is_terminated {
4791 panic!("polled SuiteControllerRequestStream after completion");
4792 }
4793 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4794 |bytes, handles| {
4795 match this.inner.channel().read_etc(cx, bytes, handles) {
4796 std::task::Poll::Ready(Ok(())) => {}
4797 std::task::Poll::Pending => return std::task::Poll::Pending,
4798 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4799 this.is_terminated = true;
4800 return std::task::Poll::Ready(None);
4801 }
4802 std::task::Poll::Ready(Err(e)) => {
4803 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4804 e.into(),
4805 ))))
4806 }
4807 }
4808
4809 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4811
4812 std::task::Poll::Ready(Some(match header.ordinal {
4813 0x4675fc6c8f404fef => {
4814 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4815 let mut req = fidl::new_empty!(
4816 fidl::encoding::EmptyPayload,
4817 fidl::encoding::DefaultFuchsiaResourceDialect
4818 );
4819 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4820 let control_handle =
4821 SuiteControllerControlHandle { inner: this.inner.clone() };
4822 Ok(SuiteControllerRequest::Stop { control_handle })
4823 }
4824 0x5f813fb72887fc17 => {
4825 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4826 let mut req = fidl::new_empty!(
4827 fidl::encoding::EmptyPayload,
4828 fidl::encoding::DefaultFuchsiaResourceDialect
4829 );
4830 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4831 let control_handle =
4832 SuiteControllerControlHandle { inner: this.inner.clone() };
4833 Ok(SuiteControllerRequest::Kill { control_handle })
4834 }
4835 0x5d1a75b1d06839b4 => {
4836 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4837 let mut req = fidl::new_empty!(
4838 fidl::encoding::EmptyPayload,
4839 fidl::encoding::DefaultFuchsiaResourceDialect
4840 );
4841 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4842 let control_handle =
4843 SuiteControllerControlHandle { inner: this.inner.clone() };
4844 Ok(SuiteControllerRequest::WatchEvents {
4845 responder: SuiteControllerWatchEventsResponder {
4846 control_handle: std::mem::ManuallyDrop::new(control_handle),
4847 tx_id: header.tx_id,
4848 },
4849 })
4850 }
4851 0x1f2ec93d2236d1db => {
4852 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4853 let mut req = fidl::new_empty!(
4854 fidl::encoding::EmptyPayload,
4855 fidl::encoding::DefaultFuchsiaResourceDialect
4856 );
4857 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4858 let control_handle =
4859 SuiteControllerControlHandle { inner: this.inner.clone() };
4860 Ok(SuiteControllerRequest::GetEvents {
4861 responder: SuiteControllerGetEventsResponder {
4862 control_handle: std::mem::ManuallyDrop::new(control_handle),
4863 tx_id: header.tx_id,
4864 },
4865 })
4866 }
4867 _ if header.tx_id == 0
4868 && header
4869 .dynamic_flags()
4870 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4871 {
4872 Ok(SuiteControllerRequest::_UnknownMethod {
4873 ordinal: header.ordinal,
4874 control_handle: SuiteControllerControlHandle {
4875 inner: this.inner.clone(),
4876 },
4877 method_type: fidl::MethodType::OneWay,
4878 })
4879 }
4880 _ if header
4881 .dynamic_flags()
4882 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
4883 {
4884 this.inner.send_framework_err(
4885 fidl::encoding::FrameworkErr::UnknownMethod,
4886 header.tx_id,
4887 header.ordinal,
4888 header.dynamic_flags(),
4889 (bytes, handles),
4890 )?;
4891 Ok(SuiteControllerRequest::_UnknownMethod {
4892 ordinal: header.ordinal,
4893 control_handle: SuiteControllerControlHandle {
4894 inner: this.inner.clone(),
4895 },
4896 method_type: fidl::MethodType::TwoWay,
4897 })
4898 }
4899 _ => Err(fidl::Error::UnknownOrdinal {
4900 ordinal: header.ordinal,
4901 protocol_name:
4902 <SuiteControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4903 }),
4904 }))
4905 },
4906 )
4907 }
4908}
4909
4910#[derive(Debug)]
4916pub enum SuiteControllerRequest {
4917 Stop { control_handle: SuiteControllerControlHandle },
4920 Kill { control_handle: SuiteControllerControlHandle },
4924 WatchEvents { responder: SuiteControllerWatchEventsResponder },
4927 GetEvents { responder: SuiteControllerGetEventsResponder },
4931 #[non_exhaustive]
4933 _UnknownMethod {
4934 ordinal: u64,
4936 control_handle: SuiteControllerControlHandle,
4937 method_type: fidl::MethodType,
4938 },
4939}
4940
4941impl SuiteControllerRequest {
4942 #[allow(irrefutable_let_patterns)]
4943 pub fn into_stop(self) -> Option<(SuiteControllerControlHandle)> {
4944 if let SuiteControllerRequest::Stop { control_handle } = self {
4945 Some((control_handle))
4946 } else {
4947 None
4948 }
4949 }
4950
4951 #[allow(irrefutable_let_patterns)]
4952 pub fn into_kill(self) -> Option<(SuiteControllerControlHandle)> {
4953 if let SuiteControllerRequest::Kill { control_handle } = self {
4954 Some((control_handle))
4955 } else {
4956 None
4957 }
4958 }
4959
4960 #[allow(irrefutable_let_patterns)]
4961 pub fn into_watch_events(self) -> Option<(SuiteControllerWatchEventsResponder)> {
4962 if let SuiteControllerRequest::WatchEvents { responder } = self {
4963 Some((responder))
4964 } else {
4965 None
4966 }
4967 }
4968
4969 #[allow(irrefutable_let_patterns)]
4970 pub fn into_get_events(self) -> Option<(SuiteControllerGetEventsResponder)> {
4971 if let SuiteControllerRequest::GetEvents { responder } = self {
4972 Some((responder))
4973 } else {
4974 None
4975 }
4976 }
4977
4978 pub fn method_name(&self) -> &'static str {
4980 match *self {
4981 SuiteControllerRequest::Stop { .. } => "stop",
4982 SuiteControllerRequest::Kill { .. } => "kill",
4983 SuiteControllerRequest::WatchEvents { .. } => "watch_events",
4984 SuiteControllerRequest::GetEvents { .. } => "get_events",
4985 SuiteControllerRequest::_UnknownMethod {
4986 method_type: fidl::MethodType::OneWay,
4987 ..
4988 } => "unknown one-way method",
4989 SuiteControllerRequest::_UnknownMethod {
4990 method_type: fidl::MethodType::TwoWay,
4991 ..
4992 } => "unknown two-way method",
4993 }
4994 }
4995}
4996
4997#[derive(Debug, Clone)]
4998pub struct SuiteControllerControlHandle {
4999 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5000}
5001
5002impl fidl::endpoints::ControlHandle for SuiteControllerControlHandle {
5003 fn shutdown(&self) {
5004 self.inner.shutdown()
5005 }
5006 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5007 self.inner.shutdown_with_epitaph(status)
5008 }
5009
5010 fn is_closed(&self) -> bool {
5011 self.inner.channel().is_closed()
5012 }
5013 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5014 self.inner.channel().on_closed()
5015 }
5016
5017 #[cfg(target_os = "fuchsia")]
5018 fn signal_peer(
5019 &self,
5020 clear_mask: zx::Signals,
5021 set_mask: zx::Signals,
5022 ) -> Result<(), zx_status::Status> {
5023 use fidl::Peered;
5024 self.inner.channel().signal_peer(clear_mask, set_mask)
5025 }
5026}
5027
5028impl SuiteControllerControlHandle {}
5029
5030#[must_use = "FIDL methods require a response to be sent"]
5031#[derive(Debug)]
5032pub struct SuiteControllerWatchEventsResponder {
5033 control_handle: std::mem::ManuallyDrop<SuiteControllerControlHandle>,
5034 tx_id: u32,
5035}
5036
5037impl std::ops::Drop for SuiteControllerWatchEventsResponder {
5041 fn drop(&mut self) {
5042 self.control_handle.shutdown();
5043 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5045 }
5046}
5047
5048impl fidl::endpoints::Responder for SuiteControllerWatchEventsResponder {
5049 type ControlHandle = SuiteControllerControlHandle;
5050
5051 fn control_handle(&self) -> &SuiteControllerControlHandle {
5052 &self.control_handle
5053 }
5054
5055 fn drop_without_shutdown(mut self) {
5056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5058 std::mem::forget(self);
5060 }
5061}
5062
5063impl SuiteControllerWatchEventsResponder {
5064 pub fn send(self, mut result: Result<Vec<Event>, LaunchError>) -> Result<(), fidl::Error> {
5068 let _result = self.send_raw(result);
5069 if _result.is_err() {
5070 self.control_handle.shutdown();
5071 }
5072 self.drop_without_shutdown();
5073 _result
5074 }
5075
5076 pub fn send_no_shutdown_on_err(
5078 self,
5079 mut result: Result<Vec<Event>, LaunchError>,
5080 ) -> Result<(), fidl::Error> {
5081 let _result = self.send_raw(result);
5082 self.drop_without_shutdown();
5083 _result
5084 }
5085
5086 fn send_raw(&self, mut result: Result<Vec<Event>, LaunchError>) -> Result<(), fidl::Error> {
5087 self.control_handle.inner.send::<fidl::encoding::ResultType<
5088 SuiteControllerWatchEventsResponse,
5089 LaunchError,
5090 >>(
5091 result.as_mut().map_err(|e| *e).map(|events| (events.as_mut_slice(),)),
5092 self.tx_id,
5093 0x5d1a75b1d06839b4,
5094 fidl::encoding::DynamicFlags::empty(),
5095 )
5096 }
5097}
5098
5099#[must_use = "FIDL methods require a response to be sent"]
5100#[derive(Debug)]
5101pub struct SuiteControllerGetEventsResponder {
5102 control_handle: std::mem::ManuallyDrop<SuiteControllerControlHandle>,
5103 tx_id: u32,
5104}
5105
5106impl std::ops::Drop for SuiteControllerGetEventsResponder {
5110 fn drop(&mut self) {
5111 self.control_handle.shutdown();
5112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5114 }
5115}
5116
5117impl fidl::endpoints::Responder for SuiteControllerGetEventsResponder {
5118 type ControlHandle = SuiteControllerControlHandle;
5119
5120 fn control_handle(&self) -> &SuiteControllerControlHandle {
5121 &self.control_handle
5122 }
5123
5124 fn drop_without_shutdown(mut self) {
5125 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5127 std::mem::forget(self);
5129 }
5130}
5131
5132impl SuiteControllerGetEventsResponder {
5133 pub fn send(self, mut result: Result<Vec<SuiteEvent>, LaunchError>) -> Result<(), fidl::Error> {
5137 let _result = self.send_raw(result);
5138 if _result.is_err() {
5139 self.control_handle.shutdown();
5140 }
5141 self.drop_without_shutdown();
5142 _result
5143 }
5144
5145 pub fn send_no_shutdown_on_err(
5147 self,
5148 mut result: Result<Vec<SuiteEvent>, LaunchError>,
5149 ) -> Result<(), fidl::Error> {
5150 let _result = self.send_raw(result);
5151 self.drop_without_shutdown();
5152 _result
5153 }
5154
5155 fn send_raw(
5156 &self,
5157 mut result: Result<Vec<SuiteEvent>, LaunchError>,
5158 ) -> Result<(), fidl::Error> {
5159 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
5160 SuiteControllerGetEventsResponse,
5161 LaunchError,
5162 >>(
5163 fidl::encoding::FlexibleResult::new(
5164 result.as_mut().map_err(|e| *e).map(|events| (events.as_mut_slice(),)),
5165 ),
5166 self.tx_id,
5167 0x1f2ec93d2236d1db,
5168 fidl::encoding::DynamicFlags::FLEXIBLE,
5169 )
5170 }
5171}
5172
5173#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5174pub struct SuiteRunnerMarker;
5175
5176impl fidl::endpoints::ProtocolMarker for SuiteRunnerMarker {
5177 type Proxy = SuiteRunnerProxy;
5178 type RequestStream = SuiteRunnerRequestStream;
5179 #[cfg(target_os = "fuchsia")]
5180 type SynchronousProxy = SuiteRunnerSynchronousProxy;
5181
5182 const DEBUG_NAME: &'static str = "fuchsia.test.manager.SuiteRunner";
5183}
5184impl fidl::endpoints::DiscoverableProtocolMarker for SuiteRunnerMarker {}
5185
5186pub trait SuiteRunnerProxyInterface: Send + Sync {
5187 fn r#run(
5188 &self,
5189 test_suite_url: &str,
5190 options: RunSuiteOptions,
5191 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5192 ) -> Result<(), fidl::Error>;
5193}
5194#[derive(Debug)]
5195#[cfg(target_os = "fuchsia")]
5196pub struct SuiteRunnerSynchronousProxy {
5197 client: fidl::client::sync::Client,
5198}
5199
5200#[cfg(target_os = "fuchsia")]
5201impl fidl::endpoints::SynchronousProxy for SuiteRunnerSynchronousProxy {
5202 type Proxy = SuiteRunnerProxy;
5203 type Protocol = SuiteRunnerMarker;
5204
5205 fn from_channel(inner: fidl::Channel) -> Self {
5206 Self::new(inner)
5207 }
5208
5209 fn into_channel(self) -> fidl::Channel {
5210 self.client.into_channel()
5211 }
5212
5213 fn as_channel(&self) -> &fidl::Channel {
5214 self.client.as_channel()
5215 }
5216}
5217
5218#[cfg(target_os = "fuchsia")]
5219impl SuiteRunnerSynchronousProxy {
5220 pub fn new(channel: fidl::Channel) -> Self {
5221 let protocol_name = <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5222 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5223 }
5224
5225 pub fn into_channel(self) -> fidl::Channel {
5226 self.client.into_channel()
5227 }
5228
5229 pub fn wait_for_event(
5232 &self,
5233 deadline: zx::MonotonicInstant,
5234 ) -> Result<SuiteRunnerEvent, fidl::Error> {
5235 SuiteRunnerEvent::decode(self.client.wait_for_event(deadline)?)
5236 }
5237
5238 pub fn r#run(
5240 &self,
5241 mut test_suite_url: &str,
5242 mut options: RunSuiteOptions,
5243 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5244 ) -> Result<(), fidl::Error> {
5245 self.client.send::<SuiteRunnerRunRequest>(
5246 (test_suite_url, &mut options, controller),
5247 0x16f5ec6a46c223f0,
5248 fidl::encoding::DynamicFlags::FLEXIBLE,
5249 )
5250 }
5251}
5252
5253#[cfg(target_os = "fuchsia")]
5254impl From<SuiteRunnerSynchronousProxy> for zx::Handle {
5255 fn from(value: SuiteRunnerSynchronousProxy) -> Self {
5256 value.into_channel().into()
5257 }
5258}
5259
5260#[cfg(target_os = "fuchsia")]
5261impl From<fidl::Channel> for SuiteRunnerSynchronousProxy {
5262 fn from(value: fidl::Channel) -> Self {
5263 Self::new(value)
5264 }
5265}
5266
5267#[cfg(target_os = "fuchsia")]
5268impl fidl::endpoints::FromClient for SuiteRunnerSynchronousProxy {
5269 type Protocol = SuiteRunnerMarker;
5270
5271 fn from_client(value: fidl::endpoints::ClientEnd<SuiteRunnerMarker>) -> Self {
5272 Self::new(value.into_channel())
5273 }
5274}
5275
5276#[derive(Debug, Clone)]
5277pub struct SuiteRunnerProxy {
5278 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5279}
5280
5281impl fidl::endpoints::Proxy for SuiteRunnerProxy {
5282 type Protocol = SuiteRunnerMarker;
5283
5284 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5285 Self::new(inner)
5286 }
5287
5288 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5289 self.client.into_channel().map_err(|client| Self { client })
5290 }
5291
5292 fn as_channel(&self) -> &::fidl::AsyncChannel {
5293 self.client.as_channel()
5294 }
5295}
5296
5297impl SuiteRunnerProxy {
5298 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5300 let protocol_name = <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5301 Self { client: fidl::client::Client::new(channel, protocol_name) }
5302 }
5303
5304 pub fn take_event_stream(&self) -> SuiteRunnerEventStream {
5310 SuiteRunnerEventStream { event_receiver: self.client.take_event_receiver() }
5311 }
5312
5313 pub fn r#run(
5315 &self,
5316 mut test_suite_url: &str,
5317 mut options: RunSuiteOptions,
5318 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5319 ) -> Result<(), fidl::Error> {
5320 SuiteRunnerProxyInterface::r#run(self, test_suite_url, options, controller)
5321 }
5322}
5323
5324impl SuiteRunnerProxyInterface for SuiteRunnerProxy {
5325 fn r#run(
5326 &self,
5327 mut test_suite_url: &str,
5328 mut options: RunSuiteOptions,
5329 mut controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5330 ) -> Result<(), fidl::Error> {
5331 self.client.send::<SuiteRunnerRunRequest>(
5332 (test_suite_url, &mut options, controller),
5333 0x16f5ec6a46c223f0,
5334 fidl::encoding::DynamicFlags::FLEXIBLE,
5335 )
5336 }
5337}
5338
5339pub struct SuiteRunnerEventStream {
5340 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5341}
5342
5343impl std::marker::Unpin for SuiteRunnerEventStream {}
5344
5345impl futures::stream::FusedStream for SuiteRunnerEventStream {
5346 fn is_terminated(&self) -> bool {
5347 self.event_receiver.is_terminated()
5348 }
5349}
5350
5351impl futures::Stream for SuiteRunnerEventStream {
5352 type Item = Result<SuiteRunnerEvent, fidl::Error>;
5353
5354 fn poll_next(
5355 mut self: std::pin::Pin<&mut Self>,
5356 cx: &mut std::task::Context<'_>,
5357 ) -> std::task::Poll<Option<Self::Item>> {
5358 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5359 &mut self.event_receiver,
5360 cx
5361 )?) {
5362 Some(buf) => std::task::Poll::Ready(Some(SuiteRunnerEvent::decode(buf))),
5363 None => std::task::Poll::Ready(None),
5364 }
5365 }
5366}
5367
5368#[derive(Debug)]
5369pub enum SuiteRunnerEvent {
5370 #[non_exhaustive]
5371 _UnknownEvent {
5372 ordinal: u64,
5374 },
5375}
5376
5377impl SuiteRunnerEvent {
5378 fn decode(
5380 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5381 ) -> Result<SuiteRunnerEvent, fidl::Error> {
5382 let (bytes, _handles) = buf.split_mut();
5383 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5384 debug_assert_eq!(tx_header.tx_id, 0);
5385 match tx_header.ordinal {
5386 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5387 Ok(SuiteRunnerEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5388 }
5389 _ => Err(fidl::Error::UnknownOrdinal {
5390 ordinal: tx_header.ordinal,
5391 protocol_name: <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5392 }),
5393 }
5394 }
5395}
5396
5397pub struct SuiteRunnerRequestStream {
5399 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5400 is_terminated: bool,
5401}
5402
5403impl std::marker::Unpin for SuiteRunnerRequestStream {}
5404
5405impl futures::stream::FusedStream for SuiteRunnerRequestStream {
5406 fn is_terminated(&self) -> bool {
5407 self.is_terminated
5408 }
5409}
5410
5411impl fidl::endpoints::RequestStream for SuiteRunnerRequestStream {
5412 type Protocol = SuiteRunnerMarker;
5413 type ControlHandle = SuiteRunnerControlHandle;
5414
5415 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5416 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5417 }
5418
5419 fn control_handle(&self) -> Self::ControlHandle {
5420 SuiteRunnerControlHandle { inner: self.inner.clone() }
5421 }
5422
5423 fn into_inner(
5424 self,
5425 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5426 {
5427 (self.inner, self.is_terminated)
5428 }
5429
5430 fn from_inner(
5431 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5432 is_terminated: bool,
5433 ) -> Self {
5434 Self { inner, is_terminated }
5435 }
5436}
5437
5438impl futures::Stream for SuiteRunnerRequestStream {
5439 type Item = Result<SuiteRunnerRequest, fidl::Error>;
5440
5441 fn poll_next(
5442 mut self: std::pin::Pin<&mut Self>,
5443 cx: &mut std::task::Context<'_>,
5444 ) -> std::task::Poll<Option<Self::Item>> {
5445 let this = &mut *self;
5446 if this.inner.check_shutdown(cx) {
5447 this.is_terminated = true;
5448 return std::task::Poll::Ready(None);
5449 }
5450 if this.is_terminated {
5451 panic!("polled SuiteRunnerRequestStream after completion");
5452 }
5453 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5454 |bytes, handles| {
5455 match this.inner.channel().read_etc(cx, bytes, handles) {
5456 std::task::Poll::Ready(Ok(())) => {}
5457 std::task::Poll::Pending => return std::task::Poll::Pending,
5458 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5459 this.is_terminated = true;
5460 return std::task::Poll::Ready(None);
5461 }
5462 std::task::Poll::Ready(Err(e)) => {
5463 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5464 e.into(),
5465 ))))
5466 }
5467 }
5468
5469 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5471
5472 std::task::Poll::Ready(Some(match header.ordinal {
5473 0x16f5ec6a46c223f0 => {
5474 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5475 let mut req = fidl::new_empty!(
5476 SuiteRunnerRunRequest,
5477 fidl::encoding::DefaultFuchsiaResourceDialect
5478 );
5479 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SuiteRunnerRunRequest>(&header, _body_bytes, handles, &mut req)?;
5480 let control_handle = SuiteRunnerControlHandle { inner: this.inner.clone() };
5481 Ok(SuiteRunnerRequest::Run {
5482 test_suite_url: req.test_suite_url,
5483 options: req.options,
5484 controller: req.controller,
5485
5486 control_handle,
5487 })
5488 }
5489 _ if header.tx_id == 0
5490 && header
5491 .dynamic_flags()
5492 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5493 {
5494 Ok(SuiteRunnerRequest::_UnknownMethod {
5495 ordinal: header.ordinal,
5496 control_handle: SuiteRunnerControlHandle { inner: this.inner.clone() },
5497 method_type: fidl::MethodType::OneWay,
5498 })
5499 }
5500 _ if header
5501 .dynamic_flags()
5502 .contains(fidl::encoding::DynamicFlags::FLEXIBLE) =>
5503 {
5504 this.inner.send_framework_err(
5505 fidl::encoding::FrameworkErr::UnknownMethod,
5506 header.tx_id,
5507 header.ordinal,
5508 header.dynamic_flags(),
5509 (bytes, handles),
5510 )?;
5511 Ok(SuiteRunnerRequest::_UnknownMethod {
5512 ordinal: header.ordinal,
5513 control_handle: SuiteRunnerControlHandle { inner: this.inner.clone() },
5514 method_type: fidl::MethodType::TwoWay,
5515 })
5516 }
5517 _ => Err(fidl::Error::UnknownOrdinal {
5518 ordinal: header.ordinal,
5519 protocol_name:
5520 <SuiteRunnerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5521 }),
5522 }))
5523 },
5524 )
5525 }
5526}
5527
5528#[derive(Debug)]
5530pub enum SuiteRunnerRequest {
5531 Run {
5533 test_suite_url: String,
5534 options: RunSuiteOptions,
5535 controller: fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5536 control_handle: SuiteRunnerControlHandle,
5537 },
5538 #[non_exhaustive]
5540 _UnknownMethod {
5541 ordinal: u64,
5543 control_handle: SuiteRunnerControlHandle,
5544 method_type: fidl::MethodType,
5545 },
5546}
5547
5548impl SuiteRunnerRequest {
5549 #[allow(irrefutable_let_patterns)]
5550 pub fn into_run(
5551 self,
5552 ) -> Option<(
5553 String,
5554 RunSuiteOptions,
5555 fidl::endpoints::ServerEnd<SuiteControllerMarker>,
5556 SuiteRunnerControlHandle,
5557 )> {
5558 if let SuiteRunnerRequest::Run { test_suite_url, options, controller, control_handle } =
5559 self
5560 {
5561 Some((test_suite_url, options, controller, control_handle))
5562 } else {
5563 None
5564 }
5565 }
5566
5567 pub fn method_name(&self) -> &'static str {
5569 match *self {
5570 SuiteRunnerRequest::Run { .. } => "run",
5571 SuiteRunnerRequest::_UnknownMethod {
5572 method_type: fidl::MethodType::OneWay, ..
5573 } => "unknown one-way method",
5574 SuiteRunnerRequest::_UnknownMethod {
5575 method_type: fidl::MethodType::TwoWay, ..
5576 } => "unknown two-way method",
5577 }
5578 }
5579}
5580
5581#[derive(Debug, Clone)]
5582pub struct SuiteRunnerControlHandle {
5583 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5584}
5585
5586impl fidl::endpoints::ControlHandle for SuiteRunnerControlHandle {
5587 fn shutdown(&self) {
5588 self.inner.shutdown()
5589 }
5590 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5591 self.inner.shutdown_with_epitaph(status)
5592 }
5593
5594 fn is_closed(&self) -> bool {
5595 self.inner.channel().is_closed()
5596 }
5597 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5598 self.inner.channel().on_closed()
5599 }
5600
5601 #[cfg(target_os = "fuchsia")]
5602 fn signal_peer(
5603 &self,
5604 clear_mask: zx::Signals,
5605 set_mask: zx::Signals,
5606 ) -> Result<(), zx_status::Status> {
5607 use fidl::Peered;
5608 self.inner.channel().signal_peer(clear_mask, set_mask)
5609 }
5610}
5611
5612impl SuiteRunnerControlHandle {}
5613
5614#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5615pub struct TestCaseEnumeratorMarker;
5616
5617impl fidl::endpoints::ProtocolMarker for TestCaseEnumeratorMarker {
5618 type Proxy = TestCaseEnumeratorProxy;
5619 type RequestStream = TestCaseEnumeratorRequestStream;
5620 #[cfg(target_os = "fuchsia")]
5621 type SynchronousProxy = TestCaseEnumeratorSynchronousProxy;
5622
5623 const DEBUG_NAME: &'static str = "fuchsia.test.manager.TestCaseEnumerator";
5624}
5625impl fidl::endpoints::DiscoverableProtocolMarker for TestCaseEnumeratorMarker {}
5626pub type TestCaseEnumeratorEnumerateResult = Result<(), LaunchError>;
5627
5628pub trait TestCaseEnumeratorProxyInterface: Send + Sync {
5629 type EnumerateResponseFut: std::future::Future<Output = Result<TestCaseEnumeratorEnumerateResult, fidl::Error>>
5630 + Send;
5631 fn r#enumerate(
5632 &self,
5633 test_suite_url: &str,
5634 options: EnumerateTestCasesOptions,
5635 iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
5636 ) -> Self::EnumerateResponseFut;
5637}
5638#[derive(Debug)]
5639#[cfg(target_os = "fuchsia")]
5640pub struct TestCaseEnumeratorSynchronousProxy {
5641 client: fidl::client::sync::Client,
5642}
5643
5644#[cfg(target_os = "fuchsia")]
5645impl fidl::endpoints::SynchronousProxy for TestCaseEnumeratorSynchronousProxy {
5646 type Proxy = TestCaseEnumeratorProxy;
5647 type Protocol = TestCaseEnumeratorMarker;
5648
5649 fn from_channel(inner: fidl::Channel) -> Self {
5650 Self::new(inner)
5651 }
5652
5653 fn into_channel(self) -> fidl::Channel {
5654 self.client.into_channel()
5655 }
5656
5657 fn as_channel(&self) -> &fidl::Channel {
5658 self.client.as_channel()
5659 }
5660}
5661
5662#[cfg(target_os = "fuchsia")]
5663impl TestCaseEnumeratorSynchronousProxy {
5664 pub fn new(channel: fidl::Channel) -> Self {
5665 let protocol_name =
5666 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5667 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5668 }
5669
5670 pub fn into_channel(self) -> fidl::Channel {
5671 self.client.into_channel()
5672 }
5673
5674 pub fn wait_for_event(
5677 &self,
5678 deadline: zx::MonotonicInstant,
5679 ) -> Result<TestCaseEnumeratorEvent, fidl::Error> {
5680 TestCaseEnumeratorEvent::decode(self.client.wait_for_event(deadline)?)
5681 }
5682
5683 pub fn r#enumerate(
5685 &self,
5686 mut test_suite_url: &str,
5687 mut options: EnumerateTestCasesOptions,
5688 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
5689 ___deadline: zx::MonotonicInstant,
5690 ) -> Result<TestCaseEnumeratorEnumerateResult, fidl::Error> {
5691 let _response = self.client.send_query::<
5692 TestCaseEnumeratorEnumerateRequest,
5693 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, LaunchError>,
5694 >(
5695 (test_suite_url, &mut options, iterator,),
5696 0x24f8a91d96134492,
5697 fidl::encoding::DynamicFlags::FLEXIBLE,
5698 ___deadline,
5699 )?
5700 .into_result::<TestCaseEnumeratorMarker>("enumerate")?;
5701 Ok(_response.map(|x| x))
5702 }
5703}
5704
5705#[cfg(target_os = "fuchsia")]
5706impl From<TestCaseEnumeratorSynchronousProxy> for zx::Handle {
5707 fn from(value: TestCaseEnumeratorSynchronousProxy) -> Self {
5708 value.into_channel().into()
5709 }
5710}
5711
5712#[cfg(target_os = "fuchsia")]
5713impl From<fidl::Channel> for TestCaseEnumeratorSynchronousProxy {
5714 fn from(value: fidl::Channel) -> Self {
5715 Self::new(value)
5716 }
5717}
5718
5719#[cfg(target_os = "fuchsia")]
5720impl fidl::endpoints::FromClient for TestCaseEnumeratorSynchronousProxy {
5721 type Protocol = TestCaseEnumeratorMarker;
5722
5723 fn from_client(value: fidl::endpoints::ClientEnd<TestCaseEnumeratorMarker>) -> Self {
5724 Self::new(value.into_channel())
5725 }
5726}
5727
5728#[derive(Debug, Clone)]
5729pub struct TestCaseEnumeratorProxy {
5730 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5731}
5732
5733impl fidl::endpoints::Proxy for TestCaseEnumeratorProxy {
5734 type Protocol = TestCaseEnumeratorMarker;
5735
5736 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5737 Self::new(inner)
5738 }
5739
5740 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5741 self.client.into_channel().map_err(|client| Self { client })
5742 }
5743
5744 fn as_channel(&self) -> &::fidl::AsyncChannel {
5745 self.client.as_channel()
5746 }
5747}
5748
5749impl TestCaseEnumeratorProxy {
5750 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5752 let protocol_name =
5753 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5754 Self { client: fidl::client::Client::new(channel, protocol_name) }
5755 }
5756
5757 pub fn take_event_stream(&self) -> TestCaseEnumeratorEventStream {
5763 TestCaseEnumeratorEventStream { event_receiver: self.client.take_event_receiver() }
5764 }
5765
5766 pub fn r#enumerate(
5768 &self,
5769 mut test_suite_url: &str,
5770 mut options: EnumerateTestCasesOptions,
5771 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
5772 ) -> fidl::client::QueryResponseFut<
5773 TestCaseEnumeratorEnumerateResult,
5774 fidl::encoding::DefaultFuchsiaResourceDialect,
5775 > {
5776 TestCaseEnumeratorProxyInterface::r#enumerate(self, test_suite_url, options, iterator)
5777 }
5778}
5779
5780impl TestCaseEnumeratorProxyInterface for TestCaseEnumeratorProxy {
5781 type EnumerateResponseFut = fidl::client::QueryResponseFut<
5782 TestCaseEnumeratorEnumerateResult,
5783 fidl::encoding::DefaultFuchsiaResourceDialect,
5784 >;
5785 fn r#enumerate(
5786 &self,
5787 mut test_suite_url: &str,
5788 mut options: EnumerateTestCasesOptions,
5789 mut iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
5790 ) -> Self::EnumerateResponseFut {
5791 fn _decode(
5792 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5793 ) -> Result<TestCaseEnumeratorEnumerateResult, fidl::Error> {
5794 let _response = fidl::client::decode_transaction_body::<
5795 fidl::encoding::FlexibleResultType<fidl::encoding::EmptyStruct, LaunchError>,
5796 fidl::encoding::DefaultFuchsiaResourceDialect,
5797 0x24f8a91d96134492,
5798 >(_buf?)?
5799 .into_result::<TestCaseEnumeratorMarker>("enumerate")?;
5800 Ok(_response.map(|x| x))
5801 }
5802 self.client.send_query_and_decode::<
5803 TestCaseEnumeratorEnumerateRequest,
5804 TestCaseEnumeratorEnumerateResult,
5805 >(
5806 (test_suite_url, &mut options, iterator,),
5807 0x24f8a91d96134492,
5808 fidl::encoding::DynamicFlags::FLEXIBLE,
5809 _decode,
5810 )
5811 }
5812}
5813
5814pub struct TestCaseEnumeratorEventStream {
5815 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5816}
5817
5818impl std::marker::Unpin for TestCaseEnumeratorEventStream {}
5819
5820impl futures::stream::FusedStream for TestCaseEnumeratorEventStream {
5821 fn is_terminated(&self) -> bool {
5822 self.event_receiver.is_terminated()
5823 }
5824}
5825
5826impl futures::Stream for TestCaseEnumeratorEventStream {
5827 type Item = Result<TestCaseEnumeratorEvent, fidl::Error>;
5828
5829 fn poll_next(
5830 mut self: std::pin::Pin<&mut Self>,
5831 cx: &mut std::task::Context<'_>,
5832 ) -> std::task::Poll<Option<Self::Item>> {
5833 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5834 &mut self.event_receiver,
5835 cx
5836 )?) {
5837 Some(buf) => std::task::Poll::Ready(Some(TestCaseEnumeratorEvent::decode(buf))),
5838 None => std::task::Poll::Ready(None),
5839 }
5840 }
5841}
5842
5843#[derive(Debug)]
5844pub enum TestCaseEnumeratorEvent {
5845 #[non_exhaustive]
5846 _UnknownEvent {
5847 ordinal: u64,
5849 },
5850}
5851
5852impl TestCaseEnumeratorEvent {
5853 fn decode(
5855 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5856 ) -> Result<TestCaseEnumeratorEvent, fidl::Error> {
5857 let (bytes, _handles) = buf.split_mut();
5858 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5859 debug_assert_eq!(tx_header.tx_id, 0);
5860 match tx_header.ordinal {
5861 _ if tx_header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5862 Ok(TestCaseEnumeratorEvent::_UnknownEvent { ordinal: tx_header.ordinal })
5863 }
5864 _ => Err(fidl::Error::UnknownOrdinal {
5865 ordinal: tx_header.ordinal,
5866 protocol_name:
5867 <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5868 }),
5869 }
5870 }
5871}
5872
5873pub struct TestCaseEnumeratorRequestStream {
5875 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5876 is_terminated: bool,
5877}
5878
5879impl std::marker::Unpin for TestCaseEnumeratorRequestStream {}
5880
5881impl futures::stream::FusedStream for TestCaseEnumeratorRequestStream {
5882 fn is_terminated(&self) -> bool {
5883 self.is_terminated
5884 }
5885}
5886
5887impl fidl::endpoints::RequestStream for TestCaseEnumeratorRequestStream {
5888 type Protocol = TestCaseEnumeratorMarker;
5889 type ControlHandle = TestCaseEnumeratorControlHandle;
5890
5891 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5892 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5893 }
5894
5895 fn control_handle(&self) -> Self::ControlHandle {
5896 TestCaseEnumeratorControlHandle { inner: self.inner.clone() }
5897 }
5898
5899 fn into_inner(
5900 self,
5901 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5902 {
5903 (self.inner, self.is_terminated)
5904 }
5905
5906 fn from_inner(
5907 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5908 is_terminated: bool,
5909 ) -> Self {
5910 Self { inner, is_terminated }
5911 }
5912}
5913
5914impl futures::Stream for TestCaseEnumeratorRequestStream {
5915 type Item = Result<TestCaseEnumeratorRequest, fidl::Error>;
5916
5917 fn poll_next(
5918 mut self: std::pin::Pin<&mut Self>,
5919 cx: &mut std::task::Context<'_>,
5920 ) -> std::task::Poll<Option<Self::Item>> {
5921 let this = &mut *self;
5922 if this.inner.check_shutdown(cx) {
5923 this.is_terminated = true;
5924 return std::task::Poll::Ready(None);
5925 }
5926 if this.is_terminated {
5927 panic!("polled TestCaseEnumeratorRequestStream after completion");
5928 }
5929 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5930 |bytes, handles| {
5931 match this.inner.channel().read_etc(cx, bytes, handles) {
5932 std::task::Poll::Ready(Ok(())) => {}
5933 std::task::Poll::Pending => return std::task::Poll::Pending,
5934 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5935 this.is_terminated = true;
5936 return std::task::Poll::Ready(None);
5937 }
5938 std::task::Poll::Ready(Err(e)) => {
5939 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5940 e.into(),
5941 ))))
5942 }
5943 }
5944
5945 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5947
5948 std::task::Poll::Ready(Some(match header.ordinal {
5949 0x24f8a91d96134492 => {
5950 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5951 let mut req = fidl::new_empty!(TestCaseEnumeratorEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5952 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TestCaseEnumeratorEnumerateRequest>(&header, _body_bytes, handles, &mut req)?;
5953 let control_handle = TestCaseEnumeratorControlHandle {
5954 inner: this.inner.clone(),
5955 };
5956 Ok(TestCaseEnumeratorRequest::Enumerate {test_suite_url: req.test_suite_url,
5957options: req.options,
5958iterator: req.iterator,
5959
5960 responder: TestCaseEnumeratorEnumerateResponder {
5961 control_handle: std::mem::ManuallyDrop::new(control_handle),
5962 tx_id: header.tx_id,
5963 },
5964 })
5965 }
5966 _ if header.tx_id == 0 && header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5967 Ok(TestCaseEnumeratorRequest::_UnknownMethod {
5968 ordinal: header.ordinal,
5969 control_handle: TestCaseEnumeratorControlHandle { inner: this.inner.clone() },
5970 method_type: fidl::MethodType::OneWay,
5971 })
5972 }
5973 _ if header.dynamic_flags().contains(fidl::encoding::DynamicFlags::FLEXIBLE) => {
5974 this.inner.send_framework_err(
5975 fidl::encoding::FrameworkErr::UnknownMethod,
5976 header.tx_id,
5977 header.ordinal,
5978 header.dynamic_flags(),
5979 (bytes, handles),
5980 )?;
5981 Ok(TestCaseEnumeratorRequest::_UnknownMethod {
5982 ordinal: header.ordinal,
5983 control_handle: TestCaseEnumeratorControlHandle { inner: this.inner.clone() },
5984 method_type: fidl::MethodType::TwoWay,
5985 })
5986 }
5987 _ => Err(fidl::Error::UnknownOrdinal {
5988 ordinal: header.ordinal,
5989 protocol_name: <TestCaseEnumeratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5990 }),
5991 }))
5992 },
5993 )
5994 }
5995}
5996
5997#[derive(Debug)]
5999pub enum TestCaseEnumeratorRequest {
6000 Enumerate {
6002 test_suite_url: String,
6003 options: EnumerateTestCasesOptions,
6004 iterator: fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6005 responder: TestCaseEnumeratorEnumerateResponder,
6006 },
6007 #[non_exhaustive]
6009 _UnknownMethod {
6010 ordinal: u64,
6012 control_handle: TestCaseEnumeratorControlHandle,
6013 method_type: fidl::MethodType,
6014 },
6015}
6016
6017impl TestCaseEnumeratorRequest {
6018 #[allow(irrefutable_let_patterns)]
6019 pub fn into_enumerate(
6020 self,
6021 ) -> Option<(
6022 String,
6023 EnumerateTestCasesOptions,
6024 fidl::endpoints::ServerEnd<TestCaseIteratorMarker>,
6025 TestCaseEnumeratorEnumerateResponder,
6026 )> {
6027 if let TestCaseEnumeratorRequest::Enumerate {
6028 test_suite_url,
6029 options,
6030 iterator,
6031 responder,
6032 } = self
6033 {
6034 Some((test_suite_url, options, iterator, responder))
6035 } else {
6036 None
6037 }
6038 }
6039
6040 pub fn method_name(&self) -> &'static str {
6042 match *self {
6043 TestCaseEnumeratorRequest::Enumerate { .. } => "enumerate",
6044 TestCaseEnumeratorRequest::_UnknownMethod {
6045 method_type: fidl::MethodType::OneWay,
6046 ..
6047 } => "unknown one-way method",
6048 TestCaseEnumeratorRequest::_UnknownMethod {
6049 method_type: fidl::MethodType::TwoWay,
6050 ..
6051 } => "unknown two-way method",
6052 }
6053 }
6054}
6055
6056#[derive(Debug, Clone)]
6057pub struct TestCaseEnumeratorControlHandle {
6058 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6059}
6060
6061impl fidl::endpoints::ControlHandle for TestCaseEnumeratorControlHandle {
6062 fn shutdown(&self) {
6063 self.inner.shutdown()
6064 }
6065 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6066 self.inner.shutdown_with_epitaph(status)
6067 }
6068
6069 fn is_closed(&self) -> bool {
6070 self.inner.channel().is_closed()
6071 }
6072 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6073 self.inner.channel().on_closed()
6074 }
6075
6076 #[cfg(target_os = "fuchsia")]
6077 fn signal_peer(
6078 &self,
6079 clear_mask: zx::Signals,
6080 set_mask: zx::Signals,
6081 ) -> Result<(), zx_status::Status> {
6082 use fidl::Peered;
6083 self.inner.channel().signal_peer(clear_mask, set_mask)
6084 }
6085}
6086
6087impl TestCaseEnumeratorControlHandle {}
6088
6089#[must_use = "FIDL methods require a response to be sent"]
6090#[derive(Debug)]
6091pub struct TestCaseEnumeratorEnumerateResponder {
6092 control_handle: std::mem::ManuallyDrop<TestCaseEnumeratorControlHandle>,
6093 tx_id: u32,
6094}
6095
6096impl std::ops::Drop for TestCaseEnumeratorEnumerateResponder {
6100 fn drop(&mut self) {
6101 self.control_handle.shutdown();
6102 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6104 }
6105}
6106
6107impl fidl::endpoints::Responder for TestCaseEnumeratorEnumerateResponder {
6108 type ControlHandle = TestCaseEnumeratorControlHandle;
6109
6110 fn control_handle(&self) -> &TestCaseEnumeratorControlHandle {
6111 &self.control_handle
6112 }
6113
6114 fn drop_without_shutdown(mut self) {
6115 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6117 std::mem::forget(self);
6119 }
6120}
6121
6122impl TestCaseEnumeratorEnumerateResponder {
6123 pub fn send(self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
6127 let _result = self.send_raw(result);
6128 if _result.is_err() {
6129 self.control_handle.shutdown();
6130 }
6131 self.drop_without_shutdown();
6132 _result
6133 }
6134
6135 pub fn send_no_shutdown_on_err(
6137 self,
6138 mut result: Result<(), LaunchError>,
6139 ) -> Result<(), fidl::Error> {
6140 let _result = self.send_raw(result);
6141 self.drop_without_shutdown();
6142 _result
6143 }
6144
6145 fn send_raw(&self, mut result: Result<(), LaunchError>) -> Result<(), fidl::Error> {
6146 self.control_handle.inner.send::<fidl::encoding::FlexibleResultType<
6147 fidl::encoding::EmptyStruct,
6148 LaunchError,
6149 >>(
6150 fidl::encoding::FlexibleResult::new(result),
6151 self.tx_id,
6152 0x24f8a91d96134492,
6153 fidl::encoding::DynamicFlags::FLEXIBLE,
6154 )
6155 }
6156}
6157
6158#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6159pub struct TestCaseIteratorMarker;
6160
6161impl fidl::endpoints::ProtocolMarker for TestCaseIteratorMarker {
6162 type Proxy = TestCaseIteratorProxy;
6163 type RequestStream = TestCaseIteratorRequestStream;
6164 #[cfg(target_os = "fuchsia")]
6165 type SynchronousProxy = TestCaseIteratorSynchronousProxy;
6166
6167 const DEBUG_NAME: &'static str = "(anonymous) TestCaseIterator";
6168}
6169
6170pub trait TestCaseIteratorProxyInterface: Send + Sync {
6171 type GetNextResponseFut: std::future::Future<Output = Result<Vec<TestCase>, fidl::Error>> + Send;
6172 fn r#get_next(&self) -> Self::GetNextResponseFut;
6173}
6174#[derive(Debug)]
6175#[cfg(target_os = "fuchsia")]
6176pub struct TestCaseIteratorSynchronousProxy {
6177 client: fidl::client::sync::Client,
6178}
6179
6180#[cfg(target_os = "fuchsia")]
6181impl fidl::endpoints::SynchronousProxy for TestCaseIteratorSynchronousProxy {
6182 type Proxy = TestCaseIteratorProxy;
6183 type Protocol = TestCaseIteratorMarker;
6184
6185 fn from_channel(inner: fidl::Channel) -> Self {
6186 Self::new(inner)
6187 }
6188
6189 fn into_channel(self) -> fidl::Channel {
6190 self.client.into_channel()
6191 }
6192
6193 fn as_channel(&self) -> &fidl::Channel {
6194 self.client.as_channel()
6195 }
6196}
6197
6198#[cfg(target_os = "fuchsia")]
6199impl TestCaseIteratorSynchronousProxy {
6200 pub fn new(channel: fidl::Channel) -> Self {
6201 let protocol_name = <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6202 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6203 }
6204
6205 pub fn into_channel(self) -> fidl::Channel {
6206 self.client.into_channel()
6207 }
6208
6209 pub fn wait_for_event(
6212 &self,
6213 deadline: zx::MonotonicInstant,
6214 ) -> Result<TestCaseIteratorEvent, fidl::Error> {
6215 TestCaseIteratorEvent::decode(self.client.wait_for_event(deadline)?)
6216 }
6217
6218 pub fn r#get_next(
6221 &self,
6222 ___deadline: zx::MonotonicInstant,
6223 ) -> Result<Vec<TestCase>, fidl::Error> {
6224 let _response = self
6225 .client
6226 .send_query::<fidl::encoding::EmptyPayload, TestCaseIteratorGetNextResponse>(
6227 (),
6228 0x37abec519b2ac1be,
6229 fidl::encoding::DynamicFlags::empty(),
6230 ___deadline,
6231 )?;
6232 Ok(_response.test_cases)
6233 }
6234}
6235
6236#[cfg(target_os = "fuchsia")]
6237impl From<TestCaseIteratorSynchronousProxy> for zx::Handle {
6238 fn from(value: TestCaseIteratorSynchronousProxy) -> Self {
6239 value.into_channel().into()
6240 }
6241}
6242
6243#[cfg(target_os = "fuchsia")]
6244impl From<fidl::Channel> for TestCaseIteratorSynchronousProxy {
6245 fn from(value: fidl::Channel) -> Self {
6246 Self::new(value)
6247 }
6248}
6249
6250#[cfg(target_os = "fuchsia")]
6251impl fidl::endpoints::FromClient for TestCaseIteratorSynchronousProxy {
6252 type Protocol = TestCaseIteratorMarker;
6253
6254 fn from_client(value: fidl::endpoints::ClientEnd<TestCaseIteratorMarker>) -> Self {
6255 Self::new(value.into_channel())
6256 }
6257}
6258
6259#[derive(Debug, Clone)]
6260pub struct TestCaseIteratorProxy {
6261 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6262}
6263
6264impl fidl::endpoints::Proxy for TestCaseIteratorProxy {
6265 type Protocol = TestCaseIteratorMarker;
6266
6267 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6268 Self::new(inner)
6269 }
6270
6271 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6272 self.client.into_channel().map_err(|client| Self { client })
6273 }
6274
6275 fn as_channel(&self) -> &::fidl::AsyncChannel {
6276 self.client.as_channel()
6277 }
6278}
6279
6280impl TestCaseIteratorProxy {
6281 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6283 let protocol_name = <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6284 Self { client: fidl::client::Client::new(channel, protocol_name) }
6285 }
6286
6287 pub fn take_event_stream(&self) -> TestCaseIteratorEventStream {
6293 TestCaseIteratorEventStream { event_receiver: self.client.take_event_receiver() }
6294 }
6295
6296 pub fn r#get_next(
6299 &self,
6300 ) -> fidl::client::QueryResponseFut<Vec<TestCase>, fidl::encoding::DefaultFuchsiaResourceDialect>
6301 {
6302 TestCaseIteratorProxyInterface::r#get_next(self)
6303 }
6304}
6305
6306impl TestCaseIteratorProxyInterface for TestCaseIteratorProxy {
6307 type GetNextResponseFut = fidl::client::QueryResponseFut<
6308 Vec<TestCase>,
6309 fidl::encoding::DefaultFuchsiaResourceDialect,
6310 >;
6311 fn r#get_next(&self) -> Self::GetNextResponseFut {
6312 fn _decode(
6313 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6314 ) -> Result<Vec<TestCase>, fidl::Error> {
6315 let _response = fidl::client::decode_transaction_body::<
6316 TestCaseIteratorGetNextResponse,
6317 fidl::encoding::DefaultFuchsiaResourceDialect,
6318 0x37abec519b2ac1be,
6319 >(_buf?)?;
6320 Ok(_response.test_cases)
6321 }
6322 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<TestCase>>(
6323 (),
6324 0x37abec519b2ac1be,
6325 fidl::encoding::DynamicFlags::empty(),
6326 _decode,
6327 )
6328 }
6329}
6330
6331pub struct TestCaseIteratorEventStream {
6332 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6333}
6334
6335impl std::marker::Unpin for TestCaseIteratorEventStream {}
6336
6337impl futures::stream::FusedStream for TestCaseIteratorEventStream {
6338 fn is_terminated(&self) -> bool {
6339 self.event_receiver.is_terminated()
6340 }
6341}
6342
6343impl futures::Stream for TestCaseIteratorEventStream {
6344 type Item = Result<TestCaseIteratorEvent, fidl::Error>;
6345
6346 fn poll_next(
6347 mut self: std::pin::Pin<&mut Self>,
6348 cx: &mut std::task::Context<'_>,
6349 ) -> std::task::Poll<Option<Self::Item>> {
6350 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6351 &mut self.event_receiver,
6352 cx
6353 )?) {
6354 Some(buf) => std::task::Poll::Ready(Some(TestCaseIteratorEvent::decode(buf))),
6355 None => std::task::Poll::Ready(None),
6356 }
6357 }
6358}
6359
6360#[derive(Debug)]
6361pub enum TestCaseIteratorEvent {}
6362
6363impl TestCaseIteratorEvent {
6364 fn decode(
6366 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6367 ) -> Result<TestCaseIteratorEvent, fidl::Error> {
6368 let (bytes, _handles) = buf.split_mut();
6369 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6370 debug_assert_eq!(tx_header.tx_id, 0);
6371 match tx_header.ordinal {
6372 _ => Err(fidl::Error::UnknownOrdinal {
6373 ordinal: tx_header.ordinal,
6374 protocol_name:
6375 <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6376 }),
6377 }
6378 }
6379}
6380
6381pub struct TestCaseIteratorRequestStream {
6383 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6384 is_terminated: bool,
6385}
6386
6387impl std::marker::Unpin for TestCaseIteratorRequestStream {}
6388
6389impl futures::stream::FusedStream for TestCaseIteratorRequestStream {
6390 fn is_terminated(&self) -> bool {
6391 self.is_terminated
6392 }
6393}
6394
6395impl fidl::endpoints::RequestStream for TestCaseIteratorRequestStream {
6396 type Protocol = TestCaseIteratorMarker;
6397 type ControlHandle = TestCaseIteratorControlHandle;
6398
6399 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6400 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6401 }
6402
6403 fn control_handle(&self) -> Self::ControlHandle {
6404 TestCaseIteratorControlHandle { inner: self.inner.clone() }
6405 }
6406
6407 fn into_inner(
6408 self,
6409 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6410 {
6411 (self.inner, self.is_terminated)
6412 }
6413
6414 fn from_inner(
6415 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6416 is_terminated: bool,
6417 ) -> Self {
6418 Self { inner, is_terminated }
6419 }
6420}
6421
6422impl futures::Stream for TestCaseIteratorRequestStream {
6423 type Item = Result<TestCaseIteratorRequest, fidl::Error>;
6424
6425 fn poll_next(
6426 mut self: std::pin::Pin<&mut Self>,
6427 cx: &mut std::task::Context<'_>,
6428 ) -> std::task::Poll<Option<Self::Item>> {
6429 let this = &mut *self;
6430 if this.inner.check_shutdown(cx) {
6431 this.is_terminated = true;
6432 return std::task::Poll::Ready(None);
6433 }
6434 if this.is_terminated {
6435 panic!("polled TestCaseIteratorRequestStream after completion");
6436 }
6437 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6438 |bytes, handles| {
6439 match this.inner.channel().read_etc(cx, bytes, handles) {
6440 std::task::Poll::Ready(Ok(())) => {}
6441 std::task::Poll::Pending => return std::task::Poll::Pending,
6442 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6443 this.is_terminated = true;
6444 return std::task::Poll::Ready(None);
6445 }
6446 std::task::Poll::Ready(Err(e)) => {
6447 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6448 e.into(),
6449 ))))
6450 }
6451 }
6452
6453 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6455
6456 std::task::Poll::Ready(Some(match header.ordinal {
6457 0x37abec519b2ac1be => {
6458 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6459 let mut req = fidl::new_empty!(
6460 fidl::encoding::EmptyPayload,
6461 fidl::encoding::DefaultFuchsiaResourceDialect
6462 );
6463 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6464 let control_handle =
6465 TestCaseIteratorControlHandle { inner: this.inner.clone() };
6466 Ok(TestCaseIteratorRequest::GetNext {
6467 responder: TestCaseIteratorGetNextResponder {
6468 control_handle: std::mem::ManuallyDrop::new(control_handle),
6469 tx_id: header.tx_id,
6470 },
6471 })
6472 }
6473 _ => Err(fidl::Error::UnknownOrdinal {
6474 ordinal: header.ordinal,
6475 protocol_name:
6476 <TestCaseIteratorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6477 }),
6478 }))
6479 },
6480 )
6481 }
6482}
6483
6484#[derive(Debug)]
6486pub enum TestCaseIteratorRequest {
6487 GetNext { responder: TestCaseIteratorGetNextResponder },
6490}
6491
6492impl TestCaseIteratorRequest {
6493 #[allow(irrefutable_let_patterns)]
6494 pub fn into_get_next(self) -> Option<(TestCaseIteratorGetNextResponder)> {
6495 if let TestCaseIteratorRequest::GetNext { responder } = self {
6496 Some((responder))
6497 } else {
6498 None
6499 }
6500 }
6501
6502 pub fn method_name(&self) -> &'static str {
6504 match *self {
6505 TestCaseIteratorRequest::GetNext { .. } => "get_next",
6506 }
6507 }
6508}
6509
6510#[derive(Debug, Clone)]
6511pub struct TestCaseIteratorControlHandle {
6512 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6513}
6514
6515impl fidl::endpoints::ControlHandle for TestCaseIteratorControlHandle {
6516 fn shutdown(&self) {
6517 self.inner.shutdown()
6518 }
6519 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6520 self.inner.shutdown_with_epitaph(status)
6521 }
6522
6523 fn is_closed(&self) -> bool {
6524 self.inner.channel().is_closed()
6525 }
6526 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6527 self.inner.channel().on_closed()
6528 }
6529
6530 #[cfg(target_os = "fuchsia")]
6531 fn signal_peer(
6532 &self,
6533 clear_mask: zx::Signals,
6534 set_mask: zx::Signals,
6535 ) -> Result<(), zx_status::Status> {
6536 use fidl::Peered;
6537 self.inner.channel().signal_peer(clear_mask, set_mask)
6538 }
6539}
6540
6541impl TestCaseIteratorControlHandle {}
6542
6543#[must_use = "FIDL methods require a response to be sent"]
6544#[derive(Debug)]
6545pub struct TestCaseIteratorGetNextResponder {
6546 control_handle: std::mem::ManuallyDrop<TestCaseIteratorControlHandle>,
6547 tx_id: u32,
6548}
6549
6550impl std::ops::Drop for TestCaseIteratorGetNextResponder {
6554 fn drop(&mut self) {
6555 self.control_handle.shutdown();
6556 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6558 }
6559}
6560
6561impl fidl::endpoints::Responder for TestCaseIteratorGetNextResponder {
6562 type ControlHandle = TestCaseIteratorControlHandle;
6563
6564 fn control_handle(&self) -> &TestCaseIteratorControlHandle {
6565 &self.control_handle
6566 }
6567
6568 fn drop_without_shutdown(mut self) {
6569 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6571 std::mem::forget(self);
6573 }
6574}
6575
6576impl TestCaseIteratorGetNextResponder {
6577 pub fn send(self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
6581 let _result = self.send_raw(test_cases);
6582 if _result.is_err() {
6583 self.control_handle.shutdown();
6584 }
6585 self.drop_without_shutdown();
6586 _result
6587 }
6588
6589 pub fn send_no_shutdown_on_err(self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
6591 let _result = self.send_raw(test_cases);
6592 self.drop_without_shutdown();
6593 _result
6594 }
6595
6596 fn send_raw(&self, mut test_cases: &[TestCase]) -> Result<(), fidl::Error> {
6597 self.control_handle.inner.send::<TestCaseIteratorGetNextResponse>(
6598 (test_cases,),
6599 self.tx_id,
6600 0x37abec519b2ac1be,
6601 fidl::encoding::DynamicFlags::empty(),
6602 )
6603 }
6604}
6605
6606mod internal {
6607 use super::*;
6608
6609 impl fidl::encoding::ResourceTypeMarker for CaseArtifact {
6610 type Borrowed<'a> = &'a mut Self;
6611 fn take_or_borrow<'a>(
6612 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6613 ) -> Self::Borrowed<'a> {
6614 value
6615 }
6616 }
6617
6618 unsafe impl fidl::encoding::TypeMarker for CaseArtifact {
6619 type Owned = Self;
6620
6621 #[inline(always)]
6622 fn inline_align(_context: fidl::encoding::Context) -> usize {
6623 8
6624 }
6625
6626 #[inline(always)]
6627 fn inline_size(_context: fidl::encoding::Context) -> usize {
6628 24
6629 }
6630 }
6631
6632 unsafe impl fidl::encoding::Encode<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
6633 for &mut CaseArtifact
6634 {
6635 #[inline]
6636 unsafe fn encode(
6637 self,
6638 encoder: &mut fidl::encoding::Encoder<
6639 '_,
6640 fidl::encoding::DefaultFuchsiaResourceDialect,
6641 >,
6642 offset: usize,
6643 _depth: fidl::encoding::Depth,
6644 ) -> fidl::Result<()> {
6645 encoder.debug_check_bounds::<CaseArtifact>(offset);
6646 fidl::encoding::Encode::<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6648 (
6649 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.identifier),
6650 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.artifact),
6651 ),
6652 encoder, offset, _depth
6653 )
6654 }
6655 }
6656 unsafe impl<
6657 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6658 T1: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>,
6659 > fidl::encoding::Encode<CaseArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
6660 for (T0, T1)
6661 {
6662 #[inline]
6663 unsafe fn encode(
6664 self,
6665 encoder: &mut fidl::encoding::Encoder<
6666 '_,
6667 fidl::encoding::DefaultFuchsiaResourceDialect,
6668 >,
6669 offset: usize,
6670 depth: fidl::encoding::Depth,
6671 ) -> fidl::Result<()> {
6672 encoder.debug_check_bounds::<CaseArtifact>(offset);
6673 unsafe {
6676 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
6677 (ptr as *mut u64).write_unaligned(0);
6678 }
6679 self.0.encode(encoder, offset + 0, depth)?;
6681 self.1.encode(encoder, offset + 8, depth)?;
6682 Ok(())
6683 }
6684 }
6685
6686 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for CaseArtifact {
6687 #[inline(always)]
6688 fn new_empty() -> Self {
6689 Self {
6690 identifier: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6691 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
6692 }
6693 }
6694
6695 #[inline]
6696 unsafe fn decode(
6697 &mut self,
6698 decoder: &mut fidl::encoding::Decoder<
6699 '_,
6700 fidl::encoding::DefaultFuchsiaResourceDialect,
6701 >,
6702 offset: usize,
6703 _depth: fidl::encoding::Depth,
6704 ) -> fidl::Result<()> {
6705 decoder.debug_check_bounds::<Self>(offset);
6706 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
6708 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6709 let mask = 0xffffffff00000000u64;
6710 let maskedval = padval & mask;
6711 if maskedval != 0 {
6712 return Err(fidl::Error::NonZeroPadding {
6713 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
6714 });
6715 }
6716 fidl::decode!(
6717 u32,
6718 fidl::encoding::DefaultFuchsiaResourceDialect,
6719 &mut self.identifier,
6720 decoder,
6721 offset + 0,
6722 _depth
6723 )?;
6724 fidl::decode!(
6725 Artifact,
6726 fidl::encoding::DefaultFuchsiaResourceDialect,
6727 &mut self.artifact,
6728 decoder,
6729 offset + 8,
6730 _depth
6731 )?;
6732 Ok(())
6733 }
6734 }
6735
6736 impl fidl::encoding::ResourceTypeMarker for DebugDataIteratorGetNextCompressedResponse {
6737 type Borrowed<'a> = &'a mut Self;
6738 fn take_or_borrow<'a>(
6739 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6740 ) -> Self::Borrowed<'a> {
6741 value
6742 }
6743 }
6744
6745 unsafe impl fidl::encoding::TypeMarker for DebugDataIteratorGetNextCompressedResponse {
6746 type Owned = Self;
6747
6748 #[inline(always)]
6749 fn inline_align(_context: fidl::encoding::Context) -> usize {
6750 8
6751 }
6752
6753 #[inline(always)]
6754 fn inline_size(_context: fidl::encoding::Context) -> usize {
6755 16
6756 }
6757 }
6758
6759 unsafe impl
6760 fidl::encoding::Encode<
6761 DebugDataIteratorGetNextCompressedResponse,
6762 fidl::encoding::DefaultFuchsiaResourceDialect,
6763 > for &mut DebugDataIteratorGetNextCompressedResponse
6764 {
6765 #[inline]
6766 unsafe fn encode(
6767 self,
6768 encoder: &mut fidl::encoding::Encoder<
6769 '_,
6770 fidl::encoding::DefaultFuchsiaResourceDialect,
6771 >,
6772 offset: usize,
6773 _depth: fidl::encoding::Depth,
6774 ) -> fidl::Result<()> {
6775 encoder.debug_check_bounds::<DebugDataIteratorGetNextCompressedResponse>(offset);
6776 fidl::encoding::Encode::<DebugDataIteratorGetNextCompressedResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6778 (
6779 <fidl::encoding::UnboundedVector<DebugData> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
6780 ),
6781 encoder, offset, _depth
6782 )
6783 }
6784 }
6785 unsafe impl<
6786 T0: fidl::encoding::Encode<
6787 fidl::encoding::UnboundedVector<DebugData>,
6788 fidl::encoding::DefaultFuchsiaResourceDialect,
6789 >,
6790 >
6791 fidl::encoding::Encode<
6792 DebugDataIteratorGetNextCompressedResponse,
6793 fidl::encoding::DefaultFuchsiaResourceDialect,
6794 > for (T0,)
6795 {
6796 #[inline]
6797 unsafe fn encode(
6798 self,
6799 encoder: &mut fidl::encoding::Encoder<
6800 '_,
6801 fidl::encoding::DefaultFuchsiaResourceDialect,
6802 >,
6803 offset: usize,
6804 depth: fidl::encoding::Depth,
6805 ) -> fidl::Result<()> {
6806 encoder.debug_check_bounds::<DebugDataIteratorGetNextCompressedResponse>(offset);
6807 self.0.encode(encoder, offset + 0, depth)?;
6811 Ok(())
6812 }
6813 }
6814
6815 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6816 for DebugDataIteratorGetNextCompressedResponse
6817 {
6818 #[inline(always)]
6819 fn new_empty() -> Self {
6820 Self {
6821 data: fidl::new_empty!(
6822 fidl::encoding::UnboundedVector<DebugData>,
6823 fidl::encoding::DefaultFuchsiaResourceDialect
6824 ),
6825 }
6826 }
6827
6828 #[inline]
6829 unsafe fn decode(
6830 &mut self,
6831 decoder: &mut fidl::encoding::Decoder<
6832 '_,
6833 fidl::encoding::DefaultFuchsiaResourceDialect,
6834 >,
6835 offset: usize,
6836 _depth: fidl::encoding::Depth,
6837 ) -> fidl::Result<()> {
6838 decoder.debug_check_bounds::<Self>(offset);
6839 fidl::decode!(
6841 fidl::encoding::UnboundedVector<DebugData>,
6842 fidl::encoding::DefaultFuchsiaResourceDialect,
6843 &mut self.data,
6844 decoder,
6845 offset + 0,
6846 _depth
6847 )?;
6848 Ok(())
6849 }
6850 }
6851
6852 impl fidl::encoding::ResourceTypeMarker for DebugDataIteratorGetNextResponse {
6853 type Borrowed<'a> = &'a mut Self;
6854 fn take_or_borrow<'a>(
6855 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6856 ) -> Self::Borrowed<'a> {
6857 value
6858 }
6859 }
6860
6861 unsafe impl fidl::encoding::TypeMarker for DebugDataIteratorGetNextResponse {
6862 type Owned = Self;
6863
6864 #[inline(always)]
6865 fn inline_align(_context: fidl::encoding::Context) -> usize {
6866 8
6867 }
6868
6869 #[inline(always)]
6870 fn inline_size(_context: fidl::encoding::Context) -> usize {
6871 16
6872 }
6873 }
6874
6875 unsafe impl
6876 fidl::encoding::Encode<
6877 DebugDataIteratorGetNextResponse,
6878 fidl::encoding::DefaultFuchsiaResourceDialect,
6879 > for &mut DebugDataIteratorGetNextResponse
6880 {
6881 #[inline]
6882 unsafe fn encode(
6883 self,
6884 encoder: &mut fidl::encoding::Encoder<
6885 '_,
6886 fidl::encoding::DefaultFuchsiaResourceDialect,
6887 >,
6888 offset: usize,
6889 _depth: fidl::encoding::Depth,
6890 ) -> fidl::Result<()> {
6891 encoder.debug_check_bounds::<DebugDataIteratorGetNextResponse>(offset);
6892 fidl::encoding::Encode::<DebugDataIteratorGetNextResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6894 (
6895 <fidl::encoding::UnboundedVector<DebugData> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
6896 ),
6897 encoder, offset, _depth
6898 )
6899 }
6900 }
6901 unsafe impl<
6902 T0: fidl::encoding::Encode<
6903 fidl::encoding::UnboundedVector<DebugData>,
6904 fidl::encoding::DefaultFuchsiaResourceDialect,
6905 >,
6906 >
6907 fidl::encoding::Encode<
6908 DebugDataIteratorGetNextResponse,
6909 fidl::encoding::DefaultFuchsiaResourceDialect,
6910 > for (T0,)
6911 {
6912 #[inline]
6913 unsafe fn encode(
6914 self,
6915 encoder: &mut fidl::encoding::Encoder<
6916 '_,
6917 fidl::encoding::DefaultFuchsiaResourceDialect,
6918 >,
6919 offset: usize,
6920 depth: fidl::encoding::Depth,
6921 ) -> fidl::Result<()> {
6922 encoder.debug_check_bounds::<DebugDataIteratorGetNextResponse>(offset);
6923 self.0.encode(encoder, offset + 0, depth)?;
6927 Ok(())
6928 }
6929 }
6930
6931 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6932 for DebugDataIteratorGetNextResponse
6933 {
6934 #[inline(always)]
6935 fn new_empty() -> Self {
6936 Self {
6937 data: fidl::new_empty!(
6938 fidl::encoding::UnboundedVector<DebugData>,
6939 fidl::encoding::DefaultFuchsiaResourceDialect
6940 ),
6941 }
6942 }
6943
6944 #[inline]
6945 unsafe fn decode(
6946 &mut self,
6947 decoder: &mut fidl::encoding::Decoder<
6948 '_,
6949 fidl::encoding::DefaultFuchsiaResourceDialect,
6950 >,
6951 offset: usize,
6952 _depth: fidl::encoding::Depth,
6953 ) -> fidl::Result<()> {
6954 decoder.debug_check_bounds::<Self>(offset);
6955 fidl::decode!(
6957 fidl::encoding::UnboundedVector<DebugData>,
6958 fidl::encoding::DefaultFuchsiaResourceDialect,
6959 &mut self.data,
6960 decoder,
6961 offset + 0,
6962 _depth
6963 )?;
6964 Ok(())
6965 }
6966 }
6967
6968 impl fidl::encoding::ResourceTypeMarker for DirectoryAndToken {
6969 type Borrowed<'a> = &'a mut Self;
6970 fn take_or_borrow<'a>(
6971 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6972 ) -> Self::Borrowed<'a> {
6973 value
6974 }
6975 }
6976
6977 unsafe impl fidl::encoding::TypeMarker for DirectoryAndToken {
6978 type Owned = Self;
6979
6980 #[inline(always)]
6981 fn inline_align(_context: fidl::encoding::Context) -> usize {
6982 4
6983 }
6984
6985 #[inline(always)]
6986 fn inline_size(_context: fidl::encoding::Context) -> usize {
6987 8
6988 }
6989 }
6990
6991 unsafe impl
6992 fidl::encoding::Encode<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>
6993 for &mut DirectoryAndToken
6994 {
6995 #[inline]
6996 unsafe fn encode(
6997 self,
6998 encoder: &mut fidl::encoding::Encoder<
6999 '_,
7000 fidl::encoding::DefaultFuchsiaResourceDialect,
7001 >,
7002 offset: usize,
7003 _depth: fidl::encoding::Depth,
7004 ) -> fidl::Result<()> {
7005 encoder.debug_check_bounds::<DirectoryAndToken>(offset);
7006 fidl::encoding::Encode::<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7008 (
7009 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.directory),
7010 <fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.token),
7011 ),
7012 encoder, offset, _depth
7013 )
7014 }
7015 }
7016 unsafe impl<
7017 T0: fidl::encoding::Encode<
7018 fidl::encoding::Endpoint<
7019 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
7020 >,
7021 fidl::encoding::DefaultFuchsiaResourceDialect,
7022 >,
7023 T1: fidl::encoding::Encode<
7024 fidl::encoding::HandleType<
7025 fidl::EventPair,
7026 { fidl::ObjectType::EVENTPAIR.into_raw() },
7027 2147483648,
7028 >,
7029 fidl::encoding::DefaultFuchsiaResourceDialect,
7030 >,
7031 >
7032 fidl::encoding::Encode<DirectoryAndToken, fidl::encoding::DefaultFuchsiaResourceDialect>
7033 for (T0, T1)
7034 {
7035 #[inline]
7036 unsafe fn encode(
7037 self,
7038 encoder: &mut fidl::encoding::Encoder<
7039 '_,
7040 fidl::encoding::DefaultFuchsiaResourceDialect,
7041 >,
7042 offset: usize,
7043 depth: fidl::encoding::Depth,
7044 ) -> fidl::Result<()> {
7045 encoder.debug_check_bounds::<DirectoryAndToken>(offset);
7046 self.0.encode(encoder, offset + 0, depth)?;
7050 self.1.encode(encoder, offset + 4, depth)?;
7051 Ok(())
7052 }
7053 }
7054
7055 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7056 for DirectoryAndToken
7057 {
7058 #[inline(always)]
7059 fn new_empty() -> Self {
7060 Self {
7061 directory: fidl::new_empty!(
7062 fidl::encoding::Endpoint<
7063 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
7064 >,
7065 fidl::encoding::DefaultFuchsiaResourceDialect
7066 ),
7067 token: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7068 }
7069 }
7070
7071 #[inline]
7072 unsafe fn decode(
7073 &mut self,
7074 decoder: &mut fidl::encoding::Decoder<
7075 '_,
7076 fidl::encoding::DefaultFuchsiaResourceDialect,
7077 >,
7078 offset: usize,
7079 _depth: fidl::encoding::Depth,
7080 ) -> fidl::Result<()> {
7081 decoder.debug_check_bounds::<Self>(offset);
7082 fidl::decode!(
7084 fidl::encoding::Endpoint<
7085 fidl::endpoints::ClientEnd<fidl_fuchsia_io::DirectoryMarker>,
7086 >,
7087 fidl::encoding::DefaultFuchsiaResourceDialect,
7088 &mut self.directory,
7089 decoder,
7090 offset + 0,
7091 _depth
7092 )?;
7093 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.token, decoder, offset + 4, _depth)?;
7094 Ok(())
7095 }
7096 }
7097
7098 impl fidl::encoding::ResourceTypeMarker for EarlyBootProfileRegisterWatcherRequest {
7099 type Borrowed<'a> = &'a mut Self;
7100 fn take_or_borrow<'a>(
7101 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7102 ) -> Self::Borrowed<'a> {
7103 value
7104 }
7105 }
7106
7107 unsafe impl fidl::encoding::TypeMarker for EarlyBootProfileRegisterWatcherRequest {
7108 type Owned = Self;
7109
7110 #[inline(always)]
7111 fn inline_align(_context: fidl::encoding::Context) -> usize {
7112 4
7113 }
7114
7115 #[inline(always)]
7116 fn inline_size(_context: fidl::encoding::Context) -> usize {
7117 4
7118 }
7119 }
7120
7121 unsafe impl
7122 fidl::encoding::Encode<
7123 EarlyBootProfileRegisterWatcherRequest,
7124 fidl::encoding::DefaultFuchsiaResourceDialect,
7125 > for &mut EarlyBootProfileRegisterWatcherRequest
7126 {
7127 #[inline]
7128 unsafe fn encode(
7129 self,
7130 encoder: &mut fidl::encoding::Encoder<
7131 '_,
7132 fidl::encoding::DefaultFuchsiaResourceDialect,
7133 >,
7134 offset: usize,
7135 _depth: fidl::encoding::Depth,
7136 ) -> fidl::Result<()> {
7137 encoder.debug_check_bounds::<EarlyBootProfileRegisterWatcherRequest>(offset);
7138 fidl::encoding::Encode::<EarlyBootProfileRegisterWatcherRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7140 (
7141 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
7142 ),
7143 encoder, offset, _depth
7144 )
7145 }
7146 }
7147 unsafe impl<
7148 T0: fidl::encoding::Encode<
7149 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
7150 fidl::encoding::DefaultFuchsiaResourceDialect,
7151 >,
7152 >
7153 fidl::encoding::Encode<
7154 EarlyBootProfileRegisterWatcherRequest,
7155 fidl::encoding::DefaultFuchsiaResourceDialect,
7156 > for (T0,)
7157 {
7158 #[inline]
7159 unsafe fn encode(
7160 self,
7161 encoder: &mut fidl::encoding::Encoder<
7162 '_,
7163 fidl::encoding::DefaultFuchsiaResourceDialect,
7164 >,
7165 offset: usize,
7166 depth: fidl::encoding::Depth,
7167 ) -> fidl::Result<()> {
7168 encoder.debug_check_bounds::<EarlyBootProfileRegisterWatcherRequest>(offset);
7169 self.0.encode(encoder, offset + 0, depth)?;
7173 Ok(())
7174 }
7175 }
7176
7177 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7178 for EarlyBootProfileRegisterWatcherRequest
7179 {
7180 #[inline(always)]
7181 fn new_empty() -> Self {
7182 Self {
7183 iterator: fidl::new_empty!(
7184 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
7185 fidl::encoding::DefaultFuchsiaResourceDialect
7186 ),
7187 }
7188 }
7189
7190 #[inline]
7191 unsafe fn decode(
7192 &mut self,
7193 decoder: &mut fidl::encoding::Decoder<
7194 '_,
7195 fidl::encoding::DefaultFuchsiaResourceDialect,
7196 >,
7197 offset: usize,
7198 _depth: fidl::encoding::Depth,
7199 ) -> fidl::Result<()> {
7200 decoder.debug_check_bounds::<Self>(offset);
7201 fidl::decode!(
7203 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DebugDataIteratorMarker>>,
7204 fidl::encoding::DefaultFuchsiaResourceDialect,
7205 &mut self.iterator,
7206 decoder,
7207 offset + 0,
7208 _depth
7209 )?;
7210 Ok(())
7211 }
7212 }
7213
7214 impl fidl::encoding::ResourceTypeMarker for QueryEnumerateInRealmRequest {
7215 type Borrowed<'a> = &'a mut Self;
7216 fn take_or_borrow<'a>(
7217 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7218 ) -> Self::Borrowed<'a> {
7219 value
7220 }
7221 }
7222
7223 unsafe impl fidl::encoding::TypeMarker for QueryEnumerateInRealmRequest {
7224 type Owned = Self;
7225
7226 #[inline(always)]
7227 fn inline_align(_context: fidl::encoding::Context) -> usize {
7228 8
7229 }
7230
7231 #[inline(always)]
7232 fn inline_size(_context: fidl::encoding::Context) -> usize {
7233 64
7234 }
7235 }
7236
7237 unsafe impl
7238 fidl::encoding::Encode<
7239 QueryEnumerateInRealmRequest,
7240 fidl::encoding::DefaultFuchsiaResourceDialect,
7241 > for &mut QueryEnumerateInRealmRequest
7242 {
7243 #[inline]
7244 unsafe fn encode(
7245 self,
7246 encoder: &mut fidl::encoding::Encoder<
7247 '_,
7248 fidl::encoding::DefaultFuchsiaResourceDialect,
7249 >,
7250 offset: usize,
7251 _depth: fidl::encoding::Depth,
7252 ) -> fidl::Result<()> {
7253 encoder.debug_check_bounds::<QueryEnumerateInRealmRequest>(offset);
7254 fidl::encoding::Encode::<QueryEnumerateInRealmRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7256 (
7257 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
7258 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm),
7259 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer> as fidl::encoding::ValueTypeMarker>::borrow(&self.offers),
7260 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.test_collection),
7261 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
7262 ),
7263 encoder, offset, _depth
7264 )
7265 }
7266 }
7267 unsafe impl<
7268 T0: fidl::encoding::Encode<
7269 fidl::encoding::BoundedString<4096>,
7270 fidl::encoding::DefaultFuchsiaResourceDialect,
7271 >,
7272 T1: fidl::encoding::Encode<
7273 fidl::encoding::Endpoint<
7274 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7275 >,
7276 fidl::encoding::DefaultFuchsiaResourceDialect,
7277 >,
7278 T2: fidl::encoding::Encode<
7279 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7280 fidl::encoding::DefaultFuchsiaResourceDialect,
7281 >,
7282 T3: fidl::encoding::Encode<
7283 fidl::encoding::UnboundedString,
7284 fidl::encoding::DefaultFuchsiaResourceDialect,
7285 >,
7286 T4: fidl::encoding::Encode<
7287 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7288 fidl::encoding::DefaultFuchsiaResourceDialect,
7289 >,
7290 >
7291 fidl::encoding::Encode<
7292 QueryEnumerateInRealmRequest,
7293 fidl::encoding::DefaultFuchsiaResourceDialect,
7294 > for (T0, T1, T2, T3, T4)
7295 {
7296 #[inline]
7297 unsafe fn encode(
7298 self,
7299 encoder: &mut fidl::encoding::Encoder<
7300 '_,
7301 fidl::encoding::DefaultFuchsiaResourceDialect,
7302 >,
7303 offset: usize,
7304 depth: fidl::encoding::Depth,
7305 ) -> fidl::Result<()> {
7306 encoder.debug_check_bounds::<QueryEnumerateInRealmRequest>(offset);
7307 unsafe {
7310 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7311 (ptr as *mut u64).write_unaligned(0);
7312 }
7313 unsafe {
7314 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(56);
7315 (ptr as *mut u64).write_unaligned(0);
7316 }
7317 self.0.encode(encoder, offset + 0, depth)?;
7319 self.1.encode(encoder, offset + 16, depth)?;
7320 self.2.encode(encoder, offset + 24, depth)?;
7321 self.3.encode(encoder, offset + 40, depth)?;
7322 self.4.encode(encoder, offset + 56, depth)?;
7323 Ok(())
7324 }
7325 }
7326
7327 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7328 for QueryEnumerateInRealmRequest
7329 {
7330 #[inline(always)]
7331 fn new_empty() -> Self {
7332 Self {
7333 test_url: fidl::new_empty!(
7334 fidl::encoding::BoundedString<4096>,
7335 fidl::encoding::DefaultFuchsiaResourceDialect
7336 ),
7337 realm: fidl::new_empty!(
7338 fidl::encoding::Endpoint<
7339 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7340 >,
7341 fidl::encoding::DefaultFuchsiaResourceDialect
7342 ),
7343 offers: fidl::new_empty!(
7344 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7345 fidl::encoding::DefaultFuchsiaResourceDialect
7346 ),
7347 test_collection: fidl::new_empty!(
7348 fidl::encoding::UnboundedString,
7349 fidl::encoding::DefaultFuchsiaResourceDialect
7350 ),
7351 iterator: fidl::new_empty!(
7352 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7353 fidl::encoding::DefaultFuchsiaResourceDialect
7354 ),
7355 }
7356 }
7357
7358 #[inline]
7359 unsafe fn decode(
7360 &mut self,
7361 decoder: &mut fidl::encoding::Decoder<
7362 '_,
7363 fidl::encoding::DefaultFuchsiaResourceDialect,
7364 >,
7365 offset: usize,
7366 _depth: fidl::encoding::Depth,
7367 ) -> fidl::Result<()> {
7368 decoder.debug_check_bounds::<Self>(offset);
7369 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7371 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7372 let mask = 0xffffffff00000000u64;
7373 let maskedval = padval & mask;
7374 if maskedval != 0 {
7375 return Err(fidl::Error::NonZeroPadding {
7376 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7377 });
7378 }
7379 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(56) };
7380 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7381 let mask = 0xffffffff00000000u64;
7382 let maskedval = padval & mask;
7383 if maskedval != 0 {
7384 return Err(fidl::Error::NonZeroPadding {
7385 padding_start: offset + 56 + ((mask as u64).trailing_zeros() / 8) as usize,
7386 });
7387 }
7388 fidl::decode!(
7389 fidl::encoding::BoundedString<4096>,
7390 fidl::encoding::DefaultFuchsiaResourceDialect,
7391 &mut self.test_url,
7392 decoder,
7393 offset + 0,
7394 _depth
7395 )?;
7396 fidl::decode!(
7397 fidl::encoding::Endpoint<
7398 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7399 >,
7400 fidl::encoding::DefaultFuchsiaResourceDialect,
7401 &mut self.realm,
7402 decoder,
7403 offset + 16,
7404 _depth
7405 )?;
7406 fidl::decode!(
7407 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7408 fidl::encoding::DefaultFuchsiaResourceDialect,
7409 &mut self.offers,
7410 decoder,
7411 offset + 24,
7412 _depth
7413 )?;
7414 fidl::decode!(
7415 fidl::encoding::UnboundedString,
7416 fidl::encoding::DefaultFuchsiaResourceDialect,
7417 &mut self.test_collection,
7418 decoder,
7419 offset + 40,
7420 _depth
7421 )?;
7422 fidl::decode!(
7423 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7424 fidl::encoding::DefaultFuchsiaResourceDialect,
7425 &mut self.iterator,
7426 decoder,
7427 offset + 56,
7428 _depth
7429 )?;
7430 Ok(())
7431 }
7432 }
7433
7434 impl fidl::encoding::ResourceTypeMarker for QueryEnumerateRequest {
7435 type Borrowed<'a> = &'a mut Self;
7436 fn take_or_borrow<'a>(
7437 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7438 ) -> Self::Borrowed<'a> {
7439 value
7440 }
7441 }
7442
7443 unsafe impl fidl::encoding::TypeMarker for QueryEnumerateRequest {
7444 type Owned = Self;
7445
7446 #[inline(always)]
7447 fn inline_align(_context: fidl::encoding::Context) -> usize {
7448 8
7449 }
7450
7451 #[inline(always)]
7452 fn inline_size(_context: fidl::encoding::Context) -> usize {
7453 24
7454 }
7455 }
7456
7457 unsafe impl
7458 fidl::encoding::Encode<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7459 for &mut QueryEnumerateRequest
7460 {
7461 #[inline]
7462 unsafe fn encode(
7463 self,
7464 encoder: &mut fidl::encoding::Encoder<
7465 '_,
7466 fidl::encoding::DefaultFuchsiaResourceDialect,
7467 >,
7468 offset: usize,
7469 _depth: fidl::encoding::Depth,
7470 ) -> fidl::Result<()> {
7471 encoder.debug_check_bounds::<QueryEnumerateRequest>(offset);
7472 fidl::encoding::Encode::<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7474 (
7475 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
7476 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
7477 ),
7478 encoder, offset, _depth
7479 )
7480 }
7481 }
7482 unsafe impl<
7483 T0: fidl::encoding::Encode<
7484 fidl::encoding::BoundedString<4096>,
7485 fidl::encoding::DefaultFuchsiaResourceDialect,
7486 >,
7487 T1: fidl::encoding::Encode<
7488 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7489 fidl::encoding::DefaultFuchsiaResourceDialect,
7490 >,
7491 >
7492 fidl::encoding::Encode<QueryEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7493 for (T0, T1)
7494 {
7495 #[inline]
7496 unsafe fn encode(
7497 self,
7498 encoder: &mut fidl::encoding::Encoder<
7499 '_,
7500 fidl::encoding::DefaultFuchsiaResourceDialect,
7501 >,
7502 offset: usize,
7503 depth: fidl::encoding::Depth,
7504 ) -> fidl::Result<()> {
7505 encoder.debug_check_bounds::<QueryEnumerateRequest>(offset);
7506 unsafe {
7509 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
7510 (ptr as *mut u64).write_unaligned(0);
7511 }
7512 self.0.encode(encoder, offset + 0, depth)?;
7514 self.1.encode(encoder, offset + 16, depth)?;
7515 Ok(())
7516 }
7517 }
7518
7519 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7520 for QueryEnumerateRequest
7521 {
7522 #[inline(always)]
7523 fn new_empty() -> Self {
7524 Self {
7525 test_url: fidl::new_empty!(
7526 fidl::encoding::BoundedString<4096>,
7527 fidl::encoding::DefaultFuchsiaResourceDialect
7528 ),
7529 iterator: fidl::new_empty!(
7530 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7531 fidl::encoding::DefaultFuchsiaResourceDialect
7532 ),
7533 }
7534 }
7535
7536 #[inline]
7537 unsafe fn decode(
7538 &mut self,
7539 decoder: &mut fidl::encoding::Decoder<
7540 '_,
7541 fidl::encoding::DefaultFuchsiaResourceDialect,
7542 >,
7543 offset: usize,
7544 _depth: fidl::encoding::Depth,
7545 ) -> fidl::Result<()> {
7546 decoder.debug_check_bounds::<Self>(offset);
7547 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
7549 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7550 let mask = 0xffffffff00000000u64;
7551 let maskedval = padval & mask;
7552 if maskedval != 0 {
7553 return Err(fidl::Error::NonZeroPadding {
7554 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
7555 });
7556 }
7557 fidl::decode!(
7558 fidl::encoding::BoundedString<4096>,
7559 fidl::encoding::DefaultFuchsiaResourceDialect,
7560 &mut self.test_url,
7561 decoder,
7562 offset + 0,
7563 _depth
7564 )?;
7565 fidl::decode!(
7566 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<CaseIteratorMarker>>,
7567 fidl::encoding::DefaultFuchsiaResourceDialect,
7568 &mut self.iterator,
7569 decoder,
7570 offset + 16,
7571 _depth
7572 )?;
7573 Ok(())
7574 }
7575 }
7576
7577 impl fidl::encoding::ResourceTypeMarker for RunBuilderAddSuiteInRealmRequest {
7578 type Borrowed<'a> = &'a mut Self;
7579 fn take_or_borrow<'a>(
7580 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7581 ) -> Self::Borrowed<'a> {
7582 value
7583 }
7584 }
7585
7586 unsafe impl fidl::encoding::TypeMarker for RunBuilderAddSuiteInRealmRequest {
7587 type Owned = Self;
7588
7589 #[inline(always)]
7590 fn inline_align(_context: fidl::encoding::Context) -> usize {
7591 8
7592 }
7593
7594 #[inline(always)]
7595 fn inline_size(_context: fidl::encoding::Context) -> usize {
7596 80
7597 }
7598 }
7599
7600 unsafe impl
7601 fidl::encoding::Encode<
7602 RunBuilderAddSuiteInRealmRequest,
7603 fidl::encoding::DefaultFuchsiaResourceDialect,
7604 > for &mut RunBuilderAddSuiteInRealmRequest
7605 {
7606 #[inline]
7607 unsafe fn encode(
7608 self,
7609 encoder: &mut fidl::encoding::Encoder<
7610 '_,
7611 fidl::encoding::DefaultFuchsiaResourceDialect,
7612 >,
7613 offset: usize,
7614 _depth: fidl::encoding::Depth,
7615 ) -> fidl::Result<()> {
7616 encoder.debug_check_bounds::<RunBuilderAddSuiteInRealmRequest>(offset);
7617 fidl::encoding::Encode::<RunBuilderAddSuiteInRealmRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7619 (
7620 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.realm),
7621 <fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer> as fidl::encoding::ValueTypeMarker>::borrow(&self.offers),
7622 <fidl::encoding::UnboundedString as fidl::encoding::ValueTypeMarker>::borrow(&self.test_collection),
7623 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
7624 <RunOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
7625 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
7626 ),
7627 encoder, offset, _depth
7628 )
7629 }
7630 }
7631 unsafe impl<
7632 T0: fidl::encoding::Encode<
7633 fidl::encoding::Endpoint<
7634 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7635 >,
7636 fidl::encoding::DefaultFuchsiaResourceDialect,
7637 >,
7638 T1: fidl::encoding::Encode<
7639 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7640 fidl::encoding::DefaultFuchsiaResourceDialect,
7641 >,
7642 T2: fidl::encoding::Encode<
7643 fidl::encoding::UnboundedString,
7644 fidl::encoding::DefaultFuchsiaResourceDialect,
7645 >,
7646 T3: fidl::encoding::Encode<
7647 fidl::encoding::BoundedString<4096>,
7648 fidl::encoding::DefaultFuchsiaResourceDialect,
7649 >,
7650 T4: fidl::encoding::Encode<RunOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
7651 T5: fidl::encoding::Encode<
7652 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7653 fidl::encoding::DefaultFuchsiaResourceDialect,
7654 >,
7655 >
7656 fidl::encoding::Encode<
7657 RunBuilderAddSuiteInRealmRequest,
7658 fidl::encoding::DefaultFuchsiaResourceDialect,
7659 > for (T0, T1, T2, T3, T4, T5)
7660 {
7661 #[inline]
7662 unsafe fn encode(
7663 self,
7664 encoder: &mut fidl::encoding::Encoder<
7665 '_,
7666 fidl::encoding::DefaultFuchsiaResourceDialect,
7667 >,
7668 offset: usize,
7669 depth: fidl::encoding::Depth,
7670 ) -> fidl::Result<()> {
7671 encoder.debug_check_bounds::<RunBuilderAddSuiteInRealmRequest>(offset);
7672 unsafe {
7675 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
7676 (ptr as *mut u64).write_unaligned(0);
7677 }
7678 unsafe {
7679 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(72);
7680 (ptr as *mut u64).write_unaligned(0);
7681 }
7682 self.0.encode(encoder, offset + 0, depth)?;
7684 self.1.encode(encoder, offset + 8, depth)?;
7685 self.2.encode(encoder, offset + 24, depth)?;
7686 self.3.encode(encoder, offset + 40, depth)?;
7687 self.4.encode(encoder, offset + 56, depth)?;
7688 self.5.encode(encoder, offset + 72, depth)?;
7689 Ok(())
7690 }
7691 }
7692
7693 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7694 for RunBuilderAddSuiteInRealmRequest
7695 {
7696 #[inline(always)]
7697 fn new_empty() -> Self {
7698 Self {
7699 realm: fidl::new_empty!(
7700 fidl::encoding::Endpoint<
7701 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7702 >,
7703 fidl::encoding::DefaultFuchsiaResourceDialect
7704 ),
7705 offers: fidl::new_empty!(
7706 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7707 fidl::encoding::DefaultFuchsiaResourceDialect
7708 ),
7709 test_collection: fidl::new_empty!(
7710 fidl::encoding::UnboundedString,
7711 fidl::encoding::DefaultFuchsiaResourceDialect
7712 ),
7713 test_url: fidl::new_empty!(
7714 fidl::encoding::BoundedString<4096>,
7715 fidl::encoding::DefaultFuchsiaResourceDialect
7716 ),
7717 options: fidl::new_empty!(
7718 RunOptions,
7719 fidl::encoding::DefaultFuchsiaResourceDialect
7720 ),
7721 controller: fidl::new_empty!(
7722 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7723 fidl::encoding::DefaultFuchsiaResourceDialect
7724 ),
7725 }
7726 }
7727
7728 #[inline]
7729 unsafe fn decode(
7730 &mut self,
7731 decoder: &mut fidl::encoding::Decoder<
7732 '_,
7733 fidl::encoding::DefaultFuchsiaResourceDialect,
7734 >,
7735 offset: usize,
7736 _depth: fidl::encoding::Depth,
7737 ) -> fidl::Result<()> {
7738 decoder.debug_check_bounds::<Self>(offset);
7739 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
7741 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7742 let mask = 0xffffffff00000000u64;
7743 let maskedval = padval & mask;
7744 if maskedval != 0 {
7745 return Err(fidl::Error::NonZeroPadding {
7746 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
7747 });
7748 }
7749 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(72) };
7750 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7751 let mask = 0xffffffff00000000u64;
7752 let maskedval = padval & mask;
7753 if maskedval != 0 {
7754 return Err(fidl::Error::NonZeroPadding {
7755 padding_start: offset + 72 + ((mask as u64).trailing_zeros() / 8) as usize,
7756 });
7757 }
7758 fidl::decode!(
7759 fidl::encoding::Endpoint<
7760 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
7761 >,
7762 fidl::encoding::DefaultFuchsiaResourceDialect,
7763 &mut self.realm,
7764 decoder,
7765 offset + 0,
7766 _depth
7767 )?;
7768 fidl::decode!(
7769 fidl::encoding::UnboundedVector<fidl_fuchsia_component_decl::Offer>,
7770 fidl::encoding::DefaultFuchsiaResourceDialect,
7771 &mut self.offers,
7772 decoder,
7773 offset + 8,
7774 _depth
7775 )?;
7776 fidl::decode!(
7777 fidl::encoding::UnboundedString,
7778 fidl::encoding::DefaultFuchsiaResourceDialect,
7779 &mut self.test_collection,
7780 decoder,
7781 offset + 24,
7782 _depth
7783 )?;
7784 fidl::decode!(
7785 fidl::encoding::BoundedString<4096>,
7786 fidl::encoding::DefaultFuchsiaResourceDialect,
7787 &mut self.test_url,
7788 decoder,
7789 offset + 40,
7790 _depth
7791 )?;
7792 fidl::decode!(
7793 RunOptions,
7794 fidl::encoding::DefaultFuchsiaResourceDialect,
7795 &mut self.options,
7796 decoder,
7797 offset + 56,
7798 _depth
7799 )?;
7800 fidl::decode!(
7801 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7802 fidl::encoding::DefaultFuchsiaResourceDialect,
7803 &mut self.controller,
7804 decoder,
7805 offset + 72,
7806 _depth
7807 )?;
7808 Ok(())
7809 }
7810 }
7811
7812 impl fidl::encoding::ResourceTypeMarker for RunBuilderAddSuiteRequest {
7813 type Borrowed<'a> = &'a mut Self;
7814 fn take_or_borrow<'a>(
7815 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7816 ) -> Self::Borrowed<'a> {
7817 value
7818 }
7819 }
7820
7821 unsafe impl fidl::encoding::TypeMarker for RunBuilderAddSuiteRequest {
7822 type Owned = Self;
7823
7824 #[inline(always)]
7825 fn inline_align(_context: fidl::encoding::Context) -> usize {
7826 8
7827 }
7828
7829 #[inline(always)]
7830 fn inline_size(_context: fidl::encoding::Context) -> usize {
7831 40
7832 }
7833 }
7834
7835 unsafe impl
7836 fidl::encoding::Encode<
7837 RunBuilderAddSuiteRequest,
7838 fidl::encoding::DefaultFuchsiaResourceDialect,
7839 > for &mut RunBuilderAddSuiteRequest
7840 {
7841 #[inline]
7842 unsafe fn encode(
7843 self,
7844 encoder: &mut fidl::encoding::Encoder<
7845 '_,
7846 fidl::encoding::DefaultFuchsiaResourceDialect,
7847 >,
7848 offset: usize,
7849 _depth: fidl::encoding::Depth,
7850 ) -> fidl::Result<()> {
7851 encoder.debug_check_bounds::<RunBuilderAddSuiteRequest>(offset);
7852 fidl::encoding::Encode::<RunBuilderAddSuiteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7854 (
7855 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_url),
7856 <RunOptions as fidl::encoding::ValueTypeMarker>::borrow(&self.options),
7857 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
7858 ),
7859 encoder, offset, _depth
7860 )
7861 }
7862 }
7863 unsafe impl<
7864 T0: fidl::encoding::Encode<
7865 fidl::encoding::BoundedString<4096>,
7866 fidl::encoding::DefaultFuchsiaResourceDialect,
7867 >,
7868 T1: fidl::encoding::Encode<RunOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
7869 T2: fidl::encoding::Encode<
7870 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7871 fidl::encoding::DefaultFuchsiaResourceDialect,
7872 >,
7873 >
7874 fidl::encoding::Encode<
7875 RunBuilderAddSuiteRequest,
7876 fidl::encoding::DefaultFuchsiaResourceDialect,
7877 > for (T0, T1, T2)
7878 {
7879 #[inline]
7880 unsafe fn encode(
7881 self,
7882 encoder: &mut fidl::encoding::Encoder<
7883 '_,
7884 fidl::encoding::DefaultFuchsiaResourceDialect,
7885 >,
7886 offset: usize,
7887 depth: fidl::encoding::Depth,
7888 ) -> fidl::Result<()> {
7889 encoder.debug_check_bounds::<RunBuilderAddSuiteRequest>(offset);
7890 unsafe {
7893 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
7894 (ptr as *mut u64).write_unaligned(0);
7895 }
7896 self.0.encode(encoder, offset + 0, depth)?;
7898 self.1.encode(encoder, offset + 16, depth)?;
7899 self.2.encode(encoder, offset + 32, depth)?;
7900 Ok(())
7901 }
7902 }
7903
7904 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7905 for RunBuilderAddSuiteRequest
7906 {
7907 #[inline(always)]
7908 fn new_empty() -> Self {
7909 Self {
7910 test_url: fidl::new_empty!(
7911 fidl::encoding::BoundedString<4096>,
7912 fidl::encoding::DefaultFuchsiaResourceDialect
7913 ),
7914 options: fidl::new_empty!(
7915 RunOptions,
7916 fidl::encoding::DefaultFuchsiaResourceDialect
7917 ),
7918 controller: fidl::new_empty!(
7919 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7920 fidl::encoding::DefaultFuchsiaResourceDialect
7921 ),
7922 }
7923 }
7924
7925 #[inline]
7926 unsafe fn decode(
7927 &mut self,
7928 decoder: &mut fidl::encoding::Decoder<
7929 '_,
7930 fidl::encoding::DefaultFuchsiaResourceDialect,
7931 >,
7932 offset: usize,
7933 _depth: fidl::encoding::Depth,
7934 ) -> fidl::Result<()> {
7935 decoder.debug_check_bounds::<Self>(offset);
7936 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
7938 let padval = unsafe { (ptr as *const u64).read_unaligned() };
7939 let mask = 0xffffffff00000000u64;
7940 let maskedval = padval & mask;
7941 if maskedval != 0 {
7942 return Err(fidl::Error::NonZeroPadding {
7943 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
7944 });
7945 }
7946 fidl::decode!(
7947 fidl::encoding::BoundedString<4096>,
7948 fidl::encoding::DefaultFuchsiaResourceDialect,
7949 &mut self.test_url,
7950 decoder,
7951 offset + 0,
7952 _depth
7953 )?;
7954 fidl::decode!(
7955 RunOptions,
7956 fidl::encoding::DefaultFuchsiaResourceDialect,
7957 &mut self.options,
7958 decoder,
7959 offset + 16,
7960 _depth
7961 )?;
7962 fidl::decode!(
7963 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
7964 fidl::encoding::DefaultFuchsiaResourceDialect,
7965 &mut self.controller,
7966 decoder,
7967 offset + 32,
7968 _depth
7969 )?;
7970 Ok(())
7971 }
7972 }
7973
7974 impl fidl::encoding::ResourceTypeMarker for RunBuilderBuildRequest {
7975 type Borrowed<'a> = &'a mut Self;
7976 fn take_or_borrow<'a>(
7977 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7978 ) -> Self::Borrowed<'a> {
7979 value
7980 }
7981 }
7982
7983 unsafe impl fidl::encoding::TypeMarker for RunBuilderBuildRequest {
7984 type Owned = Self;
7985
7986 #[inline(always)]
7987 fn inline_align(_context: fidl::encoding::Context) -> usize {
7988 4
7989 }
7990
7991 #[inline(always)]
7992 fn inline_size(_context: fidl::encoding::Context) -> usize {
7993 4
7994 }
7995 }
7996
7997 unsafe impl
7998 fidl::encoding::Encode<
7999 RunBuilderBuildRequest,
8000 fidl::encoding::DefaultFuchsiaResourceDialect,
8001 > for &mut RunBuilderBuildRequest
8002 {
8003 #[inline]
8004 unsafe fn encode(
8005 self,
8006 encoder: &mut fidl::encoding::Encoder<
8007 '_,
8008 fidl::encoding::DefaultFuchsiaResourceDialect,
8009 >,
8010 offset: usize,
8011 _depth: fidl::encoding::Depth,
8012 ) -> fidl::Result<()> {
8013 encoder.debug_check_bounds::<RunBuilderBuildRequest>(offset);
8014 fidl::encoding::Encode::<RunBuilderBuildRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8016 (
8017 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
8018 ),
8019 encoder, offset, _depth
8020 )
8021 }
8022 }
8023 unsafe impl<
8024 T0: fidl::encoding::Encode<
8025 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
8026 fidl::encoding::DefaultFuchsiaResourceDialect,
8027 >,
8028 >
8029 fidl::encoding::Encode<
8030 RunBuilderBuildRequest,
8031 fidl::encoding::DefaultFuchsiaResourceDialect,
8032 > for (T0,)
8033 {
8034 #[inline]
8035 unsafe fn encode(
8036 self,
8037 encoder: &mut fidl::encoding::Encoder<
8038 '_,
8039 fidl::encoding::DefaultFuchsiaResourceDialect,
8040 >,
8041 offset: usize,
8042 depth: fidl::encoding::Depth,
8043 ) -> fidl::Result<()> {
8044 encoder.debug_check_bounds::<RunBuilderBuildRequest>(offset);
8045 self.0.encode(encoder, offset + 0, depth)?;
8049 Ok(())
8050 }
8051 }
8052
8053 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8054 for RunBuilderBuildRequest
8055 {
8056 #[inline(always)]
8057 fn new_empty() -> Self {
8058 Self {
8059 controller: fidl::new_empty!(
8060 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
8061 fidl::encoding::DefaultFuchsiaResourceDialect
8062 ),
8063 }
8064 }
8065
8066 #[inline]
8067 unsafe fn decode(
8068 &mut self,
8069 decoder: &mut fidl::encoding::Decoder<
8070 '_,
8071 fidl::encoding::DefaultFuchsiaResourceDialect,
8072 >,
8073 offset: usize,
8074 _depth: fidl::encoding::Depth,
8075 ) -> fidl::Result<()> {
8076 decoder.debug_check_bounds::<Self>(offset);
8077 fidl::decode!(
8079 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<RunControllerMarker>>,
8080 fidl::encoding::DefaultFuchsiaResourceDialect,
8081 &mut self.controller,
8082 decoder,
8083 offset + 0,
8084 _depth
8085 )?;
8086 Ok(())
8087 }
8088 }
8089
8090 impl fidl::encoding::ResourceTypeMarker for RunControllerGetEventsResponse {
8091 type Borrowed<'a> = &'a mut Self;
8092 fn take_or_borrow<'a>(
8093 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8094 ) -> Self::Borrowed<'a> {
8095 value
8096 }
8097 }
8098
8099 unsafe impl fidl::encoding::TypeMarker for RunControllerGetEventsResponse {
8100 type Owned = Self;
8101
8102 #[inline(always)]
8103 fn inline_align(_context: fidl::encoding::Context) -> usize {
8104 8
8105 }
8106
8107 #[inline(always)]
8108 fn inline_size(_context: fidl::encoding::Context) -> usize {
8109 16
8110 }
8111 }
8112
8113 unsafe impl
8114 fidl::encoding::Encode<
8115 RunControllerGetEventsResponse,
8116 fidl::encoding::DefaultFuchsiaResourceDialect,
8117 > for &mut RunControllerGetEventsResponse
8118 {
8119 #[inline]
8120 unsafe fn encode(
8121 self,
8122 encoder: &mut fidl::encoding::Encoder<
8123 '_,
8124 fidl::encoding::DefaultFuchsiaResourceDialect,
8125 >,
8126 offset: usize,
8127 _depth: fidl::encoding::Depth,
8128 ) -> fidl::Result<()> {
8129 encoder.debug_check_bounds::<RunControllerGetEventsResponse>(offset);
8130 fidl::encoding::Encode::<RunControllerGetEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8132 (
8133 <fidl::encoding::UnboundedVector<RunEvent> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
8134 ),
8135 encoder, offset, _depth
8136 )
8137 }
8138 }
8139 unsafe impl<
8140 T0: fidl::encoding::Encode<
8141 fidl::encoding::UnboundedVector<RunEvent>,
8142 fidl::encoding::DefaultFuchsiaResourceDialect,
8143 >,
8144 >
8145 fidl::encoding::Encode<
8146 RunControllerGetEventsResponse,
8147 fidl::encoding::DefaultFuchsiaResourceDialect,
8148 > for (T0,)
8149 {
8150 #[inline]
8151 unsafe fn encode(
8152 self,
8153 encoder: &mut fidl::encoding::Encoder<
8154 '_,
8155 fidl::encoding::DefaultFuchsiaResourceDialect,
8156 >,
8157 offset: usize,
8158 depth: fidl::encoding::Depth,
8159 ) -> fidl::Result<()> {
8160 encoder.debug_check_bounds::<RunControllerGetEventsResponse>(offset);
8161 self.0.encode(encoder, offset + 0, depth)?;
8165 Ok(())
8166 }
8167 }
8168
8169 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8170 for RunControllerGetEventsResponse
8171 {
8172 #[inline(always)]
8173 fn new_empty() -> Self {
8174 Self {
8175 events: fidl::new_empty!(
8176 fidl::encoding::UnboundedVector<RunEvent>,
8177 fidl::encoding::DefaultFuchsiaResourceDialect
8178 ),
8179 }
8180 }
8181
8182 #[inline]
8183 unsafe fn decode(
8184 &mut self,
8185 decoder: &mut fidl::encoding::Decoder<
8186 '_,
8187 fidl::encoding::DefaultFuchsiaResourceDialect,
8188 >,
8189 offset: usize,
8190 _depth: fidl::encoding::Depth,
8191 ) -> fidl::Result<()> {
8192 decoder.debug_check_bounds::<Self>(offset);
8193 fidl::decode!(
8195 fidl::encoding::UnboundedVector<RunEvent>,
8196 fidl::encoding::DefaultFuchsiaResourceDialect,
8197 &mut self.events,
8198 decoder,
8199 offset + 0,
8200 _depth
8201 )?;
8202 Ok(())
8203 }
8204 }
8205
8206 impl fidl::encoding::ResourceTypeMarker for Stderr {
8207 type Borrowed<'a> = &'a mut Self;
8208 fn take_or_borrow<'a>(
8209 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8210 ) -> Self::Borrowed<'a> {
8211 value
8212 }
8213 }
8214
8215 unsafe impl fidl::encoding::TypeMarker for Stderr {
8216 type Owned = Self;
8217
8218 #[inline(always)]
8219 fn inline_align(_context: fidl::encoding::Context) -> usize {
8220 4
8221 }
8222
8223 #[inline(always)]
8224 fn inline_size(_context: fidl::encoding::Context) -> usize {
8225 4
8226 }
8227 }
8228
8229 unsafe impl fidl::encoding::Encode<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect>
8230 for &mut Stderr
8231 {
8232 #[inline]
8233 unsafe fn encode(
8234 self,
8235 encoder: &mut fidl::encoding::Encoder<
8236 '_,
8237 fidl::encoding::DefaultFuchsiaResourceDialect,
8238 >,
8239 offset: usize,
8240 _depth: fidl::encoding::Depth,
8241 ) -> fidl::Result<()> {
8242 encoder.debug_check_bounds::<Stderr>(offset);
8243 fidl::encoding::Encode::<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8245 (<fidl::encoding::HandleType<
8246 fidl::Socket,
8247 { fidl::ObjectType::SOCKET.into_raw() },
8248 2147483648,
8249 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8250 &mut self.socket
8251 ),),
8252 encoder,
8253 offset,
8254 _depth,
8255 )
8256 }
8257 }
8258 unsafe impl<
8259 T0: fidl::encoding::Encode<
8260 fidl::encoding::HandleType<
8261 fidl::Socket,
8262 { fidl::ObjectType::SOCKET.into_raw() },
8263 2147483648,
8264 >,
8265 fidl::encoding::DefaultFuchsiaResourceDialect,
8266 >,
8267 > fidl::encoding::Encode<Stderr, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
8268 {
8269 #[inline]
8270 unsafe fn encode(
8271 self,
8272 encoder: &mut fidl::encoding::Encoder<
8273 '_,
8274 fidl::encoding::DefaultFuchsiaResourceDialect,
8275 >,
8276 offset: usize,
8277 depth: fidl::encoding::Depth,
8278 ) -> fidl::Result<()> {
8279 encoder.debug_check_bounds::<Stderr>(offset);
8280 self.0.encode(encoder, offset + 0, depth)?;
8284 Ok(())
8285 }
8286 }
8287
8288 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Stderr {
8289 #[inline(always)]
8290 fn new_empty() -> Self {
8291 Self {
8292 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8293 }
8294 }
8295
8296 #[inline]
8297 unsafe fn decode(
8298 &mut self,
8299 decoder: &mut fidl::encoding::Decoder<
8300 '_,
8301 fidl::encoding::DefaultFuchsiaResourceDialect,
8302 >,
8303 offset: usize,
8304 _depth: fidl::encoding::Depth,
8305 ) -> fidl::Result<()> {
8306 decoder.debug_check_bounds::<Self>(offset);
8307 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
8309 Ok(())
8310 }
8311 }
8312
8313 impl fidl::encoding::ResourceTypeMarker for Stdout {
8314 type Borrowed<'a> = &'a mut Self;
8315 fn take_or_borrow<'a>(
8316 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8317 ) -> Self::Borrowed<'a> {
8318 value
8319 }
8320 }
8321
8322 unsafe impl fidl::encoding::TypeMarker for Stdout {
8323 type Owned = Self;
8324
8325 #[inline(always)]
8326 fn inline_align(_context: fidl::encoding::Context) -> usize {
8327 4
8328 }
8329
8330 #[inline(always)]
8331 fn inline_size(_context: fidl::encoding::Context) -> usize {
8332 4
8333 }
8334 }
8335
8336 unsafe impl fidl::encoding::Encode<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect>
8337 for &mut Stdout
8338 {
8339 #[inline]
8340 unsafe fn encode(
8341 self,
8342 encoder: &mut fidl::encoding::Encoder<
8343 '_,
8344 fidl::encoding::DefaultFuchsiaResourceDialect,
8345 >,
8346 offset: usize,
8347 _depth: fidl::encoding::Depth,
8348 ) -> fidl::Result<()> {
8349 encoder.debug_check_bounds::<Stdout>(offset);
8350 fidl::encoding::Encode::<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8352 (<fidl::encoding::HandleType<
8353 fidl::Socket,
8354 { fidl::ObjectType::SOCKET.into_raw() },
8355 2147483648,
8356 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8357 &mut self.socket
8358 ),),
8359 encoder,
8360 offset,
8361 _depth,
8362 )
8363 }
8364 }
8365 unsafe impl<
8366 T0: fidl::encoding::Encode<
8367 fidl::encoding::HandleType<
8368 fidl::Socket,
8369 { fidl::ObjectType::SOCKET.into_raw() },
8370 2147483648,
8371 >,
8372 fidl::encoding::DefaultFuchsiaResourceDialect,
8373 >,
8374 > fidl::encoding::Encode<Stdout, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0,)
8375 {
8376 #[inline]
8377 unsafe fn encode(
8378 self,
8379 encoder: &mut fidl::encoding::Encoder<
8380 '_,
8381 fidl::encoding::DefaultFuchsiaResourceDialect,
8382 >,
8383 offset: usize,
8384 depth: fidl::encoding::Depth,
8385 ) -> fidl::Result<()> {
8386 encoder.debug_check_bounds::<Stdout>(offset);
8387 self.0.encode(encoder, offset + 0, depth)?;
8391 Ok(())
8392 }
8393 }
8394
8395 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Stdout {
8396 #[inline(always)]
8397 fn new_empty() -> Self {
8398 Self {
8399 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
8400 }
8401 }
8402
8403 #[inline]
8404 unsafe fn decode(
8405 &mut self,
8406 decoder: &mut fidl::encoding::Decoder<
8407 '_,
8408 fidl::encoding::DefaultFuchsiaResourceDialect,
8409 >,
8410 offset: usize,
8411 _depth: fidl::encoding::Depth,
8412 ) -> fidl::Result<()> {
8413 decoder.debug_check_bounds::<Self>(offset);
8414 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
8416 Ok(())
8417 }
8418 }
8419
8420 impl fidl::encoding::ResourceTypeMarker for SuiteArtifact {
8421 type Borrowed<'a> = &'a mut Self;
8422 fn take_or_borrow<'a>(
8423 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8424 ) -> Self::Borrowed<'a> {
8425 value
8426 }
8427 }
8428
8429 unsafe impl fidl::encoding::TypeMarker for SuiteArtifact {
8430 type Owned = Self;
8431
8432 #[inline(always)]
8433 fn inline_align(_context: fidl::encoding::Context) -> usize {
8434 8
8435 }
8436
8437 #[inline(always)]
8438 fn inline_size(_context: fidl::encoding::Context) -> usize {
8439 16
8440 }
8441 }
8442
8443 unsafe impl fidl::encoding::Encode<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
8444 for &mut SuiteArtifact
8445 {
8446 #[inline]
8447 unsafe fn encode(
8448 self,
8449 encoder: &mut fidl::encoding::Encoder<
8450 '_,
8451 fidl::encoding::DefaultFuchsiaResourceDialect,
8452 >,
8453 offset: usize,
8454 _depth: fidl::encoding::Depth,
8455 ) -> fidl::Result<()> {
8456 encoder.debug_check_bounds::<SuiteArtifact>(offset);
8457 fidl::encoding::Encode::<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8459 (
8460 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.artifact),
8461 ),
8462 encoder, offset, _depth
8463 )
8464 }
8465 }
8466 unsafe impl<T0: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>>
8467 fidl::encoding::Encode<SuiteArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
8468 for (T0,)
8469 {
8470 #[inline]
8471 unsafe fn encode(
8472 self,
8473 encoder: &mut fidl::encoding::Encoder<
8474 '_,
8475 fidl::encoding::DefaultFuchsiaResourceDialect,
8476 >,
8477 offset: usize,
8478 depth: fidl::encoding::Depth,
8479 ) -> fidl::Result<()> {
8480 encoder.debug_check_bounds::<SuiteArtifact>(offset);
8481 self.0.encode(encoder, offset + 0, depth)?;
8485 Ok(())
8486 }
8487 }
8488
8489 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteArtifact {
8490 #[inline(always)]
8491 fn new_empty() -> Self {
8492 Self {
8493 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
8494 }
8495 }
8496
8497 #[inline]
8498 unsafe fn decode(
8499 &mut self,
8500 decoder: &mut fidl::encoding::Decoder<
8501 '_,
8502 fidl::encoding::DefaultFuchsiaResourceDialect,
8503 >,
8504 offset: usize,
8505 _depth: fidl::encoding::Depth,
8506 ) -> fidl::Result<()> {
8507 decoder.debug_check_bounds::<Self>(offset);
8508 fidl::decode!(
8510 Artifact,
8511 fidl::encoding::DefaultFuchsiaResourceDialect,
8512 &mut self.artifact,
8513 decoder,
8514 offset + 0,
8515 _depth
8516 )?;
8517 Ok(())
8518 }
8519 }
8520
8521 impl fidl::encoding::ResourceTypeMarker for SuiteControllerGetEventsResponse {
8522 type Borrowed<'a> = &'a mut Self;
8523 fn take_or_borrow<'a>(
8524 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8525 ) -> Self::Borrowed<'a> {
8526 value
8527 }
8528 }
8529
8530 unsafe impl fidl::encoding::TypeMarker for SuiteControllerGetEventsResponse {
8531 type Owned = Self;
8532
8533 #[inline(always)]
8534 fn inline_align(_context: fidl::encoding::Context) -> usize {
8535 8
8536 }
8537
8538 #[inline(always)]
8539 fn inline_size(_context: fidl::encoding::Context) -> usize {
8540 16
8541 }
8542 }
8543
8544 unsafe impl
8545 fidl::encoding::Encode<
8546 SuiteControllerGetEventsResponse,
8547 fidl::encoding::DefaultFuchsiaResourceDialect,
8548 > for &mut SuiteControllerGetEventsResponse
8549 {
8550 #[inline]
8551 unsafe fn encode(
8552 self,
8553 encoder: &mut fidl::encoding::Encoder<
8554 '_,
8555 fidl::encoding::DefaultFuchsiaResourceDialect,
8556 >,
8557 offset: usize,
8558 _depth: fidl::encoding::Depth,
8559 ) -> fidl::Result<()> {
8560 encoder.debug_check_bounds::<SuiteControllerGetEventsResponse>(offset);
8561 fidl::encoding::Encode::<SuiteControllerGetEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8563 (
8564 <fidl::encoding::UnboundedVector<SuiteEvent> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
8565 ),
8566 encoder, offset, _depth
8567 )
8568 }
8569 }
8570 unsafe impl<
8571 T0: fidl::encoding::Encode<
8572 fidl::encoding::UnboundedVector<SuiteEvent>,
8573 fidl::encoding::DefaultFuchsiaResourceDialect,
8574 >,
8575 >
8576 fidl::encoding::Encode<
8577 SuiteControllerGetEventsResponse,
8578 fidl::encoding::DefaultFuchsiaResourceDialect,
8579 > for (T0,)
8580 {
8581 #[inline]
8582 unsafe fn encode(
8583 self,
8584 encoder: &mut fidl::encoding::Encoder<
8585 '_,
8586 fidl::encoding::DefaultFuchsiaResourceDialect,
8587 >,
8588 offset: usize,
8589 depth: fidl::encoding::Depth,
8590 ) -> fidl::Result<()> {
8591 encoder.debug_check_bounds::<SuiteControllerGetEventsResponse>(offset);
8592 self.0.encode(encoder, offset + 0, depth)?;
8596 Ok(())
8597 }
8598 }
8599
8600 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8601 for SuiteControllerGetEventsResponse
8602 {
8603 #[inline(always)]
8604 fn new_empty() -> Self {
8605 Self {
8606 events: fidl::new_empty!(
8607 fidl::encoding::UnboundedVector<SuiteEvent>,
8608 fidl::encoding::DefaultFuchsiaResourceDialect
8609 ),
8610 }
8611 }
8612
8613 #[inline]
8614 unsafe fn decode(
8615 &mut self,
8616 decoder: &mut fidl::encoding::Decoder<
8617 '_,
8618 fidl::encoding::DefaultFuchsiaResourceDialect,
8619 >,
8620 offset: usize,
8621 _depth: fidl::encoding::Depth,
8622 ) -> fidl::Result<()> {
8623 decoder.debug_check_bounds::<Self>(offset);
8624 fidl::decode!(
8626 fidl::encoding::UnboundedVector<SuiteEvent>,
8627 fidl::encoding::DefaultFuchsiaResourceDialect,
8628 &mut self.events,
8629 decoder,
8630 offset + 0,
8631 _depth
8632 )?;
8633 Ok(())
8634 }
8635 }
8636
8637 impl fidl::encoding::ResourceTypeMarker for SuiteControllerWatchEventsResponse {
8638 type Borrowed<'a> = &'a mut Self;
8639 fn take_or_borrow<'a>(
8640 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8641 ) -> Self::Borrowed<'a> {
8642 value
8643 }
8644 }
8645
8646 unsafe impl fidl::encoding::TypeMarker for SuiteControllerWatchEventsResponse {
8647 type Owned = Self;
8648
8649 #[inline(always)]
8650 fn inline_align(_context: fidl::encoding::Context) -> usize {
8651 8
8652 }
8653
8654 #[inline(always)]
8655 fn inline_size(_context: fidl::encoding::Context) -> usize {
8656 16
8657 }
8658 }
8659
8660 unsafe impl
8661 fidl::encoding::Encode<
8662 SuiteControllerWatchEventsResponse,
8663 fidl::encoding::DefaultFuchsiaResourceDialect,
8664 > for &mut SuiteControllerWatchEventsResponse
8665 {
8666 #[inline]
8667 unsafe fn encode(
8668 self,
8669 encoder: &mut fidl::encoding::Encoder<
8670 '_,
8671 fidl::encoding::DefaultFuchsiaResourceDialect,
8672 >,
8673 offset: usize,
8674 _depth: fidl::encoding::Depth,
8675 ) -> fidl::Result<()> {
8676 encoder.debug_check_bounds::<SuiteControllerWatchEventsResponse>(offset);
8677 fidl::encoding::Encode::<SuiteControllerWatchEventsResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8679 (
8680 <fidl::encoding::Vector<Event, 1024> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.events),
8681 ),
8682 encoder, offset, _depth
8683 )
8684 }
8685 }
8686 unsafe impl<
8687 T0: fidl::encoding::Encode<
8688 fidl::encoding::Vector<Event, 1024>,
8689 fidl::encoding::DefaultFuchsiaResourceDialect,
8690 >,
8691 >
8692 fidl::encoding::Encode<
8693 SuiteControllerWatchEventsResponse,
8694 fidl::encoding::DefaultFuchsiaResourceDialect,
8695 > for (T0,)
8696 {
8697 #[inline]
8698 unsafe fn encode(
8699 self,
8700 encoder: &mut fidl::encoding::Encoder<
8701 '_,
8702 fidl::encoding::DefaultFuchsiaResourceDialect,
8703 >,
8704 offset: usize,
8705 depth: fidl::encoding::Depth,
8706 ) -> fidl::Result<()> {
8707 encoder.debug_check_bounds::<SuiteControllerWatchEventsResponse>(offset);
8708 self.0.encode(encoder, offset + 0, depth)?;
8712 Ok(())
8713 }
8714 }
8715
8716 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8717 for SuiteControllerWatchEventsResponse
8718 {
8719 #[inline(always)]
8720 fn new_empty() -> Self {
8721 Self {
8722 events: fidl::new_empty!(fidl::encoding::Vector<Event, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect),
8723 }
8724 }
8725
8726 #[inline]
8727 unsafe fn decode(
8728 &mut self,
8729 decoder: &mut fidl::encoding::Decoder<
8730 '_,
8731 fidl::encoding::DefaultFuchsiaResourceDialect,
8732 >,
8733 offset: usize,
8734 _depth: fidl::encoding::Depth,
8735 ) -> fidl::Result<()> {
8736 decoder.debug_check_bounds::<Self>(offset);
8737 fidl::decode!(fidl::encoding::Vector<Event, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.events, decoder, offset + 0, _depth)?;
8739 Ok(())
8740 }
8741 }
8742
8743 impl fidl::encoding::ResourceTypeMarker for SuiteRunnerRunRequest {
8744 type Borrowed<'a> = &'a mut Self;
8745 fn take_or_borrow<'a>(
8746 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8747 ) -> Self::Borrowed<'a> {
8748 value
8749 }
8750 }
8751
8752 unsafe impl fidl::encoding::TypeMarker for SuiteRunnerRunRequest {
8753 type Owned = Self;
8754
8755 #[inline(always)]
8756 fn inline_align(_context: fidl::encoding::Context) -> usize {
8757 8
8758 }
8759
8760 #[inline(always)]
8761 fn inline_size(_context: fidl::encoding::Context) -> usize {
8762 40
8763 }
8764 }
8765
8766 unsafe impl
8767 fidl::encoding::Encode<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
8768 for &mut SuiteRunnerRunRequest
8769 {
8770 #[inline]
8771 unsafe fn encode(
8772 self,
8773 encoder: &mut fidl::encoding::Encoder<
8774 '_,
8775 fidl::encoding::DefaultFuchsiaResourceDialect,
8776 >,
8777 offset: usize,
8778 _depth: fidl::encoding::Depth,
8779 ) -> fidl::Result<()> {
8780 encoder.debug_check_bounds::<SuiteRunnerRunRequest>(offset);
8781 fidl::encoding::Encode::<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8783 (
8784 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_suite_url),
8785 <RunSuiteOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.options),
8786 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
8787 ),
8788 encoder, offset, _depth
8789 )
8790 }
8791 }
8792 unsafe impl<
8793 T0: fidl::encoding::Encode<
8794 fidl::encoding::BoundedString<4096>,
8795 fidl::encoding::DefaultFuchsiaResourceDialect,
8796 >,
8797 T1: fidl::encoding::Encode<RunSuiteOptions, fidl::encoding::DefaultFuchsiaResourceDialect>,
8798 T2: fidl::encoding::Encode<
8799 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
8800 fidl::encoding::DefaultFuchsiaResourceDialect,
8801 >,
8802 >
8803 fidl::encoding::Encode<SuiteRunnerRunRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
8804 for (T0, T1, T2)
8805 {
8806 #[inline]
8807 unsafe fn encode(
8808 self,
8809 encoder: &mut fidl::encoding::Encoder<
8810 '_,
8811 fidl::encoding::DefaultFuchsiaResourceDialect,
8812 >,
8813 offset: usize,
8814 depth: fidl::encoding::Depth,
8815 ) -> fidl::Result<()> {
8816 encoder.debug_check_bounds::<SuiteRunnerRunRequest>(offset);
8817 unsafe {
8820 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
8821 (ptr as *mut u64).write_unaligned(0);
8822 }
8823 self.0.encode(encoder, offset + 0, depth)?;
8825 self.1.encode(encoder, offset + 16, depth)?;
8826 self.2.encode(encoder, offset + 32, depth)?;
8827 Ok(())
8828 }
8829 }
8830
8831 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8832 for SuiteRunnerRunRequest
8833 {
8834 #[inline(always)]
8835 fn new_empty() -> Self {
8836 Self {
8837 test_suite_url: fidl::new_empty!(
8838 fidl::encoding::BoundedString<4096>,
8839 fidl::encoding::DefaultFuchsiaResourceDialect
8840 ),
8841 options: fidl::new_empty!(
8842 RunSuiteOptions,
8843 fidl::encoding::DefaultFuchsiaResourceDialect
8844 ),
8845 controller: fidl::new_empty!(
8846 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
8847 fidl::encoding::DefaultFuchsiaResourceDialect
8848 ),
8849 }
8850 }
8851
8852 #[inline]
8853 unsafe fn decode(
8854 &mut self,
8855 decoder: &mut fidl::encoding::Decoder<
8856 '_,
8857 fidl::encoding::DefaultFuchsiaResourceDialect,
8858 >,
8859 offset: usize,
8860 _depth: fidl::encoding::Depth,
8861 ) -> fidl::Result<()> {
8862 decoder.debug_check_bounds::<Self>(offset);
8863 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
8865 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8866 let mask = 0xffffffff00000000u64;
8867 let maskedval = padval & mask;
8868 if maskedval != 0 {
8869 return Err(fidl::Error::NonZeroPadding {
8870 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
8871 });
8872 }
8873 fidl::decode!(
8874 fidl::encoding::BoundedString<4096>,
8875 fidl::encoding::DefaultFuchsiaResourceDialect,
8876 &mut self.test_suite_url,
8877 decoder,
8878 offset + 0,
8879 _depth
8880 )?;
8881 fidl::decode!(
8882 RunSuiteOptions,
8883 fidl::encoding::DefaultFuchsiaResourceDialect,
8884 &mut self.options,
8885 decoder,
8886 offset + 16,
8887 _depth
8888 )?;
8889 fidl::decode!(
8890 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SuiteControllerMarker>>,
8891 fidl::encoding::DefaultFuchsiaResourceDialect,
8892 &mut self.controller,
8893 decoder,
8894 offset + 32,
8895 _depth
8896 )?;
8897 Ok(())
8898 }
8899 }
8900
8901 impl fidl::encoding::ResourceTypeMarker for TestCaseEnumeratorEnumerateRequest {
8902 type Borrowed<'a> = &'a mut Self;
8903 fn take_or_borrow<'a>(
8904 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8905 ) -> Self::Borrowed<'a> {
8906 value
8907 }
8908 }
8909
8910 unsafe impl fidl::encoding::TypeMarker for TestCaseEnumeratorEnumerateRequest {
8911 type Owned = Self;
8912
8913 #[inline(always)]
8914 fn inline_align(_context: fidl::encoding::Context) -> usize {
8915 8
8916 }
8917
8918 #[inline(always)]
8919 fn inline_size(_context: fidl::encoding::Context) -> usize {
8920 40
8921 }
8922 }
8923
8924 unsafe impl
8925 fidl::encoding::Encode<
8926 TestCaseEnumeratorEnumerateRequest,
8927 fidl::encoding::DefaultFuchsiaResourceDialect,
8928 > for &mut TestCaseEnumeratorEnumerateRequest
8929 {
8930 #[inline]
8931 unsafe fn encode(
8932 self,
8933 encoder: &mut fidl::encoding::Encoder<
8934 '_,
8935 fidl::encoding::DefaultFuchsiaResourceDialect,
8936 >,
8937 offset: usize,
8938 _depth: fidl::encoding::Depth,
8939 ) -> fidl::Result<()> {
8940 encoder.debug_check_bounds::<TestCaseEnumeratorEnumerateRequest>(offset);
8941 fidl::encoding::Encode::<TestCaseEnumeratorEnumerateRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8943 (
8944 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.test_suite_url),
8945 <EnumerateTestCasesOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.options),
8946 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.iterator),
8947 ),
8948 encoder, offset, _depth
8949 )
8950 }
8951 }
8952 unsafe impl<
8953 T0: fidl::encoding::Encode<
8954 fidl::encoding::BoundedString<4096>,
8955 fidl::encoding::DefaultFuchsiaResourceDialect,
8956 >,
8957 T1: fidl::encoding::Encode<
8958 EnumerateTestCasesOptions,
8959 fidl::encoding::DefaultFuchsiaResourceDialect,
8960 >,
8961 T2: fidl::encoding::Encode<
8962 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
8963 fidl::encoding::DefaultFuchsiaResourceDialect,
8964 >,
8965 >
8966 fidl::encoding::Encode<
8967 TestCaseEnumeratorEnumerateRequest,
8968 fidl::encoding::DefaultFuchsiaResourceDialect,
8969 > for (T0, T1, T2)
8970 {
8971 #[inline]
8972 unsafe fn encode(
8973 self,
8974 encoder: &mut fidl::encoding::Encoder<
8975 '_,
8976 fidl::encoding::DefaultFuchsiaResourceDialect,
8977 >,
8978 offset: usize,
8979 depth: fidl::encoding::Depth,
8980 ) -> fidl::Result<()> {
8981 encoder.debug_check_bounds::<TestCaseEnumeratorEnumerateRequest>(offset);
8982 unsafe {
8985 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(32);
8986 (ptr as *mut u64).write_unaligned(0);
8987 }
8988 self.0.encode(encoder, offset + 0, depth)?;
8990 self.1.encode(encoder, offset + 16, depth)?;
8991 self.2.encode(encoder, offset + 32, depth)?;
8992 Ok(())
8993 }
8994 }
8995
8996 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8997 for TestCaseEnumeratorEnumerateRequest
8998 {
8999 #[inline(always)]
9000 fn new_empty() -> Self {
9001 Self {
9002 test_suite_url: fidl::new_empty!(
9003 fidl::encoding::BoundedString<4096>,
9004 fidl::encoding::DefaultFuchsiaResourceDialect
9005 ),
9006 options: fidl::new_empty!(
9007 EnumerateTestCasesOptions,
9008 fidl::encoding::DefaultFuchsiaResourceDialect
9009 ),
9010 iterator: fidl::new_empty!(
9011 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
9012 fidl::encoding::DefaultFuchsiaResourceDialect
9013 ),
9014 }
9015 }
9016
9017 #[inline]
9018 unsafe fn decode(
9019 &mut self,
9020 decoder: &mut fidl::encoding::Decoder<
9021 '_,
9022 fidl::encoding::DefaultFuchsiaResourceDialect,
9023 >,
9024 offset: usize,
9025 _depth: fidl::encoding::Depth,
9026 ) -> fidl::Result<()> {
9027 decoder.debug_check_bounds::<Self>(offset);
9028 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(32) };
9030 let padval = unsafe { (ptr as *const u64).read_unaligned() };
9031 let mask = 0xffffffff00000000u64;
9032 let maskedval = padval & mask;
9033 if maskedval != 0 {
9034 return Err(fidl::Error::NonZeroPadding {
9035 padding_start: offset + 32 + ((mask as u64).trailing_zeros() / 8) as usize,
9036 });
9037 }
9038 fidl::decode!(
9039 fidl::encoding::BoundedString<4096>,
9040 fidl::encoding::DefaultFuchsiaResourceDialect,
9041 &mut self.test_suite_url,
9042 decoder,
9043 offset + 0,
9044 _depth
9045 )?;
9046 fidl::decode!(
9047 EnumerateTestCasesOptions,
9048 fidl::encoding::DefaultFuchsiaResourceDialect,
9049 &mut self.options,
9050 decoder,
9051 offset + 16,
9052 _depth
9053 )?;
9054 fidl::decode!(
9055 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<TestCaseIteratorMarker>>,
9056 fidl::encoding::DefaultFuchsiaResourceDialect,
9057 &mut self.iterator,
9058 decoder,
9059 offset + 32,
9060 _depth
9061 )?;
9062 Ok(())
9063 }
9064 }
9065
9066 impl CustomArtifact {
9067 #[inline(always)]
9068 fn max_ordinal_present(&self) -> u64 {
9069 if let Some(_) = self.directory_and_token {
9070 return 2;
9071 }
9072 if let Some(_) = self.component_moniker {
9073 return 1;
9074 }
9075 0
9076 }
9077 }
9078
9079 impl fidl::encoding::ResourceTypeMarker for CustomArtifact {
9080 type Borrowed<'a> = &'a mut Self;
9081 fn take_or_borrow<'a>(
9082 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9083 ) -> Self::Borrowed<'a> {
9084 value
9085 }
9086 }
9087
9088 unsafe impl fidl::encoding::TypeMarker for CustomArtifact {
9089 type Owned = Self;
9090
9091 #[inline(always)]
9092 fn inline_align(_context: fidl::encoding::Context) -> usize {
9093 8
9094 }
9095
9096 #[inline(always)]
9097 fn inline_size(_context: fidl::encoding::Context) -> usize {
9098 16
9099 }
9100 }
9101
9102 unsafe impl
9103 fidl::encoding::Encode<CustomArtifact, fidl::encoding::DefaultFuchsiaResourceDialect>
9104 for &mut CustomArtifact
9105 {
9106 unsafe fn encode(
9107 self,
9108 encoder: &mut fidl::encoding::Encoder<
9109 '_,
9110 fidl::encoding::DefaultFuchsiaResourceDialect,
9111 >,
9112 offset: usize,
9113 mut depth: fidl::encoding::Depth,
9114 ) -> fidl::Result<()> {
9115 encoder.debug_check_bounds::<CustomArtifact>(offset);
9116 let max_ordinal: u64 = self.max_ordinal_present();
9118 encoder.write_num(max_ordinal, offset);
9119 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9120 if max_ordinal == 0 {
9122 return Ok(());
9123 }
9124 depth.increment()?;
9125 let envelope_size = 8;
9126 let bytes_len = max_ordinal as usize * envelope_size;
9127 #[allow(unused_variables)]
9128 let offset = encoder.out_of_line_offset(bytes_len);
9129 let mut _prev_end_offset: usize = 0;
9130 if 1 > max_ordinal {
9131 return Ok(());
9132 }
9133
9134 let cur_offset: usize = (1 - 1) * envelope_size;
9137
9138 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9140
9141 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::BoundedString<4096>, fidl::encoding::DefaultFuchsiaResourceDialect>(
9146 self.component_moniker.as_ref().map(<fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow),
9147 encoder, offset + cur_offset, depth
9148 )?;
9149
9150 _prev_end_offset = cur_offset + envelope_size;
9151 if 2 > max_ordinal {
9152 return Ok(());
9153 }
9154
9155 let cur_offset: usize = (2 - 1) * envelope_size;
9158
9159 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9161
9162 fidl::encoding::encode_in_envelope_optional::<
9167 DirectoryAndToken,
9168 fidl::encoding::DefaultFuchsiaResourceDialect,
9169 >(
9170 self.directory_and_token
9171 .as_mut()
9172 .map(<DirectoryAndToken as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
9173 encoder,
9174 offset + cur_offset,
9175 depth,
9176 )?;
9177
9178 _prev_end_offset = cur_offset + envelope_size;
9179
9180 Ok(())
9181 }
9182 }
9183
9184 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9185 for CustomArtifact
9186 {
9187 #[inline(always)]
9188 fn new_empty() -> Self {
9189 Self::default()
9190 }
9191
9192 unsafe fn decode(
9193 &mut self,
9194 decoder: &mut fidl::encoding::Decoder<
9195 '_,
9196 fidl::encoding::DefaultFuchsiaResourceDialect,
9197 >,
9198 offset: usize,
9199 mut depth: fidl::encoding::Depth,
9200 ) -> fidl::Result<()> {
9201 decoder.debug_check_bounds::<Self>(offset);
9202 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9203 None => return Err(fidl::Error::NotNullable),
9204 Some(len) => len,
9205 };
9206 if len == 0 {
9208 return Ok(());
9209 };
9210 depth.increment()?;
9211 let envelope_size = 8;
9212 let bytes_len = len * envelope_size;
9213 let offset = decoder.out_of_line_offset(bytes_len)?;
9214 let mut _next_ordinal_to_read = 0;
9216 let mut next_offset = offset;
9217 let end_offset = offset + bytes_len;
9218 _next_ordinal_to_read += 1;
9219 if next_offset >= end_offset {
9220 return Ok(());
9221 }
9222
9223 while _next_ordinal_to_read < 1 {
9225 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9226 _next_ordinal_to_read += 1;
9227 next_offset += envelope_size;
9228 }
9229
9230 let next_out_of_line = decoder.next_out_of_line();
9231 let handles_before = decoder.remaining_handles();
9232 if let Some((inlined, num_bytes, num_handles)) =
9233 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9234 {
9235 let member_inline_size = <fidl::encoding::BoundedString<4096> as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9236 if inlined != (member_inline_size <= 4) {
9237 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9238 }
9239 let inner_offset;
9240 let mut inner_depth = depth.clone();
9241 if inlined {
9242 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9243 inner_offset = next_offset;
9244 } else {
9245 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9246 inner_depth.increment()?;
9247 }
9248 let val_ref = self.component_moniker.get_or_insert_with(|| {
9249 fidl::new_empty!(
9250 fidl::encoding::BoundedString<4096>,
9251 fidl::encoding::DefaultFuchsiaResourceDialect
9252 )
9253 });
9254 fidl::decode!(
9255 fidl::encoding::BoundedString<4096>,
9256 fidl::encoding::DefaultFuchsiaResourceDialect,
9257 val_ref,
9258 decoder,
9259 inner_offset,
9260 inner_depth
9261 )?;
9262 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9263 {
9264 return Err(fidl::Error::InvalidNumBytesInEnvelope);
9265 }
9266 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9267 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9268 }
9269 }
9270
9271 next_offset += envelope_size;
9272 _next_ordinal_to_read += 1;
9273 if next_offset >= end_offset {
9274 return Ok(());
9275 }
9276
9277 while _next_ordinal_to_read < 2 {
9279 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9280 _next_ordinal_to_read += 1;
9281 next_offset += envelope_size;
9282 }
9283
9284 let next_out_of_line = decoder.next_out_of_line();
9285 let handles_before = decoder.remaining_handles();
9286 if let Some((inlined, num_bytes, num_handles)) =
9287 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9288 {
9289 let member_inline_size =
9290 <DirectoryAndToken as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9291 if inlined != (member_inline_size <= 4) {
9292 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9293 }
9294 let inner_offset;
9295 let mut inner_depth = depth.clone();
9296 if inlined {
9297 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9298 inner_offset = next_offset;
9299 } else {
9300 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9301 inner_depth.increment()?;
9302 }
9303 let val_ref = self.directory_and_token.get_or_insert_with(|| {
9304 fidl::new_empty!(
9305 DirectoryAndToken,
9306 fidl::encoding::DefaultFuchsiaResourceDialect
9307 )
9308 });
9309 fidl::decode!(
9310 DirectoryAndToken,
9311 fidl::encoding::DefaultFuchsiaResourceDialect,
9312 val_ref,
9313 decoder,
9314 inner_offset,
9315 inner_depth
9316 )?;
9317 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9318 {
9319 return Err(fidl::Error::InvalidNumBytesInEnvelope);
9320 }
9321 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9322 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9323 }
9324 }
9325
9326 next_offset += envelope_size;
9327
9328 while next_offset < end_offset {
9330 _next_ordinal_to_read += 1;
9331 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9332 next_offset += envelope_size;
9333 }
9334
9335 Ok(())
9336 }
9337 }
9338
9339 impl DebugData {
9340 #[inline(always)]
9341 fn max_ordinal_present(&self) -> u64 {
9342 if let Some(_) = self.socket {
9343 return 2;
9344 }
9345 if let Some(_) = self.name {
9346 return 1;
9347 }
9348 0
9349 }
9350 }
9351
9352 impl fidl::encoding::ResourceTypeMarker for DebugData {
9353 type Borrowed<'a> = &'a mut Self;
9354 fn take_or_borrow<'a>(
9355 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9356 ) -> Self::Borrowed<'a> {
9357 value
9358 }
9359 }
9360
9361 unsafe impl fidl::encoding::TypeMarker for DebugData {
9362 type Owned = Self;
9363
9364 #[inline(always)]
9365 fn inline_align(_context: fidl::encoding::Context) -> usize {
9366 8
9367 }
9368
9369 #[inline(always)]
9370 fn inline_size(_context: fidl::encoding::Context) -> usize {
9371 16
9372 }
9373 }
9374
9375 unsafe impl fidl::encoding::Encode<DebugData, fidl::encoding::DefaultFuchsiaResourceDialect>
9376 for &mut DebugData
9377 {
9378 unsafe fn encode(
9379 self,
9380 encoder: &mut fidl::encoding::Encoder<
9381 '_,
9382 fidl::encoding::DefaultFuchsiaResourceDialect,
9383 >,
9384 offset: usize,
9385 mut depth: fidl::encoding::Depth,
9386 ) -> fidl::Result<()> {
9387 encoder.debug_check_bounds::<DebugData>(offset);
9388 let max_ordinal: u64 = self.max_ordinal_present();
9390 encoder.write_num(max_ordinal, offset);
9391 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9392 if max_ordinal == 0 {
9394 return Ok(());
9395 }
9396 depth.increment()?;
9397 let envelope_size = 8;
9398 let bytes_len = max_ordinal as usize * envelope_size;
9399 #[allow(unused_variables)]
9400 let offset = encoder.out_of_line_offset(bytes_len);
9401 let mut _prev_end_offset: usize = 0;
9402 if 1 > max_ordinal {
9403 return Ok(());
9404 }
9405
9406 let cur_offset: usize = (1 - 1) * envelope_size;
9409
9410 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9412
9413 fidl::encoding::encode_in_envelope_optional::<
9418 fidl::encoding::BoundedString<512>,
9419 fidl::encoding::DefaultFuchsiaResourceDialect,
9420 >(
9421 self.name.as_ref().map(
9422 <fidl::encoding::BoundedString<512> as fidl::encoding::ValueTypeMarker>::borrow,
9423 ),
9424 encoder,
9425 offset + cur_offset,
9426 depth,
9427 )?;
9428
9429 _prev_end_offset = cur_offset + envelope_size;
9430 if 2 > max_ordinal {
9431 return Ok(());
9432 }
9433
9434 let cur_offset: usize = (2 - 1) * envelope_size;
9437
9438 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9440
9441 fidl::encoding::encode_in_envelope_optional::<
9446 fidl::encoding::HandleType<
9447 fidl::Socket,
9448 { fidl::ObjectType::SOCKET.into_raw() },
9449 2147483648,
9450 >,
9451 fidl::encoding::DefaultFuchsiaResourceDialect,
9452 >(
9453 self.socket.as_mut().map(
9454 <fidl::encoding::HandleType<
9455 fidl::Socket,
9456 { fidl::ObjectType::SOCKET.into_raw() },
9457 2147483648,
9458 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
9459 ),
9460 encoder,
9461 offset + cur_offset,
9462 depth,
9463 )?;
9464
9465 _prev_end_offset = cur_offset + envelope_size;
9466
9467 Ok(())
9468 }
9469 }
9470
9471 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for DebugData {
9472 #[inline(always)]
9473 fn new_empty() -> Self {
9474 Self::default()
9475 }
9476
9477 unsafe fn decode(
9478 &mut self,
9479 decoder: &mut fidl::encoding::Decoder<
9480 '_,
9481 fidl::encoding::DefaultFuchsiaResourceDialect,
9482 >,
9483 offset: usize,
9484 mut depth: fidl::encoding::Depth,
9485 ) -> fidl::Result<()> {
9486 decoder.debug_check_bounds::<Self>(offset);
9487 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9488 None => return Err(fidl::Error::NotNullable),
9489 Some(len) => len,
9490 };
9491 if len == 0 {
9493 return Ok(());
9494 };
9495 depth.increment()?;
9496 let envelope_size = 8;
9497 let bytes_len = len * envelope_size;
9498 let offset = decoder.out_of_line_offset(bytes_len)?;
9499 let mut _next_ordinal_to_read = 0;
9501 let mut next_offset = offset;
9502 let end_offset = offset + bytes_len;
9503 _next_ordinal_to_read += 1;
9504 if next_offset >= end_offset {
9505 return Ok(());
9506 }
9507
9508 while _next_ordinal_to_read < 1 {
9510 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9511 _next_ordinal_to_read += 1;
9512 next_offset += envelope_size;
9513 }
9514
9515 let next_out_of_line = decoder.next_out_of_line();
9516 let handles_before = decoder.remaining_handles();
9517 if let Some((inlined, num_bytes, num_handles)) =
9518 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9519 {
9520 let member_inline_size =
9521 <fidl::encoding::BoundedString<512> as fidl::encoding::TypeMarker>::inline_size(
9522 decoder.context,
9523 );
9524 if inlined != (member_inline_size <= 4) {
9525 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9526 }
9527 let inner_offset;
9528 let mut inner_depth = depth.clone();
9529 if inlined {
9530 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9531 inner_offset = next_offset;
9532 } else {
9533 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9534 inner_depth.increment()?;
9535 }
9536 let val_ref = self.name.get_or_insert_with(|| {
9537 fidl::new_empty!(
9538 fidl::encoding::BoundedString<512>,
9539 fidl::encoding::DefaultFuchsiaResourceDialect
9540 )
9541 });
9542 fidl::decode!(
9543 fidl::encoding::BoundedString<512>,
9544 fidl::encoding::DefaultFuchsiaResourceDialect,
9545 val_ref,
9546 decoder,
9547 inner_offset,
9548 inner_depth
9549 )?;
9550 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9551 {
9552 return Err(fidl::Error::InvalidNumBytesInEnvelope);
9553 }
9554 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9555 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9556 }
9557 }
9558
9559 next_offset += envelope_size;
9560 _next_ordinal_to_read += 1;
9561 if next_offset >= end_offset {
9562 return Ok(());
9563 }
9564
9565 while _next_ordinal_to_read < 2 {
9567 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9568 _next_ordinal_to_read += 1;
9569 next_offset += envelope_size;
9570 }
9571
9572 let next_out_of_line = decoder.next_out_of_line();
9573 let handles_before = decoder.remaining_handles();
9574 if let Some((inlined, num_bytes, num_handles)) =
9575 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9576 {
9577 let member_inline_size = <fidl::encoding::HandleType<
9578 fidl::Socket,
9579 { fidl::ObjectType::SOCKET.into_raw() },
9580 2147483648,
9581 > as fidl::encoding::TypeMarker>::inline_size(
9582 decoder.context
9583 );
9584 if inlined != (member_inline_size <= 4) {
9585 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9586 }
9587 let inner_offset;
9588 let mut inner_depth = depth.clone();
9589 if inlined {
9590 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9591 inner_offset = next_offset;
9592 } else {
9593 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9594 inner_depth.increment()?;
9595 }
9596 let val_ref =
9597 self.socket.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect));
9598 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
9599 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9600 {
9601 return Err(fidl::Error::InvalidNumBytesInEnvelope);
9602 }
9603 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9604 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9605 }
9606 }
9607
9608 next_offset += envelope_size;
9609
9610 while next_offset < end_offset {
9612 _next_ordinal_to_read += 1;
9613 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9614 next_offset += envelope_size;
9615 }
9616
9617 Ok(())
9618 }
9619 }
9620
9621 impl EnumerateTestCasesOptions {
9622 #[inline(always)]
9623 fn max_ordinal_present(&self) -> u64 {
9624 if let Some(_) = self.realm_options {
9625 return 1;
9626 }
9627 0
9628 }
9629 }
9630
9631 impl fidl::encoding::ResourceTypeMarker for EnumerateTestCasesOptions {
9632 type Borrowed<'a> = &'a mut Self;
9633 fn take_or_borrow<'a>(
9634 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9635 ) -> Self::Borrowed<'a> {
9636 value
9637 }
9638 }
9639
9640 unsafe impl fidl::encoding::TypeMarker for EnumerateTestCasesOptions {
9641 type Owned = Self;
9642
9643 #[inline(always)]
9644 fn inline_align(_context: fidl::encoding::Context) -> usize {
9645 8
9646 }
9647
9648 #[inline(always)]
9649 fn inline_size(_context: fidl::encoding::Context) -> usize {
9650 16
9651 }
9652 }
9653
9654 unsafe impl
9655 fidl::encoding::Encode<
9656 EnumerateTestCasesOptions,
9657 fidl::encoding::DefaultFuchsiaResourceDialect,
9658 > for &mut EnumerateTestCasesOptions
9659 {
9660 unsafe fn encode(
9661 self,
9662 encoder: &mut fidl::encoding::Encoder<
9663 '_,
9664 fidl::encoding::DefaultFuchsiaResourceDialect,
9665 >,
9666 offset: usize,
9667 mut depth: fidl::encoding::Depth,
9668 ) -> fidl::Result<()> {
9669 encoder.debug_check_bounds::<EnumerateTestCasesOptions>(offset);
9670 let max_ordinal: u64 = self.max_ordinal_present();
9672 encoder.write_num(max_ordinal, offset);
9673 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9674 if max_ordinal == 0 {
9676 return Ok(());
9677 }
9678 depth.increment()?;
9679 let envelope_size = 8;
9680 let bytes_len = max_ordinal as usize * envelope_size;
9681 #[allow(unused_variables)]
9682 let offset = encoder.out_of_line_offset(bytes_len);
9683 let mut _prev_end_offset: usize = 0;
9684 if 1 > max_ordinal {
9685 return Ok(());
9686 }
9687
9688 let cur_offset: usize = (1 - 1) * envelope_size;
9691
9692 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9694
9695 fidl::encoding::encode_in_envelope_optional::<
9700 RealmOptions,
9701 fidl::encoding::DefaultFuchsiaResourceDialect,
9702 >(
9703 self.realm_options
9704 .as_mut()
9705 .map(<RealmOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
9706 encoder,
9707 offset + cur_offset,
9708 depth,
9709 )?;
9710
9711 _prev_end_offset = cur_offset + envelope_size;
9712
9713 Ok(())
9714 }
9715 }
9716
9717 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9718 for EnumerateTestCasesOptions
9719 {
9720 #[inline(always)]
9721 fn new_empty() -> Self {
9722 Self::default()
9723 }
9724
9725 unsafe fn decode(
9726 &mut self,
9727 decoder: &mut fidl::encoding::Decoder<
9728 '_,
9729 fidl::encoding::DefaultFuchsiaResourceDialect,
9730 >,
9731 offset: usize,
9732 mut depth: fidl::encoding::Depth,
9733 ) -> fidl::Result<()> {
9734 decoder.debug_check_bounds::<Self>(offset);
9735 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9736 None => return Err(fidl::Error::NotNullable),
9737 Some(len) => len,
9738 };
9739 if len == 0 {
9741 return Ok(());
9742 };
9743 depth.increment()?;
9744 let envelope_size = 8;
9745 let bytes_len = len * envelope_size;
9746 let offset = decoder.out_of_line_offset(bytes_len)?;
9747 let mut _next_ordinal_to_read = 0;
9749 let mut next_offset = offset;
9750 let end_offset = offset + bytes_len;
9751 _next_ordinal_to_read += 1;
9752 if next_offset >= end_offset {
9753 return Ok(());
9754 }
9755
9756 while _next_ordinal_to_read < 1 {
9758 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9759 _next_ordinal_to_read += 1;
9760 next_offset += envelope_size;
9761 }
9762
9763 let next_out_of_line = decoder.next_out_of_line();
9764 let handles_before = decoder.remaining_handles();
9765 if let Some((inlined, num_bytes, num_handles)) =
9766 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9767 {
9768 let member_inline_size =
9769 <RealmOptions as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9770 if inlined != (member_inline_size <= 4) {
9771 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9772 }
9773 let inner_offset;
9774 let mut inner_depth = depth.clone();
9775 if inlined {
9776 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9777 inner_offset = next_offset;
9778 } else {
9779 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9780 inner_depth.increment()?;
9781 }
9782 let val_ref = self.realm_options.get_or_insert_with(|| {
9783 fidl::new_empty!(RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect)
9784 });
9785 fidl::decode!(
9786 RealmOptions,
9787 fidl::encoding::DefaultFuchsiaResourceDialect,
9788 val_ref,
9789 decoder,
9790 inner_offset,
9791 inner_depth
9792 )?;
9793 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
9794 {
9795 return Err(fidl::Error::InvalidNumBytesInEnvelope);
9796 }
9797 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
9798 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
9799 }
9800 }
9801
9802 next_offset += envelope_size;
9803
9804 while next_offset < end_offset {
9806 _next_ordinal_to_read += 1;
9807 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9808 next_offset += envelope_size;
9809 }
9810
9811 Ok(())
9812 }
9813 }
9814
9815 impl Event {
9816 #[inline(always)]
9817 fn max_ordinal_present(&self) -> u64 {
9818 if let Some(_) = self.details {
9819 return 2;
9820 }
9821 if let Some(_) = self.timestamp {
9822 return 1;
9823 }
9824 0
9825 }
9826 }
9827
9828 impl fidl::encoding::ResourceTypeMarker for Event {
9829 type Borrowed<'a> = &'a mut Self;
9830 fn take_or_borrow<'a>(
9831 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9832 ) -> Self::Borrowed<'a> {
9833 value
9834 }
9835 }
9836
9837 unsafe impl fidl::encoding::TypeMarker for Event {
9838 type Owned = Self;
9839
9840 #[inline(always)]
9841 fn inline_align(_context: fidl::encoding::Context) -> usize {
9842 8
9843 }
9844
9845 #[inline(always)]
9846 fn inline_size(_context: fidl::encoding::Context) -> usize {
9847 16
9848 }
9849 }
9850
9851 unsafe impl fidl::encoding::Encode<Event, fidl::encoding::DefaultFuchsiaResourceDialect>
9852 for &mut Event
9853 {
9854 unsafe fn encode(
9855 self,
9856 encoder: &mut fidl::encoding::Encoder<
9857 '_,
9858 fidl::encoding::DefaultFuchsiaResourceDialect,
9859 >,
9860 offset: usize,
9861 mut depth: fidl::encoding::Depth,
9862 ) -> fidl::Result<()> {
9863 encoder.debug_check_bounds::<Event>(offset);
9864 let max_ordinal: u64 = self.max_ordinal_present();
9866 encoder.write_num(max_ordinal, offset);
9867 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
9868 if max_ordinal == 0 {
9870 return Ok(());
9871 }
9872 depth.increment()?;
9873 let envelope_size = 8;
9874 let bytes_len = max_ordinal as usize * envelope_size;
9875 #[allow(unused_variables)]
9876 let offset = encoder.out_of_line_offset(bytes_len);
9877 let mut _prev_end_offset: usize = 0;
9878 if 1 > max_ordinal {
9879 return Ok(());
9880 }
9881
9882 let cur_offset: usize = (1 - 1) * envelope_size;
9885
9886 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9888
9889 fidl::encoding::encode_in_envelope_optional::<
9894 i64,
9895 fidl::encoding::DefaultFuchsiaResourceDialect,
9896 >(
9897 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
9898 encoder,
9899 offset + cur_offset,
9900 depth,
9901 )?;
9902
9903 _prev_end_offset = cur_offset + envelope_size;
9904 if 2 > max_ordinal {
9905 return Ok(());
9906 }
9907
9908 let cur_offset: usize = (2 - 1) * envelope_size;
9911
9912 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
9914
9915 fidl::encoding::encode_in_envelope_optional::<
9920 EventDetails,
9921 fidl::encoding::DefaultFuchsiaResourceDialect,
9922 >(
9923 self.details
9924 .as_mut()
9925 .map(<EventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
9926 encoder,
9927 offset + cur_offset,
9928 depth,
9929 )?;
9930
9931 _prev_end_offset = cur_offset + envelope_size;
9932
9933 Ok(())
9934 }
9935 }
9936
9937 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Event {
9938 #[inline(always)]
9939 fn new_empty() -> Self {
9940 Self::default()
9941 }
9942
9943 unsafe fn decode(
9944 &mut self,
9945 decoder: &mut fidl::encoding::Decoder<
9946 '_,
9947 fidl::encoding::DefaultFuchsiaResourceDialect,
9948 >,
9949 offset: usize,
9950 mut depth: fidl::encoding::Depth,
9951 ) -> fidl::Result<()> {
9952 decoder.debug_check_bounds::<Self>(offset);
9953 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
9954 None => return Err(fidl::Error::NotNullable),
9955 Some(len) => len,
9956 };
9957 if len == 0 {
9959 return Ok(());
9960 };
9961 depth.increment()?;
9962 let envelope_size = 8;
9963 let bytes_len = len * envelope_size;
9964 let offset = decoder.out_of_line_offset(bytes_len)?;
9965 let mut _next_ordinal_to_read = 0;
9967 let mut next_offset = offset;
9968 let end_offset = offset + bytes_len;
9969 _next_ordinal_to_read += 1;
9970 if next_offset >= end_offset {
9971 return Ok(());
9972 }
9973
9974 while _next_ordinal_to_read < 1 {
9976 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
9977 _next_ordinal_to_read += 1;
9978 next_offset += envelope_size;
9979 }
9980
9981 let next_out_of_line = decoder.next_out_of_line();
9982 let handles_before = decoder.remaining_handles();
9983 if let Some((inlined, num_bytes, num_handles)) =
9984 fidl::encoding::decode_envelope_header(decoder, next_offset)?
9985 {
9986 let member_inline_size =
9987 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
9988 if inlined != (member_inline_size <= 4) {
9989 return Err(fidl::Error::InvalidInlineBitInEnvelope);
9990 }
9991 let inner_offset;
9992 let mut inner_depth = depth.clone();
9993 if inlined {
9994 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
9995 inner_offset = next_offset;
9996 } else {
9997 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
9998 inner_depth.increment()?;
9999 }
10000 let val_ref = self.timestamp.get_or_insert_with(|| {
10001 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
10002 });
10003 fidl::decode!(
10004 i64,
10005 fidl::encoding::DefaultFuchsiaResourceDialect,
10006 val_ref,
10007 decoder,
10008 inner_offset,
10009 inner_depth
10010 )?;
10011 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10012 {
10013 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10014 }
10015 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10016 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10017 }
10018 }
10019
10020 next_offset += envelope_size;
10021 _next_ordinal_to_read += 1;
10022 if next_offset >= end_offset {
10023 return Ok(());
10024 }
10025
10026 while _next_ordinal_to_read < 2 {
10028 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10029 _next_ordinal_to_read += 1;
10030 next_offset += envelope_size;
10031 }
10032
10033 let next_out_of_line = decoder.next_out_of_line();
10034 let handles_before = decoder.remaining_handles();
10035 if let Some((inlined, num_bytes, num_handles)) =
10036 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10037 {
10038 let member_inline_size =
10039 <EventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10040 if inlined != (member_inline_size <= 4) {
10041 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10042 }
10043 let inner_offset;
10044 let mut inner_depth = depth.clone();
10045 if inlined {
10046 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10047 inner_offset = next_offset;
10048 } else {
10049 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10050 inner_depth.increment()?;
10051 }
10052 let val_ref = self.details.get_or_insert_with(|| {
10053 fidl::new_empty!(EventDetails, fidl::encoding::DefaultFuchsiaResourceDialect)
10054 });
10055 fidl::decode!(
10056 EventDetails,
10057 fidl::encoding::DefaultFuchsiaResourceDialect,
10058 val_ref,
10059 decoder,
10060 inner_offset,
10061 inner_depth
10062 )?;
10063 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10064 {
10065 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10066 }
10067 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10068 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10069 }
10070 }
10071
10072 next_offset += envelope_size;
10073
10074 while next_offset < end_offset {
10076 _next_ordinal_to_read += 1;
10077 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10078 next_offset += envelope_size;
10079 }
10080
10081 Ok(())
10082 }
10083 }
10084
10085 impl RealmOptions {
10086 #[inline(always)]
10087 fn max_ordinal_present(&self) -> u64 {
10088 if let Some(_) = self.test_collection {
10089 return 3;
10090 }
10091 if let Some(_) = self.offers {
10092 return 2;
10093 }
10094 if let Some(_) = self.realm {
10095 return 1;
10096 }
10097 0
10098 }
10099 }
10100
10101 impl fidl::encoding::ResourceTypeMarker for RealmOptions {
10102 type Borrowed<'a> = &'a mut Self;
10103 fn take_or_borrow<'a>(
10104 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10105 ) -> Self::Borrowed<'a> {
10106 value
10107 }
10108 }
10109
10110 unsafe impl fidl::encoding::TypeMarker for RealmOptions {
10111 type Owned = Self;
10112
10113 #[inline(always)]
10114 fn inline_align(_context: fidl::encoding::Context) -> usize {
10115 8
10116 }
10117
10118 #[inline(always)]
10119 fn inline_size(_context: fidl::encoding::Context) -> usize {
10120 16
10121 }
10122 }
10123
10124 unsafe impl fidl::encoding::Encode<RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect>
10125 for &mut RealmOptions
10126 {
10127 unsafe fn encode(
10128 self,
10129 encoder: &mut fidl::encoding::Encoder<
10130 '_,
10131 fidl::encoding::DefaultFuchsiaResourceDialect,
10132 >,
10133 offset: usize,
10134 mut depth: fidl::encoding::Depth,
10135 ) -> fidl::Result<()> {
10136 encoder.debug_check_bounds::<RealmOptions>(offset);
10137 let max_ordinal: u64 = self.max_ordinal_present();
10139 encoder.write_num(max_ordinal, offset);
10140 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10141 if max_ordinal == 0 {
10143 return Ok(());
10144 }
10145 depth.increment()?;
10146 let envelope_size = 8;
10147 let bytes_len = max_ordinal as usize * envelope_size;
10148 #[allow(unused_variables)]
10149 let offset = encoder.out_of_line_offset(bytes_len);
10150 let mut _prev_end_offset: usize = 0;
10151 if 1 > max_ordinal {
10152 return Ok(());
10153 }
10154
10155 let cur_offset: usize = (1 - 1) * envelope_size;
10158
10159 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10161
10162 fidl::encoding::encode_in_envelope_optional::<
10167 fidl::encoding::Endpoint<
10168 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
10169 >,
10170 fidl::encoding::DefaultFuchsiaResourceDialect,
10171 >(
10172 self.realm.as_mut().map(
10173 <fidl::encoding::Endpoint<
10174 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
10175 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow,
10176 ),
10177 encoder,
10178 offset + cur_offset,
10179 depth,
10180 )?;
10181
10182 _prev_end_offset = cur_offset + envelope_size;
10183 if 2 > max_ordinal {
10184 return Ok(());
10185 }
10186
10187 let cur_offset: usize = (2 - 1) * envelope_size;
10190
10191 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10193
10194 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect>(
10199 self.offers.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024> as fidl::encoding::ValueTypeMarker>::borrow),
10200 encoder, offset + cur_offset, depth
10201 )?;
10202
10203 _prev_end_offset = cur_offset + envelope_size;
10204 if 3 > max_ordinal {
10205 return Ok(());
10206 }
10207
10208 let cur_offset: usize = (3 - 1) * envelope_size;
10211
10212 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10214
10215 fidl::encoding::encode_in_envelope_optional::<
10220 fidl::encoding::BoundedString<255>,
10221 fidl::encoding::DefaultFuchsiaResourceDialect,
10222 >(
10223 self.test_collection.as_ref().map(
10224 <fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow,
10225 ),
10226 encoder,
10227 offset + cur_offset,
10228 depth,
10229 )?;
10230
10231 _prev_end_offset = cur_offset + envelope_size;
10232
10233 Ok(())
10234 }
10235 }
10236
10237 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RealmOptions {
10238 #[inline(always)]
10239 fn new_empty() -> Self {
10240 Self::default()
10241 }
10242
10243 unsafe fn decode(
10244 &mut self,
10245 decoder: &mut fidl::encoding::Decoder<
10246 '_,
10247 fidl::encoding::DefaultFuchsiaResourceDialect,
10248 >,
10249 offset: usize,
10250 mut depth: fidl::encoding::Depth,
10251 ) -> fidl::Result<()> {
10252 decoder.debug_check_bounds::<Self>(offset);
10253 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10254 None => return Err(fidl::Error::NotNullable),
10255 Some(len) => len,
10256 };
10257 if len == 0 {
10259 return Ok(());
10260 };
10261 depth.increment()?;
10262 let envelope_size = 8;
10263 let bytes_len = len * envelope_size;
10264 let offset = decoder.out_of_line_offset(bytes_len)?;
10265 let mut _next_ordinal_to_read = 0;
10267 let mut next_offset = offset;
10268 let end_offset = offset + bytes_len;
10269 _next_ordinal_to_read += 1;
10270 if next_offset >= end_offset {
10271 return Ok(());
10272 }
10273
10274 while _next_ordinal_to_read < 1 {
10276 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10277 _next_ordinal_to_read += 1;
10278 next_offset += envelope_size;
10279 }
10280
10281 let next_out_of_line = decoder.next_out_of_line();
10282 let handles_before = decoder.remaining_handles();
10283 if let Some((inlined, num_bytes, num_handles)) =
10284 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10285 {
10286 let member_inline_size = <fidl::encoding::Endpoint<
10287 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
10288 > as fidl::encoding::TypeMarker>::inline_size(
10289 decoder.context
10290 );
10291 if inlined != (member_inline_size <= 4) {
10292 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10293 }
10294 let inner_offset;
10295 let mut inner_depth = depth.clone();
10296 if inlined {
10297 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10298 inner_offset = next_offset;
10299 } else {
10300 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10301 inner_depth.increment()?;
10302 }
10303 let val_ref = self.realm.get_or_insert_with(|| {
10304 fidl::new_empty!(
10305 fidl::encoding::Endpoint<
10306 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
10307 >,
10308 fidl::encoding::DefaultFuchsiaResourceDialect
10309 )
10310 });
10311 fidl::decode!(
10312 fidl::encoding::Endpoint<
10313 fidl::endpoints::ClientEnd<fidl_fuchsia_component::RealmMarker>,
10314 >,
10315 fidl::encoding::DefaultFuchsiaResourceDialect,
10316 val_ref,
10317 decoder,
10318 inner_offset,
10319 inner_depth
10320 )?;
10321 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10322 {
10323 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10324 }
10325 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10326 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10327 }
10328 }
10329
10330 next_offset += envelope_size;
10331 _next_ordinal_to_read += 1;
10332 if next_offset >= end_offset {
10333 return Ok(());
10334 }
10335
10336 while _next_ordinal_to_read < 2 {
10338 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10339 _next_ordinal_to_read += 1;
10340 next_offset += envelope_size;
10341 }
10342
10343 let next_out_of_line = decoder.next_out_of_line();
10344 let handles_before = decoder.remaining_handles();
10345 if let Some((inlined, num_bytes, num_handles)) =
10346 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10347 {
10348 let member_inline_size = <fidl::encoding::Vector<
10349 fidl_fuchsia_component_decl::Offer,
10350 1024,
10351 > as fidl::encoding::TypeMarker>::inline_size(
10352 decoder.context
10353 );
10354 if inlined != (member_inline_size <= 4) {
10355 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10356 }
10357 let inner_offset;
10358 let mut inner_depth = depth.clone();
10359 if inlined {
10360 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10361 inner_offset = next_offset;
10362 } else {
10363 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10364 inner_depth.increment()?;
10365 }
10366 let val_ref =
10367 self.offers.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect));
10368 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_component_decl::Offer, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
10369 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10370 {
10371 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10372 }
10373 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10374 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10375 }
10376 }
10377
10378 next_offset += envelope_size;
10379 _next_ordinal_to_read += 1;
10380 if next_offset >= end_offset {
10381 return Ok(());
10382 }
10383
10384 while _next_ordinal_to_read < 3 {
10386 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10387 _next_ordinal_to_read += 1;
10388 next_offset += envelope_size;
10389 }
10390
10391 let next_out_of_line = decoder.next_out_of_line();
10392 let handles_before = decoder.remaining_handles();
10393 if let Some((inlined, num_bytes, num_handles)) =
10394 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10395 {
10396 let member_inline_size =
10397 <fidl::encoding::BoundedString<255> as fidl::encoding::TypeMarker>::inline_size(
10398 decoder.context,
10399 );
10400 if inlined != (member_inline_size <= 4) {
10401 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10402 }
10403 let inner_offset;
10404 let mut inner_depth = depth.clone();
10405 if inlined {
10406 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10407 inner_offset = next_offset;
10408 } else {
10409 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10410 inner_depth.increment()?;
10411 }
10412 let val_ref = self.test_collection.get_or_insert_with(|| {
10413 fidl::new_empty!(
10414 fidl::encoding::BoundedString<255>,
10415 fidl::encoding::DefaultFuchsiaResourceDialect
10416 )
10417 });
10418 fidl::decode!(
10419 fidl::encoding::BoundedString<255>,
10420 fidl::encoding::DefaultFuchsiaResourceDialect,
10421 val_ref,
10422 decoder,
10423 inner_offset,
10424 inner_depth
10425 )?;
10426 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10427 {
10428 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10429 }
10430 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10431 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10432 }
10433 }
10434
10435 next_offset += envelope_size;
10436
10437 while next_offset < end_offset {
10439 _next_ordinal_to_read += 1;
10440 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10441 next_offset += envelope_size;
10442 }
10443
10444 Ok(())
10445 }
10446 }
10447
10448 impl RunEvent {
10449 #[inline(always)]
10450 fn max_ordinal_present(&self) -> u64 {
10451 if let Some(_) = self.payload {
10452 return 2;
10453 }
10454 if let Some(_) = self.timestamp {
10455 return 1;
10456 }
10457 0
10458 }
10459 }
10460
10461 impl fidl::encoding::ResourceTypeMarker for RunEvent {
10462 type Borrowed<'a> = &'a mut Self;
10463 fn take_or_borrow<'a>(
10464 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10465 ) -> Self::Borrowed<'a> {
10466 value
10467 }
10468 }
10469
10470 unsafe impl fidl::encoding::TypeMarker for RunEvent {
10471 type Owned = Self;
10472
10473 #[inline(always)]
10474 fn inline_align(_context: fidl::encoding::Context) -> usize {
10475 8
10476 }
10477
10478 #[inline(always)]
10479 fn inline_size(_context: fidl::encoding::Context) -> usize {
10480 16
10481 }
10482 }
10483
10484 unsafe impl fidl::encoding::Encode<RunEvent, fidl::encoding::DefaultFuchsiaResourceDialect>
10485 for &mut RunEvent
10486 {
10487 unsafe fn encode(
10488 self,
10489 encoder: &mut fidl::encoding::Encoder<
10490 '_,
10491 fidl::encoding::DefaultFuchsiaResourceDialect,
10492 >,
10493 offset: usize,
10494 mut depth: fidl::encoding::Depth,
10495 ) -> fidl::Result<()> {
10496 encoder.debug_check_bounds::<RunEvent>(offset);
10497 let max_ordinal: u64 = self.max_ordinal_present();
10499 encoder.write_num(max_ordinal, offset);
10500 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10501 if max_ordinal == 0 {
10503 return Ok(());
10504 }
10505 depth.increment()?;
10506 let envelope_size = 8;
10507 let bytes_len = max_ordinal as usize * envelope_size;
10508 #[allow(unused_variables)]
10509 let offset = encoder.out_of_line_offset(bytes_len);
10510 let mut _prev_end_offset: usize = 0;
10511 if 1 > max_ordinal {
10512 return Ok(());
10513 }
10514
10515 let cur_offset: usize = (1 - 1) * envelope_size;
10518
10519 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10521
10522 fidl::encoding::encode_in_envelope_optional::<
10527 i64,
10528 fidl::encoding::DefaultFuchsiaResourceDialect,
10529 >(
10530 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
10531 encoder,
10532 offset + cur_offset,
10533 depth,
10534 )?;
10535
10536 _prev_end_offset = cur_offset + envelope_size;
10537 if 2 > max_ordinal {
10538 return Ok(());
10539 }
10540
10541 let cur_offset: usize = (2 - 1) * envelope_size;
10544
10545 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10547
10548 fidl::encoding::encode_in_envelope_optional::<
10553 RunEventPayload,
10554 fidl::encoding::DefaultFuchsiaResourceDialect,
10555 >(
10556 self.payload
10557 .as_mut()
10558 .map(<RunEventPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
10559 encoder,
10560 offset + cur_offset,
10561 depth,
10562 )?;
10563
10564 _prev_end_offset = cur_offset + envelope_size;
10565
10566 Ok(())
10567 }
10568 }
10569
10570 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for RunEvent {
10571 #[inline(always)]
10572 fn new_empty() -> Self {
10573 Self::default()
10574 }
10575
10576 unsafe fn decode(
10577 &mut self,
10578 decoder: &mut fidl::encoding::Decoder<
10579 '_,
10580 fidl::encoding::DefaultFuchsiaResourceDialect,
10581 >,
10582 offset: usize,
10583 mut depth: fidl::encoding::Depth,
10584 ) -> fidl::Result<()> {
10585 decoder.debug_check_bounds::<Self>(offset);
10586 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
10587 None => return Err(fidl::Error::NotNullable),
10588 Some(len) => len,
10589 };
10590 if len == 0 {
10592 return Ok(());
10593 };
10594 depth.increment()?;
10595 let envelope_size = 8;
10596 let bytes_len = len * envelope_size;
10597 let offset = decoder.out_of_line_offset(bytes_len)?;
10598 let mut _next_ordinal_to_read = 0;
10600 let mut next_offset = offset;
10601 let end_offset = offset + bytes_len;
10602 _next_ordinal_to_read += 1;
10603 if next_offset >= end_offset {
10604 return Ok(());
10605 }
10606
10607 while _next_ordinal_to_read < 1 {
10609 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10610 _next_ordinal_to_read += 1;
10611 next_offset += envelope_size;
10612 }
10613
10614 let next_out_of_line = decoder.next_out_of_line();
10615 let handles_before = decoder.remaining_handles();
10616 if let Some((inlined, num_bytes, num_handles)) =
10617 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10618 {
10619 let member_inline_size =
10620 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10621 if inlined != (member_inline_size <= 4) {
10622 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10623 }
10624 let inner_offset;
10625 let mut inner_depth = depth.clone();
10626 if inlined {
10627 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10628 inner_offset = next_offset;
10629 } else {
10630 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10631 inner_depth.increment()?;
10632 }
10633 let val_ref = self.timestamp.get_or_insert_with(|| {
10634 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
10635 });
10636 fidl::decode!(
10637 i64,
10638 fidl::encoding::DefaultFuchsiaResourceDialect,
10639 val_ref,
10640 decoder,
10641 inner_offset,
10642 inner_depth
10643 )?;
10644 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10645 {
10646 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10647 }
10648 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10649 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10650 }
10651 }
10652
10653 next_offset += envelope_size;
10654 _next_ordinal_to_read += 1;
10655 if next_offset >= end_offset {
10656 return Ok(());
10657 }
10658
10659 while _next_ordinal_to_read < 2 {
10661 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10662 _next_ordinal_to_read += 1;
10663 next_offset += envelope_size;
10664 }
10665
10666 let next_out_of_line = decoder.next_out_of_line();
10667 let handles_before = decoder.remaining_handles();
10668 if let Some((inlined, num_bytes, num_handles)) =
10669 fidl::encoding::decode_envelope_header(decoder, next_offset)?
10670 {
10671 let member_inline_size =
10672 <RunEventPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context);
10673 if inlined != (member_inline_size <= 4) {
10674 return Err(fidl::Error::InvalidInlineBitInEnvelope);
10675 }
10676 let inner_offset;
10677 let mut inner_depth = depth.clone();
10678 if inlined {
10679 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
10680 inner_offset = next_offset;
10681 } else {
10682 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
10683 inner_depth.increment()?;
10684 }
10685 let val_ref = self.payload.get_or_insert_with(|| {
10686 fidl::new_empty!(RunEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect)
10687 });
10688 fidl::decode!(
10689 RunEventPayload,
10690 fidl::encoding::DefaultFuchsiaResourceDialect,
10691 val_ref,
10692 decoder,
10693 inner_offset,
10694 inner_depth
10695 )?;
10696 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
10697 {
10698 return Err(fidl::Error::InvalidNumBytesInEnvelope);
10699 }
10700 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
10701 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
10702 }
10703 }
10704
10705 next_offset += envelope_size;
10706
10707 while next_offset < end_offset {
10709 _next_ordinal_to_read += 1;
10710 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
10711 next_offset += envelope_size;
10712 }
10713
10714 Ok(())
10715 }
10716 }
10717
10718 impl RunSuiteOptions {
10719 #[inline(always)]
10720 fn max_ordinal_present(&self) -> u64 {
10721 if let Some(_) = self.break_on_failure {
10722 return 11;
10723 }
10724 if let Some(_) = self.no_exception_channel {
10725 return 10;
10726 }
10727 if let Some(_) = self.accumulate_debug_data {
10728 return 9;
10729 }
10730 if let Some(_) = self.log_interest {
10731 return 8;
10732 }
10733 if let Some(_) = self.logs_iterator_type {
10734 return 7;
10735 }
10736 if let Some(_) = self.test_case_filters {
10737 return 6;
10738 }
10739 if let Some(_) = self.timeout {
10740 return 5;
10741 }
10742 if let Some(_) = self.arguments {
10743 return 4;
10744 }
10745 if let Some(_) = self.max_concurrent_test_case_runs {
10746 return 3;
10747 }
10748 if let Some(_) = self.run_disabled_tests {
10749 return 2;
10750 }
10751 if let Some(_) = self.realm_options {
10752 return 1;
10753 }
10754 0
10755 }
10756 }
10757
10758 impl fidl::encoding::ResourceTypeMarker for RunSuiteOptions {
10759 type Borrowed<'a> = &'a mut Self;
10760 fn take_or_borrow<'a>(
10761 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10762 ) -> Self::Borrowed<'a> {
10763 value
10764 }
10765 }
10766
10767 unsafe impl fidl::encoding::TypeMarker for RunSuiteOptions {
10768 type Owned = Self;
10769
10770 #[inline(always)]
10771 fn inline_align(_context: fidl::encoding::Context) -> usize {
10772 8
10773 }
10774
10775 #[inline(always)]
10776 fn inline_size(_context: fidl::encoding::Context) -> usize {
10777 16
10778 }
10779 }
10780
10781 unsafe impl
10782 fidl::encoding::Encode<RunSuiteOptions, fidl::encoding::DefaultFuchsiaResourceDialect>
10783 for &mut RunSuiteOptions
10784 {
10785 unsafe fn encode(
10786 self,
10787 encoder: &mut fidl::encoding::Encoder<
10788 '_,
10789 fidl::encoding::DefaultFuchsiaResourceDialect,
10790 >,
10791 offset: usize,
10792 mut depth: fidl::encoding::Depth,
10793 ) -> fidl::Result<()> {
10794 encoder.debug_check_bounds::<RunSuiteOptions>(offset);
10795 let max_ordinal: u64 = self.max_ordinal_present();
10797 encoder.write_num(max_ordinal, offset);
10798 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
10799 if max_ordinal == 0 {
10801 return Ok(());
10802 }
10803 depth.increment()?;
10804 let envelope_size = 8;
10805 let bytes_len = max_ordinal as usize * envelope_size;
10806 #[allow(unused_variables)]
10807 let offset = encoder.out_of_line_offset(bytes_len);
10808 let mut _prev_end_offset: usize = 0;
10809 if 1 > max_ordinal {
10810 return Ok(());
10811 }
10812
10813 let cur_offset: usize = (1 - 1) * envelope_size;
10816
10817 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10819
10820 fidl::encoding::encode_in_envelope_optional::<
10825 RealmOptions,
10826 fidl::encoding::DefaultFuchsiaResourceDialect,
10827 >(
10828 self.realm_options
10829 .as_mut()
10830 .map(<RealmOptions as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
10831 encoder,
10832 offset + cur_offset,
10833 depth,
10834 )?;
10835
10836 _prev_end_offset = cur_offset + envelope_size;
10837 if 2 > max_ordinal {
10838 return Ok(());
10839 }
10840
10841 let cur_offset: usize = (2 - 1) * envelope_size;
10844
10845 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10847
10848 fidl::encoding::encode_in_envelope_optional::<
10853 bool,
10854 fidl::encoding::DefaultFuchsiaResourceDialect,
10855 >(
10856 self.run_disabled_tests
10857 .as_ref()
10858 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
10859 encoder,
10860 offset + cur_offset,
10861 depth,
10862 )?;
10863
10864 _prev_end_offset = cur_offset + envelope_size;
10865 if 3 > max_ordinal {
10866 return Ok(());
10867 }
10868
10869 let cur_offset: usize = (3 - 1) * envelope_size;
10872
10873 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10875
10876 fidl::encoding::encode_in_envelope_optional::<
10881 u16,
10882 fidl::encoding::DefaultFuchsiaResourceDialect,
10883 >(
10884 self.max_concurrent_test_case_runs
10885 .as_ref()
10886 .map(<u16 as fidl::encoding::ValueTypeMarker>::borrow),
10887 encoder,
10888 offset + cur_offset,
10889 depth,
10890 )?;
10891
10892 _prev_end_offset = cur_offset + envelope_size;
10893 if 4 > max_ordinal {
10894 return Ok(());
10895 }
10896
10897 let cur_offset: usize = (4 - 1) * envelope_size;
10900
10901 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10903
10904 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>, fidl::encoding::DefaultFuchsiaResourceDialect>(
10909 self.arguments.as_ref().map(<fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095> as fidl::encoding::ValueTypeMarker>::borrow),
10910 encoder, offset + cur_offset, depth
10911 )?;
10912
10913 _prev_end_offset = cur_offset + envelope_size;
10914 if 5 > max_ordinal {
10915 return Ok(());
10916 }
10917
10918 let cur_offset: usize = (5 - 1) * envelope_size;
10921
10922 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10924
10925 fidl::encoding::encode_in_envelope_optional::<
10930 i64,
10931 fidl::encoding::DefaultFuchsiaResourceDialect,
10932 >(
10933 self.timeout.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
10934 encoder,
10935 offset + cur_offset,
10936 depth,
10937 )?;
10938
10939 _prev_end_offset = cur_offset + envelope_size;
10940 if 6 > max_ordinal {
10941 return Ok(());
10942 }
10943
10944 let cur_offset: usize = (6 - 1) * envelope_size;
10947
10948 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10950
10951 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>, fidl::encoding::DefaultFuchsiaResourceDialect>(
10956 self.test_case_filters.as_ref().map(<fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024> as fidl::encoding::ValueTypeMarker>::borrow),
10957 encoder, offset + cur_offset, depth
10958 )?;
10959
10960 _prev_end_offset = cur_offset + envelope_size;
10961 if 7 > max_ordinal {
10962 return Ok(());
10963 }
10964
10965 let cur_offset: usize = (7 - 1) * envelope_size;
10968
10969 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10971
10972 fidl::encoding::encode_in_envelope_optional::<
10977 LogsIteratorType,
10978 fidl::encoding::DefaultFuchsiaResourceDialect,
10979 >(
10980 self.logs_iterator_type
10981 .as_ref()
10982 .map(<LogsIteratorType as fidl::encoding::ValueTypeMarker>::borrow),
10983 encoder,
10984 offset + cur_offset,
10985 depth,
10986 )?;
10987
10988 _prev_end_offset = cur_offset + envelope_size;
10989 if 8 > max_ordinal {
10990 return Ok(());
10991 }
10992
10993 let cur_offset: usize = (8 - 1) * envelope_size;
10996
10997 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
10999
11000 fidl::encoding::encode_in_envelope_optional::<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect>(
11005 self.log_interest.as_ref().map(<fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64> as fidl::encoding::ValueTypeMarker>::borrow),
11006 encoder, offset + cur_offset, depth
11007 )?;
11008
11009 _prev_end_offset = cur_offset + envelope_size;
11010 if 9 > max_ordinal {
11011 return Ok(());
11012 }
11013
11014 let cur_offset: usize = (9 - 1) * envelope_size;
11017
11018 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11020
11021 fidl::encoding::encode_in_envelope_optional::<
11026 bool,
11027 fidl::encoding::DefaultFuchsiaResourceDialect,
11028 >(
11029 self.accumulate_debug_data
11030 .as_ref()
11031 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
11032 encoder,
11033 offset + cur_offset,
11034 depth,
11035 )?;
11036
11037 _prev_end_offset = cur_offset + envelope_size;
11038 if 10 > max_ordinal {
11039 return Ok(());
11040 }
11041
11042 let cur_offset: usize = (10 - 1) * envelope_size;
11045
11046 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11048
11049 fidl::encoding::encode_in_envelope_optional::<
11054 bool,
11055 fidl::encoding::DefaultFuchsiaResourceDialect,
11056 >(
11057 self.no_exception_channel
11058 .as_ref()
11059 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
11060 encoder,
11061 offset + cur_offset,
11062 depth,
11063 )?;
11064
11065 _prev_end_offset = cur_offset + envelope_size;
11066 if 11 > max_ordinal {
11067 return Ok(());
11068 }
11069
11070 let cur_offset: usize = (11 - 1) * envelope_size;
11073
11074 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11076
11077 fidl::encoding::encode_in_envelope_optional::<
11082 bool,
11083 fidl::encoding::DefaultFuchsiaResourceDialect,
11084 >(
11085 self.break_on_failure
11086 .as_ref()
11087 .map(<bool as fidl::encoding::ValueTypeMarker>::borrow),
11088 encoder,
11089 offset + cur_offset,
11090 depth,
11091 )?;
11092
11093 _prev_end_offset = cur_offset + envelope_size;
11094
11095 Ok(())
11096 }
11097 }
11098
11099 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11100 for RunSuiteOptions
11101 {
11102 #[inline(always)]
11103 fn new_empty() -> Self {
11104 Self::default()
11105 }
11106
11107 unsafe fn decode(
11108 &mut self,
11109 decoder: &mut fidl::encoding::Decoder<
11110 '_,
11111 fidl::encoding::DefaultFuchsiaResourceDialect,
11112 >,
11113 offset: usize,
11114 mut depth: fidl::encoding::Depth,
11115 ) -> fidl::Result<()> {
11116 decoder.debug_check_bounds::<Self>(offset);
11117 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11118 None => return Err(fidl::Error::NotNullable),
11119 Some(len) => len,
11120 };
11121 if len == 0 {
11123 return Ok(());
11124 };
11125 depth.increment()?;
11126 let envelope_size = 8;
11127 let bytes_len = len * envelope_size;
11128 let offset = decoder.out_of_line_offset(bytes_len)?;
11129 let mut _next_ordinal_to_read = 0;
11131 let mut next_offset = offset;
11132 let end_offset = offset + bytes_len;
11133 _next_ordinal_to_read += 1;
11134 if next_offset >= end_offset {
11135 return Ok(());
11136 }
11137
11138 while _next_ordinal_to_read < 1 {
11140 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11141 _next_ordinal_to_read += 1;
11142 next_offset += envelope_size;
11143 }
11144
11145 let next_out_of_line = decoder.next_out_of_line();
11146 let handles_before = decoder.remaining_handles();
11147 if let Some((inlined, num_bytes, num_handles)) =
11148 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11149 {
11150 let member_inline_size =
11151 <RealmOptions as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11152 if inlined != (member_inline_size <= 4) {
11153 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11154 }
11155 let inner_offset;
11156 let mut inner_depth = depth.clone();
11157 if inlined {
11158 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11159 inner_offset = next_offset;
11160 } else {
11161 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11162 inner_depth.increment()?;
11163 }
11164 let val_ref = self.realm_options.get_or_insert_with(|| {
11165 fidl::new_empty!(RealmOptions, fidl::encoding::DefaultFuchsiaResourceDialect)
11166 });
11167 fidl::decode!(
11168 RealmOptions,
11169 fidl::encoding::DefaultFuchsiaResourceDialect,
11170 val_ref,
11171 decoder,
11172 inner_offset,
11173 inner_depth
11174 )?;
11175 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11176 {
11177 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11178 }
11179 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11180 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11181 }
11182 }
11183
11184 next_offset += envelope_size;
11185 _next_ordinal_to_read += 1;
11186 if next_offset >= end_offset {
11187 return Ok(());
11188 }
11189
11190 while _next_ordinal_to_read < 2 {
11192 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11193 _next_ordinal_to_read += 1;
11194 next_offset += envelope_size;
11195 }
11196
11197 let next_out_of_line = decoder.next_out_of_line();
11198 let handles_before = decoder.remaining_handles();
11199 if let Some((inlined, num_bytes, num_handles)) =
11200 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11201 {
11202 let member_inline_size =
11203 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11204 if inlined != (member_inline_size <= 4) {
11205 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11206 }
11207 let inner_offset;
11208 let mut inner_depth = depth.clone();
11209 if inlined {
11210 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11211 inner_offset = next_offset;
11212 } else {
11213 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11214 inner_depth.increment()?;
11215 }
11216 let val_ref = self.run_disabled_tests.get_or_insert_with(|| {
11217 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
11218 });
11219 fidl::decode!(
11220 bool,
11221 fidl::encoding::DefaultFuchsiaResourceDialect,
11222 val_ref,
11223 decoder,
11224 inner_offset,
11225 inner_depth
11226 )?;
11227 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11228 {
11229 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11230 }
11231 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11232 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11233 }
11234 }
11235
11236 next_offset += envelope_size;
11237 _next_ordinal_to_read += 1;
11238 if next_offset >= end_offset {
11239 return Ok(());
11240 }
11241
11242 while _next_ordinal_to_read < 3 {
11244 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11245 _next_ordinal_to_read += 1;
11246 next_offset += envelope_size;
11247 }
11248
11249 let next_out_of_line = decoder.next_out_of_line();
11250 let handles_before = decoder.remaining_handles();
11251 if let Some((inlined, num_bytes, num_handles)) =
11252 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11253 {
11254 let member_inline_size =
11255 <u16 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11256 if inlined != (member_inline_size <= 4) {
11257 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11258 }
11259 let inner_offset;
11260 let mut inner_depth = depth.clone();
11261 if inlined {
11262 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11263 inner_offset = next_offset;
11264 } else {
11265 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11266 inner_depth.increment()?;
11267 }
11268 let val_ref = self.max_concurrent_test_case_runs.get_or_insert_with(|| {
11269 fidl::new_empty!(u16, fidl::encoding::DefaultFuchsiaResourceDialect)
11270 });
11271 fidl::decode!(
11272 u16,
11273 fidl::encoding::DefaultFuchsiaResourceDialect,
11274 val_ref,
11275 decoder,
11276 inner_offset,
11277 inner_depth
11278 )?;
11279 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11280 {
11281 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11282 }
11283 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11284 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11285 }
11286 }
11287
11288 next_offset += envelope_size;
11289 _next_ordinal_to_read += 1;
11290 if next_offset >= end_offset {
11291 return Ok(());
11292 }
11293
11294 while _next_ordinal_to_read < 4 {
11296 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11297 _next_ordinal_to_read += 1;
11298 next_offset += envelope_size;
11299 }
11300
11301 let next_out_of_line = decoder.next_out_of_line();
11302 let handles_before = decoder.remaining_handles();
11303 if let Some((inlined, num_bytes, num_handles)) =
11304 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11305 {
11306 let member_inline_size = <fidl::encoding::Vector<
11307 fidl::encoding::BoundedString<1024>,
11308 4095,
11309 > as fidl::encoding::TypeMarker>::inline_size(
11310 decoder.context
11311 );
11312 if inlined != (member_inline_size <= 4) {
11313 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11314 }
11315 let inner_offset;
11316 let mut inner_depth = depth.clone();
11317 if inlined {
11318 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11319 inner_offset = next_offset;
11320 } else {
11321 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11322 inner_depth.increment()?;
11323 }
11324 let val_ref = self.arguments.get_or_insert_with(|| {
11325 fidl::new_empty!(
11326 fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>,
11327 fidl::encoding::DefaultFuchsiaResourceDialect
11328 )
11329 });
11330 fidl::decode!(
11331 fidl::encoding::Vector<fidl::encoding::BoundedString<1024>, 4095>,
11332 fidl::encoding::DefaultFuchsiaResourceDialect,
11333 val_ref,
11334 decoder,
11335 inner_offset,
11336 inner_depth
11337 )?;
11338 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11339 {
11340 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11341 }
11342 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11343 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11344 }
11345 }
11346
11347 next_offset += envelope_size;
11348 _next_ordinal_to_read += 1;
11349 if next_offset >= end_offset {
11350 return Ok(());
11351 }
11352
11353 while _next_ordinal_to_read < 5 {
11355 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11356 _next_ordinal_to_read += 1;
11357 next_offset += envelope_size;
11358 }
11359
11360 let next_out_of_line = decoder.next_out_of_line();
11361 let handles_before = decoder.remaining_handles();
11362 if let Some((inlined, num_bytes, num_handles)) =
11363 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11364 {
11365 let member_inline_size =
11366 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11367 if inlined != (member_inline_size <= 4) {
11368 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11369 }
11370 let inner_offset;
11371 let mut inner_depth = depth.clone();
11372 if inlined {
11373 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11374 inner_offset = next_offset;
11375 } else {
11376 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11377 inner_depth.increment()?;
11378 }
11379 let val_ref = self.timeout.get_or_insert_with(|| {
11380 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
11381 });
11382 fidl::decode!(
11383 i64,
11384 fidl::encoding::DefaultFuchsiaResourceDialect,
11385 val_ref,
11386 decoder,
11387 inner_offset,
11388 inner_depth
11389 )?;
11390 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11391 {
11392 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11393 }
11394 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11395 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11396 }
11397 }
11398
11399 next_offset += envelope_size;
11400 _next_ordinal_to_read += 1;
11401 if next_offset >= end_offset {
11402 return Ok(());
11403 }
11404
11405 while _next_ordinal_to_read < 6 {
11407 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11408 _next_ordinal_to_read += 1;
11409 next_offset += envelope_size;
11410 }
11411
11412 let next_out_of_line = decoder.next_out_of_line();
11413 let handles_before = decoder.remaining_handles();
11414 if let Some((inlined, num_bytes, num_handles)) =
11415 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11416 {
11417 let member_inline_size = <fidl::encoding::Vector<
11418 fidl::encoding::BoundedString<4096>,
11419 1024,
11420 > as fidl::encoding::TypeMarker>::inline_size(
11421 decoder.context
11422 );
11423 if inlined != (member_inline_size <= 4) {
11424 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11425 }
11426 let inner_offset;
11427 let mut inner_depth = depth.clone();
11428 if inlined {
11429 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11430 inner_offset = next_offset;
11431 } else {
11432 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11433 inner_depth.increment()?;
11434 }
11435 let val_ref = self.test_case_filters.get_or_insert_with(|| {
11436 fidl::new_empty!(
11437 fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>,
11438 fidl::encoding::DefaultFuchsiaResourceDialect
11439 )
11440 });
11441 fidl::decode!(
11442 fidl::encoding::Vector<fidl::encoding::BoundedString<4096>, 1024>,
11443 fidl::encoding::DefaultFuchsiaResourceDialect,
11444 val_ref,
11445 decoder,
11446 inner_offset,
11447 inner_depth
11448 )?;
11449 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11450 {
11451 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11452 }
11453 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11454 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11455 }
11456 }
11457
11458 next_offset += envelope_size;
11459 _next_ordinal_to_read += 1;
11460 if next_offset >= end_offset {
11461 return Ok(());
11462 }
11463
11464 while _next_ordinal_to_read < 7 {
11466 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11467 _next_ordinal_to_read += 1;
11468 next_offset += envelope_size;
11469 }
11470
11471 let next_out_of_line = decoder.next_out_of_line();
11472 let handles_before = decoder.remaining_handles();
11473 if let Some((inlined, num_bytes, num_handles)) =
11474 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11475 {
11476 let member_inline_size =
11477 <LogsIteratorType as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11478 if inlined != (member_inline_size <= 4) {
11479 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11480 }
11481 let inner_offset;
11482 let mut inner_depth = depth.clone();
11483 if inlined {
11484 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11485 inner_offset = next_offset;
11486 } else {
11487 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11488 inner_depth.increment()?;
11489 }
11490 let val_ref = self.logs_iterator_type.get_or_insert_with(|| {
11491 fidl::new_empty!(
11492 LogsIteratorType,
11493 fidl::encoding::DefaultFuchsiaResourceDialect
11494 )
11495 });
11496 fidl::decode!(
11497 LogsIteratorType,
11498 fidl::encoding::DefaultFuchsiaResourceDialect,
11499 val_ref,
11500 decoder,
11501 inner_offset,
11502 inner_depth
11503 )?;
11504 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11505 {
11506 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11507 }
11508 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11509 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11510 }
11511 }
11512
11513 next_offset += envelope_size;
11514 _next_ordinal_to_read += 1;
11515 if next_offset >= end_offset {
11516 return Ok(());
11517 }
11518
11519 while _next_ordinal_to_read < 8 {
11521 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11522 _next_ordinal_to_read += 1;
11523 next_offset += envelope_size;
11524 }
11525
11526 let next_out_of_line = decoder.next_out_of_line();
11527 let handles_before = decoder.remaining_handles();
11528 if let Some((inlined, num_bytes, num_handles)) =
11529 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11530 {
11531 let member_inline_size = <fidl::encoding::Vector<
11532 fidl_fuchsia_diagnostics::LogInterestSelector,
11533 64,
11534 > as fidl::encoding::TypeMarker>::inline_size(
11535 decoder.context
11536 );
11537 if inlined != (member_inline_size <= 4) {
11538 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11539 }
11540 let inner_offset;
11541 let mut inner_depth = depth.clone();
11542 if inlined {
11543 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11544 inner_offset = next_offset;
11545 } else {
11546 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11547 inner_depth.increment()?;
11548 }
11549 let val_ref =
11550 self.log_interest.get_or_insert_with(|| fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect));
11551 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_diagnostics::LogInterestSelector, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, val_ref, decoder, inner_offset, inner_depth)?;
11552 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11553 {
11554 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11555 }
11556 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11557 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11558 }
11559 }
11560
11561 next_offset += envelope_size;
11562 _next_ordinal_to_read += 1;
11563 if next_offset >= end_offset {
11564 return Ok(());
11565 }
11566
11567 while _next_ordinal_to_read < 9 {
11569 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11570 _next_ordinal_to_read += 1;
11571 next_offset += envelope_size;
11572 }
11573
11574 let next_out_of_line = decoder.next_out_of_line();
11575 let handles_before = decoder.remaining_handles();
11576 if let Some((inlined, num_bytes, num_handles)) =
11577 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11578 {
11579 let member_inline_size =
11580 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11581 if inlined != (member_inline_size <= 4) {
11582 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11583 }
11584 let inner_offset;
11585 let mut inner_depth = depth.clone();
11586 if inlined {
11587 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11588 inner_offset = next_offset;
11589 } else {
11590 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11591 inner_depth.increment()?;
11592 }
11593 let val_ref = self.accumulate_debug_data.get_or_insert_with(|| {
11594 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
11595 });
11596 fidl::decode!(
11597 bool,
11598 fidl::encoding::DefaultFuchsiaResourceDialect,
11599 val_ref,
11600 decoder,
11601 inner_offset,
11602 inner_depth
11603 )?;
11604 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11605 {
11606 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11607 }
11608 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11609 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11610 }
11611 }
11612
11613 next_offset += envelope_size;
11614 _next_ordinal_to_read += 1;
11615 if next_offset >= end_offset {
11616 return Ok(());
11617 }
11618
11619 while _next_ordinal_to_read < 10 {
11621 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11622 _next_ordinal_to_read += 1;
11623 next_offset += envelope_size;
11624 }
11625
11626 let next_out_of_line = decoder.next_out_of_line();
11627 let handles_before = decoder.remaining_handles();
11628 if let Some((inlined, num_bytes, num_handles)) =
11629 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11630 {
11631 let member_inline_size =
11632 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11633 if inlined != (member_inline_size <= 4) {
11634 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11635 }
11636 let inner_offset;
11637 let mut inner_depth = depth.clone();
11638 if inlined {
11639 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11640 inner_offset = next_offset;
11641 } else {
11642 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11643 inner_depth.increment()?;
11644 }
11645 let val_ref = self.no_exception_channel.get_or_insert_with(|| {
11646 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
11647 });
11648 fidl::decode!(
11649 bool,
11650 fidl::encoding::DefaultFuchsiaResourceDialect,
11651 val_ref,
11652 decoder,
11653 inner_offset,
11654 inner_depth
11655 )?;
11656 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11657 {
11658 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11659 }
11660 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11661 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11662 }
11663 }
11664
11665 next_offset += envelope_size;
11666 _next_ordinal_to_read += 1;
11667 if next_offset >= end_offset {
11668 return Ok(());
11669 }
11670
11671 while _next_ordinal_to_read < 11 {
11673 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11674 _next_ordinal_to_read += 1;
11675 next_offset += envelope_size;
11676 }
11677
11678 let next_out_of_line = decoder.next_out_of_line();
11679 let handles_before = decoder.remaining_handles();
11680 if let Some((inlined, num_bytes, num_handles)) =
11681 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11682 {
11683 let member_inline_size =
11684 <bool as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11685 if inlined != (member_inline_size <= 4) {
11686 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11687 }
11688 let inner_offset;
11689 let mut inner_depth = depth.clone();
11690 if inlined {
11691 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11692 inner_offset = next_offset;
11693 } else {
11694 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11695 inner_depth.increment()?;
11696 }
11697 let val_ref = self.break_on_failure.get_or_insert_with(|| {
11698 fidl::new_empty!(bool, fidl::encoding::DefaultFuchsiaResourceDialect)
11699 });
11700 fidl::decode!(
11701 bool,
11702 fidl::encoding::DefaultFuchsiaResourceDialect,
11703 val_ref,
11704 decoder,
11705 inner_offset,
11706 inner_depth
11707 )?;
11708 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11709 {
11710 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11711 }
11712 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11713 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11714 }
11715 }
11716
11717 next_offset += envelope_size;
11718
11719 while next_offset < end_offset {
11721 _next_ordinal_to_read += 1;
11722 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11723 next_offset += envelope_size;
11724 }
11725
11726 Ok(())
11727 }
11728 }
11729
11730 impl SuiteArtifactGeneratedEventDetails {
11731 #[inline(always)]
11732 fn max_ordinal_present(&self) -> u64 {
11733 if let Some(_) = self.artifact {
11734 return 1;
11735 }
11736 0
11737 }
11738 }
11739
11740 impl fidl::encoding::ResourceTypeMarker for SuiteArtifactGeneratedEventDetails {
11741 type Borrowed<'a> = &'a mut Self;
11742 fn take_or_borrow<'a>(
11743 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11744 ) -> Self::Borrowed<'a> {
11745 value
11746 }
11747 }
11748
11749 unsafe impl fidl::encoding::TypeMarker for SuiteArtifactGeneratedEventDetails {
11750 type Owned = Self;
11751
11752 #[inline(always)]
11753 fn inline_align(_context: fidl::encoding::Context) -> usize {
11754 8
11755 }
11756
11757 #[inline(always)]
11758 fn inline_size(_context: fidl::encoding::Context) -> usize {
11759 16
11760 }
11761 }
11762
11763 unsafe impl
11764 fidl::encoding::Encode<
11765 SuiteArtifactGeneratedEventDetails,
11766 fidl::encoding::DefaultFuchsiaResourceDialect,
11767 > for &mut SuiteArtifactGeneratedEventDetails
11768 {
11769 unsafe fn encode(
11770 self,
11771 encoder: &mut fidl::encoding::Encoder<
11772 '_,
11773 fidl::encoding::DefaultFuchsiaResourceDialect,
11774 >,
11775 offset: usize,
11776 mut depth: fidl::encoding::Depth,
11777 ) -> fidl::Result<()> {
11778 encoder.debug_check_bounds::<SuiteArtifactGeneratedEventDetails>(offset);
11779 let max_ordinal: u64 = self.max_ordinal_present();
11781 encoder.write_num(max_ordinal, offset);
11782 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11783 if max_ordinal == 0 {
11785 return Ok(());
11786 }
11787 depth.increment()?;
11788 let envelope_size = 8;
11789 let bytes_len = max_ordinal as usize * envelope_size;
11790 #[allow(unused_variables)]
11791 let offset = encoder.out_of_line_offset(bytes_len);
11792 let mut _prev_end_offset: usize = 0;
11793 if 1 > max_ordinal {
11794 return Ok(());
11795 }
11796
11797 let cur_offset: usize = (1 - 1) * envelope_size;
11800
11801 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11803
11804 fidl::encoding::encode_in_envelope_optional::<
11809 Artifact,
11810 fidl::encoding::DefaultFuchsiaResourceDialect,
11811 >(
11812 self.artifact
11813 .as_mut()
11814 .map(<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11815 encoder,
11816 offset + cur_offset,
11817 depth,
11818 )?;
11819
11820 _prev_end_offset = cur_offset + envelope_size;
11821
11822 Ok(())
11823 }
11824 }
11825
11826 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11827 for SuiteArtifactGeneratedEventDetails
11828 {
11829 #[inline(always)]
11830 fn new_empty() -> Self {
11831 Self::default()
11832 }
11833
11834 unsafe fn decode(
11835 &mut self,
11836 decoder: &mut fidl::encoding::Decoder<
11837 '_,
11838 fidl::encoding::DefaultFuchsiaResourceDialect,
11839 >,
11840 offset: usize,
11841 mut depth: fidl::encoding::Depth,
11842 ) -> fidl::Result<()> {
11843 decoder.debug_check_bounds::<Self>(offset);
11844 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11845 None => return Err(fidl::Error::NotNullable),
11846 Some(len) => len,
11847 };
11848 if len == 0 {
11850 return Ok(());
11851 };
11852 depth.increment()?;
11853 let envelope_size = 8;
11854 let bytes_len = len * envelope_size;
11855 let offset = decoder.out_of_line_offset(bytes_len)?;
11856 let mut _next_ordinal_to_read = 0;
11858 let mut next_offset = offset;
11859 let end_offset = offset + bytes_len;
11860 _next_ordinal_to_read += 1;
11861 if next_offset >= end_offset {
11862 return Ok(());
11863 }
11864
11865 while _next_ordinal_to_read < 1 {
11867 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11868 _next_ordinal_to_read += 1;
11869 next_offset += envelope_size;
11870 }
11871
11872 let next_out_of_line = decoder.next_out_of_line();
11873 let handles_before = decoder.remaining_handles();
11874 if let Some((inlined, num_bytes, num_handles)) =
11875 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11876 {
11877 let member_inline_size =
11878 <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11879 if inlined != (member_inline_size <= 4) {
11880 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11881 }
11882 let inner_offset;
11883 let mut inner_depth = depth.clone();
11884 if inlined {
11885 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11886 inner_offset = next_offset;
11887 } else {
11888 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11889 inner_depth.increment()?;
11890 }
11891 let val_ref = self.artifact.get_or_insert_with(|| {
11892 fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect)
11893 });
11894 fidl::decode!(
11895 Artifact,
11896 fidl::encoding::DefaultFuchsiaResourceDialect,
11897 val_ref,
11898 decoder,
11899 inner_offset,
11900 inner_depth
11901 )?;
11902 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11903 {
11904 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11905 }
11906 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11907 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11908 }
11909 }
11910
11911 next_offset += envelope_size;
11912
11913 while next_offset < end_offset {
11915 _next_ordinal_to_read += 1;
11916 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11917 next_offset += envelope_size;
11918 }
11919
11920 Ok(())
11921 }
11922 }
11923
11924 impl SuiteEvent {
11925 #[inline(always)]
11926 fn max_ordinal_present(&self) -> u64 {
11927 if let Some(_) = self.payload {
11928 return 2;
11929 }
11930 if let Some(_) = self.timestamp {
11931 return 1;
11932 }
11933 0
11934 }
11935 }
11936
11937 impl fidl::encoding::ResourceTypeMarker for SuiteEvent {
11938 type Borrowed<'a> = &'a mut Self;
11939 fn take_or_borrow<'a>(
11940 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11941 ) -> Self::Borrowed<'a> {
11942 value
11943 }
11944 }
11945
11946 unsafe impl fidl::encoding::TypeMarker for SuiteEvent {
11947 type Owned = Self;
11948
11949 #[inline(always)]
11950 fn inline_align(_context: fidl::encoding::Context) -> usize {
11951 8
11952 }
11953
11954 #[inline(always)]
11955 fn inline_size(_context: fidl::encoding::Context) -> usize {
11956 16
11957 }
11958 }
11959
11960 unsafe impl fidl::encoding::Encode<SuiteEvent, fidl::encoding::DefaultFuchsiaResourceDialect>
11961 for &mut SuiteEvent
11962 {
11963 unsafe fn encode(
11964 self,
11965 encoder: &mut fidl::encoding::Encoder<
11966 '_,
11967 fidl::encoding::DefaultFuchsiaResourceDialect,
11968 >,
11969 offset: usize,
11970 mut depth: fidl::encoding::Depth,
11971 ) -> fidl::Result<()> {
11972 encoder.debug_check_bounds::<SuiteEvent>(offset);
11973 let max_ordinal: u64 = self.max_ordinal_present();
11975 encoder.write_num(max_ordinal, offset);
11976 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11977 if max_ordinal == 0 {
11979 return Ok(());
11980 }
11981 depth.increment()?;
11982 let envelope_size = 8;
11983 let bytes_len = max_ordinal as usize * envelope_size;
11984 #[allow(unused_variables)]
11985 let offset = encoder.out_of_line_offset(bytes_len);
11986 let mut _prev_end_offset: usize = 0;
11987 if 1 > max_ordinal {
11988 return Ok(());
11989 }
11990
11991 let cur_offset: usize = (1 - 1) * envelope_size;
11994
11995 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11997
11998 fidl::encoding::encode_in_envelope_optional::<
12003 i64,
12004 fidl::encoding::DefaultFuchsiaResourceDialect,
12005 >(
12006 self.timestamp.as_ref().map(<i64 as fidl::encoding::ValueTypeMarker>::borrow),
12007 encoder,
12008 offset + cur_offset,
12009 depth,
12010 )?;
12011
12012 _prev_end_offset = cur_offset + envelope_size;
12013 if 2 > max_ordinal {
12014 return Ok(());
12015 }
12016
12017 let cur_offset: usize = (2 - 1) * envelope_size;
12020
12021 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12023
12024 fidl::encoding::encode_in_envelope_optional::<
12029 SuiteEventPayload,
12030 fidl::encoding::DefaultFuchsiaResourceDialect,
12031 >(
12032 self.payload
12033 .as_mut()
12034 .map(<SuiteEventPayload as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12035 encoder,
12036 offset + cur_offset,
12037 depth,
12038 )?;
12039
12040 _prev_end_offset = cur_offset + envelope_size;
12041
12042 Ok(())
12043 }
12044 }
12045
12046 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for SuiteEvent {
12047 #[inline(always)]
12048 fn new_empty() -> Self {
12049 Self::default()
12050 }
12051
12052 unsafe fn decode(
12053 &mut self,
12054 decoder: &mut fidl::encoding::Decoder<
12055 '_,
12056 fidl::encoding::DefaultFuchsiaResourceDialect,
12057 >,
12058 offset: usize,
12059 mut depth: fidl::encoding::Depth,
12060 ) -> fidl::Result<()> {
12061 decoder.debug_check_bounds::<Self>(offset);
12062 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12063 None => return Err(fidl::Error::NotNullable),
12064 Some(len) => len,
12065 };
12066 if len == 0 {
12068 return Ok(());
12069 };
12070 depth.increment()?;
12071 let envelope_size = 8;
12072 let bytes_len = len * envelope_size;
12073 let offset = decoder.out_of_line_offset(bytes_len)?;
12074 let mut _next_ordinal_to_read = 0;
12076 let mut next_offset = offset;
12077 let end_offset = offset + bytes_len;
12078 _next_ordinal_to_read += 1;
12079 if next_offset >= end_offset {
12080 return Ok(());
12081 }
12082
12083 while _next_ordinal_to_read < 1 {
12085 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12086 _next_ordinal_to_read += 1;
12087 next_offset += envelope_size;
12088 }
12089
12090 let next_out_of_line = decoder.next_out_of_line();
12091 let handles_before = decoder.remaining_handles();
12092 if let Some((inlined, num_bytes, num_handles)) =
12093 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12094 {
12095 let member_inline_size =
12096 <i64 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12097 if inlined != (member_inline_size <= 4) {
12098 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12099 }
12100 let inner_offset;
12101 let mut inner_depth = depth.clone();
12102 if inlined {
12103 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12104 inner_offset = next_offset;
12105 } else {
12106 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12107 inner_depth.increment()?;
12108 }
12109 let val_ref = self.timestamp.get_or_insert_with(|| {
12110 fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect)
12111 });
12112 fidl::decode!(
12113 i64,
12114 fidl::encoding::DefaultFuchsiaResourceDialect,
12115 val_ref,
12116 decoder,
12117 inner_offset,
12118 inner_depth
12119 )?;
12120 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12121 {
12122 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12123 }
12124 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12125 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12126 }
12127 }
12128
12129 next_offset += envelope_size;
12130 _next_ordinal_to_read += 1;
12131 if next_offset >= end_offset {
12132 return Ok(());
12133 }
12134
12135 while _next_ordinal_to_read < 2 {
12137 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12138 _next_ordinal_to_read += 1;
12139 next_offset += envelope_size;
12140 }
12141
12142 let next_out_of_line = decoder.next_out_of_line();
12143 let handles_before = decoder.remaining_handles();
12144 if let Some((inlined, num_bytes, num_handles)) =
12145 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12146 {
12147 let member_inline_size =
12148 <SuiteEventPayload as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12149 if inlined != (member_inline_size <= 4) {
12150 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12151 }
12152 let inner_offset;
12153 let mut inner_depth = depth.clone();
12154 if inlined {
12155 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12156 inner_offset = next_offset;
12157 } else {
12158 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12159 inner_depth.increment()?;
12160 }
12161 let val_ref = self.payload.get_or_insert_with(|| {
12162 fidl::new_empty!(
12163 SuiteEventPayload,
12164 fidl::encoding::DefaultFuchsiaResourceDialect
12165 )
12166 });
12167 fidl::decode!(
12168 SuiteEventPayload,
12169 fidl::encoding::DefaultFuchsiaResourceDialect,
12170 val_ref,
12171 decoder,
12172 inner_offset,
12173 inner_depth
12174 )?;
12175 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12176 {
12177 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12178 }
12179 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12180 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12181 }
12182 }
12183
12184 next_offset += envelope_size;
12185
12186 while next_offset < end_offset {
12188 _next_ordinal_to_read += 1;
12189 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12190 next_offset += envelope_size;
12191 }
12192
12193 Ok(())
12194 }
12195 }
12196
12197 impl TestCaseArtifactGeneratedEventDetails {
12198 #[inline(always)]
12199 fn max_ordinal_present(&self) -> u64 {
12200 if let Some(_) = self.artifact {
12201 return 2;
12202 }
12203 if let Some(_) = self.test_case_id {
12204 return 1;
12205 }
12206 0
12207 }
12208 }
12209
12210 impl fidl::encoding::ResourceTypeMarker for TestCaseArtifactGeneratedEventDetails {
12211 type Borrowed<'a> = &'a mut Self;
12212 fn take_or_borrow<'a>(
12213 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12214 ) -> Self::Borrowed<'a> {
12215 value
12216 }
12217 }
12218
12219 unsafe impl fidl::encoding::TypeMarker for TestCaseArtifactGeneratedEventDetails {
12220 type Owned = Self;
12221
12222 #[inline(always)]
12223 fn inline_align(_context: fidl::encoding::Context) -> usize {
12224 8
12225 }
12226
12227 #[inline(always)]
12228 fn inline_size(_context: fidl::encoding::Context) -> usize {
12229 16
12230 }
12231 }
12232
12233 unsafe impl
12234 fidl::encoding::Encode<
12235 TestCaseArtifactGeneratedEventDetails,
12236 fidl::encoding::DefaultFuchsiaResourceDialect,
12237 > for &mut TestCaseArtifactGeneratedEventDetails
12238 {
12239 unsafe fn encode(
12240 self,
12241 encoder: &mut fidl::encoding::Encoder<
12242 '_,
12243 fidl::encoding::DefaultFuchsiaResourceDialect,
12244 >,
12245 offset: usize,
12246 mut depth: fidl::encoding::Depth,
12247 ) -> fidl::Result<()> {
12248 encoder.debug_check_bounds::<TestCaseArtifactGeneratedEventDetails>(offset);
12249 let max_ordinal: u64 = self.max_ordinal_present();
12251 encoder.write_num(max_ordinal, offset);
12252 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
12253 if max_ordinal == 0 {
12255 return Ok(());
12256 }
12257 depth.increment()?;
12258 let envelope_size = 8;
12259 let bytes_len = max_ordinal as usize * envelope_size;
12260 #[allow(unused_variables)]
12261 let offset = encoder.out_of_line_offset(bytes_len);
12262 let mut _prev_end_offset: usize = 0;
12263 if 1 > max_ordinal {
12264 return Ok(());
12265 }
12266
12267 let cur_offset: usize = (1 - 1) * envelope_size;
12270
12271 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12273
12274 fidl::encoding::encode_in_envelope_optional::<
12279 u32,
12280 fidl::encoding::DefaultFuchsiaResourceDialect,
12281 >(
12282 self.test_case_id.as_ref().map(<u32 as fidl::encoding::ValueTypeMarker>::borrow),
12283 encoder,
12284 offset + cur_offset,
12285 depth,
12286 )?;
12287
12288 _prev_end_offset = cur_offset + envelope_size;
12289 if 2 > max_ordinal {
12290 return Ok(());
12291 }
12292
12293 let cur_offset: usize = (2 - 1) * envelope_size;
12296
12297 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
12299
12300 fidl::encoding::encode_in_envelope_optional::<
12305 Artifact,
12306 fidl::encoding::DefaultFuchsiaResourceDialect,
12307 >(
12308 self.artifact
12309 .as_mut()
12310 .map(<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
12311 encoder,
12312 offset + cur_offset,
12313 depth,
12314 )?;
12315
12316 _prev_end_offset = cur_offset + envelope_size;
12317
12318 Ok(())
12319 }
12320 }
12321
12322 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
12323 for TestCaseArtifactGeneratedEventDetails
12324 {
12325 #[inline(always)]
12326 fn new_empty() -> Self {
12327 Self::default()
12328 }
12329
12330 unsafe fn decode(
12331 &mut self,
12332 decoder: &mut fidl::encoding::Decoder<
12333 '_,
12334 fidl::encoding::DefaultFuchsiaResourceDialect,
12335 >,
12336 offset: usize,
12337 mut depth: fidl::encoding::Depth,
12338 ) -> fidl::Result<()> {
12339 decoder.debug_check_bounds::<Self>(offset);
12340 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
12341 None => return Err(fidl::Error::NotNullable),
12342 Some(len) => len,
12343 };
12344 if len == 0 {
12346 return Ok(());
12347 };
12348 depth.increment()?;
12349 let envelope_size = 8;
12350 let bytes_len = len * envelope_size;
12351 let offset = decoder.out_of_line_offset(bytes_len)?;
12352 let mut _next_ordinal_to_read = 0;
12354 let mut next_offset = offset;
12355 let end_offset = offset + bytes_len;
12356 _next_ordinal_to_read += 1;
12357 if next_offset >= end_offset {
12358 return Ok(());
12359 }
12360
12361 while _next_ordinal_to_read < 1 {
12363 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12364 _next_ordinal_to_read += 1;
12365 next_offset += envelope_size;
12366 }
12367
12368 let next_out_of_line = decoder.next_out_of_line();
12369 let handles_before = decoder.remaining_handles();
12370 if let Some((inlined, num_bytes, num_handles)) =
12371 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12372 {
12373 let member_inline_size =
12374 <u32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12375 if inlined != (member_inline_size <= 4) {
12376 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12377 }
12378 let inner_offset;
12379 let mut inner_depth = depth.clone();
12380 if inlined {
12381 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12382 inner_offset = next_offset;
12383 } else {
12384 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12385 inner_depth.increment()?;
12386 }
12387 let val_ref = self.test_case_id.get_or_insert_with(|| {
12388 fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect)
12389 });
12390 fidl::decode!(
12391 u32,
12392 fidl::encoding::DefaultFuchsiaResourceDialect,
12393 val_ref,
12394 decoder,
12395 inner_offset,
12396 inner_depth
12397 )?;
12398 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12399 {
12400 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12401 }
12402 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12403 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12404 }
12405 }
12406
12407 next_offset += envelope_size;
12408 _next_ordinal_to_read += 1;
12409 if next_offset >= end_offset {
12410 return Ok(());
12411 }
12412
12413 while _next_ordinal_to_read < 2 {
12415 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12416 _next_ordinal_to_read += 1;
12417 next_offset += envelope_size;
12418 }
12419
12420 let next_out_of_line = decoder.next_out_of_line();
12421 let handles_before = decoder.remaining_handles();
12422 if let Some((inlined, num_bytes, num_handles)) =
12423 fidl::encoding::decode_envelope_header(decoder, next_offset)?
12424 {
12425 let member_inline_size =
12426 <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context);
12427 if inlined != (member_inline_size <= 4) {
12428 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12429 }
12430 let inner_offset;
12431 let mut inner_depth = depth.clone();
12432 if inlined {
12433 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
12434 inner_offset = next_offset;
12435 } else {
12436 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12437 inner_depth.increment()?;
12438 }
12439 let val_ref = self.artifact.get_or_insert_with(|| {
12440 fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect)
12441 });
12442 fidl::decode!(
12443 Artifact,
12444 fidl::encoding::DefaultFuchsiaResourceDialect,
12445 val_ref,
12446 decoder,
12447 inner_offset,
12448 inner_depth
12449 )?;
12450 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
12451 {
12452 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12453 }
12454 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12455 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12456 }
12457 }
12458
12459 next_offset += envelope_size;
12460
12461 while next_offset < end_offset {
12463 _next_ordinal_to_read += 1;
12464 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
12465 next_offset += envelope_size;
12466 }
12467
12468 Ok(())
12469 }
12470 }
12471
12472 impl fidl::encoding::ResourceTypeMarker for Artifact {
12473 type Borrowed<'a> = &'a mut Self;
12474 fn take_or_borrow<'a>(
12475 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12476 ) -> Self::Borrowed<'a> {
12477 value
12478 }
12479 }
12480
12481 unsafe impl fidl::encoding::TypeMarker for Artifact {
12482 type Owned = Self;
12483
12484 #[inline(always)]
12485 fn inline_align(_context: fidl::encoding::Context) -> usize {
12486 8
12487 }
12488
12489 #[inline(always)]
12490 fn inline_size(_context: fidl::encoding::Context) -> usize {
12491 16
12492 }
12493 }
12494
12495 unsafe impl fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
12496 for &mut Artifact
12497 {
12498 #[inline]
12499 unsafe fn encode(
12500 self,
12501 encoder: &mut fidl::encoding::Encoder<
12502 '_,
12503 fidl::encoding::DefaultFuchsiaResourceDialect,
12504 >,
12505 offset: usize,
12506 _depth: fidl::encoding::Depth,
12507 ) -> fidl::Result<()> {
12508 encoder.debug_check_bounds::<Artifact>(offset);
12509 encoder.write_num::<u64>(self.ordinal(), offset);
12510 match self {
12511 Artifact::Stdout(ref mut val) => fidl::encoding::encode_in_envelope::<
12512 fidl::encoding::HandleType<
12513 fidl::Socket,
12514 { fidl::ObjectType::SOCKET.into_raw() },
12515 2147483648,
12516 >,
12517 fidl::encoding::DefaultFuchsiaResourceDialect,
12518 >(
12519 <fidl::encoding::HandleType<
12520 fidl::Socket,
12521 { fidl::ObjectType::SOCKET.into_raw() },
12522 2147483648,
12523 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12524 val
12525 ),
12526 encoder,
12527 offset + 8,
12528 _depth,
12529 ),
12530 Artifact::Stderr(ref mut val) => fidl::encoding::encode_in_envelope::<
12531 fidl::encoding::HandleType<
12532 fidl::Socket,
12533 { fidl::ObjectType::SOCKET.into_raw() },
12534 2147483648,
12535 >,
12536 fidl::encoding::DefaultFuchsiaResourceDialect,
12537 >(
12538 <fidl::encoding::HandleType<
12539 fidl::Socket,
12540 { fidl::ObjectType::SOCKET.into_raw() },
12541 2147483648,
12542 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12543 val
12544 ),
12545 encoder,
12546 offset + 8,
12547 _depth,
12548 ),
12549 Artifact::Log(ref mut val) => fidl::encoding::encode_in_envelope::<
12550 Syslog,
12551 fidl::encoding::DefaultFuchsiaResourceDialect,
12552 >(
12553 <Syslog as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12554 encoder,
12555 offset + 8,
12556 _depth,
12557 ),
12558 Artifact::Custom(ref mut val) => fidl::encoding::encode_in_envelope::<
12559 CustomArtifact,
12560 fidl::encoding::DefaultFuchsiaResourceDialect,
12561 >(
12562 <CustomArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12563 encoder,
12564 offset + 8,
12565 _depth,
12566 ),
12567 Artifact::DebugData(ref mut val) => {
12568 fidl::encoding::encode_in_envelope::<
12569 fidl::encoding::Endpoint<
12570 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
12571 >,
12572 fidl::encoding::DefaultFuchsiaResourceDialect,
12573 >(
12574 <fidl::encoding::Endpoint<
12575 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
12576 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
12577 val
12578 ),
12579 encoder,
12580 offset + 8,
12581 _depth,
12582 )
12583 }
12584 Artifact::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12585 }
12586 }
12587 }
12588
12589 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {
12590 #[inline(always)]
12591 fn new_empty() -> Self {
12592 Self::__SourceBreaking { unknown_ordinal: 0 }
12593 }
12594
12595 #[inline]
12596 unsafe fn decode(
12597 &mut self,
12598 decoder: &mut fidl::encoding::Decoder<
12599 '_,
12600 fidl::encoding::DefaultFuchsiaResourceDialect,
12601 >,
12602 offset: usize,
12603 mut depth: fidl::encoding::Depth,
12604 ) -> fidl::Result<()> {
12605 decoder.debug_check_bounds::<Self>(offset);
12606 #[allow(unused_variables)]
12607 let next_out_of_line = decoder.next_out_of_line();
12608 let handles_before = decoder.remaining_handles();
12609 let (ordinal, inlined, num_bytes, num_handles) =
12610 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12611
12612 let member_inline_size =
12613 match ordinal {
12614 1 => <fidl::encoding::HandleType<
12615 fidl::Socket,
12616 { fidl::ObjectType::SOCKET.into_raw() },
12617 2147483648,
12618 > as fidl::encoding::TypeMarker>::inline_size(
12619 decoder.context
12620 ),
12621 2 => <fidl::encoding::HandleType<
12622 fidl::Socket,
12623 { fidl::ObjectType::SOCKET.into_raw() },
12624 2147483648,
12625 > as fidl::encoding::TypeMarker>::inline_size(
12626 decoder.context
12627 ),
12628 3 => <Syslog as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12629 4 => {
12630 <CustomArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context)
12631 }
12632 5 => <fidl::encoding::Endpoint<
12633 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
12634 > as fidl::encoding::TypeMarker>::inline_size(
12635 decoder.context
12636 ),
12637 0 => return Err(fidl::Error::UnknownUnionTag),
12638 _ => num_bytes as usize,
12639 };
12640
12641 if inlined != (member_inline_size <= 4) {
12642 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12643 }
12644 let _inner_offset;
12645 if inlined {
12646 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12647 _inner_offset = offset + 8;
12648 } else {
12649 depth.increment()?;
12650 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12651 }
12652 match ordinal {
12653 1 => {
12654 #[allow(irrefutable_let_patterns)]
12655 if let Artifact::Stdout(_) = self {
12656 } else {
12658 *self = Artifact::Stdout(
12660 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12661 );
12662 }
12663 #[allow(irrefutable_let_patterns)]
12664 if let Artifact::Stdout(ref mut val) = self {
12665 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
12666 } else {
12667 unreachable!()
12668 }
12669 }
12670 2 => {
12671 #[allow(irrefutable_let_patterns)]
12672 if let Artifact::Stderr(_) = self {
12673 } else {
12675 *self = Artifact::Stderr(
12677 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
12678 );
12679 }
12680 #[allow(irrefutable_let_patterns)]
12681 if let Artifact::Stderr(ref mut val) = self {
12682 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
12683 } else {
12684 unreachable!()
12685 }
12686 }
12687 3 => {
12688 #[allow(irrefutable_let_patterns)]
12689 if let Artifact::Log(_) = self {
12690 } else {
12692 *self = Artifact::Log(fidl::new_empty!(
12694 Syslog,
12695 fidl::encoding::DefaultFuchsiaResourceDialect
12696 ));
12697 }
12698 #[allow(irrefutable_let_patterns)]
12699 if let Artifact::Log(ref mut val) = self {
12700 fidl::decode!(
12701 Syslog,
12702 fidl::encoding::DefaultFuchsiaResourceDialect,
12703 val,
12704 decoder,
12705 _inner_offset,
12706 depth
12707 )?;
12708 } else {
12709 unreachable!()
12710 }
12711 }
12712 4 => {
12713 #[allow(irrefutable_let_patterns)]
12714 if let Artifact::Custom(_) = self {
12715 } else {
12717 *self = Artifact::Custom(fidl::new_empty!(
12719 CustomArtifact,
12720 fidl::encoding::DefaultFuchsiaResourceDialect
12721 ));
12722 }
12723 #[allow(irrefutable_let_patterns)]
12724 if let Artifact::Custom(ref mut val) = self {
12725 fidl::decode!(
12726 CustomArtifact,
12727 fidl::encoding::DefaultFuchsiaResourceDialect,
12728 val,
12729 decoder,
12730 _inner_offset,
12731 depth
12732 )?;
12733 } else {
12734 unreachable!()
12735 }
12736 }
12737 5 => {
12738 #[allow(irrefutable_let_patterns)]
12739 if let Artifact::DebugData(_) = self {
12740 } else {
12742 *self = Artifact::DebugData(fidl::new_empty!(
12744 fidl::encoding::Endpoint<
12745 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
12746 >,
12747 fidl::encoding::DefaultFuchsiaResourceDialect
12748 ));
12749 }
12750 #[allow(irrefutable_let_patterns)]
12751 if let Artifact::DebugData(ref mut val) = self {
12752 fidl::decode!(
12753 fidl::encoding::Endpoint<
12754 fidl::endpoints::ClientEnd<DebugDataIteratorMarker>,
12755 >,
12756 fidl::encoding::DefaultFuchsiaResourceDialect,
12757 val,
12758 decoder,
12759 _inner_offset,
12760 depth
12761 )?;
12762 } else {
12763 unreachable!()
12764 }
12765 }
12766 #[allow(deprecated)]
12767 ordinal => {
12768 for _ in 0..num_handles {
12769 decoder.drop_next_handle()?;
12770 }
12771 *self = Artifact::__SourceBreaking { unknown_ordinal: ordinal };
12772 }
12773 }
12774 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
12775 return Err(fidl::Error::InvalidNumBytesInEnvelope);
12776 }
12777 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
12778 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
12779 }
12780 Ok(())
12781 }
12782 }
12783
12784 impl fidl::encoding::ResourceTypeMarker for EventDetails {
12785 type Borrowed<'a> = &'a mut Self;
12786 fn take_or_borrow<'a>(
12787 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
12788 ) -> Self::Borrowed<'a> {
12789 value
12790 }
12791 }
12792
12793 unsafe impl fidl::encoding::TypeMarker for EventDetails {
12794 type Owned = Self;
12795
12796 #[inline(always)]
12797 fn inline_align(_context: fidl::encoding::Context) -> usize {
12798 8
12799 }
12800
12801 #[inline(always)]
12802 fn inline_size(_context: fidl::encoding::Context) -> usize {
12803 16
12804 }
12805 }
12806
12807 unsafe impl fidl::encoding::Encode<EventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>
12808 for &mut EventDetails
12809 {
12810 #[inline]
12811 unsafe fn encode(
12812 self,
12813 encoder: &mut fidl::encoding::Encoder<
12814 '_,
12815 fidl::encoding::DefaultFuchsiaResourceDialect,
12816 >,
12817 offset: usize,
12818 _depth: fidl::encoding::Depth,
12819 ) -> fidl::Result<()> {
12820 encoder.debug_check_bounds::<EventDetails>(offset);
12821 encoder.write_num::<u64>(self.ordinal(), offset);
12822 match self {
12823 EventDetails::SuiteStarted(ref val) => {
12824 fidl::encoding::encode_in_envelope::<SuiteStartedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12825 <SuiteStartedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12826 encoder, offset + 8, _depth
12827 )
12828 }
12829 EventDetails::TestCaseFound(ref val) => {
12830 fidl::encoding::encode_in_envelope::<TestCaseFoundEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12831 <TestCaseFoundEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12832 encoder, offset + 8, _depth
12833 )
12834 }
12835 EventDetails::TestCaseStarted(ref val) => {
12836 fidl::encoding::encode_in_envelope::<TestCaseStartedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12837 <TestCaseStartedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12838 encoder, offset + 8, _depth
12839 )
12840 }
12841 EventDetails::TestCaseArtifactGenerated(ref mut val) => {
12842 fidl::encoding::encode_in_envelope::<TestCaseArtifactGeneratedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12843 <TestCaseArtifactGeneratedEventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12844 encoder, offset + 8, _depth
12845 )
12846 }
12847 EventDetails::TestCaseStopped(ref val) => {
12848 fidl::encoding::encode_in_envelope::<TestCaseStoppedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12849 <TestCaseStoppedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12850 encoder, offset + 8, _depth
12851 )
12852 }
12853 EventDetails::TestCaseFinished(ref val) => {
12854 fidl::encoding::encode_in_envelope::<TestCaseFinishedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12855 <TestCaseFinishedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12856 encoder, offset + 8, _depth
12857 )
12858 }
12859 EventDetails::SuiteArtifactGenerated(ref mut val) => {
12860 fidl::encoding::encode_in_envelope::<SuiteArtifactGeneratedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12861 <SuiteArtifactGeneratedEventDetails as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
12862 encoder, offset + 8, _depth
12863 )
12864 }
12865 EventDetails::SuiteStopped(ref val) => {
12866 fidl::encoding::encode_in_envelope::<SuiteStoppedEventDetails, fidl::encoding::DefaultFuchsiaResourceDialect>(
12867 <SuiteStoppedEventDetails as fidl::encoding::ValueTypeMarker>::borrow(val),
12868 encoder, offset + 8, _depth
12869 )
12870 }
12871 EventDetails::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
12872 }
12873 }
12874 }
12875
12876 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for EventDetails {
12877 #[inline(always)]
12878 fn new_empty() -> Self {
12879 Self::__SourceBreaking { unknown_ordinal: 0 }
12880 }
12881
12882 #[inline]
12883 unsafe fn decode(
12884 &mut self,
12885 decoder: &mut fidl::encoding::Decoder<
12886 '_,
12887 fidl::encoding::DefaultFuchsiaResourceDialect,
12888 >,
12889 offset: usize,
12890 mut depth: fidl::encoding::Depth,
12891 ) -> fidl::Result<()> {
12892 decoder.debug_check_bounds::<Self>(offset);
12893 #[allow(unused_variables)]
12894 let next_out_of_line = decoder.next_out_of_line();
12895 let handles_before = decoder.remaining_handles();
12896 let (ordinal, inlined, num_bytes, num_handles) =
12897 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
12898
12899 let member_inline_size = match ordinal {
12900 1 => <SuiteStartedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12901 2 => <TestCaseFoundEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12902 3 => <TestCaseStartedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12903 4 => <TestCaseArtifactGeneratedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12904 5 => <TestCaseStoppedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12905 6 => <TestCaseFinishedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12906 7 => <SuiteArtifactGeneratedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12907 8 => <SuiteStoppedEventDetails as fidl::encoding::TypeMarker>::inline_size(decoder.context),
12908 0 => return Err(fidl::Error::UnknownUnionTag),
12909 _ => num_bytes as usize,
12910 };
12911
12912 if inlined != (member_inline_size <= 4) {
12913 return Err(fidl::Error::InvalidInlineBitInEnvelope);
12914 }
12915 let _inner_offset;
12916 if inlined {
12917 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
12918 _inner_offset = offset + 8;
12919 } else {
12920 depth.increment()?;
12921 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
12922 }
12923 match ordinal {
12924 1 => {
12925 #[allow(irrefutable_let_patterns)]
12926 if let EventDetails::SuiteStarted(_) = self {
12927 } else {
12929 *self = EventDetails::SuiteStarted(fidl::new_empty!(
12931 SuiteStartedEventDetails,
12932 fidl::encoding::DefaultFuchsiaResourceDialect
12933 ));
12934 }
12935 #[allow(irrefutable_let_patterns)]
12936 if let EventDetails::SuiteStarted(ref mut val) = self {
12937 fidl::decode!(
12938 SuiteStartedEventDetails,
12939 fidl::encoding::DefaultFuchsiaResourceDialect,
12940 val,
12941 decoder,
12942 _inner_offset,
12943 depth
12944 )?;
12945 } else {
12946 unreachable!()
12947 }
12948 }
12949 2 => {
12950 #[allow(irrefutable_let_patterns)]
12951 if let EventDetails::TestCaseFound(_) = self {
12952 } else {
12954 *self = EventDetails::TestCaseFound(fidl::new_empty!(
12956 TestCaseFoundEventDetails,
12957 fidl::encoding::DefaultFuchsiaResourceDialect
12958 ));
12959 }
12960 #[allow(irrefutable_let_patterns)]
12961 if let EventDetails::TestCaseFound(ref mut val) = self {
12962 fidl::decode!(
12963 TestCaseFoundEventDetails,
12964 fidl::encoding::DefaultFuchsiaResourceDialect,
12965 val,
12966 decoder,
12967 _inner_offset,
12968 depth
12969 )?;
12970 } else {
12971 unreachable!()
12972 }
12973 }
12974 3 => {
12975 #[allow(irrefutable_let_patterns)]
12976 if let EventDetails::TestCaseStarted(_) = self {
12977 } else {
12979 *self = EventDetails::TestCaseStarted(fidl::new_empty!(
12981 TestCaseStartedEventDetails,
12982 fidl::encoding::DefaultFuchsiaResourceDialect
12983 ));
12984 }
12985 #[allow(irrefutable_let_patterns)]
12986 if let EventDetails::TestCaseStarted(ref mut val) = self {
12987 fidl::decode!(
12988 TestCaseStartedEventDetails,
12989 fidl::encoding::DefaultFuchsiaResourceDialect,
12990 val,
12991 decoder,
12992 _inner_offset,
12993 depth
12994 )?;
12995 } else {
12996 unreachable!()
12997 }
12998 }
12999 4 => {
13000 #[allow(irrefutable_let_patterns)]
13001 if let EventDetails::TestCaseArtifactGenerated(_) = self {
13002 } else {
13004 *self = EventDetails::TestCaseArtifactGenerated(fidl::new_empty!(
13006 TestCaseArtifactGeneratedEventDetails,
13007 fidl::encoding::DefaultFuchsiaResourceDialect
13008 ));
13009 }
13010 #[allow(irrefutable_let_patterns)]
13011 if let EventDetails::TestCaseArtifactGenerated(ref mut val) = self {
13012 fidl::decode!(
13013 TestCaseArtifactGeneratedEventDetails,
13014 fidl::encoding::DefaultFuchsiaResourceDialect,
13015 val,
13016 decoder,
13017 _inner_offset,
13018 depth
13019 )?;
13020 } else {
13021 unreachable!()
13022 }
13023 }
13024 5 => {
13025 #[allow(irrefutable_let_patterns)]
13026 if let EventDetails::TestCaseStopped(_) = self {
13027 } else {
13029 *self = EventDetails::TestCaseStopped(fidl::new_empty!(
13031 TestCaseStoppedEventDetails,
13032 fidl::encoding::DefaultFuchsiaResourceDialect
13033 ));
13034 }
13035 #[allow(irrefutable_let_patterns)]
13036 if let EventDetails::TestCaseStopped(ref mut val) = self {
13037 fidl::decode!(
13038 TestCaseStoppedEventDetails,
13039 fidl::encoding::DefaultFuchsiaResourceDialect,
13040 val,
13041 decoder,
13042 _inner_offset,
13043 depth
13044 )?;
13045 } else {
13046 unreachable!()
13047 }
13048 }
13049 6 => {
13050 #[allow(irrefutable_let_patterns)]
13051 if let EventDetails::TestCaseFinished(_) = self {
13052 } else {
13054 *self = EventDetails::TestCaseFinished(fidl::new_empty!(
13056 TestCaseFinishedEventDetails,
13057 fidl::encoding::DefaultFuchsiaResourceDialect
13058 ));
13059 }
13060 #[allow(irrefutable_let_patterns)]
13061 if let EventDetails::TestCaseFinished(ref mut val) = self {
13062 fidl::decode!(
13063 TestCaseFinishedEventDetails,
13064 fidl::encoding::DefaultFuchsiaResourceDialect,
13065 val,
13066 decoder,
13067 _inner_offset,
13068 depth
13069 )?;
13070 } else {
13071 unreachable!()
13072 }
13073 }
13074 7 => {
13075 #[allow(irrefutable_let_patterns)]
13076 if let EventDetails::SuiteArtifactGenerated(_) = self {
13077 } else {
13079 *self = EventDetails::SuiteArtifactGenerated(fidl::new_empty!(
13081 SuiteArtifactGeneratedEventDetails,
13082 fidl::encoding::DefaultFuchsiaResourceDialect
13083 ));
13084 }
13085 #[allow(irrefutable_let_patterns)]
13086 if let EventDetails::SuiteArtifactGenerated(ref mut val) = self {
13087 fidl::decode!(
13088 SuiteArtifactGeneratedEventDetails,
13089 fidl::encoding::DefaultFuchsiaResourceDialect,
13090 val,
13091 decoder,
13092 _inner_offset,
13093 depth
13094 )?;
13095 } else {
13096 unreachable!()
13097 }
13098 }
13099 8 => {
13100 #[allow(irrefutable_let_patterns)]
13101 if let EventDetails::SuiteStopped(_) = self {
13102 } else {
13104 *self = EventDetails::SuiteStopped(fidl::new_empty!(
13106 SuiteStoppedEventDetails,
13107 fidl::encoding::DefaultFuchsiaResourceDialect
13108 ));
13109 }
13110 #[allow(irrefutable_let_patterns)]
13111 if let EventDetails::SuiteStopped(ref mut val) = self {
13112 fidl::decode!(
13113 SuiteStoppedEventDetails,
13114 fidl::encoding::DefaultFuchsiaResourceDialect,
13115 val,
13116 decoder,
13117 _inner_offset,
13118 depth
13119 )?;
13120 } else {
13121 unreachable!()
13122 }
13123 }
13124 #[allow(deprecated)]
13125 ordinal => {
13126 for _ in 0..num_handles {
13127 decoder.drop_next_handle()?;
13128 }
13129 *self = EventDetails::__SourceBreaking { unknown_ordinal: ordinal };
13130 }
13131 }
13132 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13133 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13134 }
13135 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13136 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13137 }
13138 Ok(())
13139 }
13140 }
13141
13142 impl fidl::encoding::ResourceTypeMarker for LogsIterator {
13143 type Borrowed<'a> = &'a mut Self;
13144 fn take_or_borrow<'a>(
13145 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13146 ) -> Self::Borrowed<'a> {
13147 value
13148 }
13149 }
13150
13151 unsafe impl fidl::encoding::TypeMarker for LogsIterator {
13152 type Owned = Self;
13153
13154 #[inline(always)]
13155 fn inline_align(_context: fidl::encoding::Context) -> usize {
13156 8
13157 }
13158
13159 #[inline(always)]
13160 fn inline_size(_context: fidl::encoding::Context) -> usize {
13161 16
13162 }
13163 }
13164
13165 unsafe impl fidl::encoding::Encode<LogsIterator, fidl::encoding::DefaultFuchsiaResourceDialect>
13166 for &mut LogsIterator
13167 {
13168 #[inline]
13169 unsafe fn encode(
13170 self,
13171 encoder: &mut fidl::encoding::Encoder<
13172 '_,
13173 fidl::encoding::DefaultFuchsiaResourceDialect,
13174 >,
13175 offset: usize,
13176 _depth: fidl::encoding::Depth,
13177 ) -> fidl::Result<()> {
13178 encoder.debug_check_bounds::<LogsIterator>(offset);
13179 encoder.write_num::<u64>(self.ordinal(), offset);
13180 match self {
13181 LogsIterator::Batch(ref mut val) => fidl::encoding::encode_in_envelope::<
13182 fidl::encoding::Endpoint<
13183 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
13184 >,
13185 fidl::encoding::DefaultFuchsiaResourceDialect,
13186 >(
13187 <fidl::encoding::Endpoint<
13188 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
13189 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13190 val
13191 ),
13192 encoder,
13193 offset + 8,
13194 _depth,
13195 ),
13196 LogsIterator::Stream(ref mut val) => fidl::encoding::encode_in_envelope::<
13197 fidl::encoding::HandleType<
13198 fidl::Socket,
13199 { fidl::ObjectType::SOCKET.into_raw() },
13200 16392,
13201 >,
13202 fidl::encoding::DefaultFuchsiaResourceDialect,
13203 >(
13204 <fidl::encoding::HandleType<
13205 fidl::Socket,
13206 { fidl::ObjectType::SOCKET.into_raw() },
13207 16392,
13208 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13209 val
13210 ),
13211 encoder,
13212 offset + 8,
13213 _depth,
13214 ),
13215 LogsIterator::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13216 }
13217 }
13218 }
13219
13220 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for LogsIterator {
13221 #[inline(always)]
13222 fn new_empty() -> Self {
13223 Self::__SourceBreaking { unknown_ordinal: 0 }
13224 }
13225
13226 #[inline]
13227 unsafe fn decode(
13228 &mut self,
13229 decoder: &mut fidl::encoding::Decoder<
13230 '_,
13231 fidl::encoding::DefaultFuchsiaResourceDialect,
13232 >,
13233 offset: usize,
13234 mut depth: fidl::encoding::Depth,
13235 ) -> fidl::Result<()> {
13236 decoder.debug_check_bounds::<Self>(offset);
13237 #[allow(unused_variables)]
13238 let next_out_of_line = decoder.next_out_of_line();
13239 let handles_before = decoder.remaining_handles();
13240 let (ordinal, inlined, num_bytes, num_handles) =
13241 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13242
13243 let member_inline_size = match ordinal {
13244 2 => <fidl::encoding::Endpoint<
13245 fidl::endpoints::ServerEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
13246 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13247 3 => <fidl::encoding::HandleType<
13248 fidl::Socket,
13249 { fidl::ObjectType::SOCKET.into_raw() },
13250 16392,
13251 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13252 0 => return Err(fidl::Error::UnknownUnionTag),
13253 _ => num_bytes as usize,
13254 };
13255
13256 if inlined != (member_inline_size <= 4) {
13257 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13258 }
13259 let _inner_offset;
13260 if inlined {
13261 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13262 _inner_offset = offset + 8;
13263 } else {
13264 depth.increment()?;
13265 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13266 }
13267 match ordinal {
13268 2 => {
13269 #[allow(irrefutable_let_patterns)]
13270 if let LogsIterator::Batch(_) = self {
13271 } else {
13273 *self = LogsIterator::Batch(fidl::new_empty!(
13275 fidl::encoding::Endpoint<
13276 fidl::endpoints::ServerEnd<
13277 fidl_fuchsia_diagnostics::BatchIteratorMarker,
13278 >,
13279 >,
13280 fidl::encoding::DefaultFuchsiaResourceDialect
13281 ));
13282 }
13283 #[allow(irrefutable_let_patterns)]
13284 if let LogsIterator::Batch(ref mut val) = self {
13285 fidl::decode!(
13286 fidl::encoding::Endpoint<
13287 fidl::endpoints::ServerEnd<
13288 fidl_fuchsia_diagnostics::BatchIteratorMarker,
13289 >,
13290 >,
13291 fidl::encoding::DefaultFuchsiaResourceDialect,
13292 val,
13293 decoder,
13294 _inner_offset,
13295 depth
13296 )?;
13297 } else {
13298 unreachable!()
13299 }
13300 }
13301 3 => {
13302 #[allow(irrefutable_let_patterns)]
13303 if let LogsIterator::Stream(_) = self {
13304 } else {
13306 *self = LogsIterator::Stream(
13308 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect),
13309 );
13310 }
13311 #[allow(irrefutable_let_patterns)]
13312 if let LogsIterator::Stream(ref mut val) = self {
13313 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 16392>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
13314 } else {
13315 unreachable!()
13316 }
13317 }
13318 #[allow(deprecated)]
13319 ordinal => {
13320 for _ in 0..num_handles {
13321 decoder.drop_next_handle()?;
13322 }
13323 *self = LogsIterator::__SourceBreaking { unknown_ordinal: ordinal };
13324 }
13325 }
13326 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13327 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13328 }
13329 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13330 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13331 }
13332 Ok(())
13333 }
13334 }
13335
13336 impl fidl::encoding::ResourceTypeMarker for RunEventPayload {
13337 type Borrowed<'a> = &'a mut Self;
13338 fn take_or_borrow<'a>(
13339 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13340 ) -> Self::Borrowed<'a> {
13341 value
13342 }
13343 }
13344
13345 unsafe impl fidl::encoding::TypeMarker for RunEventPayload {
13346 type Owned = Self;
13347
13348 #[inline(always)]
13349 fn inline_align(_context: fidl::encoding::Context) -> usize {
13350 8
13351 }
13352
13353 #[inline(always)]
13354 fn inline_size(_context: fidl::encoding::Context) -> usize {
13355 16
13356 }
13357 }
13358
13359 unsafe impl
13360 fidl::encoding::Encode<RunEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13361 for &mut RunEventPayload
13362 {
13363 #[inline]
13364 unsafe fn encode(
13365 self,
13366 encoder: &mut fidl::encoding::Encoder<
13367 '_,
13368 fidl::encoding::DefaultFuchsiaResourceDialect,
13369 >,
13370 offset: usize,
13371 _depth: fidl::encoding::Depth,
13372 ) -> fidl::Result<()> {
13373 encoder.debug_check_bounds::<RunEventPayload>(offset);
13374 encoder.write_num::<u64>(self.ordinal(), offset);
13375 match self {
13376 RunEventPayload::RunStarted(ref val) => fidl::encoding::encode_in_envelope::<
13377 RunStarted,
13378 fidl::encoding::DefaultFuchsiaResourceDialect,
13379 >(
13380 <RunStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
13381 encoder,
13382 offset + 8,
13383 _depth,
13384 ),
13385 RunEventPayload::RunStopped(ref val) => fidl::encoding::encode_in_envelope::<
13386 RunStopped,
13387 fidl::encoding::DefaultFuchsiaResourceDialect,
13388 >(
13389 <RunStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
13390 encoder,
13391 offset + 8,
13392 _depth,
13393 ),
13394 RunEventPayload::Artifact(ref mut val) => fidl::encoding::encode_in_envelope::<
13395 Artifact,
13396 fidl::encoding::DefaultFuchsiaResourceDialect,
13397 >(
13398 <Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13399 encoder,
13400 offset + 8,
13401 _depth,
13402 ),
13403 RunEventPayload::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13404 }
13405 }
13406 }
13407
13408 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13409 for RunEventPayload
13410 {
13411 #[inline(always)]
13412 fn new_empty() -> Self {
13413 Self::__SourceBreaking { unknown_ordinal: 0 }
13414 }
13415
13416 #[inline]
13417 unsafe fn decode(
13418 &mut self,
13419 decoder: &mut fidl::encoding::Decoder<
13420 '_,
13421 fidl::encoding::DefaultFuchsiaResourceDialect,
13422 >,
13423 offset: usize,
13424 mut depth: fidl::encoding::Depth,
13425 ) -> fidl::Result<()> {
13426 decoder.debug_check_bounds::<Self>(offset);
13427 #[allow(unused_variables)]
13428 let next_out_of_line = decoder.next_out_of_line();
13429 let handles_before = decoder.remaining_handles();
13430 let (ordinal, inlined, num_bytes, num_handles) =
13431 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13432
13433 let member_inline_size = match ordinal {
13434 1 => <RunStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13435 2 => <RunStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13436 3 => <Artifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13437 0 => return Err(fidl::Error::UnknownUnionTag),
13438 _ => num_bytes as usize,
13439 };
13440
13441 if inlined != (member_inline_size <= 4) {
13442 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13443 }
13444 let _inner_offset;
13445 if inlined {
13446 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13447 _inner_offset = offset + 8;
13448 } else {
13449 depth.increment()?;
13450 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13451 }
13452 match ordinal {
13453 1 => {
13454 #[allow(irrefutable_let_patterns)]
13455 if let RunEventPayload::RunStarted(_) = self {
13456 } else {
13458 *self = RunEventPayload::RunStarted(fidl::new_empty!(
13460 RunStarted,
13461 fidl::encoding::DefaultFuchsiaResourceDialect
13462 ));
13463 }
13464 #[allow(irrefutable_let_patterns)]
13465 if let RunEventPayload::RunStarted(ref mut val) = self {
13466 fidl::decode!(
13467 RunStarted,
13468 fidl::encoding::DefaultFuchsiaResourceDialect,
13469 val,
13470 decoder,
13471 _inner_offset,
13472 depth
13473 )?;
13474 } else {
13475 unreachable!()
13476 }
13477 }
13478 2 => {
13479 #[allow(irrefutable_let_patterns)]
13480 if let RunEventPayload::RunStopped(_) = self {
13481 } else {
13483 *self = RunEventPayload::RunStopped(fidl::new_empty!(
13485 RunStopped,
13486 fidl::encoding::DefaultFuchsiaResourceDialect
13487 ));
13488 }
13489 #[allow(irrefutable_let_patterns)]
13490 if let RunEventPayload::RunStopped(ref mut val) = self {
13491 fidl::decode!(
13492 RunStopped,
13493 fidl::encoding::DefaultFuchsiaResourceDialect,
13494 val,
13495 decoder,
13496 _inner_offset,
13497 depth
13498 )?;
13499 } else {
13500 unreachable!()
13501 }
13502 }
13503 3 => {
13504 #[allow(irrefutable_let_patterns)]
13505 if let RunEventPayload::Artifact(_) = self {
13506 } else {
13508 *self = RunEventPayload::Artifact(fidl::new_empty!(
13510 Artifact,
13511 fidl::encoding::DefaultFuchsiaResourceDialect
13512 ));
13513 }
13514 #[allow(irrefutable_let_patterns)]
13515 if let RunEventPayload::Artifact(ref mut val) = self {
13516 fidl::decode!(
13517 Artifact,
13518 fidl::encoding::DefaultFuchsiaResourceDialect,
13519 val,
13520 decoder,
13521 _inner_offset,
13522 depth
13523 )?;
13524 } else {
13525 unreachable!()
13526 }
13527 }
13528 #[allow(deprecated)]
13529 ordinal => {
13530 for _ in 0..num_handles {
13531 decoder.drop_next_handle()?;
13532 }
13533 *self = RunEventPayload::__SourceBreaking { unknown_ordinal: ordinal };
13534 }
13535 }
13536 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13537 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13538 }
13539 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13540 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13541 }
13542 Ok(())
13543 }
13544 }
13545
13546 impl fidl::encoding::ResourceTypeMarker for SuiteEventPayload {
13547 type Borrowed<'a> = &'a mut Self;
13548 fn take_or_borrow<'a>(
13549 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13550 ) -> Self::Borrowed<'a> {
13551 value
13552 }
13553 }
13554
13555 unsafe impl fidl::encoding::TypeMarker for SuiteEventPayload {
13556 type Owned = Self;
13557
13558 #[inline(always)]
13559 fn inline_align(_context: fidl::encoding::Context) -> usize {
13560 8
13561 }
13562
13563 #[inline(always)]
13564 fn inline_size(_context: fidl::encoding::Context) -> usize {
13565 16
13566 }
13567 }
13568
13569 unsafe impl
13570 fidl::encoding::Encode<SuiteEventPayload, fidl::encoding::DefaultFuchsiaResourceDialect>
13571 for &mut SuiteEventPayload
13572 {
13573 #[inline]
13574 unsafe fn encode(
13575 self,
13576 encoder: &mut fidl::encoding::Encoder<
13577 '_,
13578 fidl::encoding::DefaultFuchsiaResourceDialect,
13579 >,
13580 offset: usize,
13581 _depth: fidl::encoding::Depth,
13582 ) -> fidl::Result<()> {
13583 encoder.debug_check_bounds::<SuiteEventPayload>(offset);
13584 encoder.write_num::<u64>(self.ordinal(), offset);
13585 match self {
13586 SuiteEventPayload::CaseFound(ref val) => fidl::encoding::encode_in_envelope::<
13587 CaseFound,
13588 fidl::encoding::DefaultFuchsiaResourceDialect,
13589 >(
13590 <CaseFound as fidl::encoding::ValueTypeMarker>::borrow(val),
13591 encoder,
13592 offset + 8,
13593 _depth,
13594 ),
13595 SuiteEventPayload::CaseStarted(ref val) => fidl::encoding::encode_in_envelope::<
13596 CaseStarted,
13597 fidl::encoding::DefaultFuchsiaResourceDialect,
13598 >(
13599 <CaseStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
13600 encoder,
13601 offset + 8,
13602 _depth,
13603 ),
13604 SuiteEventPayload::CaseStopped(ref val) => fidl::encoding::encode_in_envelope::<
13605 CaseStopped,
13606 fidl::encoding::DefaultFuchsiaResourceDialect,
13607 >(
13608 <CaseStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
13609 encoder,
13610 offset + 8,
13611 _depth,
13612 ),
13613 SuiteEventPayload::CaseFinished(ref val) => fidl::encoding::encode_in_envelope::<
13614 CaseFinished,
13615 fidl::encoding::DefaultFuchsiaResourceDialect,
13616 >(
13617 <CaseFinished as fidl::encoding::ValueTypeMarker>::borrow(val),
13618 encoder,
13619 offset + 8,
13620 _depth,
13621 ),
13622 SuiteEventPayload::CaseArtifact(ref mut val) => {
13623 fidl::encoding::encode_in_envelope::<
13624 CaseArtifact,
13625 fidl::encoding::DefaultFuchsiaResourceDialect,
13626 >(
13627 <CaseArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13628 encoder,
13629 offset + 8,
13630 _depth,
13631 )
13632 }
13633 SuiteEventPayload::SuiteArtifact(ref mut val) => {
13634 fidl::encoding::encode_in_envelope::<
13635 SuiteArtifact,
13636 fidl::encoding::DefaultFuchsiaResourceDialect,
13637 >(
13638 <SuiteArtifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(val),
13639 encoder,
13640 offset + 8,
13641 _depth,
13642 )
13643 }
13644 SuiteEventPayload::SuiteStarted(ref val) => fidl::encoding::encode_in_envelope::<
13645 SuiteStarted,
13646 fidl::encoding::DefaultFuchsiaResourceDialect,
13647 >(
13648 <SuiteStarted as fidl::encoding::ValueTypeMarker>::borrow(val),
13649 encoder,
13650 offset + 8,
13651 _depth,
13652 ),
13653 SuiteEventPayload::SuiteStopped(ref val) => fidl::encoding::encode_in_envelope::<
13654 SuiteStopped,
13655 fidl::encoding::DefaultFuchsiaResourceDialect,
13656 >(
13657 <SuiteStopped as fidl::encoding::ValueTypeMarker>::borrow(val),
13658 encoder,
13659 offset + 8,
13660 _depth,
13661 ),
13662 SuiteEventPayload::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
13663 }
13664 }
13665 }
13666
13667 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
13668 for SuiteEventPayload
13669 {
13670 #[inline(always)]
13671 fn new_empty() -> Self {
13672 Self::__SourceBreaking { unknown_ordinal: 0 }
13673 }
13674
13675 #[inline]
13676 unsafe fn decode(
13677 &mut self,
13678 decoder: &mut fidl::encoding::Decoder<
13679 '_,
13680 fidl::encoding::DefaultFuchsiaResourceDialect,
13681 >,
13682 offset: usize,
13683 mut depth: fidl::encoding::Depth,
13684 ) -> fidl::Result<()> {
13685 decoder.debug_check_bounds::<Self>(offset);
13686 #[allow(unused_variables)]
13687 let next_out_of_line = decoder.next_out_of_line();
13688 let handles_before = decoder.remaining_handles();
13689 let (ordinal, inlined, num_bytes, num_handles) =
13690 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
13691
13692 let member_inline_size = match ordinal {
13693 1 => <CaseFound as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13694 2 => <CaseStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13695 3 => <CaseStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13696 4 => <CaseFinished as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13697 5 => <CaseArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13698 6 => <SuiteArtifact as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13699 7 => <SuiteStarted as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13700 8 => <SuiteStopped as fidl::encoding::TypeMarker>::inline_size(decoder.context),
13701 0 => return Err(fidl::Error::UnknownUnionTag),
13702 _ => num_bytes as usize,
13703 };
13704
13705 if inlined != (member_inline_size <= 4) {
13706 return Err(fidl::Error::InvalidInlineBitInEnvelope);
13707 }
13708 let _inner_offset;
13709 if inlined {
13710 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
13711 _inner_offset = offset + 8;
13712 } else {
13713 depth.increment()?;
13714 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
13715 }
13716 match ordinal {
13717 1 => {
13718 #[allow(irrefutable_let_patterns)]
13719 if let SuiteEventPayload::CaseFound(_) = self {
13720 } else {
13722 *self = SuiteEventPayload::CaseFound(fidl::new_empty!(
13724 CaseFound,
13725 fidl::encoding::DefaultFuchsiaResourceDialect
13726 ));
13727 }
13728 #[allow(irrefutable_let_patterns)]
13729 if let SuiteEventPayload::CaseFound(ref mut val) = self {
13730 fidl::decode!(
13731 CaseFound,
13732 fidl::encoding::DefaultFuchsiaResourceDialect,
13733 val,
13734 decoder,
13735 _inner_offset,
13736 depth
13737 )?;
13738 } else {
13739 unreachable!()
13740 }
13741 }
13742 2 => {
13743 #[allow(irrefutable_let_patterns)]
13744 if let SuiteEventPayload::CaseStarted(_) = self {
13745 } else {
13747 *self = SuiteEventPayload::CaseStarted(fidl::new_empty!(
13749 CaseStarted,
13750 fidl::encoding::DefaultFuchsiaResourceDialect
13751 ));
13752 }
13753 #[allow(irrefutable_let_patterns)]
13754 if let SuiteEventPayload::CaseStarted(ref mut val) = self {
13755 fidl::decode!(
13756 CaseStarted,
13757 fidl::encoding::DefaultFuchsiaResourceDialect,
13758 val,
13759 decoder,
13760 _inner_offset,
13761 depth
13762 )?;
13763 } else {
13764 unreachable!()
13765 }
13766 }
13767 3 => {
13768 #[allow(irrefutable_let_patterns)]
13769 if let SuiteEventPayload::CaseStopped(_) = self {
13770 } else {
13772 *self = SuiteEventPayload::CaseStopped(fidl::new_empty!(
13774 CaseStopped,
13775 fidl::encoding::DefaultFuchsiaResourceDialect
13776 ));
13777 }
13778 #[allow(irrefutable_let_patterns)]
13779 if let SuiteEventPayload::CaseStopped(ref mut val) = self {
13780 fidl::decode!(
13781 CaseStopped,
13782 fidl::encoding::DefaultFuchsiaResourceDialect,
13783 val,
13784 decoder,
13785 _inner_offset,
13786 depth
13787 )?;
13788 } else {
13789 unreachable!()
13790 }
13791 }
13792 4 => {
13793 #[allow(irrefutable_let_patterns)]
13794 if let SuiteEventPayload::CaseFinished(_) = self {
13795 } else {
13797 *self = SuiteEventPayload::CaseFinished(fidl::new_empty!(
13799 CaseFinished,
13800 fidl::encoding::DefaultFuchsiaResourceDialect
13801 ));
13802 }
13803 #[allow(irrefutable_let_patterns)]
13804 if let SuiteEventPayload::CaseFinished(ref mut val) = self {
13805 fidl::decode!(
13806 CaseFinished,
13807 fidl::encoding::DefaultFuchsiaResourceDialect,
13808 val,
13809 decoder,
13810 _inner_offset,
13811 depth
13812 )?;
13813 } else {
13814 unreachable!()
13815 }
13816 }
13817 5 => {
13818 #[allow(irrefutable_let_patterns)]
13819 if let SuiteEventPayload::CaseArtifact(_) = self {
13820 } else {
13822 *self = SuiteEventPayload::CaseArtifact(fidl::new_empty!(
13824 CaseArtifact,
13825 fidl::encoding::DefaultFuchsiaResourceDialect
13826 ));
13827 }
13828 #[allow(irrefutable_let_patterns)]
13829 if let SuiteEventPayload::CaseArtifact(ref mut val) = self {
13830 fidl::decode!(
13831 CaseArtifact,
13832 fidl::encoding::DefaultFuchsiaResourceDialect,
13833 val,
13834 decoder,
13835 _inner_offset,
13836 depth
13837 )?;
13838 } else {
13839 unreachable!()
13840 }
13841 }
13842 6 => {
13843 #[allow(irrefutable_let_patterns)]
13844 if let SuiteEventPayload::SuiteArtifact(_) = self {
13845 } else {
13847 *self = SuiteEventPayload::SuiteArtifact(fidl::new_empty!(
13849 SuiteArtifact,
13850 fidl::encoding::DefaultFuchsiaResourceDialect
13851 ));
13852 }
13853 #[allow(irrefutable_let_patterns)]
13854 if let SuiteEventPayload::SuiteArtifact(ref mut val) = self {
13855 fidl::decode!(
13856 SuiteArtifact,
13857 fidl::encoding::DefaultFuchsiaResourceDialect,
13858 val,
13859 decoder,
13860 _inner_offset,
13861 depth
13862 )?;
13863 } else {
13864 unreachable!()
13865 }
13866 }
13867 7 => {
13868 #[allow(irrefutable_let_patterns)]
13869 if let SuiteEventPayload::SuiteStarted(_) = self {
13870 } else {
13872 *self = SuiteEventPayload::SuiteStarted(fidl::new_empty!(
13874 SuiteStarted,
13875 fidl::encoding::DefaultFuchsiaResourceDialect
13876 ));
13877 }
13878 #[allow(irrefutable_let_patterns)]
13879 if let SuiteEventPayload::SuiteStarted(ref mut val) = self {
13880 fidl::decode!(
13881 SuiteStarted,
13882 fidl::encoding::DefaultFuchsiaResourceDialect,
13883 val,
13884 decoder,
13885 _inner_offset,
13886 depth
13887 )?;
13888 } else {
13889 unreachable!()
13890 }
13891 }
13892 8 => {
13893 #[allow(irrefutable_let_patterns)]
13894 if let SuiteEventPayload::SuiteStopped(_) = self {
13895 } else {
13897 *self = SuiteEventPayload::SuiteStopped(fidl::new_empty!(
13899 SuiteStopped,
13900 fidl::encoding::DefaultFuchsiaResourceDialect
13901 ));
13902 }
13903 #[allow(irrefutable_let_patterns)]
13904 if let SuiteEventPayload::SuiteStopped(ref mut val) = self {
13905 fidl::decode!(
13906 SuiteStopped,
13907 fidl::encoding::DefaultFuchsiaResourceDialect,
13908 val,
13909 decoder,
13910 _inner_offset,
13911 depth
13912 )?;
13913 } else {
13914 unreachable!()
13915 }
13916 }
13917 #[allow(deprecated)]
13918 ordinal => {
13919 for _ in 0..num_handles {
13920 decoder.drop_next_handle()?;
13921 }
13922 *self = SuiteEventPayload::__SourceBreaking { unknown_ordinal: ordinal };
13923 }
13924 }
13925 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
13926 return Err(fidl::Error::InvalidNumBytesInEnvelope);
13927 }
13928 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
13929 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
13930 }
13931 Ok(())
13932 }
13933 }
13934
13935 impl fidl::encoding::ResourceTypeMarker for Syslog {
13936 type Borrowed<'a> = &'a mut Self;
13937 fn take_or_borrow<'a>(
13938 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
13939 ) -> Self::Borrowed<'a> {
13940 value
13941 }
13942 }
13943
13944 unsafe impl fidl::encoding::TypeMarker for Syslog {
13945 type Owned = Self;
13946
13947 #[inline(always)]
13948 fn inline_align(_context: fidl::encoding::Context) -> usize {
13949 8
13950 }
13951
13952 #[inline(always)]
13953 fn inline_size(_context: fidl::encoding::Context) -> usize {
13954 16
13955 }
13956 }
13957
13958 unsafe impl fidl::encoding::Encode<Syslog, fidl::encoding::DefaultFuchsiaResourceDialect>
13959 for &mut Syslog
13960 {
13961 #[inline]
13962 unsafe fn encode(
13963 self,
13964 encoder: &mut fidl::encoding::Encoder<
13965 '_,
13966 fidl::encoding::DefaultFuchsiaResourceDialect,
13967 >,
13968 offset: usize,
13969 _depth: fidl::encoding::Depth,
13970 ) -> fidl::Result<()> {
13971 encoder.debug_check_bounds::<Syslog>(offset);
13972 encoder.write_num::<u64>(self.ordinal(), offset);
13973 match self {
13974 Syslog::Batch(ref mut val) => fidl::encoding::encode_in_envelope::<
13975 fidl::encoding::Endpoint<
13976 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
13977 >,
13978 fidl::encoding::DefaultFuchsiaResourceDialect,
13979 >(
13980 <fidl::encoding::Endpoint<
13981 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
13982 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
13983 val
13984 ),
13985 encoder,
13986 offset + 8,
13987 _depth,
13988 ),
13989 Syslog::Stream(ref mut val) => fidl::encoding::encode_in_envelope::<
13990 fidl::encoding::HandleType<
13991 fidl::Socket,
13992 { fidl::ObjectType::SOCKET.into_raw() },
13993 2147483648,
13994 >,
13995 fidl::encoding::DefaultFuchsiaResourceDialect,
13996 >(
13997 <fidl::encoding::HandleType<
13998 fidl::Socket,
13999 { fidl::ObjectType::SOCKET.into_raw() },
14000 2147483648,
14001 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
14002 val
14003 ),
14004 encoder,
14005 offset + 8,
14006 _depth,
14007 ),
14008 Syslog::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
14009 }
14010 }
14011 }
14012
14013 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Syslog {
14014 #[inline(always)]
14015 fn new_empty() -> Self {
14016 Self::__SourceBreaking { unknown_ordinal: 0 }
14017 }
14018
14019 #[inline]
14020 unsafe fn decode(
14021 &mut self,
14022 decoder: &mut fidl::encoding::Decoder<
14023 '_,
14024 fidl::encoding::DefaultFuchsiaResourceDialect,
14025 >,
14026 offset: usize,
14027 mut depth: fidl::encoding::Depth,
14028 ) -> fidl::Result<()> {
14029 decoder.debug_check_bounds::<Self>(offset);
14030 #[allow(unused_variables)]
14031 let next_out_of_line = decoder.next_out_of_line();
14032 let handles_before = decoder.remaining_handles();
14033 let (ordinal, inlined, num_bytes, num_handles) =
14034 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
14035
14036 let member_inline_size = match ordinal {
14037 2 => <fidl::encoding::Endpoint<
14038 fidl::endpoints::ClientEnd<fidl_fuchsia_diagnostics::BatchIteratorMarker>,
14039 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14040 3 => <fidl::encoding::HandleType<
14041 fidl::Socket,
14042 { fidl::ObjectType::SOCKET.into_raw() },
14043 2147483648,
14044 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
14045 0 => return Err(fidl::Error::UnknownUnionTag),
14046 _ => num_bytes as usize,
14047 };
14048
14049 if inlined != (member_inline_size <= 4) {
14050 return Err(fidl::Error::InvalidInlineBitInEnvelope);
14051 }
14052 let _inner_offset;
14053 if inlined {
14054 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
14055 _inner_offset = offset + 8;
14056 } else {
14057 depth.increment()?;
14058 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
14059 }
14060 match ordinal {
14061 2 => {
14062 #[allow(irrefutable_let_patterns)]
14063 if let Syslog::Batch(_) = self {
14064 } else {
14066 *self = Syslog::Batch(fidl::new_empty!(
14068 fidl::encoding::Endpoint<
14069 fidl::endpoints::ClientEnd<
14070 fidl_fuchsia_diagnostics::BatchIteratorMarker,
14071 >,
14072 >,
14073 fidl::encoding::DefaultFuchsiaResourceDialect
14074 ));
14075 }
14076 #[allow(irrefutable_let_patterns)]
14077 if let Syslog::Batch(ref mut val) = self {
14078 fidl::decode!(
14079 fidl::encoding::Endpoint<
14080 fidl::endpoints::ClientEnd<
14081 fidl_fuchsia_diagnostics::BatchIteratorMarker,
14082 >,
14083 >,
14084 fidl::encoding::DefaultFuchsiaResourceDialect,
14085 val,
14086 decoder,
14087 _inner_offset,
14088 depth
14089 )?;
14090 } else {
14091 unreachable!()
14092 }
14093 }
14094 3 => {
14095 #[allow(irrefutable_let_patterns)]
14096 if let Syslog::Stream(_) = self {
14097 } else {
14099 *self = Syslog::Stream(
14101 fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
14102 );
14103 }
14104 #[allow(irrefutable_let_patterns)]
14105 if let Syslog::Stream(ref mut val) = self {
14106 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
14107 } else {
14108 unreachable!()
14109 }
14110 }
14111 #[allow(deprecated)]
14112 ordinal => {
14113 for _ in 0..num_handles {
14114 decoder.drop_next_handle()?;
14115 }
14116 *self = Syslog::__SourceBreaking { unknown_ordinal: ordinal };
14117 }
14118 }
14119 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
14120 return Err(fidl::Error::InvalidNumBytesInEnvelope);
14121 }
14122 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
14123 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
14124 }
14125 Ok(())
14126 }
14127 }
14128}