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