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