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