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_fuzzer_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct ControllerAddMonitorRequest {
16 pub monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
17}
18
19impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
20 for ControllerAddMonitorRequest
21{
22}
23
24#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
25pub struct ControllerAddToCorpusRequest {
26 pub corpus: Corpus,
27 pub input: Input,
28}
29
30impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
31 for ControllerAddToCorpusRequest
32{
33}
34
35#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
36pub struct ControllerCleanseRequest {
37 pub test_input: Input,
38}
39
40impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ControllerCleanseRequest {}
41
42#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
43pub struct ControllerMinimizeRequest {
44 pub test_input: Input,
45}
46
47impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ControllerMinimizeRequest {}
48
49#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
50pub struct ControllerProviderConnectRequest {
51 pub controller: fidl::endpoints::ServerEnd<ControllerMarker>,
52}
53
54impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
55 for ControllerProviderConnectRequest
56{
57}
58
59#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct ControllerReadCorpusRequest {
61 pub corpus: Corpus,
62 pub corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
63}
64
65impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
66 for ControllerReadCorpusRequest
67{
68}
69
70#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
71pub struct ControllerReadDictionaryResponse {
72 pub dictionary: Input,
73}
74
75impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
76 for ControllerReadDictionaryResponse
77{
78}
79
80#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
81pub struct ControllerTryOneRequest {
82 pub test_input: Input,
83}
84
85impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ControllerTryOneRequest {}
86
87#[derive(Debug, PartialEq)]
88pub struct ControllerWatchArtifactResponse {
89 pub artifact: Artifact,
90}
91
92impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
93 for ControllerWatchArtifactResponse
94{
95}
96
97#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
98pub struct ControllerWriteDictionaryRequest {
99 pub dictionary: Input,
100}
101
102impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
103 for ControllerWriteDictionaryRequest
104{
105}
106
107#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
108pub struct CorpusReaderNextRequest {
109 pub test_input: Input,
110}
111
112impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CorpusReaderNextRequest {}
113
114#[derive(Debug, PartialEq)]
116pub struct CoverageData {
117 pub target_id: u64,
118 pub data: Data,
119}
120
121impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for CoverageData {}
122
123#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
124pub struct CoverageDataCollectorAddInline8bitCountersRequest {
125 pub inline_8bit_counters: fidl::Vmo,
126}
127
128impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
129 for CoverageDataCollectorAddInline8bitCountersRequest
130{
131}
132
133#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
134pub struct CoverageDataCollectorInitializeRequest {
135 pub eventpair: fidl::EventPair,
136 pub process: fidl::Process,
137}
138
139impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
140 for CoverageDataCollectorInitializeRequest
141{
142}
143
144#[derive(Debug, PartialEq)]
145pub struct CoverageDataProviderWatchCoverageDataResponse {
146 pub coverage_data: Vec<CoverageData>,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
150 for CoverageDataProviderWatchCoverageDataResponse
151{
152}
153
154#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
157pub struct Input {
158 pub socket: fidl::Socket,
160 pub size: u64,
162}
163
164impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Input {}
165
166#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
171pub struct InstrumentedProcess {
172 pub eventpair: fidl::EventPair,
173 pub process: fidl::Process,
174}
175
176impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for InstrumentedProcess {}
177
178#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
179pub struct ManagerConnectRequest {
180 pub fuzzer_url: String,
181 pub controller: fidl::endpoints::ServerEnd<ControllerMarker>,
182}
183
184impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ManagerConnectRequest {}
185
186#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187pub struct ManagerGetOutputRequest {
188 pub fuzzer_url: String,
189 pub output: TestOutput,
190 pub socket: fidl::Socket,
191}
192
193impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ManagerGetOutputRequest {}
194
195#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
196pub struct RegistrarRegisterRequest {
197 pub fuzzer_url: String,
198 pub provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
199}
200
201impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RegistrarRegisterRequest {}
202
203#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
204pub struct RegistryConnectRequest {
205 pub fuzzer_url: String,
206 pub controller: fidl::endpoints::ServerEnd<ControllerMarker>,
207 pub timeout: i64,
208}
209
210impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RegistryConnectRequest {}
211
212#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
213pub struct TargetAdapterConnectRequest {
214 pub eventpair: fidl::EventPair,
215 pub test_input: fidl::Vmo,
216}
217
218impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
219 for TargetAdapterConnectRequest
220{
221}
222
223#[derive(Debug, Default, PartialEq)]
226pub struct Artifact {
227 pub result: Option<Result_>,
229 pub input: Option<Input>,
236 pub error: Option<i32>,
245 #[doc(hidden)]
246 pub __source_breaking: fidl::marker::SourceBreaking,
247}
248
249impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {}
250
251#[derive(Debug)]
252pub enum Data {
253 Instrumented(InstrumentedProcess),
255 Inline8bitCounters(fidl::Vmo),
257 #[doc(hidden)]
258 __SourceBreaking { unknown_ordinal: u64 },
259}
260
261#[macro_export]
263macro_rules! DataUnknown {
264 () => {
265 _
266 };
267}
268
269impl PartialEq for Data {
271 fn eq(&self, other: &Self) -> bool {
272 match (self, other) {
273 (Self::Instrumented(x), Self::Instrumented(y)) => *x == *y,
274 (Self::Inline8bitCounters(x), Self::Inline8bitCounters(y)) => *x == *y,
275 _ => false,
276 }
277 }
278}
279
280impl Data {
281 #[inline]
282 pub fn ordinal(&self) -> u64 {
283 match *self {
284 Self::Instrumented(_) => 1,
285 Self::Inline8bitCounters(_) => 2,
286 Self::__SourceBreaking { unknown_ordinal } => unknown_ordinal,
287 }
288 }
289
290 #[inline]
291 pub fn unknown_variant_for_testing() -> Self {
292 Self::__SourceBreaking { unknown_ordinal: 0 }
293 }
294
295 #[inline]
296 pub fn is_unknown(&self) -> bool {
297 match self {
298 Self::__SourceBreaking { .. } => true,
299 _ => false,
300 }
301 }
302}
303
304impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for Data {}
305
306#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
307pub struct ControllerMarker;
308
309impl fidl::endpoints::ProtocolMarker for ControllerMarker {
310 type Proxy = ControllerProxy;
311 type RequestStream = ControllerRequestStream;
312 #[cfg(target_os = "fuchsia")]
313 type SynchronousProxy = ControllerSynchronousProxy;
314
315 const DEBUG_NAME: &'static str = "(anonymous) Controller";
316}
317pub type ControllerConfigureResult = Result<(), i32>;
318pub type ControllerAddToCorpusResult = Result<(), i32>;
319pub type ControllerWriteDictionaryResult = Result<(), i32>;
320pub type ControllerFuzzResult = Result<(), i32>;
321pub type ControllerTryOneResult = Result<(), i32>;
322pub type ControllerMinimizeResult = Result<(), i32>;
323pub type ControllerCleanseResult = Result<(), i32>;
324pub type ControllerMergeResult = Result<(), i32>;
325
326pub trait ControllerProxyInterface: Send + Sync {
327 type ConfigureResponseFut: std::future::Future<Output = Result<ControllerConfigureResult, fidl::Error>>
328 + Send;
329 fn r#configure(&self, options: &Options) -> Self::ConfigureResponseFut;
330 type GetOptionsResponseFut: std::future::Future<Output = Result<Options, fidl::Error>> + Send;
331 fn r#get_options(&self) -> Self::GetOptionsResponseFut;
332 type AddToCorpusResponseFut: std::future::Future<Output = Result<ControllerAddToCorpusResult, fidl::Error>>
333 + Send;
334 fn r#add_to_corpus(&self, corpus: Corpus, input: Input) -> Self::AddToCorpusResponseFut;
335 type ReadCorpusResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
336 fn r#read_corpus(
337 &self,
338 corpus: Corpus,
339 corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
340 ) -> Self::ReadCorpusResponseFut;
341 type WriteDictionaryResponseFut: std::future::Future<Output = Result<ControllerWriteDictionaryResult, fidl::Error>>
342 + Send;
343 fn r#write_dictionary(&self, dictionary: Input) -> Self::WriteDictionaryResponseFut;
344 type ReadDictionaryResponseFut: std::future::Future<Output = Result<Input, fidl::Error>> + Send;
345 fn r#read_dictionary(&self) -> Self::ReadDictionaryResponseFut;
346 type AddMonitorResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
347 fn r#add_monitor(
348 &self,
349 monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
350 ) -> Self::AddMonitorResponseFut;
351 type FuzzResponseFut: std::future::Future<Output = Result<ControllerFuzzResult, fidl::Error>>
352 + Send;
353 fn r#fuzz(&self) -> Self::FuzzResponseFut;
354 type TryOneResponseFut: std::future::Future<Output = Result<ControllerTryOneResult, fidl::Error>>
355 + Send;
356 fn r#try_one(&self, test_input: Input) -> Self::TryOneResponseFut;
357 type MinimizeResponseFut: std::future::Future<Output = Result<ControllerMinimizeResult, fidl::Error>>
358 + Send;
359 fn r#minimize(&self, test_input: Input) -> Self::MinimizeResponseFut;
360 type CleanseResponseFut: std::future::Future<Output = Result<ControllerCleanseResult, fidl::Error>>
361 + Send;
362 fn r#cleanse(&self, test_input: Input) -> Self::CleanseResponseFut;
363 type MergeResponseFut: std::future::Future<Output = Result<ControllerMergeResult, fidl::Error>>
364 + Send;
365 fn r#merge(&self) -> Self::MergeResponseFut;
366 type GetStatusResponseFut: std::future::Future<Output = Result<Status, fidl::Error>> + Send;
367 fn r#get_status(&self) -> Self::GetStatusResponseFut;
368 type WatchArtifactResponseFut: std::future::Future<Output = Result<Artifact, fidl::Error>>
369 + Send;
370 fn r#watch_artifact(&self) -> Self::WatchArtifactResponseFut;
371}
372#[derive(Debug)]
373#[cfg(target_os = "fuchsia")]
374pub struct ControllerSynchronousProxy {
375 client: fidl::client::sync::Client,
376}
377
378#[cfg(target_os = "fuchsia")]
379impl fidl::endpoints::SynchronousProxy for ControllerSynchronousProxy {
380 type Proxy = ControllerProxy;
381 type Protocol = ControllerMarker;
382
383 fn from_channel(inner: fidl::Channel) -> Self {
384 Self::new(inner)
385 }
386
387 fn into_channel(self) -> fidl::Channel {
388 self.client.into_channel()
389 }
390
391 fn as_channel(&self) -> &fidl::Channel {
392 self.client.as_channel()
393 }
394}
395
396#[cfg(target_os = "fuchsia")]
397impl ControllerSynchronousProxy {
398 pub fn new(channel: fidl::Channel) -> Self {
399 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
400 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
401 }
402
403 pub fn into_channel(self) -> fidl::Channel {
404 self.client.into_channel()
405 }
406
407 pub fn wait_for_event(
410 &self,
411 deadline: zx::MonotonicInstant,
412 ) -> Result<ControllerEvent, fidl::Error> {
413 ControllerEvent::decode(self.client.wait_for_event(deadline)?)
414 }
415
416 pub fn r#configure(
430 &self,
431 mut options: &Options,
432 ___deadline: zx::MonotonicInstant,
433 ) -> Result<ControllerConfigureResult, fidl::Error> {
434 let _response = self.client.send_query::<
435 ControllerConfigureRequest,
436 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
437 >(
438 (options,),
439 0x35c8cba7fa3d32e4,
440 fidl::encoding::DynamicFlags::empty(),
441 ___deadline,
442 )?;
443 Ok(_response.map(|x| x))
444 }
445
446 pub fn r#get_options(&self, ___deadline: zx::MonotonicInstant) -> Result<Options, fidl::Error> {
451 let _response =
452 self.client.send_query::<fidl::encoding::EmptyPayload, ControllerGetOptionsResponse>(
453 (),
454 0x683d93332504b9cd,
455 fidl::encoding::DynamicFlags::empty(),
456 ___deadline,
457 )?;
458 Ok(_response.options)
459 }
460
461 pub fn r#add_to_corpus(
471 &self,
472 mut corpus: Corpus,
473 mut input: Input,
474 ___deadline: zx::MonotonicInstant,
475 ) -> Result<ControllerAddToCorpusResult, fidl::Error> {
476 let _response = self.client.send_query::<
477 ControllerAddToCorpusRequest,
478 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
479 >(
480 (corpus, &mut input,),
481 0x7bdf8336ab534cee,
482 fidl::encoding::DynamicFlags::empty(),
483 ___deadline,
484 )?;
485 Ok(_response.map(|x| x))
486 }
487
488 pub fn r#read_corpus(
493 &self,
494 mut corpus: Corpus,
495 mut corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
496 ___deadline: zx::MonotonicInstant,
497 ) -> Result<(), fidl::Error> {
498 let _response =
499 self.client.send_query::<ControllerReadCorpusRequest, fidl::encoding::EmptyPayload>(
500 (corpus, corpus_reader),
501 0x501279b430b34514,
502 fidl::encoding::DynamicFlags::empty(),
503 ___deadline,
504 )?;
505 Ok(_response)
506 }
507
508 pub fn r#write_dictionary(
520 &self,
521 mut dictionary: Input,
522 ___deadline: zx::MonotonicInstant,
523 ) -> Result<ControllerWriteDictionaryResult, fidl::Error> {
524 let _response = self.client.send_query::<
525 ControllerWriteDictionaryRequest,
526 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
527 >(
528 (&mut dictionary,),
529 0x4ecfc1274fe4a70b,
530 fidl::encoding::DynamicFlags::empty(),
531 ___deadline,
532 )?;
533 Ok(_response.map(|x| x))
534 }
535
536 pub fn r#read_dictionary(
540 &self,
541 ___deadline: zx::MonotonicInstant,
542 ) -> Result<Input, fidl::Error> {
543 let _response = self
544 .client
545 .send_query::<fidl::encoding::EmptyPayload, ControllerReadDictionaryResponse>(
546 (),
547 0x1be6724c87b51c37,
548 fidl::encoding::DynamicFlags::empty(),
549 ___deadline,
550 )?;
551 Ok(_response.dictionary)
552 }
553
554 pub fn r#add_monitor(
559 &self,
560 mut monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
561 ___deadline: zx::MonotonicInstant,
562 ) -> Result<(), fidl::Error> {
563 let _response =
564 self.client.send_query::<ControllerAddMonitorRequest, fidl::encoding::EmptyPayload>(
565 (monitor,),
566 0x2efbf7d3dc21438e,
567 fidl::encoding::DynamicFlags::empty(),
568 ___deadline,
569 )?;
570 Ok(_response)
571 }
572
573 pub fn r#fuzz(
594 &self,
595 ___deadline: zx::MonotonicInstant,
596 ) -> Result<ControllerFuzzResult, fidl::Error> {
597 let _response = self.client.send_query::<
598 fidl::encoding::EmptyPayload,
599 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
600 >(
601 (),
602 0x62fe3684ea23af62,
603 fidl::encoding::DynamicFlags::empty(),
604 ___deadline,
605 )?;
606 Ok(_response.map(|x| x))
607 }
608
609 pub fn r#try_one(
620 &self,
621 mut test_input: Input,
622 ___deadline: zx::MonotonicInstant,
623 ) -> Result<ControllerTryOneResult, fidl::Error> {
624 let _response = self.client.send_query::<
625 ControllerTryOneRequest,
626 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
627 >(
628 (&mut test_input,),
629 0x368dc762d8e16d46,
630 fidl::encoding::DynamicFlags::empty(),
631 ___deadline,
632 )?;
633 Ok(_response.map(|x| x))
634 }
635
636 pub fn r#minimize(
651 &self,
652 mut test_input: Input,
653 ___deadline: zx::MonotonicInstant,
654 ) -> Result<ControllerMinimizeResult, fidl::Error> {
655 let _response = self.client.send_query::<
656 ControllerMinimizeRequest,
657 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
658 >(
659 (&mut test_input,),
660 0x105a242ee0552794,
661 fidl::encoding::DynamicFlags::empty(),
662 ___deadline,
663 )?;
664 Ok(_response.map(|x| x))
665 }
666
667 pub fn r#cleanse(
683 &self,
684 mut test_input: Input,
685 ___deadline: zx::MonotonicInstant,
686 ) -> Result<ControllerCleanseResult, fidl::Error> {
687 let _response = self.client.send_query::<
688 ControllerCleanseRequest,
689 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
690 >(
691 (&mut test_input,),
692 0x6d7892f62735f3e0,
693 fidl::encoding::DynamicFlags::empty(),
694 ___deadline,
695 )?;
696 Ok(_response.map(|x| x))
697 }
698
699 pub fn r#merge(
713 &self,
714 ___deadline: zx::MonotonicInstant,
715 ) -> Result<ControllerMergeResult, fidl::Error> {
716 let _response = self.client.send_query::<
717 fidl::encoding::EmptyPayload,
718 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
719 >(
720 (),
721 0x3614e5c39413b5eb,
722 fidl::encoding::DynamicFlags::empty(),
723 ___deadline,
724 )?;
725 Ok(_response.map(|x| x))
726 }
727
728 pub fn r#get_status(&self, ___deadline: zx::MonotonicInstant) -> Result<Status, fidl::Error> {
732 let _response =
733 self.client.send_query::<fidl::encoding::EmptyPayload, ControllerGetStatusResponse>(
734 (),
735 0x51db4975d93ce768,
736 fidl::encoding::DynamicFlags::empty(),
737 ___deadline,
738 )?;
739 Ok(_response.status)
740 }
741
742 pub fn r#watch_artifact(
772 &self,
773 ___deadline: zx::MonotonicInstant,
774 ) -> Result<Artifact, fidl::Error> {
775 let _response = self
776 .client
777 .send_query::<fidl::encoding::EmptyPayload, ControllerWatchArtifactResponse>(
778 (),
779 0x6cfca3730944a414,
780 fidl::encoding::DynamicFlags::empty(),
781 ___deadline,
782 )?;
783 Ok(_response.artifact)
784 }
785}
786
787#[cfg(target_os = "fuchsia")]
788impl From<ControllerSynchronousProxy> for zx::Handle {
789 fn from(value: ControllerSynchronousProxy) -> Self {
790 value.into_channel().into()
791 }
792}
793
794#[cfg(target_os = "fuchsia")]
795impl From<fidl::Channel> for ControllerSynchronousProxy {
796 fn from(value: fidl::Channel) -> Self {
797 Self::new(value)
798 }
799}
800
801#[derive(Debug, Clone)]
802pub struct ControllerProxy {
803 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
804}
805
806impl fidl::endpoints::Proxy for ControllerProxy {
807 type Protocol = ControllerMarker;
808
809 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
810 Self::new(inner)
811 }
812
813 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
814 self.client.into_channel().map_err(|client| Self { client })
815 }
816
817 fn as_channel(&self) -> &::fidl::AsyncChannel {
818 self.client.as_channel()
819 }
820}
821
822impl ControllerProxy {
823 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
825 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
826 Self { client: fidl::client::Client::new(channel, protocol_name) }
827 }
828
829 pub fn take_event_stream(&self) -> ControllerEventStream {
835 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
836 }
837
838 pub fn r#configure(
852 &self,
853 mut options: &Options,
854 ) -> fidl::client::QueryResponseFut<
855 ControllerConfigureResult,
856 fidl::encoding::DefaultFuchsiaResourceDialect,
857 > {
858 ControllerProxyInterface::r#configure(self, options)
859 }
860
861 pub fn r#get_options(
866 &self,
867 ) -> fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
868 {
869 ControllerProxyInterface::r#get_options(self)
870 }
871
872 pub fn r#add_to_corpus(
882 &self,
883 mut corpus: Corpus,
884 mut input: Input,
885 ) -> fidl::client::QueryResponseFut<
886 ControllerAddToCorpusResult,
887 fidl::encoding::DefaultFuchsiaResourceDialect,
888 > {
889 ControllerProxyInterface::r#add_to_corpus(self, corpus, input)
890 }
891
892 pub fn r#read_corpus(
897 &self,
898 mut corpus: Corpus,
899 mut corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
900 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
901 ControllerProxyInterface::r#read_corpus(self, corpus, corpus_reader)
902 }
903
904 pub fn r#write_dictionary(
916 &self,
917 mut dictionary: Input,
918 ) -> fidl::client::QueryResponseFut<
919 ControllerWriteDictionaryResult,
920 fidl::encoding::DefaultFuchsiaResourceDialect,
921 > {
922 ControllerProxyInterface::r#write_dictionary(self, dictionary)
923 }
924
925 pub fn r#read_dictionary(
929 &self,
930 ) -> fidl::client::QueryResponseFut<Input, fidl::encoding::DefaultFuchsiaResourceDialect> {
931 ControllerProxyInterface::r#read_dictionary(self)
932 }
933
934 pub fn r#add_monitor(
939 &self,
940 mut monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
941 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
942 ControllerProxyInterface::r#add_monitor(self, monitor)
943 }
944
945 pub fn r#fuzz(
966 &self,
967 ) -> fidl::client::QueryResponseFut<
968 ControllerFuzzResult,
969 fidl::encoding::DefaultFuchsiaResourceDialect,
970 > {
971 ControllerProxyInterface::r#fuzz(self)
972 }
973
974 pub fn r#try_one(
985 &self,
986 mut test_input: Input,
987 ) -> fidl::client::QueryResponseFut<
988 ControllerTryOneResult,
989 fidl::encoding::DefaultFuchsiaResourceDialect,
990 > {
991 ControllerProxyInterface::r#try_one(self, test_input)
992 }
993
994 pub fn r#minimize(
1009 &self,
1010 mut test_input: Input,
1011 ) -> fidl::client::QueryResponseFut<
1012 ControllerMinimizeResult,
1013 fidl::encoding::DefaultFuchsiaResourceDialect,
1014 > {
1015 ControllerProxyInterface::r#minimize(self, test_input)
1016 }
1017
1018 pub fn r#cleanse(
1034 &self,
1035 mut test_input: Input,
1036 ) -> fidl::client::QueryResponseFut<
1037 ControllerCleanseResult,
1038 fidl::encoding::DefaultFuchsiaResourceDialect,
1039 > {
1040 ControllerProxyInterface::r#cleanse(self, test_input)
1041 }
1042
1043 pub fn r#merge(
1057 &self,
1058 ) -> fidl::client::QueryResponseFut<
1059 ControllerMergeResult,
1060 fidl::encoding::DefaultFuchsiaResourceDialect,
1061 > {
1062 ControllerProxyInterface::r#merge(self)
1063 }
1064
1065 pub fn r#get_status(
1069 &self,
1070 ) -> fidl::client::QueryResponseFut<Status, fidl::encoding::DefaultFuchsiaResourceDialect> {
1071 ControllerProxyInterface::r#get_status(self)
1072 }
1073
1074 pub fn r#watch_artifact(
1104 &self,
1105 ) -> fidl::client::QueryResponseFut<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
1106 {
1107 ControllerProxyInterface::r#watch_artifact(self)
1108 }
1109}
1110
1111impl ControllerProxyInterface for ControllerProxy {
1112 type ConfigureResponseFut = fidl::client::QueryResponseFut<
1113 ControllerConfigureResult,
1114 fidl::encoding::DefaultFuchsiaResourceDialect,
1115 >;
1116 fn r#configure(&self, mut options: &Options) -> Self::ConfigureResponseFut {
1117 fn _decode(
1118 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1119 ) -> Result<ControllerConfigureResult, fidl::Error> {
1120 let _response = fidl::client::decode_transaction_body::<
1121 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1122 fidl::encoding::DefaultFuchsiaResourceDialect,
1123 0x35c8cba7fa3d32e4,
1124 >(_buf?)?;
1125 Ok(_response.map(|x| x))
1126 }
1127 self.client.send_query_and_decode::<ControllerConfigureRequest, ControllerConfigureResult>(
1128 (options,),
1129 0x35c8cba7fa3d32e4,
1130 fidl::encoding::DynamicFlags::empty(),
1131 _decode,
1132 )
1133 }
1134
1135 type GetOptionsResponseFut =
1136 fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>;
1137 fn r#get_options(&self) -> Self::GetOptionsResponseFut {
1138 fn _decode(
1139 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1140 ) -> Result<Options, fidl::Error> {
1141 let _response = fidl::client::decode_transaction_body::<
1142 ControllerGetOptionsResponse,
1143 fidl::encoding::DefaultFuchsiaResourceDialect,
1144 0x683d93332504b9cd,
1145 >(_buf?)?;
1146 Ok(_response.options)
1147 }
1148 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Options>(
1149 (),
1150 0x683d93332504b9cd,
1151 fidl::encoding::DynamicFlags::empty(),
1152 _decode,
1153 )
1154 }
1155
1156 type AddToCorpusResponseFut = fidl::client::QueryResponseFut<
1157 ControllerAddToCorpusResult,
1158 fidl::encoding::DefaultFuchsiaResourceDialect,
1159 >;
1160 fn r#add_to_corpus(
1161 &self,
1162 mut corpus: Corpus,
1163 mut input: Input,
1164 ) -> Self::AddToCorpusResponseFut {
1165 fn _decode(
1166 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1167 ) -> Result<ControllerAddToCorpusResult, fidl::Error> {
1168 let _response = fidl::client::decode_transaction_body::<
1169 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1170 fidl::encoding::DefaultFuchsiaResourceDialect,
1171 0x7bdf8336ab534cee,
1172 >(_buf?)?;
1173 Ok(_response.map(|x| x))
1174 }
1175 self.client
1176 .send_query_and_decode::<ControllerAddToCorpusRequest, ControllerAddToCorpusResult>(
1177 (corpus, &mut input),
1178 0x7bdf8336ab534cee,
1179 fidl::encoding::DynamicFlags::empty(),
1180 _decode,
1181 )
1182 }
1183
1184 type ReadCorpusResponseFut =
1185 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1186 fn r#read_corpus(
1187 &self,
1188 mut corpus: Corpus,
1189 mut corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
1190 ) -> Self::ReadCorpusResponseFut {
1191 fn _decode(
1192 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1193 ) -> Result<(), fidl::Error> {
1194 let _response = fidl::client::decode_transaction_body::<
1195 fidl::encoding::EmptyPayload,
1196 fidl::encoding::DefaultFuchsiaResourceDialect,
1197 0x501279b430b34514,
1198 >(_buf?)?;
1199 Ok(_response)
1200 }
1201 self.client.send_query_and_decode::<ControllerReadCorpusRequest, ()>(
1202 (corpus, corpus_reader),
1203 0x501279b430b34514,
1204 fidl::encoding::DynamicFlags::empty(),
1205 _decode,
1206 )
1207 }
1208
1209 type WriteDictionaryResponseFut = fidl::client::QueryResponseFut<
1210 ControllerWriteDictionaryResult,
1211 fidl::encoding::DefaultFuchsiaResourceDialect,
1212 >;
1213 fn r#write_dictionary(&self, mut dictionary: Input) -> Self::WriteDictionaryResponseFut {
1214 fn _decode(
1215 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1216 ) -> Result<ControllerWriteDictionaryResult, fidl::Error> {
1217 let _response = fidl::client::decode_transaction_body::<
1218 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1219 fidl::encoding::DefaultFuchsiaResourceDialect,
1220 0x4ecfc1274fe4a70b,
1221 >(_buf?)?;
1222 Ok(_response.map(|x| x))
1223 }
1224 self.client.send_query_and_decode::<
1225 ControllerWriteDictionaryRequest,
1226 ControllerWriteDictionaryResult,
1227 >(
1228 (&mut dictionary,),
1229 0x4ecfc1274fe4a70b,
1230 fidl::encoding::DynamicFlags::empty(),
1231 _decode,
1232 )
1233 }
1234
1235 type ReadDictionaryResponseFut =
1236 fidl::client::QueryResponseFut<Input, fidl::encoding::DefaultFuchsiaResourceDialect>;
1237 fn r#read_dictionary(&self) -> Self::ReadDictionaryResponseFut {
1238 fn _decode(
1239 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1240 ) -> Result<Input, fidl::Error> {
1241 let _response = fidl::client::decode_transaction_body::<
1242 ControllerReadDictionaryResponse,
1243 fidl::encoding::DefaultFuchsiaResourceDialect,
1244 0x1be6724c87b51c37,
1245 >(_buf?)?;
1246 Ok(_response.dictionary)
1247 }
1248 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Input>(
1249 (),
1250 0x1be6724c87b51c37,
1251 fidl::encoding::DynamicFlags::empty(),
1252 _decode,
1253 )
1254 }
1255
1256 type AddMonitorResponseFut =
1257 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1258 fn r#add_monitor(
1259 &self,
1260 mut monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
1261 ) -> Self::AddMonitorResponseFut {
1262 fn _decode(
1263 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1264 ) -> Result<(), fidl::Error> {
1265 let _response = fidl::client::decode_transaction_body::<
1266 fidl::encoding::EmptyPayload,
1267 fidl::encoding::DefaultFuchsiaResourceDialect,
1268 0x2efbf7d3dc21438e,
1269 >(_buf?)?;
1270 Ok(_response)
1271 }
1272 self.client.send_query_and_decode::<ControllerAddMonitorRequest, ()>(
1273 (monitor,),
1274 0x2efbf7d3dc21438e,
1275 fidl::encoding::DynamicFlags::empty(),
1276 _decode,
1277 )
1278 }
1279
1280 type FuzzResponseFut = fidl::client::QueryResponseFut<
1281 ControllerFuzzResult,
1282 fidl::encoding::DefaultFuchsiaResourceDialect,
1283 >;
1284 fn r#fuzz(&self) -> Self::FuzzResponseFut {
1285 fn _decode(
1286 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1287 ) -> Result<ControllerFuzzResult, fidl::Error> {
1288 let _response = fidl::client::decode_transaction_body::<
1289 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1290 fidl::encoding::DefaultFuchsiaResourceDialect,
1291 0x62fe3684ea23af62,
1292 >(_buf?)?;
1293 Ok(_response.map(|x| x))
1294 }
1295 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerFuzzResult>(
1296 (),
1297 0x62fe3684ea23af62,
1298 fidl::encoding::DynamicFlags::empty(),
1299 _decode,
1300 )
1301 }
1302
1303 type TryOneResponseFut = fidl::client::QueryResponseFut<
1304 ControllerTryOneResult,
1305 fidl::encoding::DefaultFuchsiaResourceDialect,
1306 >;
1307 fn r#try_one(&self, mut test_input: Input) -> Self::TryOneResponseFut {
1308 fn _decode(
1309 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1310 ) -> Result<ControllerTryOneResult, fidl::Error> {
1311 let _response = fidl::client::decode_transaction_body::<
1312 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1313 fidl::encoding::DefaultFuchsiaResourceDialect,
1314 0x368dc762d8e16d46,
1315 >(_buf?)?;
1316 Ok(_response.map(|x| x))
1317 }
1318 self.client.send_query_and_decode::<ControllerTryOneRequest, ControllerTryOneResult>(
1319 (&mut test_input,),
1320 0x368dc762d8e16d46,
1321 fidl::encoding::DynamicFlags::empty(),
1322 _decode,
1323 )
1324 }
1325
1326 type MinimizeResponseFut = fidl::client::QueryResponseFut<
1327 ControllerMinimizeResult,
1328 fidl::encoding::DefaultFuchsiaResourceDialect,
1329 >;
1330 fn r#minimize(&self, mut test_input: Input) -> Self::MinimizeResponseFut {
1331 fn _decode(
1332 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1333 ) -> Result<ControllerMinimizeResult, fidl::Error> {
1334 let _response = fidl::client::decode_transaction_body::<
1335 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1336 fidl::encoding::DefaultFuchsiaResourceDialect,
1337 0x105a242ee0552794,
1338 >(_buf?)?;
1339 Ok(_response.map(|x| x))
1340 }
1341 self.client.send_query_and_decode::<ControllerMinimizeRequest, ControllerMinimizeResult>(
1342 (&mut test_input,),
1343 0x105a242ee0552794,
1344 fidl::encoding::DynamicFlags::empty(),
1345 _decode,
1346 )
1347 }
1348
1349 type CleanseResponseFut = fidl::client::QueryResponseFut<
1350 ControllerCleanseResult,
1351 fidl::encoding::DefaultFuchsiaResourceDialect,
1352 >;
1353 fn r#cleanse(&self, mut test_input: Input) -> Self::CleanseResponseFut {
1354 fn _decode(
1355 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1356 ) -> Result<ControllerCleanseResult, fidl::Error> {
1357 let _response = fidl::client::decode_transaction_body::<
1358 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1359 fidl::encoding::DefaultFuchsiaResourceDialect,
1360 0x6d7892f62735f3e0,
1361 >(_buf?)?;
1362 Ok(_response.map(|x| x))
1363 }
1364 self.client.send_query_and_decode::<ControllerCleanseRequest, ControllerCleanseResult>(
1365 (&mut test_input,),
1366 0x6d7892f62735f3e0,
1367 fidl::encoding::DynamicFlags::empty(),
1368 _decode,
1369 )
1370 }
1371
1372 type MergeResponseFut = fidl::client::QueryResponseFut<
1373 ControllerMergeResult,
1374 fidl::encoding::DefaultFuchsiaResourceDialect,
1375 >;
1376 fn r#merge(&self) -> Self::MergeResponseFut {
1377 fn _decode(
1378 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1379 ) -> Result<ControllerMergeResult, fidl::Error> {
1380 let _response = fidl::client::decode_transaction_body::<
1381 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1382 fidl::encoding::DefaultFuchsiaResourceDialect,
1383 0x3614e5c39413b5eb,
1384 >(_buf?)?;
1385 Ok(_response.map(|x| x))
1386 }
1387 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerMergeResult>(
1388 (),
1389 0x3614e5c39413b5eb,
1390 fidl::encoding::DynamicFlags::empty(),
1391 _decode,
1392 )
1393 }
1394
1395 type GetStatusResponseFut =
1396 fidl::client::QueryResponseFut<Status, fidl::encoding::DefaultFuchsiaResourceDialect>;
1397 fn r#get_status(&self) -> Self::GetStatusResponseFut {
1398 fn _decode(
1399 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1400 ) -> Result<Status, fidl::Error> {
1401 let _response = fidl::client::decode_transaction_body::<
1402 ControllerGetStatusResponse,
1403 fidl::encoding::DefaultFuchsiaResourceDialect,
1404 0x51db4975d93ce768,
1405 >(_buf?)?;
1406 Ok(_response.status)
1407 }
1408 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Status>(
1409 (),
1410 0x51db4975d93ce768,
1411 fidl::encoding::DynamicFlags::empty(),
1412 _decode,
1413 )
1414 }
1415
1416 type WatchArtifactResponseFut =
1417 fidl::client::QueryResponseFut<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>;
1418 fn r#watch_artifact(&self) -> Self::WatchArtifactResponseFut {
1419 fn _decode(
1420 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1421 ) -> Result<Artifact, fidl::Error> {
1422 let _response = fidl::client::decode_transaction_body::<
1423 ControllerWatchArtifactResponse,
1424 fidl::encoding::DefaultFuchsiaResourceDialect,
1425 0x6cfca3730944a414,
1426 >(_buf?)?;
1427 Ok(_response.artifact)
1428 }
1429 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Artifact>(
1430 (),
1431 0x6cfca3730944a414,
1432 fidl::encoding::DynamicFlags::empty(),
1433 _decode,
1434 )
1435 }
1436}
1437
1438pub struct ControllerEventStream {
1439 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1440}
1441
1442impl std::marker::Unpin for ControllerEventStream {}
1443
1444impl futures::stream::FusedStream for ControllerEventStream {
1445 fn is_terminated(&self) -> bool {
1446 self.event_receiver.is_terminated()
1447 }
1448}
1449
1450impl futures::Stream for ControllerEventStream {
1451 type Item = Result<ControllerEvent, fidl::Error>;
1452
1453 fn poll_next(
1454 mut self: std::pin::Pin<&mut Self>,
1455 cx: &mut std::task::Context<'_>,
1456 ) -> std::task::Poll<Option<Self::Item>> {
1457 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1458 &mut self.event_receiver,
1459 cx
1460 )?) {
1461 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1462 None => std::task::Poll::Ready(None),
1463 }
1464 }
1465}
1466
1467#[derive(Debug)]
1468pub enum ControllerEvent {}
1469
1470impl ControllerEvent {
1471 fn decode(
1473 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1474 ) -> Result<ControllerEvent, fidl::Error> {
1475 let (bytes, _handles) = buf.split_mut();
1476 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1477 debug_assert_eq!(tx_header.tx_id, 0);
1478 match tx_header.ordinal {
1479 _ => Err(fidl::Error::UnknownOrdinal {
1480 ordinal: tx_header.ordinal,
1481 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1482 }),
1483 }
1484 }
1485}
1486
1487pub struct ControllerRequestStream {
1489 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1490 is_terminated: bool,
1491}
1492
1493impl std::marker::Unpin for ControllerRequestStream {}
1494
1495impl futures::stream::FusedStream for ControllerRequestStream {
1496 fn is_terminated(&self) -> bool {
1497 self.is_terminated
1498 }
1499}
1500
1501impl fidl::endpoints::RequestStream for ControllerRequestStream {
1502 type Protocol = ControllerMarker;
1503 type ControlHandle = ControllerControlHandle;
1504
1505 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1506 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1507 }
1508
1509 fn control_handle(&self) -> Self::ControlHandle {
1510 ControllerControlHandle { inner: self.inner.clone() }
1511 }
1512
1513 fn into_inner(
1514 self,
1515 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1516 {
1517 (self.inner, self.is_terminated)
1518 }
1519
1520 fn from_inner(
1521 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1522 is_terminated: bool,
1523 ) -> Self {
1524 Self { inner, is_terminated }
1525 }
1526}
1527
1528impl futures::Stream for ControllerRequestStream {
1529 type Item = Result<ControllerRequest, fidl::Error>;
1530
1531 fn poll_next(
1532 mut self: std::pin::Pin<&mut Self>,
1533 cx: &mut std::task::Context<'_>,
1534 ) -> std::task::Poll<Option<Self::Item>> {
1535 let this = &mut *self;
1536 if this.inner.check_shutdown(cx) {
1537 this.is_terminated = true;
1538 return std::task::Poll::Ready(None);
1539 }
1540 if this.is_terminated {
1541 panic!("polled ControllerRequestStream after completion");
1542 }
1543 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1544 |bytes, handles| {
1545 match this.inner.channel().read_etc(cx, bytes, handles) {
1546 std::task::Poll::Ready(Ok(())) => {}
1547 std::task::Poll::Pending => return std::task::Poll::Pending,
1548 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1549 this.is_terminated = true;
1550 return std::task::Poll::Ready(None);
1551 }
1552 std::task::Poll::Ready(Err(e)) => {
1553 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1554 e.into(),
1555 ))))
1556 }
1557 }
1558
1559 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1561
1562 std::task::Poll::Ready(Some(match header.ordinal {
1563 0x35c8cba7fa3d32e4 => {
1564 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1565 let mut req = fidl::new_empty!(
1566 ControllerConfigureRequest,
1567 fidl::encoding::DefaultFuchsiaResourceDialect
1568 );
1569 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerConfigureRequest>(&header, _body_bytes, handles, &mut req)?;
1570 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1571 Ok(ControllerRequest::Configure {
1572 options: req.options,
1573
1574 responder: ControllerConfigureResponder {
1575 control_handle: std::mem::ManuallyDrop::new(control_handle),
1576 tx_id: header.tx_id,
1577 },
1578 })
1579 }
1580 0x683d93332504b9cd => {
1581 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1582 let mut req = fidl::new_empty!(
1583 fidl::encoding::EmptyPayload,
1584 fidl::encoding::DefaultFuchsiaResourceDialect
1585 );
1586 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1587 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1588 Ok(ControllerRequest::GetOptions {
1589 responder: ControllerGetOptionsResponder {
1590 control_handle: std::mem::ManuallyDrop::new(control_handle),
1591 tx_id: header.tx_id,
1592 },
1593 })
1594 }
1595 0x7bdf8336ab534cee => {
1596 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1597 let mut req = fidl::new_empty!(
1598 ControllerAddToCorpusRequest,
1599 fidl::encoding::DefaultFuchsiaResourceDialect
1600 );
1601 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddToCorpusRequest>(&header, _body_bytes, handles, &mut req)?;
1602 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1603 Ok(ControllerRequest::AddToCorpus {
1604 corpus: req.corpus,
1605 input: req.input,
1606
1607 responder: ControllerAddToCorpusResponder {
1608 control_handle: std::mem::ManuallyDrop::new(control_handle),
1609 tx_id: header.tx_id,
1610 },
1611 })
1612 }
1613 0x501279b430b34514 => {
1614 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1615 let mut req = fidl::new_empty!(
1616 ControllerReadCorpusRequest,
1617 fidl::encoding::DefaultFuchsiaResourceDialect
1618 );
1619 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerReadCorpusRequest>(&header, _body_bytes, handles, &mut req)?;
1620 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1621 Ok(ControllerRequest::ReadCorpus {
1622 corpus: req.corpus,
1623 corpus_reader: req.corpus_reader,
1624
1625 responder: ControllerReadCorpusResponder {
1626 control_handle: std::mem::ManuallyDrop::new(control_handle),
1627 tx_id: header.tx_id,
1628 },
1629 })
1630 }
1631 0x4ecfc1274fe4a70b => {
1632 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1633 let mut req = fidl::new_empty!(
1634 ControllerWriteDictionaryRequest,
1635 fidl::encoding::DefaultFuchsiaResourceDialect
1636 );
1637 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerWriteDictionaryRequest>(&header, _body_bytes, handles, &mut req)?;
1638 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1639 Ok(ControllerRequest::WriteDictionary {
1640 dictionary: req.dictionary,
1641
1642 responder: ControllerWriteDictionaryResponder {
1643 control_handle: std::mem::ManuallyDrop::new(control_handle),
1644 tx_id: header.tx_id,
1645 },
1646 })
1647 }
1648 0x1be6724c87b51c37 => {
1649 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1650 let mut req = fidl::new_empty!(
1651 fidl::encoding::EmptyPayload,
1652 fidl::encoding::DefaultFuchsiaResourceDialect
1653 );
1654 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1655 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1656 Ok(ControllerRequest::ReadDictionary {
1657 responder: ControllerReadDictionaryResponder {
1658 control_handle: std::mem::ManuallyDrop::new(control_handle),
1659 tx_id: header.tx_id,
1660 },
1661 })
1662 }
1663 0x2efbf7d3dc21438e => {
1664 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1665 let mut req = fidl::new_empty!(
1666 ControllerAddMonitorRequest,
1667 fidl::encoding::DefaultFuchsiaResourceDialect
1668 );
1669 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddMonitorRequest>(&header, _body_bytes, handles, &mut req)?;
1670 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1671 Ok(ControllerRequest::AddMonitor {
1672 monitor: req.monitor,
1673
1674 responder: ControllerAddMonitorResponder {
1675 control_handle: std::mem::ManuallyDrop::new(control_handle),
1676 tx_id: header.tx_id,
1677 },
1678 })
1679 }
1680 0x62fe3684ea23af62 => {
1681 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1682 let mut req = fidl::new_empty!(
1683 fidl::encoding::EmptyPayload,
1684 fidl::encoding::DefaultFuchsiaResourceDialect
1685 );
1686 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1687 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1688 Ok(ControllerRequest::Fuzz {
1689 responder: ControllerFuzzResponder {
1690 control_handle: std::mem::ManuallyDrop::new(control_handle),
1691 tx_id: header.tx_id,
1692 },
1693 })
1694 }
1695 0x368dc762d8e16d46 => {
1696 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1697 let mut req = fidl::new_empty!(
1698 ControllerTryOneRequest,
1699 fidl::encoding::DefaultFuchsiaResourceDialect
1700 );
1701 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerTryOneRequest>(&header, _body_bytes, handles, &mut req)?;
1702 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1703 Ok(ControllerRequest::TryOne {
1704 test_input: req.test_input,
1705
1706 responder: ControllerTryOneResponder {
1707 control_handle: std::mem::ManuallyDrop::new(control_handle),
1708 tx_id: header.tx_id,
1709 },
1710 })
1711 }
1712 0x105a242ee0552794 => {
1713 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1714 let mut req = fidl::new_empty!(
1715 ControllerMinimizeRequest,
1716 fidl::encoding::DefaultFuchsiaResourceDialect
1717 );
1718 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerMinimizeRequest>(&header, _body_bytes, handles, &mut req)?;
1719 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1720 Ok(ControllerRequest::Minimize {
1721 test_input: req.test_input,
1722
1723 responder: ControllerMinimizeResponder {
1724 control_handle: std::mem::ManuallyDrop::new(control_handle),
1725 tx_id: header.tx_id,
1726 },
1727 })
1728 }
1729 0x6d7892f62735f3e0 => {
1730 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1731 let mut req = fidl::new_empty!(
1732 ControllerCleanseRequest,
1733 fidl::encoding::DefaultFuchsiaResourceDialect
1734 );
1735 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerCleanseRequest>(&header, _body_bytes, handles, &mut req)?;
1736 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1737 Ok(ControllerRequest::Cleanse {
1738 test_input: req.test_input,
1739
1740 responder: ControllerCleanseResponder {
1741 control_handle: std::mem::ManuallyDrop::new(control_handle),
1742 tx_id: header.tx_id,
1743 },
1744 })
1745 }
1746 0x3614e5c39413b5eb => {
1747 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1748 let mut req = fidl::new_empty!(
1749 fidl::encoding::EmptyPayload,
1750 fidl::encoding::DefaultFuchsiaResourceDialect
1751 );
1752 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1753 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1754 Ok(ControllerRequest::Merge {
1755 responder: ControllerMergeResponder {
1756 control_handle: std::mem::ManuallyDrop::new(control_handle),
1757 tx_id: header.tx_id,
1758 },
1759 })
1760 }
1761 0x51db4975d93ce768 => {
1762 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1763 let mut req = fidl::new_empty!(
1764 fidl::encoding::EmptyPayload,
1765 fidl::encoding::DefaultFuchsiaResourceDialect
1766 );
1767 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1768 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1769 Ok(ControllerRequest::GetStatus {
1770 responder: ControllerGetStatusResponder {
1771 control_handle: std::mem::ManuallyDrop::new(control_handle),
1772 tx_id: header.tx_id,
1773 },
1774 })
1775 }
1776 0x6cfca3730944a414 => {
1777 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1778 let mut req = fidl::new_empty!(
1779 fidl::encoding::EmptyPayload,
1780 fidl::encoding::DefaultFuchsiaResourceDialect
1781 );
1782 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1783 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1784 Ok(ControllerRequest::WatchArtifact {
1785 responder: ControllerWatchArtifactResponder {
1786 control_handle: std::mem::ManuallyDrop::new(control_handle),
1787 tx_id: header.tx_id,
1788 },
1789 })
1790 }
1791 _ => Err(fidl::Error::UnknownOrdinal {
1792 ordinal: header.ordinal,
1793 protocol_name:
1794 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1795 }),
1796 }))
1797 },
1798 )
1799 }
1800}
1801
1802#[derive(Debug)]
1810pub enum ControllerRequest {
1811 Configure { options: Options, responder: ControllerConfigureResponder },
1825 GetOptions { responder: ControllerGetOptionsResponder },
1830 AddToCorpus { corpus: Corpus, input: Input, responder: ControllerAddToCorpusResponder },
1840 ReadCorpus {
1845 corpus: Corpus,
1846 corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
1847 responder: ControllerReadCorpusResponder,
1848 },
1849 WriteDictionary { dictionary: Input, responder: ControllerWriteDictionaryResponder },
1861 ReadDictionary { responder: ControllerReadDictionaryResponder },
1865 AddMonitor {
1870 monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
1871 responder: ControllerAddMonitorResponder,
1872 },
1873 Fuzz { responder: ControllerFuzzResponder },
1894 TryOne { test_input: Input, responder: ControllerTryOneResponder },
1905 Minimize { test_input: Input, responder: ControllerMinimizeResponder },
1920 Cleanse { test_input: Input, responder: ControllerCleanseResponder },
1936 Merge { responder: ControllerMergeResponder },
1950 GetStatus { responder: ControllerGetStatusResponder },
1954 WatchArtifact { responder: ControllerWatchArtifactResponder },
1984}
1985
1986impl ControllerRequest {
1987 #[allow(irrefutable_let_patterns)]
1988 pub fn into_configure(self) -> Option<(Options, ControllerConfigureResponder)> {
1989 if let ControllerRequest::Configure { options, responder } = self {
1990 Some((options, responder))
1991 } else {
1992 None
1993 }
1994 }
1995
1996 #[allow(irrefutable_let_patterns)]
1997 pub fn into_get_options(self) -> Option<(ControllerGetOptionsResponder)> {
1998 if let ControllerRequest::GetOptions { responder } = self {
1999 Some((responder))
2000 } else {
2001 None
2002 }
2003 }
2004
2005 #[allow(irrefutable_let_patterns)]
2006 pub fn into_add_to_corpus(self) -> Option<(Corpus, Input, ControllerAddToCorpusResponder)> {
2007 if let ControllerRequest::AddToCorpus { corpus, input, responder } = self {
2008 Some((corpus, input, responder))
2009 } else {
2010 None
2011 }
2012 }
2013
2014 #[allow(irrefutable_let_patterns)]
2015 pub fn into_read_corpus(
2016 self,
2017 ) -> Option<(
2018 Corpus,
2019 fidl::endpoints::ClientEnd<CorpusReaderMarker>,
2020 ControllerReadCorpusResponder,
2021 )> {
2022 if let ControllerRequest::ReadCorpus { corpus, corpus_reader, responder } = self {
2023 Some((corpus, corpus_reader, responder))
2024 } else {
2025 None
2026 }
2027 }
2028
2029 #[allow(irrefutable_let_patterns)]
2030 pub fn into_write_dictionary(self) -> Option<(Input, ControllerWriteDictionaryResponder)> {
2031 if let ControllerRequest::WriteDictionary { dictionary, responder } = self {
2032 Some((dictionary, responder))
2033 } else {
2034 None
2035 }
2036 }
2037
2038 #[allow(irrefutable_let_patterns)]
2039 pub fn into_read_dictionary(self) -> Option<(ControllerReadDictionaryResponder)> {
2040 if let ControllerRequest::ReadDictionary { responder } = self {
2041 Some((responder))
2042 } else {
2043 None
2044 }
2045 }
2046
2047 #[allow(irrefutable_let_patterns)]
2048 pub fn into_add_monitor(
2049 self,
2050 ) -> Option<(fidl::endpoints::ClientEnd<MonitorMarker>, ControllerAddMonitorResponder)> {
2051 if let ControllerRequest::AddMonitor { monitor, responder } = self {
2052 Some((monitor, responder))
2053 } else {
2054 None
2055 }
2056 }
2057
2058 #[allow(irrefutable_let_patterns)]
2059 pub fn into_fuzz(self) -> Option<(ControllerFuzzResponder)> {
2060 if let ControllerRequest::Fuzz { responder } = self {
2061 Some((responder))
2062 } else {
2063 None
2064 }
2065 }
2066
2067 #[allow(irrefutable_let_patterns)]
2068 pub fn into_try_one(self) -> Option<(Input, ControllerTryOneResponder)> {
2069 if let ControllerRequest::TryOne { test_input, responder } = self {
2070 Some((test_input, responder))
2071 } else {
2072 None
2073 }
2074 }
2075
2076 #[allow(irrefutable_let_patterns)]
2077 pub fn into_minimize(self) -> Option<(Input, ControllerMinimizeResponder)> {
2078 if let ControllerRequest::Minimize { test_input, responder } = self {
2079 Some((test_input, responder))
2080 } else {
2081 None
2082 }
2083 }
2084
2085 #[allow(irrefutable_let_patterns)]
2086 pub fn into_cleanse(self) -> Option<(Input, ControllerCleanseResponder)> {
2087 if let ControllerRequest::Cleanse { test_input, responder } = self {
2088 Some((test_input, responder))
2089 } else {
2090 None
2091 }
2092 }
2093
2094 #[allow(irrefutable_let_patterns)]
2095 pub fn into_merge(self) -> Option<(ControllerMergeResponder)> {
2096 if let ControllerRequest::Merge { responder } = self {
2097 Some((responder))
2098 } else {
2099 None
2100 }
2101 }
2102
2103 #[allow(irrefutable_let_patterns)]
2104 pub fn into_get_status(self) -> Option<(ControllerGetStatusResponder)> {
2105 if let ControllerRequest::GetStatus { responder } = self {
2106 Some((responder))
2107 } else {
2108 None
2109 }
2110 }
2111
2112 #[allow(irrefutable_let_patterns)]
2113 pub fn into_watch_artifact(self) -> Option<(ControllerWatchArtifactResponder)> {
2114 if let ControllerRequest::WatchArtifact { responder } = self {
2115 Some((responder))
2116 } else {
2117 None
2118 }
2119 }
2120
2121 pub fn method_name(&self) -> &'static str {
2123 match *self {
2124 ControllerRequest::Configure { .. } => "configure",
2125 ControllerRequest::GetOptions { .. } => "get_options",
2126 ControllerRequest::AddToCorpus { .. } => "add_to_corpus",
2127 ControllerRequest::ReadCorpus { .. } => "read_corpus",
2128 ControllerRequest::WriteDictionary { .. } => "write_dictionary",
2129 ControllerRequest::ReadDictionary { .. } => "read_dictionary",
2130 ControllerRequest::AddMonitor { .. } => "add_monitor",
2131 ControllerRequest::Fuzz { .. } => "fuzz",
2132 ControllerRequest::TryOne { .. } => "try_one",
2133 ControllerRequest::Minimize { .. } => "minimize",
2134 ControllerRequest::Cleanse { .. } => "cleanse",
2135 ControllerRequest::Merge { .. } => "merge",
2136 ControllerRequest::GetStatus { .. } => "get_status",
2137 ControllerRequest::WatchArtifact { .. } => "watch_artifact",
2138 }
2139 }
2140}
2141
2142#[derive(Debug, Clone)]
2143pub struct ControllerControlHandle {
2144 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2145}
2146
2147impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2148 fn shutdown(&self) {
2149 self.inner.shutdown()
2150 }
2151 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2152 self.inner.shutdown_with_epitaph(status)
2153 }
2154
2155 fn is_closed(&self) -> bool {
2156 self.inner.channel().is_closed()
2157 }
2158 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2159 self.inner.channel().on_closed()
2160 }
2161
2162 #[cfg(target_os = "fuchsia")]
2163 fn signal_peer(
2164 &self,
2165 clear_mask: zx::Signals,
2166 set_mask: zx::Signals,
2167 ) -> Result<(), zx_status::Status> {
2168 use fidl::Peered;
2169 self.inner.channel().signal_peer(clear_mask, set_mask)
2170 }
2171}
2172
2173impl ControllerControlHandle {}
2174
2175#[must_use = "FIDL methods require a response to be sent"]
2176#[derive(Debug)]
2177pub struct ControllerConfigureResponder {
2178 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2179 tx_id: u32,
2180}
2181
2182impl std::ops::Drop for ControllerConfigureResponder {
2186 fn drop(&mut self) {
2187 self.control_handle.shutdown();
2188 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2190 }
2191}
2192
2193impl fidl::endpoints::Responder for ControllerConfigureResponder {
2194 type ControlHandle = ControllerControlHandle;
2195
2196 fn control_handle(&self) -> &ControllerControlHandle {
2197 &self.control_handle
2198 }
2199
2200 fn drop_without_shutdown(mut self) {
2201 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2203 std::mem::forget(self);
2205 }
2206}
2207
2208impl ControllerConfigureResponder {
2209 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2213 let _result = self.send_raw(result);
2214 if _result.is_err() {
2215 self.control_handle.shutdown();
2216 }
2217 self.drop_without_shutdown();
2218 _result
2219 }
2220
2221 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2223 let _result = self.send_raw(result);
2224 self.drop_without_shutdown();
2225 _result
2226 }
2227
2228 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2229 self.control_handle
2230 .inner
2231 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2232 result,
2233 self.tx_id,
2234 0x35c8cba7fa3d32e4,
2235 fidl::encoding::DynamicFlags::empty(),
2236 )
2237 }
2238}
2239
2240#[must_use = "FIDL methods require a response to be sent"]
2241#[derive(Debug)]
2242pub struct ControllerGetOptionsResponder {
2243 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2244 tx_id: u32,
2245}
2246
2247impl std::ops::Drop for ControllerGetOptionsResponder {
2251 fn drop(&mut self) {
2252 self.control_handle.shutdown();
2253 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2255 }
2256}
2257
2258impl fidl::endpoints::Responder for ControllerGetOptionsResponder {
2259 type ControlHandle = ControllerControlHandle;
2260
2261 fn control_handle(&self) -> &ControllerControlHandle {
2262 &self.control_handle
2263 }
2264
2265 fn drop_without_shutdown(mut self) {
2266 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2268 std::mem::forget(self);
2270 }
2271}
2272
2273impl ControllerGetOptionsResponder {
2274 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
2278 let _result = self.send_raw(options);
2279 if _result.is_err() {
2280 self.control_handle.shutdown();
2281 }
2282 self.drop_without_shutdown();
2283 _result
2284 }
2285
2286 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
2288 let _result = self.send_raw(options);
2289 self.drop_without_shutdown();
2290 _result
2291 }
2292
2293 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
2294 self.control_handle.inner.send::<ControllerGetOptionsResponse>(
2295 (options,),
2296 self.tx_id,
2297 0x683d93332504b9cd,
2298 fidl::encoding::DynamicFlags::empty(),
2299 )
2300 }
2301}
2302
2303#[must_use = "FIDL methods require a response to be sent"]
2304#[derive(Debug)]
2305pub struct ControllerAddToCorpusResponder {
2306 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2307 tx_id: u32,
2308}
2309
2310impl std::ops::Drop for ControllerAddToCorpusResponder {
2314 fn drop(&mut self) {
2315 self.control_handle.shutdown();
2316 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2318 }
2319}
2320
2321impl fidl::endpoints::Responder for ControllerAddToCorpusResponder {
2322 type ControlHandle = ControllerControlHandle;
2323
2324 fn control_handle(&self) -> &ControllerControlHandle {
2325 &self.control_handle
2326 }
2327
2328 fn drop_without_shutdown(mut self) {
2329 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2331 std::mem::forget(self);
2333 }
2334}
2335
2336impl ControllerAddToCorpusResponder {
2337 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2341 let _result = self.send_raw(result);
2342 if _result.is_err() {
2343 self.control_handle.shutdown();
2344 }
2345 self.drop_without_shutdown();
2346 _result
2347 }
2348
2349 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2351 let _result = self.send_raw(result);
2352 self.drop_without_shutdown();
2353 _result
2354 }
2355
2356 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2357 self.control_handle
2358 .inner
2359 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2360 result,
2361 self.tx_id,
2362 0x7bdf8336ab534cee,
2363 fidl::encoding::DynamicFlags::empty(),
2364 )
2365 }
2366}
2367
2368#[must_use = "FIDL methods require a response to be sent"]
2369#[derive(Debug)]
2370pub struct ControllerReadCorpusResponder {
2371 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2372 tx_id: u32,
2373}
2374
2375impl std::ops::Drop for ControllerReadCorpusResponder {
2379 fn drop(&mut self) {
2380 self.control_handle.shutdown();
2381 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2383 }
2384}
2385
2386impl fidl::endpoints::Responder for ControllerReadCorpusResponder {
2387 type ControlHandle = ControllerControlHandle;
2388
2389 fn control_handle(&self) -> &ControllerControlHandle {
2390 &self.control_handle
2391 }
2392
2393 fn drop_without_shutdown(mut self) {
2394 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2396 std::mem::forget(self);
2398 }
2399}
2400
2401impl ControllerReadCorpusResponder {
2402 pub fn send(self) -> Result<(), fidl::Error> {
2406 let _result = self.send_raw();
2407 if _result.is_err() {
2408 self.control_handle.shutdown();
2409 }
2410 self.drop_without_shutdown();
2411 _result
2412 }
2413
2414 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2416 let _result = self.send_raw();
2417 self.drop_without_shutdown();
2418 _result
2419 }
2420
2421 fn send_raw(&self) -> Result<(), fidl::Error> {
2422 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2423 (),
2424 self.tx_id,
2425 0x501279b430b34514,
2426 fidl::encoding::DynamicFlags::empty(),
2427 )
2428 }
2429}
2430
2431#[must_use = "FIDL methods require a response to be sent"]
2432#[derive(Debug)]
2433pub struct ControllerWriteDictionaryResponder {
2434 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2435 tx_id: u32,
2436}
2437
2438impl std::ops::Drop for ControllerWriteDictionaryResponder {
2442 fn drop(&mut self) {
2443 self.control_handle.shutdown();
2444 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2446 }
2447}
2448
2449impl fidl::endpoints::Responder for ControllerWriteDictionaryResponder {
2450 type ControlHandle = ControllerControlHandle;
2451
2452 fn control_handle(&self) -> &ControllerControlHandle {
2453 &self.control_handle
2454 }
2455
2456 fn drop_without_shutdown(mut self) {
2457 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2459 std::mem::forget(self);
2461 }
2462}
2463
2464impl ControllerWriteDictionaryResponder {
2465 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2469 let _result = self.send_raw(result);
2470 if _result.is_err() {
2471 self.control_handle.shutdown();
2472 }
2473 self.drop_without_shutdown();
2474 _result
2475 }
2476
2477 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2479 let _result = self.send_raw(result);
2480 self.drop_without_shutdown();
2481 _result
2482 }
2483
2484 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2485 self.control_handle
2486 .inner
2487 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2488 result,
2489 self.tx_id,
2490 0x4ecfc1274fe4a70b,
2491 fidl::encoding::DynamicFlags::empty(),
2492 )
2493 }
2494}
2495
2496#[must_use = "FIDL methods require a response to be sent"]
2497#[derive(Debug)]
2498pub struct ControllerReadDictionaryResponder {
2499 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2500 tx_id: u32,
2501}
2502
2503impl std::ops::Drop for ControllerReadDictionaryResponder {
2507 fn drop(&mut self) {
2508 self.control_handle.shutdown();
2509 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2511 }
2512}
2513
2514impl fidl::endpoints::Responder for ControllerReadDictionaryResponder {
2515 type ControlHandle = ControllerControlHandle;
2516
2517 fn control_handle(&self) -> &ControllerControlHandle {
2518 &self.control_handle
2519 }
2520
2521 fn drop_without_shutdown(mut self) {
2522 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2524 std::mem::forget(self);
2526 }
2527}
2528
2529impl ControllerReadDictionaryResponder {
2530 pub fn send(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2534 let _result = self.send_raw(dictionary);
2535 if _result.is_err() {
2536 self.control_handle.shutdown();
2537 }
2538 self.drop_without_shutdown();
2539 _result
2540 }
2541
2542 pub fn send_no_shutdown_on_err(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2544 let _result = self.send_raw(dictionary);
2545 self.drop_without_shutdown();
2546 _result
2547 }
2548
2549 fn send_raw(&self, mut dictionary: Input) -> Result<(), fidl::Error> {
2550 self.control_handle.inner.send::<ControllerReadDictionaryResponse>(
2551 (&mut dictionary,),
2552 self.tx_id,
2553 0x1be6724c87b51c37,
2554 fidl::encoding::DynamicFlags::empty(),
2555 )
2556 }
2557}
2558
2559#[must_use = "FIDL methods require a response to be sent"]
2560#[derive(Debug)]
2561pub struct ControllerAddMonitorResponder {
2562 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2563 tx_id: u32,
2564}
2565
2566impl std::ops::Drop for ControllerAddMonitorResponder {
2570 fn drop(&mut self) {
2571 self.control_handle.shutdown();
2572 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2574 }
2575}
2576
2577impl fidl::endpoints::Responder for ControllerAddMonitorResponder {
2578 type ControlHandle = ControllerControlHandle;
2579
2580 fn control_handle(&self) -> &ControllerControlHandle {
2581 &self.control_handle
2582 }
2583
2584 fn drop_without_shutdown(mut self) {
2585 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2587 std::mem::forget(self);
2589 }
2590}
2591
2592impl ControllerAddMonitorResponder {
2593 pub fn send(self) -> Result<(), fidl::Error> {
2597 let _result = self.send_raw();
2598 if _result.is_err() {
2599 self.control_handle.shutdown();
2600 }
2601 self.drop_without_shutdown();
2602 _result
2603 }
2604
2605 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2607 let _result = self.send_raw();
2608 self.drop_without_shutdown();
2609 _result
2610 }
2611
2612 fn send_raw(&self) -> Result<(), fidl::Error> {
2613 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2614 (),
2615 self.tx_id,
2616 0x2efbf7d3dc21438e,
2617 fidl::encoding::DynamicFlags::empty(),
2618 )
2619 }
2620}
2621
2622#[must_use = "FIDL methods require a response to be sent"]
2623#[derive(Debug)]
2624pub struct ControllerFuzzResponder {
2625 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2626 tx_id: u32,
2627}
2628
2629impl std::ops::Drop for ControllerFuzzResponder {
2633 fn drop(&mut self) {
2634 self.control_handle.shutdown();
2635 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2637 }
2638}
2639
2640impl fidl::endpoints::Responder for ControllerFuzzResponder {
2641 type ControlHandle = ControllerControlHandle;
2642
2643 fn control_handle(&self) -> &ControllerControlHandle {
2644 &self.control_handle
2645 }
2646
2647 fn drop_without_shutdown(mut self) {
2648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2650 std::mem::forget(self);
2652 }
2653}
2654
2655impl ControllerFuzzResponder {
2656 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2660 let _result = self.send_raw(result);
2661 if _result.is_err() {
2662 self.control_handle.shutdown();
2663 }
2664 self.drop_without_shutdown();
2665 _result
2666 }
2667
2668 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2670 let _result = self.send_raw(result);
2671 self.drop_without_shutdown();
2672 _result
2673 }
2674
2675 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2676 self.control_handle
2677 .inner
2678 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2679 result,
2680 self.tx_id,
2681 0x62fe3684ea23af62,
2682 fidl::encoding::DynamicFlags::empty(),
2683 )
2684 }
2685}
2686
2687#[must_use = "FIDL methods require a response to be sent"]
2688#[derive(Debug)]
2689pub struct ControllerTryOneResponder {
2690 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2691 tx_id: u32,
2692}
2693
2694impl std::ops::Drop for ControllerTryOneResponder {
2698 fn drop(&mut self) {
2699 self.control_handle.shutdown();
2700 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2702 }
2703}
2704
2705impl fidl::endpoints::Responder for ControllerTryOneResponder {
2706 type ControlHandle = ControllerControlHandle;
2707
2708 fn control_handle(&self) -> &ControllerControlHandle {
2709 &self.control_handle
2710 }
2711
2712 fn drop_without_shutdown(mut self) {
2713 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2715 std::mem::forget(self);
2717 }
2718}
2719
2720impl ControllerTryOneResponder {
2721 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2725 let _result = self.send_raw(result);
2726 if _result.is_err() {
2727 self.control_handle.shutdown();
2728 }
2729 self.drop_without_shutdown();
2730 _result
2731 }
2732
2733 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2735 let _result = self.send_raw(result);
2736 self.drop_without_shutdown();
2737 _result
2738 }
2739
2740 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2741 self.control_handle
2742 .inner
2743 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2744 result,
2745 self.tx_id,
2746 0x368dc762d8e16d46,
2747 fidl::encoding::DynamicFlags::empty(),
2748 )
2749 }
2750}
2751
2752#[must_use = "FIDL methods require a response to be sent"]
2753#[derive(Debug)]
2754pub struct ControllerMinimizeResponder {
2755 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2756 tx_id: u32,
2757}
2758
2759impl std::ops::Drop for ControllerMinimizeResponder {
2763 fn drop(&mut self) {
2764 self.control_handle.shutdown();
2765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2767 }
2768}
2769
2770impl fidl::endpoints::Responder for ControllerMinimizeResponder {
2771 type ControlHandle = ControllerControlHandle;
2772
2773 fn control_handle(&self) -> &ControllerControlHandle {
2774 &self.control_handle
2775 }
2776
2777 fn drop_without_shutdown(mut self) {
2778 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2780 std::mem::forget(self);
2782 }
2783}
2784
2785impl ControllerMinimizeResponder {
2786 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2790 let _result = self.send_raw(result);
2791 if _result.is_err() {
2792 self.control_handle.shutdown();
2793 }
2794 self.drop_without_shutdown();
2795 _result
2796 }
2797
2798 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2800 let _result = self.send_raw(result);
2801 self.drop_without_shutdown();
2802 _result
2803 }
2804
2805 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2806 self.control_handle
2807 .inner
2808 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2809 result,
2810 self.tx_id,
2811 0x105a242ee0552794,
2812 fidl::encoding::DynamicFlags::empty(),
2813 )
2814 }
2815}
2816
2817#[must_use = "FIDL methods require a response to be sent"]
2818#[derive(Debug)]
2819pub struct ControllerCleanseResponder {
2820 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2821 tx_id: u32,
2822}
2823
2824impl std::ops::Drop for ControllerCleanseResponder {
2828 fn drop(&mut self) {
2829 self.control_handle.shutdown();
2830 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2832 }
2833}
2834
2835impl fidl::endpoints::Responder for ControllerCleanseResponder {
2836 type ControlHandle = ControllerControlHandle;
2837
2838 fn control_handle(&self) -> &ControllerControlHandle {
2839 &self.control_handle
2840 }
2841
2842 fn drop_without_shutdown(mut self) {
2843 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2845 std::mem::forget(self);
2847 }
2848}
2849
2850impl ControllerCleanseResponder {
2851 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2855 let _result = self.send_raw(result);
2856 if _result.is_err() {
2857 self.control_handle.shutdown();
2858 }
2859 self.drop_without_shutdown();
2860 _result
2861 }
2862
2863 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2865 let _result = self.send_raw(result);
2866 self.drop_without_shutdown();
2867 _result
2868 }
2869
2870 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2871 self.control_handle
2872 .inner
2873 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2874 result,
2875 self.tx_id,
2876 0x6d7892f62735f3e0,
2877 fidl::encoding::DynamicFlags::empty(),
2878 )
2879 }
2880}
2881
2882#[must_use = "FIDL methods require a response to be sent"]
2883#[derive(Debug)]
2884pub struct ControllerMergeResponder {
2885 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2886 tx_id: u32,
2887}
2888
2889impl std::ops::Drop for ControllerMergeResponder {
2893 fn drop(&mut self) {
2894 self.control_handle.shutdown();
2895 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2897 }
2898}
2899
2900impl fidl::endpoints::Responder for ControllerMergeResponder {
2901 type ControlHandle = ControllerControlHandle;
2902
2903 fn control_handle(&self) -> &ControllerControlHandle {
2904 &self.control_handle
2905 }
2906
2907 fn drop_without_shutdown(mut self) {
2908 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2910 std::mem::forget(self);
2912 }
2913}
2914
2915impl ControllerMergeResponder {
2916 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2920 let _result = self.send_raw(result);
2921 if _result.is_err() {
2922 self.control_handle.shutdown();
2923 }
2924 self.drop_without_shutdown();
2925 _result
2926 }
2927
2928 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2930 let _result = self.send_raw(result);
2931 self.drop_without_shutdown();
2932 _result
2933 }
2934
2935 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2936 self.control_handle
2937 .inner
2938 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2939 result,
2940 self.tx_id,
2941 0x3614e5c39413b5eb,
2942 fidl::encoding::DynamicFlags::empty(),
2943 )
2944 }
2945}
2946
2947#[must_use = "FIDL methods require a response to be sent"]
2948#[derive(Debug)]
2949pub struct ControllerGetStatusResponder {
2950 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2951 tx_id: u32,
2952}
2953
2954impl std::ops::Drop for ControllerGetStatusResponder {
2958 fn drop(&mut self) {
2959 self.control_handle.shutdown();
2960 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2962 }
2963}
2964
2965impl fidl::endpoints::Responder for ControllerGetStatusResponder {
2966 type ControlHandle = ControllerControlHandle;
2967
2968 fn control_handle(&self) -> &ControllerControlHandle {
2969 &self.control_handle
2970 }
2971
2972 fn drop_without_shutdown(mut self) {
2973 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2975 std::mem::forget(self);
2977 }
2978}
2979
2980impl ControllerGetStatusResponder {
2981 pub fn send(self, mut status: &Status) -> Result<(), fidl::Error> {
2985 let _result = self.send_raw(status);
2986 if _result.is_err() {
2987 self.control_handle.shutdown();
2988 }
2989 self.drop_without_shutdown();
2990 _result
2991 }
2992
2993 pub fn send_no_shutdown_on_err(self, mut status: &Status) -> Result<(), fidl::Error> {
2995 let _result = self.send_raw(status);
2996 self.drop_without_shutdown();
2997 _result
2998 }
2999
3000 fn send_raw(&self, mut status: &Status) -> Result<(), fidl::Error> {
3001 self.control_handle.inner.send::<ControllerGetStatusResponse>(
3002 (status,),
3003 self.tx_id,
3004 0x51db4975d93ce768,
3005 fidl::encoding::DynamicFlags::empty(),
3006 )
3007 }
3008}
3009
3010#[must_use = "FIDL methods require a response to be sent"]
3011#[derive(Debug)]
3012pub struct ControllerWatchArtifactResponder {
3013 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
3014 tx_id: u32,
3015}
3016
3017impl std::ops::Drop for ControllerWatchArtifactResponder {
3021 fn drop(&mut self) {
3022 self.control_handle.shutdown();
3023 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3025 }
3026}
3027
3028impl fidl::endpoints::Responder for ControllerWatchArtifactResponder {
3029 type ControlHandle = ControllerControlHandle;
3030
3031 fn control_handle(&self) -> &ControllerControlHandle {
3032 &self.control_handle
3033 }
3034
3035 fn drop_without_shutdown(mut self) {
3036 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3038 std::mem::forget(self);
3040 }
3041}
3042
3043impl ControllerWatchArtifactResponder {
3044 pub fn send(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3048 let _result = self.send_raw(artifact);
3049 if _result.is_err() {
3050 self.control_handle.shutdown();
3051 }
3052 self.drop_without_shutdown();
3053 _result
3054 }
3055
3056 pub fn send_no_shutdown_on_err(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3058 let _result = self.send_raw(artifact);
3059 self.drop_without_shutdown();
3060 _result
3061 }
3062
3063 fn send_raw(&self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3064 self.control_handle.inner.send::<ControllerWatchArtifactResponse>(
3065 (&mut artifact,),
3066 self.tx_id,
3067 0x6cfca3730944a414,
3068 fidl::encoding::DynamicFlags::empty(),
3069 )
3070 }
3071}
3072
3073#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3074pub struct ControllerProviderMarker;
3075
3076impl fidl::endpoints::ProtocolMarker for ControllerProviderMarker {
3077 type Proxy = ControllerProviderProxy;
3078 type RequestStream = ControllerProviderRequestStream;
3079 #[cfg(target_os = "fuchsia")]
3080 type SynchronousProxy = ControllerProviderSynchronousProxy;
3081
3082 const DEBUG_NAME: &'static str = "(anonymous) ControllerProvider";
3083}
3084
3085pub trait ControllerProviderProxyInterface: Send + Sync {
3086 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
3087 fn r#connect(
3088 &self,
3089 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3090 ) -> Self::ConnectResponseFut;
3091 fn r#stop(&self) -> Result<(), fidl::Error>;
3092}
3093#[derive(Debug)]
3094#[cfg(target_os = "fuchsia")]
3095pub struct ControllerProviderSynchronousProxy {
3096 client: fidl::client::sync::Client,
3097}
3098
3099#[cfg(target_os = "fuchsia")]
3100impl fidl::endpoints::SynchronousProxy for ControllerProviderSynchronousProxy {
3101 type Proxy = ControllerProviderProxy;
3102 type Protocol = ControllerProviderMarker;
3103
3104 fn from_channel(inner: fidl::Channel) -> Self {
3105 Self::new(inner)
3106 }
3107
3108 fn into_channel(self) -> fidl::Channel {
3109 self.client.into_channel()
3110 }
3111
3112 fn as_channel(&self) -> &fidl::Channel {
3113 self.client.as_channel()
3114 }
3115}
3116
3117#[cfg(target_os = "fuchsia")]
3118impl ControllerProviderSynchronousProxy {
3119 pub fn new(channel: fidl::Channel) -> Self {
3120 let protocol_name =
3121 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3122 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3123 }
3124
3125 pub fn into_channel(self) -> fidl::Channel {
3126 self.client.into_channel()
3127 }
3128
3129 pub fn wait_for_event(
3132 &self,
3133 deadline: zx::MonotonicInstant,
3134 ) -> Result<ControllerProviderEvent, fidl::Error> {
3135 ControllerProviderEvent::decode(self.client.wait_for_event(deadline)?)
3136 }
3137
3138 pub fn r#connect(
3151 &self,
3152 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3153 ___deadline: zx::MonotonicInstant,
3154 ) -> Result<(), fidl::Error> {
3155 let _response = self
3156 .client
3157 .send_query::<ControllerProviderConnectRequest, fidl::encoding::EmptyPayload>(
3158 (controller,),
3159 0xc0325f0732defcb,
3160 fidl::encoding::DynamicFlags::empty(),
3161 ___deadline,
3162 )?;
3163 Ok(_response)
3164 }
3165
3166 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3169 self.client.send::<fidl::encoding::EmptyPayload>(
3170 (),
3171 0x6cd6a98fc38bcbf2,
3172 fidl::encoding::DynamicFlags::empty(),
3173 )
3174 }
3175}
3176
3177#[cfg(target_os = "fuchsia")]
3178impl From<ControllerProviderSynchronousProxy> for zx::Handle {
3179 fn from(value: ControllerProviderSynchronousProxy) -> Self {
3180 value.into_channel().into()
3181 }
3182}
3183
3184#[cfg(target_os = "fuchsia")]
3185impl From<fidl::Channel> for ControllerProviderSynchronousProxy {
3186 fn from(value: fidl::Channel) -> Self {
3187 Self::new(value)
3188 }
3189}
3190
3191#[derive(Debug, Clone)]
3192pub struct ControllerProviderProxy {
3193 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3194}
3195
3196impl fidl::endpoints::Proxy for ControllerProviderProxy {
3197 type Protocol = ControllerProviderMarker;
3198
3199 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3200 Self::new(inner)
3201 }
3202
3203 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3204 self.client.into_channel().map_err(|client| Self { client })
3205 }
3206
3207 fn as_channel(&self) -> &::fidl::AsyncChannel {
3208 self.client.as_channel()
3209 }
3210}
3211
3212impl ControllerProviderProxy {
3213 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3215 let protocol_name =
3216 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3217 Self { client: fidl::client::Client::new(channel, protocol_name) }
3218 }
3219
3220 pub fn take_event_stream(&self) -> ControllerProviderEventStream {
3226 ControllerProviderEventStream { event_receiver: self.client.take_event_receiver() }
3227 }
3228
3229 pub fn r#connect(
3242 &self,
3243 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3244 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
3245 ControllerProviderProxyInterface::r#connect(self, controller)
3246 }
3247
3248 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3251 ControllerProviderProxyInterface::r#stop(self)
3252 }
3253}
3254
3255impl ControllerProviderProxyInterface for ControllerProviderProxy {
3256 type ConnectResponseFut =
3257 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3258 fn r#connect(
3259 &self,
3260 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3261 ) -> Self::ConnectResponseFut {
3262 fn _decode(
3263 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3264 ) -> Result<(), fidl::Error> {
3265 let _response = fidl::client::decode_transaction_body::<
3266 fidl::encoding::EmptyPayload,
3267 fidl::encoding::DefaultFuchsiaResourceDialect,
3268 0xc0325f0732defcb,
3269 >(_buf?)?;
3270 Ok(_response)
3271 }
3272 self.client.send_query_and_decode::<ControllerProviderConnectRequest, ()>(
3273 (controller,),
3274 0xc0325f0732defcb,
3275 fidl::encoding::DynamicFlags::empty(),
3276 _decode,
3277 )
3278 }
3279
3280 fn r#stop(&self) -> Result<(), fidl::Error> {
3281 self.client.send::<fidl::encoding::EmptyPayload>(
3282 (),
3283 0x6cd6a98fc38bcbf2,
3284 fidl::encoding::DynamicFlags::empty(),
3285 )
3286 }
3287}
3288
3289pub struct ControllerProviderEventStream {
3290 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3291}
3292
3293impl std::marker::Unpin for ControllerProviderEventStream {}
3294
3295impl futures::stream::FusedStream for ControllerProviderEventStream {
3296 fn is_terminated(&self) -> bool {
3297 self.event_receiver.is_terminated()
3298 }
3299}
3300
3301impl futures::Stream for ControllerProviderEventStream {
3302 type Item = Result<ControllerProviderEvent, fidl::Error>;
3303
3304 fn poll_next(
3305 mut self: std::pin::Pin<&mut Self>,
3306 cx: &mut std::task::Context<'_>,
3307 ) -> std::task::Poll<Option<Self::Item>> {
3308 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3309 &mut self.event_receiver,
3310 cx
3311 )?) {
3312 Some(buf) => std::task::Poll::Ready(Some(ControllerProviderEvent::decode(buf))),
3313 None => std::task::Poll::Ready(None),
3314 }
3315 }
3316}
3317
3318#[derive(Debug)]
3319pub enum ControllerProviderEvent {}
3320
3321impl ControllerProviderEvent {
3322 fn decode(
3324 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3325 ) -> Result<ControllerProviderEvent, fidl::Error> {
3326 let (bytes, _handles) = buf.split_mut();
3327 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3328 debug_assert_eq!(tx_header.tx_id, 0);
3329 match tx_header.ordinal {
3330 _ => Err(fidl::Error::UnknownOrdinal {
3331 ordinal: tx_header.ordinal,
3332 protocol_name:
3333 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3334 }),
3335 }
3336 }
3337}
3338
3339pub struct ControllerProviderRequestStream {
3341 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3342 is_terminated: bool,
3343}
3344
3345impl std::marker::Unpin for ControllerProviderRequestStream {}
3346
3347impl futures::stream::FusedStream for ControllerProviderRequestStream {
3348 fn is_terminated(&self) -> bool {
3349 self.is_terminated
3350 }
3351}
3352
3353impl fidl::endpoints::RequestStream for ControllerProviderRequestStream {
3354 type Protocol = ControllerProviderMarker;
3355 type ControlHandle = ControllerProviderControlHandle;
3356
3357 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3358 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3359 }
3360
3361 fn control_handle(&self) -> Self::ControlHandle {
3362 ControllerProviderControlHandle { inner: self.inner.clone() }
3363 }
3364
3365 fn into_inner(
3366 self,
3367 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3368 {
3369 (self.inner, self.is_terminated)
3370 }
3371
3372 fn from_inner(
3373 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3374 is_terminated: bool,
3375 ) -> Self {
3376 Self { inner, is_terminated }
3377 }
3378}
3379
3380impl futures::Stream for ControllerProviderRequestStream {
3381 type Item = Result<ControllerProviderRequest, fidl::Error>;
3382
3383 fn poll_next(
3384 mut self: std::pin::Pin<&mut Self>,
3385 cx: &mut std::task::Context<'_>,
3386 ) -> std::task::Poll<Option<Self::Item>> {
3387 let this = &mut *self;
3388 if this.inner.check_shutdown(cx) {
3389 this.is_terminated = true;
3390 return std::task::Poll::Ready(None);
3391 }
3392 if this.is_terminated {
3393 panic!("polled ControllerProviderRequestStream after completion");
3394 }
3395 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3396 |bytes, handles| {
3397 match this.inner.channel().read_etc(cx, bytes, handles) {
3398 std::task::Poll::Ready(Ok(())) => {}
3399 std::task::Poll::Pending => return std::task::Poll::Pending,
3400 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3401 this.is_terminated = true;
3402 return std::task::Poll::Ready(None);
3403 }
3404 std::task::Poll::Ready(Err(e)) => {
3405 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3406 e.into(),
3407 ))))
3408 }
3409 }
3410
3411 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3413
3414 std::task::Poll::Ready(Some(match header.ordinal {
3415 0xc0325f0732defcb => {
3416 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3417 let mut req = fidl::new_empty!(ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
3418 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerProviderConnectRequest>(&header, _body_bytes, handles, &mut req)?;
3419 let control_handle = ControllerProviderControlHandle {
3420 inner: this.inner.clone(),
3421 };
3422 Ok(ControllerProviderRequest::Connect {controller: req.controller,
3423
3424 responder: ControllerProviderConnectResponder {
3425 control_handle: std::mem::ManuallyDrop::new(control_handle),
3426 tx_id: header.tx_id,
3427 },
3428 })
3429 }
3430 0x6cd6a98fc38bcbf2 => {
3431 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3432 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
3433 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3434 let control_handle = ControllerProviderControlHandle {
3435 inner: this.inner.clone(),
3436 };
3437 Ok(ControllerProviderRequest::Stop {
3438 control_handle,
3439 })
3440 }
3441 _ => Err(fidl::Error::UnknownOrdinal {
3442 ordinal: header.ordinal,
3443 protocol_name: <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3444 }),
3445 }))
3446 },
3447 )
3448 }
3449}
3450
3451#[derive(Debug)]
3461pub enum ControllerProviderRequest {
3462 Connect {
3475 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3476 responder: ControllerProviderConnectResponder,
3477 },
3478 Stop { control_handle: ControllerProviderControlHandle },
3481}
3482
3483impl ControllerProviderRequest {
3484 #[allow(irrefutable_let_patterns)]
3485 pub fn into_connect(
3486 self,
3487 ) -> Option<(fidl::endpoints::ServerEnd<ControllerMarker>, ControllerProviderConnectResponder)>
3488 {
3489 if let ControllerProviderRequest::Connect { controller, responder } = self {
3490 Some((controller, responder))
3491 } else {
3492 None
3493 }
3494 }
3495
3496 #[allow(irrefutable_let_patterns)]
3497 pub fn into_stop(self) -> Option<(ControllerProviderControlHandle)> {
3498 if let ControllerProviderRequest::Stop { control_handle } = self {
3499 Some((control_handle))
3500 } else {
3501 None
3502 }
3503 }
3504
3505 pub fn method_name(&self) -> &'static str {
3507 match *self {
3508 ControllerProviderRequest::Connect { .. } => "connect",
3509 ControllerProviderRequest::Stop { .. } => "stop",
3510 }
3511 }
3512}
3513
3514#[derive(Debug, Clone)]
3515pub struct ControllerProviderControlHandle {
3516 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3517}
3518
3519impl fidl::endpoints::ControlHandle for ControllerProviderControlHandle {
3520 fn shutdown(&self) {
3521 self.inner.shutdown()
3522 }
3523 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3524 self.inner.shutdown_with_epitaph(status)
3525 }
3526
3527 fn is_closed(&self) -> bool {
3528 self.inner.channel().is_closed()
3529 }
3530 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3531 self.inner.channel().on_closed()
3532 }
3533
3534 #[cfg(target_os = "fuchsia")]
3535 fn signal_peer(
3536 &self,
3537 clear_mask: zx::Signals,
3538 set_mask: zx::Signals,
3539 ) -> Result<(), zx_status::Status> {
3540 use fidl::Peered;
3541 self.inner.channel().signal_peer(clear_mask, set_mask)
3542 }
3543}
3544
3545impl ControllerProviderControlHandle {}
3546
3547#[must_use = "FIDL methods require a response to be sent"]
3548#[derive(Debug)]
3549pub struct ControllerProviderConnectResponder {
3550 control_handle: std::mem::ManuallyDrop<ControllerProviderControlHandle>,
3551 tx_id: u32,
3552}
3553
3554impl std::ops::Drop for ControllerProviderConnectResponder {
3558 fn drop(&mut self) {
3559 self.control_handle.shutdown();
3560 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3562 }
3563}
3564
3565impl fidl::endpoints::Responder for ControllerProviderConnectResponder {
3566 type ControlHandle = ControllerProviderControlHandle;
3567
3568 fn control_handle(&self) -> &ControllerProviderControlHandle {
3569 &self.control_handle
3570 }
3571
3572 fn drop_without_shutdown(mut self) {
3573 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3575 std::mem::forget(self);
3577 }
3578}
3579
3580impl ControllerProviderConnectResponder {
3581 pub fn send(self) -> Result<(), fidl::Error> {
3585 let _result = self.send_raw();
3586 if _result.is_err() {
3587 self.control_handle.shutdown();
3588 }
3589 self.drop_without_shutdown();
3590 _result
3591 }
3592
3593 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3595 let _result = self.send_raw();
3596 self.drop_without_shutdown();
3597 _result
3598 }
3599
3600 fn send_raw(&self) -> Result<(), fidl::Error> {
3601 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3602 (),
3603 self.tx_id,
3604 0xc0325f0732defcb,
3605 fidl::encoding::DynamicFlags::empty(),
3606 )
3607 }
3608}
3609
3610#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3611pub struct CorpusReaderMarker;
3612
3613impl fidl::endpoints::ProtocolMarker for CorpusReaderMarker {
3614 type Proxy = CorpusReaderProxy;
3615 type RequestStream = CorpusReaderRequestStream;
3616 #[cfg(target_os = "fuchsia")]
3617 type SynchronousProxy = CorpusReaderSynchronousProxy;
3618
3619 const DEBUG_NAME: &'static str = "(anonymous) CorpusReader";
3620}
3621
3622pub trait CorpusReaderProxyInterface: Send + Sync {
3623 type NextResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
3624 fn r#next(&self, test_input: Input) -> Self::NextResponseFut;
3625}
3626#[derive(Debug)]
3627#[cfg(target_os = "fuchsia")]
3628pub struct CorpusReaderSynchronousProxy {
3629 client: fidl::client::sync::Client,
3630}
3631
3632#[cfg(target_os = "fuchsia")]
3633impl fidl::endpoints::SynchronousProxy for CorpusReaderSynchronousProxy {
3634 type Proxy = CorpusReaderProxy;
3635 type Protocol = CorpusReaderMarker;
3636
3637 fn from_channel(inner: fidl::Channel) -> Self {
3638 Self::new(inner)
3639 }
3640
3641 fn into_channel(self) -> fidl::Channel {
3642 self.client.into_channel()
3643 }
3644
3645 fn as_channel(&self) -> &fidl::Channel {
3646 self.client.as_channel()
3647 }
3648}
3649
3650#[cfg(target_os = "fuchsia")]
3651impl CorpusReaderSynchronousProxy {
3652 pub fn new(channel: fidl::Channel) -> Self {
3653 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3654 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3655 }
3656
3657 pub fn into_channel(self) -> fidl::Channel {
3658 self.client.into_channel()
3659 }
3660
3661 pub fn wait_for_event(
3664 &self,
3665 deadline: zx::MonotonicInstant,
3666 ) -> Result<CorpusReaderEvent, fidl::Error> {
3667 CorpusReaderEvent::decode(self.client.wait_for_event(deadline)?)
3668 }
3669
3670 pub fn r#next(
3678 &self,
3679 mut test_input: Input,
3680 ___deadline: zx::MonotonicInstant,
3681 ) -> Result<i32, fidl::Error> {
3682 let _response =
3683 self.client.send_query::<CorpusReaderNextRequest, CorpusReaderNextResponse>(
3684 (&mut test_input,),
3685 0x68d19e55ea635356,
3686 fidl::encoding::DynamicFlags::empty(),
3687 ___deadline,
3688 )?;
3689 Ok(_response.result)
3690 }
3691}
3692
3693#[cfg(target_os = "fuchsia")]
3694impl From<CorpusReaderSynchronousProxy> for zx::Handle {
3695 fn from(value: CorpusReaderSynchronousProxy) -> Self {
3696 value.into_channel().into()
3697 }
3698}
3699
3700#[cfg(target_os = "fuchsia")]
3701impl From<fidl::Channel> for CorpusReaderSynchronousProxy {
3702 fn from(value: fidl::Channel) -> Self {
3703 Self::new(value)
3704 }
3705}
3706
3707#[derive(Debug, Clone)]
3708pub struct CorpusReaderProxy {
3709 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3710}
3711
3712impl fidl::endpoints::Proxy for CorpusReaderProxy {
3713 type Protocol = CorpusReaderMarker;
3714
3715 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3716 Self::new(inner)
3717 }
3718
3719 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3720 self.client.into_channel().map_err(|client| Self { client })
3721 }
3722
3723 fn as_channel(&self) -> &::fidl::AsyncChannel {
3724 self.client.as_channel()
3725 }
3726}
3727
3728impl CorpusReaderProxy {
3729 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3731 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3732 Self { client: fidl::client::Client::new(channel, protocol_name) }
3733 }
3734
3735 pub fn take_event_stream(&self) -> CorpusReaderEventStream {
3741 CorpusReaderEventStream { event_receiver: self.client.take_event_receiver() }
3742 }
3743
3744 pub fn r#next(
3752 &self,
3753 mut test_input: Input,
3754 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
3755 CorpusReaderProxyInterface::r#next(self, test_input)
3756 }
3757}
3758
3759impl CorpusReaderProxyInterface for CorpusReaderProxy {
3760 type NextResponseFut =
3761 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3762 fn r#next(&self, mut test_input: Input) -> Self::NextResponseFut {
3763 fn _decode(
3764 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3765 ) -> Result<i32, fidl::Error> {
3766 let _response = fidl::client::decode_transaction_body::<
3767 CorpusReaderNextResponse,
3768 fidl::encoding::DefaultFuchsiaResourceDialect,
3769 0x68d19e55ea635356,
3770 >(_buf?)?;
3771 Ok(_response.result)
3772 }
3773 self.client.send_query_and_decode::<CorpusReaderNextRequest, i32>(
3774 (&mut test_input,),
3775 0x68d19e55ea635356,
3776 fidl::encoding::DynamicFlags::empty(),
3777 _decode,
3778 )
3779 }
3780}
3781
3782pub struct CorpusReaderEventStream {
3783 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3784}
3785
3786impl std::marker::Unpin for CorpusReaderEventStream {}
3787
3788impl futures::stream::FusedStream for CorpusReaderEventStream {
3789 fn is_terminated(&self) -> bool {
3790 self.event_receiver.is_terminated()
3791 }
3792}
3793
3794impl futures::Stream for CorpusReaderEventStream {
3795 type Item = Result<CorpusReaderEvent, fidl::Error>;
3796
3797 fn poll_next(
3798 mut self: std::pin::Pin<&mut Self>,
3799 cx: &mut std::task::Context<'_>,
3800 ) -> std::task::Poll<Option<Self::Item>> {
3801 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3802 &mut self.event_receiver,
3803 cx
3804 )?) {
3805 Some(buf) => std::task::Poll::Ready(Some(CorpusReaderEvent::decode(buf))),
3806 None => std::task::Poll::Ready(None),
3807 }
3808 }
3809}
3810
3811#[derive(Debug)]
3812pub enum CorpusReaderEvent {}
3813
3814impl CorpusReaderEvent {
3815 fn decode(
3817 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3818 ) -> Result<CorpusReaderEvent, fidl::Error> {
3819 let (bytes, _handles) = buf.split_mut();
3820 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3821 debug_assert_eq!(tx_header.tx_id, 0);
3822 match tx_header.ordinal {
3823 _ => Err(fidl::Error::UnknownOrdinal {
3824 ordinal: tx_header.ordinal,
3825 protocol_name: <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3826 }),
3827 }
3828 }
3829}
3830
3831pub struct CorpusReaderRequestStream {
3833 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3834 is_terminated: bool,
3835}
3836
3837impl std::marker::Unpin for CorpusReaderRequestStream {}
3838
3839impl futures::stream::FusedStream for CorpusReaderRequestStream {
3840 fn is_terminated(&self) -> bool {
3841 self.is_terminated
3842 }
3843}
3844
3845impl fidl::endpoints::RequestStream for CorpusReaderRequestStream {
3846 type Protocol = CorpusReaderMarker;
3847 type ControlHandle = CorpusReaderControlHandle;
3848
3849 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3850 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3851 }
3852
3853 fn control_handle(&self) -> Self::ControlHandle {
3854 CorpusReaderControlHandle { inner: self.inner.clone() }
3855 }
3856
3857 fn into_inner(
3858 self,
3859 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3860 {
3861 (self.inner, self.is_terminated)
3862 }
3863
3864 fn from_inner(
3865 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3866 is_terminated: bool,
3867 ) -> Self {
3868 Self { inner, is_terminated }
3869 }
3870}
3871
3872impl futures::Stream for CorpusReaderRequestStream {
3873 type Item = Result<CorpusReaderRequest, fidl::Error>;
3874
3875 fn poll_next(
3876 mut self: std::pin::Pin<&mut Self>,
3877 cx: &mut std::task::Context<'_>,
3878 ) -> std::task::Poll<Option<Self::Item>> {
3879 let this = &mut *self;
3880 if this.inner.check_shutdown(cx) {
3881 this.is_terminated = true;
3882 return std::task::Poll::Ready(None);
3883 }
3884 if this.is_terminated {
3885 panic!("polled CorpusReaderRequestStream after completion");
3886 }
3887 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3888 |bytes, handles| {
3889 match this.inner.channel().read_etc(cx, bytes, handles) {
3890 std::task::Poll::Ready(Ok(())) => {}
3891 std::task::Poll::Pending => return std::task::Poll::Pending,
3892 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3893 this.is_terminated = true;
3894 return std::task::Poll::Ready(None);
3895 }
3896 std::task::Poll::Ready(Err(e)) => {
3897 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3898 e.into(),
3899 ))))
3900 }
3901 }
3902
3903 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3905
3906 std::task::Poll::Ready(Some(match header.ordinal {
3907 0x68d19e55ea635356 => {
3908 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3909 let mut req = fidl::new_empty!(
3910 CorpusReaderNextRequest,
3911 fidl::encoding::DefaultFuchsiaResourceDialect
3912 );
3913 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CorpusReaderNextRequest>(&header, _body_bytes, handles, &mut req)?;
3914 let control_handle =
3915 CorpusReaderControlHandle { inner: this.inner.clone() };
3916 Ok(CorpusReaderRequest::Next {
3917 test_input: req.test_input,
3918
3919 responder: CorpusReaderNextResponder {
3920 control_handle: std::mem::ManuallyDrop::new(control_handle),
3921 tx_id: header.tx_id,
3922 },
3923 })
3924 }
3925 _ => Err(fidl::Error::UnknownOrdinal {
3926 ordinal: header.ordinal,
3927 protocol_name:
3928 <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3929 }),
3930 }))
3931 },
3932 )
3933 }
3934}
3935
3936#[derive(Debug)]
3938pub enum CorpusReaderRequest {
3939 Next { test_input: Input, responder: CorpusReaderNextResponder },
3947}
3948
3949impl CorpusReaderRequest {
3950 #[allow(irrefutable_let_patterns)]
3951 pub fn into_next(self) -> Option<(Input, CorpusReaderNextResponder)> {
3952 if let CorpusReaderRequest::Next { test_input, responder } = self {
3953 Some((test_input, responder))
3954 } else {
3955 None
3956 }
3957 }
3958
3959 pub fn method_name(&self) -> &'static str {
3961 match *self {
3962 CorpusReaderRequest::Next { .. } => "next",
3963 }
3964 }
3965}
3966
3967#[derive(Debug, Clone)]
3968pub struct CorpusReaderControlHandle {
3969 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3970}
3971
3972impl fidl::endpoints::ControlHandle for CorpusReaderControlHandle {
3973 fn shutdown(&self) {
3974 self.inner.shutdown()
3975 }
3976 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3977 self.inner.shutdown_with_epitaph(status)
3978 }
3979
3980 fn is_closed(&self) -> bool {
3981 self.inner.channel().is_closed()
3982 }
3983 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3984 self.inner.channel().on_closed()
3985 }
3986
3987 #[cfg(target_os = "fuchsia")]
3988 fn signal_peer(
3989 &self,
3990 clear_mask: zx::Signals,
3991 set_mask: zx::Signals,
3992 ) -> Result<(), zx_status::Status> {
3993 use fidl::Peered;
3994 self.inner.channel().signal_peer(clear_mask, set_mask)
3995 }
3996}
3997
3998impl CorpusReaderControlHandle {}
3999
4000#[must_use = "FIDL methods require a response to be sent"]
4001#[derive(Debug)]
4002pub struct CorpusReaderNextResponder {
4003 control_handle: std::mem::ManuallyDrop<CorpusReaderControlHandle>,
4004 tx_id: u32,
4005}
4006
4007impl std::ops::Drop for CorpusReaderNextResponder {
4011 fn drop(&mut self) {
4012 self.control_handle.shutdown();
4013 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4015 }
4016}
4017
4018impl fidl::endpoints::Responder for CorpusReaderNextResponder {
4019 type ControlHandle = CorpusReaderControlHandle;
4020
4021 fn control_handle(&self) -> &CorpusReaderControlHandle {
4022 &self.control_handle
4023 }
4024
4025 fn drop_without_shutdown(mut self) {
4026 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4028 std::mem::forget(self);
4030 }
4031}
4032
4033impl CorpusReaderNextResponder {
4034 pub fn send(self, mut result: i32) -> Result<(), fidl::Error> {
4038 let _result = self.send_raw(result);
4039 if _result.is_err() {
4040 self.control_handle.shutdown();
4041 }
4042 self.drop_without_shutdown();
4043 _result
4044 }
4045
4046 pub fn send_no_shutdown_on_err(self, mut result: i32) -> Result<(), fidl::Error> {
4048 let _result = self.send_raw(result);
4049 self.drop_without_shutdown();
4050 _result
4051 }
4052
4053 fn send_raw(&self, mut result: i32) -> Result<(), fidl::Error> {
4054 self.control_handle.inner.send::<CorpusReaderNextResponse>(
4055 (result,),
4056 self.tx_id,
4057 0x68d19e55ea635356,
4058 fidl::encoding::DynamicFlags::empty(),
4059 )
4060 }
4061}
4062
4063#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4064pub struct CoverageDataCollectorMarker;
4065
4066impl fidl::endpoints::ProtocolMarker for CoverageDataCollectorMarker {
4067 type Proxy = CoverageDataCollectorProxy;
4068 type RequestStream = CoverageDataCollectorRequestStream;
4069 #[cfg(target_os = "fuchsia")]
4070 type SynchronousProxy = CoverageDataCollectorSynchronousProxy;
4071
4072 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataCollector";
4073}
4074impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataCollectorMarker {}
4075
4076pub trait CoverageDataCollectorProxyInterface: Send + Sync {
4077 type InitializeResponseFut: std::future::Future<Output = Result<Options, fidl::Error>> + Send;
4078 fn r#initialize(
4079 &self,
4080 eventpair: fidl::EventPair,
4081 process: fidl::Process,
4082 ) -> Self::InitializeResponseFut;
4083 type AddInline8bitCountersResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4084 + Send;
4085 fn r#add_inline8bit_counters(
4086 &self,
4087 inline_8bit_counters: fidl::Vmo,
4088 ) -> Self::AddInline8bitCountersResponseFut;
4089}
4090#[derive(Debug)]
4091#[cfg(target_os = "fuchsia")]
4092pub struct CoverageDataCollectorSynchronousProxy {
4093 client: fidl::client::sync::Client,
4094}
4095
4096#[cfg(target_os = "fuchsia")]
4097impl fidl::endpoints::SynchronousProxy for CoverageDataCollectorSynchronousProxy {
4098 type Proxy = CoverageDataCollectorProxy;
4099 type Protocol = CoverageDataCollectorMarker;
4100
4101 fn from_channel(inner: fidl::Channel) -> Self {
4102 Self::new(inner)
4103 }
4104
4105 fn into_channel(self) -> fidl::Channel {
4106 self.client.into_channel()
4107 }
4108
4109 fn as_channel(&self) -> &fidl::Channel {
4110 self.client.as_channel()
4111 }
4112}
4113
4114#[cfg(target_os = "fuchsia")]
4115impl CoverageDataCollectorSynchronousProxy {
4116 pub fn new(channel: fidl::Channel) -> Self {
4117 let protocol_name =
4118 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4119 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4120 }
4121
4122 pub fn into_channel(self) -> fidl::Channel {
4123 self.client.into_channel()
4124 }
4125
4126 pub fn wait_for_event(
4129 &self,
4130 deadline: zx::MonotonicInstant,
4131 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4132 CoverageDataCollectorEvent::decode(self.client.wait_for_event(deadline)?)
4133 }
4134
4135 pub fn r#initialize(
4152 &self,
4153 mut eventpair: fidl::EventPair,
4154 mut process: fidl::Process,
4155 ___deadline: zx::MonotonicInstant,
4156 ) -> Result<Options, fidl::Error> {
4157 let _response = self.client.send_query::<
4158 CoverageDataCollectorInitializeRequest,
4159 CoverageDataCollectorInitializeResponse,
4160 >(
4161 (eventpair, process,),
4162 0x51d6f91d6f02d9d6,
4163 fidl::encoding::DynamicFlags::empty(),
4164 ___deadline,
4165 )?;
4166 Ok(_response.options)
4167 }
4168
4169 pub fn r#add_inline8bit_counters(
4188 &self,
4189 mut inline_8bit_counters: fidl::Vmo,
4190 ___deadline: zx::MonotonicInstant,
4191 ) -> Result<(), fidl::Error> {
4192 let _response = self.client.send_query::<
4193 CoverageDataCollectorAddInline8bitCountersRequest,
4194 fidl::encoding::EmptyPayload,
4195 >(
4196 (inline_8bit_counters,),
4197 0x75f87cadfc94d1be,
4198 fidl::encoding::DynamicFlags::empty(),
4199 ___deadline,
4200 )?;
4201 Ok(_response)
4202 }
4203}
4204
4205#[cfg(target_os = "fuchsia")]
4206impl From<CoverageDataCollectorSynchronousProxy> for zx::Handle {
4207 fn from(value: CoverageDataCollectorSynchronousProxy) -> Self {
4208 value.into_channel().into()
4209 }
4210}
4211
4212#[cfg(target_os = "fuchsia")]
4213impl From<fidl::Channel> for CoverageDataCollectorSynchronousProxy {
4214 fn from(value: fidl::Channel) -> Self {
4215 Self::new(value)
4216 }
4217}
4218
4219#[derive(Debug, Clone)]
4220pub struct CoverageDataCollectorProxy {
4221 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4222}
4223
4224impl fidl::endpoints::Proxy for CoverageDataCollectorProxy {
4225 type Protocol = CoverageDataCollectorMarker;
4226
4227 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4228 Self::new(inner)
4229 }
4230
4231 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4232 self.client.into_channel().map_err(|client| Self { client })
4233 }
4234
4235 fn as_channel(&self) -> &::fidl::AsyncChannel {
4236 self.client.as_channel()
4237 }
4238}
4239
4240impl CoverageDataCollectorProxy {
4241 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4243 let protocol_name =
4244 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4245 Self { client: fidl::client::Client::new(channel, protocol_name) }
4246 }
4247
4248 pub fn take_event_stream(&self) -> CoverageDataCollectorEventStream {
4254 CoverageDataCollectorEventStream { event_receiver: self.client.take_event_receiver() }
4255 }
4256
4257 pub fn r#initialize(
4274 &self,
4275 mut eventpair: fidl::EventPair,
4276 mut process: fidl::Process,
4277 ) -> fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
4278 {
4279 CoverageDataCollectorProxyInterface::r#initialize(self, eventpair, process)
4280 }
4281
4282 pub fn r#add_inline8bit_counters(
4301 &self,
4302 mut inline_8bit_counters: fidl::Vmo,
4303 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4304 CoverageDataCollectorProxyInterface::r#add_inline8bit_counters(self, inline_8bit_counters)
4305 }
4306}
4307
4308impl CoverageDataCollectorProxyInterface for CoverageDataCollectorProxy {
4309 type InitializeResponseFut =
4310 fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>;
4311 fn r#initialize(
4312 &self,
4313 mut eventpair: fidl::EventPair,
4314 mut process: fidl::Process,
4315 ) -> Self::InitializeResponseFut {
4316 fn _decode(
4317 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4318 ) -> Result<Options, fidl::Error> {
4319 let _response = fidl::client::decode_transaction_body::<
4320 CoverageDataCollectorInitializeResponse,
4321 fidl::encoding::DefaultFuchsiaResourceDialect,
4322 0x51d6f91d6f02d9d6,
4323 >(_buf?)?;
4324 Ok(_response.options)
4325 }
4326 self.client.send_query_and_decode::<CoverageDataCollectorInitializeRequest, Options>(
4327 (eventpair, process),
4328 0x51d6f91d6f02d9d6,
4329 fidl::encoding::DynamicFlags::empty(),
4330 _decode,
4331 )
4332 }
4333
4334 type AddInline8bitCountersResponseFut =
4335 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4336 fn r#add_inline8bit_counters(
4337 &self,
4338 mut inline_8bit_counters: fidl::Vmo,
4339 ) -> Self::AddInline8bitCountersResponseFut {
4340 fn _decode(
4341 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4342 ) -> Result<(), fidl::Error> {
4343 let _response = fidl::client::decode_transaction_body::<
4344 fidl::encoding::EmptyPayload,
4345 fidl::encoding::DefaultFuchsiaResourceDialect,
4346 0x75f87cadfc94d1be,
4347 >(_buf?)?;
4348 Ok(_response)
4349 }
4350 self.client.send_query_and_decode::<CoverageDataCollectorAddInline8bitCountersRequest, ()>(
4351 (inline_8bit_counters,),
4352 0x75f87cadfc94d1be,
4353 fidl::encoding::DynamicFlags::empty(),
4354 _decode,
4355 )
4356 }
4357}
4358
4359pub struct CoverageDataCollectorEventStream {
4360 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4361}
4362
4363impl std::marker::Unpin for CoverageDataCollectorEventStream {}
4364
4365impl futures::stream::FusedStream for CoverageDataCollectorEventStream {
4366 fn is_terminated(&self) -> bool {
4367 self.event_receiver.is_terminated()
4368 }
4369}
4370
4371impl futures::Stream for CoverageDataCollectorEventStream {
4372 type Item = Result<CoverageDataCollectorEvent, fidl::Error>;
4373
4374 fn poll_next(
4375 mut self: std::pin::Pin<&mut Self>,
4376 cx: &mut std::task::Context<'_>,
4377 ) -> std::task::Poll<Option<Self::Item>> {
4378 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4379 &mut self.event_receiver,
4380 cx
4381 )?) {
4382 Some(buf) => std::task::Poll::Ready(Some(CoverageDataCollectorEvent::decode(buf))),
4383 None => std::task::Poll::Ready(None),
4384 }
4385 }
4386}
4387
4388#[derive(Debug)]
4389pub enum CoverageDataCollectorEvent {}
4390
4391impl CoverageDataCollectorEvent {
4392 fn decode(
4394 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4395 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4396 let (bytes, _handles) = buf.split_mut();
4397 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4398 debug_assert_eq!(tx_header.tx_id, 0);
4399 match tx_header.ordinal {
4400 _ => Err(fidl::Error::UnknownOrdinal {
4401 ordinal: tx_header.ordinal,
4402 protocol_name:
4403 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4404 }),
4405 }
4406 }
4407}
4408
4409pub struct CoverageDataCollectorRequestStream {
4411 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4412 is_terminated: bool,
4413}
4414
4415impl std::marker::Unpin for CoverageDataCollectorRequestStream {}
4416
4417impl futures::stream::FusedStream for CoverageDataCollectorRequestStream {
4418 fn is_terminated(&self) -> bool {
4419 self.is_terminated
4420 }
4421}
4422
4423impl fidl::endpoints::RequestStream for CoverageDataCollectorRequestStream {
4424 type Protocol = CoverageDataCollectorMarker;
4425 type ControlHandle = CoverageDataCollectorControlHandle;
4426
4427 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4428 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4429 }
4430
4431 fn control_handle(&self) -> Self::ControlHandle {
4432 CoverageDataCollectorControlHandle { inner: self.inner.clone() }
4433 }
4434
4435 fn into_inner(
4436 self,
4437 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4438 {
4439 (self.inner, self.is_terminated)
4440 }
4441
4442 fn from_inner(
4443 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4444 is_terminated: bool,
4445 ) -> Self {
4446 Self { inner, is_terminated }
4447 }
4448}
4449
4450impl futures::Stream for CoverageDataCollectorRequestStream {
4451 type Item = Result<CoverageDataCollectorRequest, fidl::Error>;
4452
4453 fn poll_next(
4454 mut self: std::pin::Pin<&mut Self>,
4455 cx: &mut std::task::Context<'_>,
4456 ) -> std::task::Poll<Option<Self::Item>> {
4457 let this = &mut *self;
4458 if this.inner.check_shutdown(cx) {
4459 this.is_terminated = true;
4460 return std::task::Poll::Ready(None);
4461 }
4462 if this.is_terminated {
4463 panic!("polled CoverageDataCollectorRequestStream after completion");
4464 }
4465 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4466 |bytes, handles| {
4467 match this.inner.channel().read_etc(cx, bytes, handles) {
4468 std::task::Poll::Ready(Ok(())) => {}
4469 std::task::Poll::Pending => return std::task::Poll::Pending,
4470 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4471 this.is_terminated = true;
4472 return std::task::Poll::Ready(None);
4473 }
4474 std::task::Poll::Ready(Err(e)) => {
4475 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4476 e.into(),
4477 ))))
4478 }
4479 }
4480
4481 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4483
4484 std::task::Poll::Ready(Some(match header.ordinal {
4485 0x51d6f91d6f02d9d6 => {
4486 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4487 let mut req = fidl::new_empty!(CoverageDataCollectorInitializeRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4488 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorInitializeRequest>(&header, _body_bytes, handles, &mut req)?;
4489 let control_handle = CoverageDataCollectorControlHandle {
4490 inner: this.inner.clone(),
4491 };
4492 Ok(CoverageDataCollectorRequest::Initialize {eventpair: req.eventpair,
4493process: req.process,
4494
4495 responder: CoverageDataCollectorInitializeResponder {
4496 control_handle: std::mem::ManuallyDrop::new(control_handle),
4497 tx_id: header.tx_id,
4498 },
4499 })
4500 }
4501 0x75f87cadfc94d1be => {
4502 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4503 let mut req = fidl::new_empty!(CoverageDataCollectorAddInline8bitCountersRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4504 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorAddInline8bitCountersRequest>(&header, _body_bytes, handles, &mut req)?;
4505 let control_handle = CoverageDataCollectorControlHandle {
4506 inner: this.inner.clone(),
4507 };
4508 Ok(CoverageDataCollectorRequest::AddInline8bitCounters {inline_8bit_counters: req.inline_8bit_counters,
4509
4510 responder: CoverageDataCollectorAddInline8bitCountersResponder {
4511 control_handle: std::mem::ManuallyDrop::new(control_handle),
4512 tx_id: header.tx_id,
4513 },
4514 })
4515 }
4516 _ => Err(fidl::Error::UnknownOrdinal {
4517 ordinal: header.ordinal,
4518 protocol_name: <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4519 }),
4520 }))
4521 },
4522 )
4523 }
4524}
4525
4526#[derive(Debug)]
4533pub enum CoverageDataCollectorRequest {
4534 Initialize {
4551 eventpair: fidl::EventPair,
4552 process: fidl::Process,
4553 responder: CoverageDataCollectorInitializeResponder,
4554 },
4555 AddInline8bitCounters {
4574 inline_8bit_counters: fidl::Vmo,
4575 responder: CoverageDataCollectorAddInline8bitCountersResponder,
4576 },
4577}
4578
4579impl CoverageDataCollectorRequest {
4580 #[allow(irrefutable_let_patterns)]
4581 pub fn into_initialize(
4582 self,
4583 ) -> Option<(fidl::EventPair, fidl::Process, CoverageDataCollectorInitializeResponder)> {
4584 if let CoverageDataCollectorRequest::Initialize { eventpair, process, responder } = self {
4585 Some((eventpair, process, responder))
4586 } else {
4587 None
4588 }
4589 }
4590
4591 #[allow(irrefutable_let_patterns)]
4592 pub fn into_add_inline8bit_counters(
4593 self,
4594 ) -> Option<(fidl::Vmo, CoverageDataCollectorAddInline8bitCountersResponder)> {
4595 if let CoverageDataCollectorRequest::AddInline8bitCounters {
4596 inline_8bit_counters,
4597 responder,
4598 } = self
4599 {
4600 Some((inline_8bit_counters, responder))
4601 } else {
4602 None
4603 }
4604 }
4605
4606 pub fn method_name(&self) -> &'static str {
4608 match *self {
4609 CoverageDataCollectorRequest::Initialize { .. } => "initialize",
4610 CoverageDataCollectorRequest::AddInline8bitCounters { .. } => "add_inline8bit_counters",
4611 }
4612 }
4613}
4614
4615#[derive(Debug, Clone)]
4616pub struct CoverageDataCollectorControlHandle {
4617 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4618}
4619
4620impl fidl::endpoints::ControlHandle for CoverageDataCollectorControlHandle {
4621 fn shutdown(&self) {
4622 self.inner.shutdown()
4623 }
4624 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4625 self.inner.shutdown_with_epitaph(status)
4626 }
4627
4628 fn is_closed(&self) -> bool {
4629 self.inner.channel().is_closed()
4630 }
4631 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4632 self.inner.channel().on_closed()
4633 }
4634
4635 #[cfg(target_os = "fuchsia")]
4636 fn signal_peer(
4637 &self,
4638 clear_mask: zx::Signals,
4639 set_mask: zx::Signals,
4640 ) -> Result<(), zx_status::Status> {
4641 use fidl::Peered;
4642 self.inner.channel().signal_peer(clear_mask, set_mask)
4643 }
4644}
4645
4646impl CoverageDataCollectorControlHandle {}
4647
4648#[must_use = "FIDL methods require a response to be sent"]
4649#[derive(Debug)]
4650pub struct CoverageDataCollectorInitializeResponder {
4651 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4652 tx_id: u32,
4653}
4654
4655impl std::ops::Drop for CoverageDataCollectorInitializeResponder {
4659 fn drop(&mut self) {
4660 self.control_handle.shutdown();
4661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4663 }
4664}
4665
4666impl fidl::endpoints::Responder for CoverageDataCollectorInitializeResponder {
4667 type ControlHandle = CoverageDataCollectorControlHandle;
4668
4669 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4670 &self.control_handle
4671 }
4672
4673 fn drop_without_shutdown(mut self) {
4674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4676 std::mem::forget(self);
4678 }
4679}
4680
4681impl CoverageDataCollectorInitializeResponder {
4682 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
4686 let _result = self.send_raw(options);
4687 if _result.is_err() {
4688 self.control_handle.shutdown();
4689 }
4690 self.drop_without_shutdown();
4691 _result
4692 }
4693
4694 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
4696 let _result = self.send_raw(options);
4697 self.drop_without_shutdown();
4698 _result
4699 }
4700
4701 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
4702 self.control_handle.inner.send::<CoverageDataCollectorInitializeResponse>(
4703 (options,),
4704 self.tx_id,
4705 0x51d6f91d6f02d9d6,
4706 fidl::encoding::DynamicFlags::empty(),
4707 )
4708 }
4709}
4710
4711#[must_use = "FIDL methods require a response to be sent"]
4712#[derive(Debug)]
4713pub struct CoverageDataCollectorAddInline8bitCountersResponder {
4714 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4715 tx_id: u32,
4716}
4717
4718impl std::ops::Drop for CoverageDataCollectorAddInline8bitCountersResponder {
4722 fn drop(&mut self) {
4723 self.control_handle.shutdown();
4724 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4726 }
4727}
4728
4729impl fidl::endpoints::Responder for CoverageDataCollectorAddInline8bitCountersResponder {
4730 type ControlHandle = CoverageDataCollectorControlHandle;
4731
4732 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4733 &self.control_handle
4734 }
4735
4736 fn drop_without_shutdown(mut self) {
4737 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4739 std::mem::forget(self);
4741 }
4742}
4743
4744impl CoverageDataCollectorAddInline8bitCountersResponder {
4745 pub fn send(self) -> Result<(), fidl::Error> {
4749 let _result = self.send_raw();
4750 if _result.is_err() {
4751 self.control_handle.shutdown();
4752 }
4753 self.drop_without_shutdown();
4754 _result
4755 }
4756
4757 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4759 let _result = self.send_raw();
4760 self.drop_without_shutdown();
4761 _result
4762 }
4763
4764 fn send_raw(&self) -> Result<(), fidl::Error> {
4765 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4766 (),
4767 self.tx_id,
4768 0x75f87cadfc94d1be,
4769 fidl::encoding::DynamicFlags::empty(),
4770 )
4771 }
4772}
4773
4774#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4775pub struct CoverageDataProviderMarker;
4776
4777impl fidl::endpoints::ProtocolMarker for CoverageDataProviderMarker {
4778 type Proxy = CoverageDataProviderProxy;
4779 type RequestStream = CoverageDataProviderRequestStream;
4780 #[cfg(target_os = "fuchsia")]
4781 type SynchronousProxy = CoverageDataProviderSynchronousProxy;
4782
4783 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataProvider";
4784}
4785impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataProviderMarker {}
4786
4787pub trait CoverageDataProviderProxyInterface: Send + Sync {
4788 fn r#set_options(&self, options: &Options) -> Result<(), fidl::Error>;
4789 type WatchCoverageDataResponseFut: std::future::Future<Output = Result<Vec<CoverageData>, fidl::Error>>
4790 + Send;
4791 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut;
4792}
4793#[derive(Debug)]
4794#[cfg(target_os = "fuchsia")]
4795pub struct CoverageDataProviderSynchronousProxy {
4796 client: fidl::client::sync::Client,
4797}
4798
4799#[cfg(target_os = "fuchsia")]
4800impl fidl::endpoints::SynchronousProxy for CoverageDataProviderSynchronousProxy {
4801 type Proxy = CoverageDataProviderProxy;
4802 type Protocol = CoverageDataProviderMarker;
4803
4804 fn from_channel(inner: fidl::Channel) -> Self {
4805 Self::new(inner)
4806 }
4807
4808 fn into_channel(self) -> fidl::Channel {
4809 self.client.into_channel()
4810 }
4811
4812 fn as_channel(&self) -> &fidl::Channel {
4813 self.client.as_channel()
4814 }
4815}
4816
4817#[cfg(target_os = "fuchsia")]
4818impl CoverageDataProviderSynchronousProxy {
4819 pub fn new(channel: fidl::Channel) -> Self {
4820 let protocol_name =
4821 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4822 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4823 }
4824
4825 pub fn into_channel(self) -> fidl::Channel {
4826 self.client.into_channel()
4827 }
4828
4829 pub fn wait_for_event(
4832 &self,
4833 deadline: zx::MonotonicInstant,
4834 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
4835 CoverageDataProviderEvent::decode(self.client.wait_for_event(deadline)?)
4836 }
4837
4838 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4840 self.client.send::<CoverageDataProviderSetOptionsRequest>(
4841 (options,),
4842 0x4873c4a5c7683384,
4843 fidl::encoding::DynamicFlags::empty(),
4844 )
4845 }
4846
4847 pub fn r#watch_coverage_data(
4859 &self,
4860 ___deadline: zx::MonotonicInstant,
4861 ) -> Result<Vec<CoverageData>, fidl::Error> {
4862 let _response = self.client.send_query::<
4863 fidl::encoding::EmptyPayload,
4864 CoverageDataProviderWatchCoverageDataResponse,
4865 >(
4866 (),
4867 0x34a92fc9c73bea5a,
4868 fidl::encoding::DynamicFlags::empty(),
4869 ___deadline,
4870 )?;
4871 Ok(_response.coverage_data)
4872 }
4873}
4874
4875#[cfg(target_os = "fuchsia")]
4876impl From<CoverageDataProviderSynchronousProxy> for zx::Handle {
4877 fn from(value: CoverageDataProviderSynchronousProxy) -> Self {
4878 value.into_channel().into()
4879 }
4880}
4881
4882#[cfg(target_os = "fuchsia")]
4883impl From<fidl::Channel> for CoverageDataProviderSynchronousProxy {
4884 fn from(value: fidl::Channel) -> Self {
4885 Self::new(value)
4886 }
4887}
4888
4889#[derive(Debug, Clone)]
4890pub struct CoverageDataProviderProxy {
4891 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4892}
4893
4894impl fidl::endpoints::Proxy for CoverageDataProviderProxy {
4895 type Protocol = CoverageDataProviderMarker;
4896
4897 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4898 Self::new(inner)
4899 }
4900
4901 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4902 self.client.into_channel().map_err(|client| Self { client })
4903 }
4904
4905 fn as_channel(&self) -> &::fidl::AsyncChannel {
4906 self.client.as_channel()
4907 }
4908}
4909
4910impl CoverageDataProviderProxy {
4911 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4913 let protocol_name =
4914 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4915 Self { client: fidl::client::Client::new(channel, protocol_name) }
4916 }
4917
4918 pub fn take_event_stream(&self) -> CoverageDataProviderEventStream {
4924 CoverageDataProviderEventStream { event_receiver: self.client.take_event_receiver() }
4925 }
4926
4927 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4929 CoverageDataProviderProxyInterface::r#set_options(self, options)
4930 }
4931
4932 pub fn r#watch_coverage_data(
4944 &self,
4945 ) -> fidl::client::QueryResponseFut<
4946 Vec<CoverageData>,
4947 fidl::encoding::DefaultFuchsiaResourceDialect,
4948 > {
4949 CoverageDataProviderProxyInterface::r#watch_coverage_data(self)
4950 }
4951}
4952
4953impl CoverageDataProviderProxyInterface for CoverageDataProviderProxy {
4954 fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4955 self.client.send::<CoverageDataProviderSetOptionsRequest>(
4956 (options,),
4957 0x4873c4a5c7683384,
4958 fidl::encoding::DynamicFlags::empty(),
4959 )
4960 }
4961
4962 type WatchCoverageDataResponseFut = fidl::client::QueryResponseFut<
4963 Vec<CoverageData>,
4964 fidl::encoding::DefaultFuchsiaResourceDialect,
4965 >;
4966 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut {
4967 fn _decode(
4968 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4969 ) -> Result<Vec<CoverageData>, fidl::Error> {
4970 let _response = fidl::client::decode_transaction_body::<
4971 CoverageDataProviderWatchCoverageDataResponse,
4972 fidl::encoding::DefaultFuchsiaResourceDialect,
4973 0x34a92fc9c73bea5a,
4974 >(_buf?)?;
4975 Ok(_response.coverage_data)
4976 }
4977 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<CoverageData>>(
4978 (),
4979 0x34a92fc9c73bea5a,
4980 fidl::encoding::DynamicFlags::empty(),
4981 _decode,
4982 )
4983 }
4984}
4985
4986pub struct CoverageDataProviderEventStream {
4987 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4988}
4989
4990impl std::marker::Unpin for CoverageDataProviderEventStream {}
4991
4992impl futures::stream::FusedStream for CoverageDataProviderEventStream {
4993 fn is_terminated(&self) -> bool {
4994 self.event_receiver.is_terminated()
4995 }
4996}
4997
4998impl futures::Stream for CoverageDataProviderEventStream {
4999 type Item = Result<CoverageDataProviderEvent, fidl::Error>;
5000
5001 fn poll_next(
5002 mut self: std::pin::Pin<&mut Self>,
5003 cx: &mut std::task::Context<'_>,
5004 ) -> std::task::Poll<Option<Self::Item>> {
5005 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5006 &mut self.event_receiver,
5007 cx
5008 )?) {
5009 Some(buf) => std::task::Poll::Ready(Some(CoverageDataProviderEvent::decode(buf))),
5010 None => std::task::Poll::Ready(None),
5011 }
5012 }
5013}
5014
5015#[derive(Debug)]
5016pub enum CoverageDataProviderEvent {}
5017
5018impl CoverageDataProviderEvent {
5019 fn decode(
5021 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5022 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
5023 let (bytes, _handles) = buf.split_mut();
5024 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5025 debug_assert_eq!(tx_header.tx_id, 0);
5026 match tx_header.ordinal {
5027 _ => Err(fidl::Error::UnknownOrdinal {
5028 ordinal: tx_header.ordinal,
5029 protocol_name:
5030 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5031 }),
5032 }
5033 }
5034}
5035
5036pub struct CoverageDataProviderRequestStream {
5038 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5039 is_terminated: bool,
5040}
5041
5042impl std::marker::Unpin for CoverageDataProviderRequestStream {}
5043
5044impl futures::stream::FusedStream for CoverageDataProviderRequestStream {
5045 fn is_terminated(&self) -> bool {
5046 self.is_terminated
5047 }
5048}
5049
5050impl fidl::endpoints::RequestStream for CoverageDataProviderRequestStream {
5051 type Protocol = CoverageDataProviderMarker;
5052 type ControlHandle = CoverageDataProviderControlHandle;
5053
5054 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5055 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5056 }
5057
5058 fn control_handle(&self) -> Self::ControlHandle {
5059 CoverageDataProviderControlHandle { inner: self.inner.clone() }
5060 }
5061
5062 fn into_inner(
5063 self,
5064 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5065 {
5066 (self.inner, self.is_terminated)
5067 }
5068
5069 fn from_inner(
5070 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5071 is_terminated: bool,
5072 ) -> Self {
5073 Self { inner, is_terminated }
5074 }
5075}
5076
5077impl futures::Stream for CoverageDataProviderRequestStream {
5078 type Item = Result<CoverageDataProviderRequest, fidl::Error>;
5079
5080 fn poll_next(
5081 mut self: std::pin::Pin<&mut Self>,
5082 cx: &mut std::task::Context<'_>,
5083 ) -> std::task::Poll<Option<Self::Item>> {
5084 let this = &mut *self;
5085 if this.inner.check_shutdown(cx) {
5086 this.is_terminated = true;
5087 return std::task::Poll::Ready(None);
5088 }
5089 if this.is_terminated {
5090 panic!("polled CoverageDataProviderRequestStream after completion");
5091 }
5092 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5093 |bytes, handles| {
5094 match this.inner.channel().read_etc(cx, bytes, handles) {
5095 std::task::Poll::Ready(Ok(())) => {}
5096 std::task::Poll::Pending => return std::task::Poll::Pending,
5097 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5098 this.is_terminated = true;
5099 return std::task::Poll::Ready(None);
5100 }
5101 std::task::Poll::Ready(Err(e)) => {
5102 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5103 e.into(),
5104 ))))
5105 }
5106 }
5107
5108 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5110
5111 std::task::Poll::Ready(Some(match header.ordinal {
5112 0x4873c4a5c7683384 => {
5113 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5114 let mut req = fidl::new_empty!(CoverageDataProviderSetOptionsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5115 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataProviderSetOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
5116 let control_handle = CoverageDataProviderControlHandle {
5117 inner: this.inner.clone(),
5118 };
5119 Ok(CoverageDataProviderRequest::SetOptions {options: req.options,
5120
5121 control_handle,
5122 })
5123 }
5124 0x34a92fc9c73bea5a => {
5125 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5126 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
5127 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5128 let control_handle = CoverageDataProviderControlHandle {
5129 inner: this.inner.clone(),
5130 };
5131 Ok(CoverageDataProviderRequest::WatchCoverageData {
5132 responder: CoverageDataProviderWatchCoverageDataResponder {
5133 control_handle: std::mem::ManuallyDrop::new(control_handle),
5134 tx_id: header.tx_id,
5135 },
5136 })
5137 }
5138 _ => Err(fidl::Error::UnknownOrdinal {
5139 ordinal: header.ordinal,
5140 protocol_name: <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5141 }),
5142 }))
5143 },
5144 )
5145 }
5146}
5147
5148#[derive(Debug)]
5157pub enum CoverageDataProviderRequest {
5158 SetOptions { options: Options, control_handle: CoverageDataProviderControlHandle },
5160 WatchCoverageData { responder: CoverageDataProviderWatchCoverageDataResponder },
5172}
5173
5174impl CoverageDataProviderRequest {
5175 #[allow(irrefutable_let_patterns)]
5176 pub fn into_set_options(self) -> Option<(Options, CoverageDataProviderControlHandle)> {
5177 if let CoverageDataProviderRequest::SetOptions { options, control_handle } = self {
5178 Some((options, control_handle))
5179 } else {
5180 None
5181 }
5182 }
5183
5184 #[allow(irrefutable_let_patterns)]
5185 pub fn into_watch_coverage_data(
5186 self,
5187 ) -> Option<(CoverageDataProviderWatchCoverageDataResponder)> {
5188 if let CoverageDataProviderRequest::WatchCoverageData { responder } = self {
5189 Some((responder))
5190 } else {
5191 None
5192 }
5193 }
5194
5195 pub fn method_name(&self) -> &'static str {
5197 match *self {
5198 CoverageDataProviderRequest::SetOptions { .. } => "set_options",
5199 CoverageDataProviderRequest::WatchCoverageData { .. } => "watch_coverage_data",
5200 }
5201 }
5202}
5203
5204#[derive(Debug, Clone)]
5205pub struct CoverageDataProviderControlHandle {
5206 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5207}
5208
5209impl fidl::endpoints::ControlHandle for CoverageDataProviderControlHandle {
5210 fn shutdown(&self) {
5211 self.inner.shutdown()
5212 }
5213 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5214 self.inner.shutdown_with_epitaph(status)
5215 }
5216
5217 fn is_closed(&self) -> bool {
5218 self.inner.channel().is_closed()
5219 }
5220 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5221 self.inner.channel().on_closed()
5222 }
5223
5224 #[cfg(target_os = "fuchsia")]
5225 fn signal_peer(
5226 &self,
5227 clear_mask: zx::Signals,
5228 set_mask: zx::Signals,
5229 ) -> Result<(), zx_status::Status> {
5230 use fidl::Peered;
5231 self.inner.channel().signal_peer(clear_mask, set_mask)
5232 }
5233}
5234
5235impl CoverageDataProviderControlHandle {}
5236
5237#[must_use = "FIDL methods require a response to be sent"]
5238#[derive(Debug)]
5239pub struct CoverageDataProviderWatchCoverageDataResponder {
5240 control_handle: std::mem::ManuallyDrop<CoverageDataProviderControlHandle>,
5241 tx_id: u32,
5242}
5243
5244impl std::ops::Drop for CoverageDataProviderWatchCoverageDataResponder {
5248 fn drop(&mut self) {
5249 self.control_handle.shutdown();
5250 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5252 }
5253}
5254
5255impl fidl::endpoints::Responder for CoverageDataProviderWatchCoverageDataResponder {
5256 type ControlHandle = CoverageDataProviderControlHandle;
5257
5258 fn control_handle(&self) -> &CoverageDataProviderControlHandle {
5259 &self.control_handle
5260 }
5261
5262 fn drop_without_shutdown(mut self) {
5263 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5265 std::mem::forget(self);
5267 }
5268}
5269
5270impl CoverageDataProviderWatchCoverageDataResponder {
5271 pub fn send(self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5275 let _result = self.send_raw(coverage_data);
5276 if _result.is_err() {
5277 self.control_handle.shutdown();
5278 }
5279 self.drop_without_shutdown();
5280 _result
5281 }
5282
5283 pub fn send_no_shutdown_on_err(
5285 self,
5286 mut coverage_data: Vec<CoverageData>,
5287 ) -> Result<(), fidl::Error> {
5288 let _result = self.send_raw(coverage_data);
5289 self.drop_without_shutdown();
5290 _result
5291 }
5292
5293 fn send_raw(&self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5294 self.control_handle.inner.send::<CoverageDataProviderWatchCoverageDataResponse>(
5295 (coverage_data.as_mut(),),
5296 self.tx_id,
5297 0x34a92fc9c73bea5a,
5298 fidl::encoding::DynamicFlags::empty(),
5299 )
5300 }
5301}
5302
5303#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5304pub struct ManagerMarker;
5305
5306impl fidl::endpoints::ProtocolMarker for ManagerMarker {
5307 type Proxy = ManagerProxy;
5308 type RequestStream = ManagerRequestStream;
5309 #[cfg(target_os = "fuchsia")]
5310 type SynchronousProxy = ManagerSynchronousProxy;
5311
5312 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Manager";
5313}
5314impl fidl::endpoints::DiscoverableProtocolMarker for ManagerMarker {}
5315pub type ManagerConnectResult = Result<(), i32>;
5316pub type ManagerGetOutputResult = Result<(), i32>;
5317pub type ManagerStopResult = Result<(), i32>;
5318
5319pub trait ManagerProxyInterface: Send + Sync {
5320 type ConnectResponseFut: std::future::Future<Output = Result<ManagerConnectResult, fidl::Error>>
5321 + Send;
5322 fn r#connect(
5323 &self,
5324 fuzzer_url: &str,
5325 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5326 ) -> Self::ConnectResponseFut;
5327 type GetOutputResponseFut: std::future::Future<Output = Result<ManagerGetOutputResult, fidl::Error>>
5328 + Send;
5329 fn r#get_output(
5330 &self,
5331 fuzzer_url: &str,
5332 output: TestOutput,
5333 socket: fidl::Socket,
5334 ) -> Self::GetOutputResponseFut;
5335 type StopResponseFut: std::future::Future<Output = Result<ManagerStopResult, fidl::Error>>
5336 + Send;
5337 fn r#stop(&self, fuzzer_url: &str) -> Self::StopResponseFut;
5338}
5339#[derive(Debug)]
5340#[cfg(target_os = "fuchsia")]
5341pub struct ManagerSynchronousProxy {
5342 client: fidl::client::sync::Client,
5343}
5344
5345#[cfg(target_os = "fuchsia")]
5346impl fidl::endpoints::SynchronousProxy for ManagerSynchronousProxy {
5347 type Proxy = ManagerProxy;
5348 type Protocol = ManagerMarker;
5349
5350 fn from_channel(inner: fidl::Channel) -> Self {
5351 Self::new(inner)
5352 }
5353
5354 fn into_channel(self) -> fidl::Channel {
5355 self.client.into_channel()
5356 }
5357
5358 fn as_channel(&self) -> &fidl::Channel {
5359 self.client.as_channel()
5360 }
5361}
5362
5363#[cfg(target_os = "fuchsia")]
5364impl ManagerSynchronousProxy {
5365 pub fn new(channel: fidl::Channel) -> Self {
5366 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5367 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5368 }
5369
5370 pub fn into_channel(self) -> fidl::Channel {
5371 self.client.into_channel()
5372 }
5373
5374 pub fn wait_for_event(
5377 &self,
5378 deadline: zx::MonotonicInstant,
5379 ) -> Result<ManagerEvent, fidl::Error> {
5380 ManagerEvent::decode(self.client.wait_for_event(deadline)?)
5381 }
5382
5383 pub fn r#connect(
5410 &self,
5411 mut fuzzer_url: &str,
5412 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5413 ___deadline: zx::MonotonicInstant,
5414 ) -> Result<ManagerConnectResult, fidl::Error> {
5415 let _response = self.client.send_query::<
5416 ManagerConnectRequest,
5417 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5418 >(
5419 (fuzzer_url, controller,),
5420 0x1620cd742a89f064,
5421 fidl::encoding::DynamicFlags::empty(),
5422 ___deadline,
5423 )?;
5424 Ok(_response.map(|x| x))
5425 }
5426
5427 pub fn r#get_output(
5442 &self,
5443 mut fuzzer_url: &str,
5444 mut output: TestOutput,
5445 mut socket: fidl::Socket,
5446 ___deadline: zx::MonotonicInstant,
5447 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5448 let _response = self.client.send_query::<
5449 ManagerGetOutputRequest,
5450 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5451 >(
5452 (fuzzer_url, output, socket,),
5453 0x755c28eecf20a88d,
5454 fidl::encoding::DynamicFlags::empty(),
5455 ___deadline,
5456 )?;
5457 Ok(_response.map(|x| x))
5458 }
5459
5460 pub fn r#stop(
5466 &self,
5467 mut fuzzer_url: &str,
5468 ___deadline: zx::MonotonicInstant,
5469 ) -> Result<ManagerStopResult, fidl::Error> {
5470 let _response = self.client.send_query::<
5471 ManagerStopRequest,
5472 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5473 >(
5474 (fuzzer_url,),
5475 0x27e53d86badd21f3,
5476 fidl::encoding::DynamicFlags::empty(),
5477 ___deadline,
5478 )?;
5479 Ok(_response.map(|x| x))
5480 }
5481}
5482
5483#[cfg(target_os = "fuchsia")]
5484impl From<ManagerSynchronousProxy> for zx::Handle {
5485 fn from(value: ManagerSynchronousProxy) -> Self {
5486 value.into_channel().into()
5487 }
5488}
5489
5490#[cfg(target_os = "fuchsia")]
5491impl From<fidl::Channel> for ManagerSynchronousProxy {
5492 fn from(value: fidl::Channel) -> Self {
5493 Self::new(value)
5494 }
5495}
5496
5497#[derive(Debug, Clone)]
5498pub struct ManagerProxy {
5499 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5500}
5501
5502impl fidl::endpoints::Proxy for ManagerProxy {
5503 type Protocol = ManagerMarker;
5504
5505 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5506 Self::new(inner)
5507 }
5508
5509 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5510 self.client.into_channel().map_err(|client| Self { client })
5511 }
5512
5513 fn as_channel(&self) -> &::fidl::AsyncChannel {
5514 self.client.as_channel()
5515 }
5516}
5517
5518impl ManagerProxy {
5519 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5521 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5522 Self { client: fidl::client::Client::new(channel, protocol_name) }
5523 }
5524
5525 pub fn take_event_stream(&self) -> ManagerEventStream {
5531 ManagerEventStream { event_receiver: self.client.take_event_receiver() }
5532 }
5533
5534 pub fn r#connect(
5561 &self,
5562 mut fuzzer_url: &str,
5563 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5564 ) -> fidl::client::QueryResponseFut<
5565 ManagerConnectResult,
5566 fidl::encoding::DefaultFuchsiaResourceDialect,
5567 > {
5568 ManagerProxyInterface::r#connect(self, fuzzer_url, controller)
5569 }
5570
5571 pub fn r#get_output(
5586 &self,
5587 mut fuzzer_url: &str,
5588 mut output: TestOutput,
5589 mut socket: fidl::Socket,
5590 ) -> fidl::client::QueryResponseFut<
5591 ManagerGetOutputResult,
5592 fidl::encoding::DefaultFuchsiaResourceDialect,
5593 > {
5594 ManagerProxyInterface::r#get_output(self, fuzzer_url, output, socket)
5595 }
5596
5597 pub fn r#stop(
5603 &self,
5604 mut fuzzer_url: &str,
5605 ) -> fidl::client::QueryResponseFut<
5606 ManagerStopResult,
5607 fidl::encoding::DefaultFuchsiaResourceDialect,
5608 > {
5609 ManagerProxyInterface::r#stop(self, fuzzer_url)
5610 }
5611}
5612
5613impl ManagerProxyInterface for ManagerProxy {
5614 type ConnectResponseFut = fidl::client::QueryResponseFut<
5615 ManagerConnectResult,
5616 fidl::encoding::DefaultFuchsiaResourceDialect,
5617 >;
5618 fn r#connect(
5619 &self,
5620 mut fuzzer_url: &str,
5621 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5622 ) -> Self::ConnectResponseFut {
5623 fn _decode(
5624 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5625 ) -> Result<ManagerConnectResult, fidl::Error> {
5626 let _response = fidl::client::decode_transaction_body::<
5627 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5628 fidl::encoding::DefaultFuchsiaResourceDialect,
5629 0x1620cd742a89f064,
5630 >(_buf?)?;
5631 Ok(_response.map(|x| x))
5632 }
5633 self.client.send_query_and_decode::<ManagerConnectRequest, ManagerConnectResult>(
5634 (fuzzer_url, controller),
5635 0x1620cd742a89f064,
5636 fidl::encoding::DynamicFlags::empty(),
5637 _decode,
5638 )
5639 }
5640
5641 type GetOutputResponseFut = fidl::client::QueryResponseFut<
5642 ManagerGetOutputResult,
5643 fidl::encoding::DefaultFuchsiaResourceDialect,
5644 >;
5645 fn r#get_output(
5646 &self,
5647 mut fuzzer_url: &str,
5648 mut output: TestOutput,
5649 mut socket: fidl::Socket,
5650 ) -> Self::GetOutputResponseFut {
5651 fn _decode(
5652 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5653 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5654 let _response = fidl::client::decode_transaction_body::<
5655 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5656 fidl::encoding::DefaultFuchsiaResourceDialect,
5657 0x755c28eecf20a88d,
5658 >(_buf?)?;
5659 Ok(_response.map(|x| x))
5660 }
5661 self.client.send_query_and_decode::<ManagerGetOutputRequest, ManagerGetOutputResult>(
5662 (fuzzer_url, output, socket),
5663 0x755c28eecf20a88d,
5664 fidl::encoding::DynamicFlags::empty(),
5665 _decode,
5666 )
5667 }
5668
5669 type StopResponseFut = fidl::client::QueryResponseFut<
5670 ManagerStopResult,
5671 fidl::encoding::DefaultFuchsiaResourceDialect,
5672 >;
5673 fn r#stop(&self, mut fuzzer_url: &str) -> Self::StopResponseFut {
5674 fn _decode(
5675 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5676 ) -> Result<ManagerStopResult, fidl::Error> {
5677 let _response = fidl::client::decode_transaction_body::<
5678 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5679 fidl::encoding::DefaultFuchsiaResourceDialect,
5680 0x27e53d86badd21f3,
5681 >(_buf?)?;
5682 Ok(_response.map(|x| x))
5683 }
5684 self.client.send_query_and_decode::<ManagerStopRequest, ManagerStopResult>(
5685 (fuzzer_url,),
5686 0x27e53d86badd21f3,
5687 fidl::encoding::DynamicFlags::empty(),
5688 _decode,
5689 )
5690 }
5691}
5692
5693pub struct ManagerEventStream {
5694 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5695}
5696
5697impl std::marker::Unpin for ManagerEventStream {}
5698
5699impl futures::stream::FusedStream for ManagerEventStream {
5700 fn is_terminated(&self) -> bool {
5701 self.event_receiver.is_terminated()
5702 }
5703}
5704
5705impl futures::Stream for ManagerEventStream {
5706 type Item = Result<ManagerEvent, fidl::Error>;
5707
5708 fn poll_next(
5709 mut self: std::pin::Pin<&mut Self>,
5710 cx: &mut std::task::Context<'_>,
5711 ) -> std::task::Poll<Option<Self::Item>> {
5712 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5713 &mut self.event_receiver,
5714 cx
5715 )?) {
5716 Some(buf) => std::task::Poll::Ready(Some(ManagerEvent::decode(buf))),
5717 None => std::task::Poll::Ready(None),
5718 }
5719 }
5720}
5721
5722#[derive(Debug)]
5723pub enum ManagerEvent {}
5724
5725impl ManagerEvent {
5726 fn decode(
5728 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5729 ) -> Result<ManagerEvent, fidl::Error> {
5730 let (bytes, _handles) = buf.split_mut();
5731 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5732 debug_assert_eq!(tx_header.tx_id, 0);
5733 match tx_header.ordinal {
5734 _ => Err(fidl::Error::UnknownOrdinal {
5735 ordinal: tx_header.ordinal,
5736 protocol_name: <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5737 }),
5738 }
5739 }
5740}
5741
5742pub struct ManagerRequestStream {
5744 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5745 is_terminated: bool,
5746}
5747
5748impl std::marker::Unpin for ManagerRequestStream {}
5749
5750impl futures::stream::FusedStream for ManagerRequestStream {
5751 fn is_terminated(&self) -> bool {
5752 self.is_terminated
5753 }
5754}
5755
5756impl fidl::endpoints::RequestStream for ManagerRequestStream {
5757 type Protocol = ManagerMarker;
5758 type ControlHandle = ManagerControlHandle;
5759
5760 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5761 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5762 }
5763
5764 fn control_handle(&self) -> Self::ControlHandle {
5765 ManagerControlHandle { inner: self.inner.clone() }
5766 }
5767
5768 fn into_inner(
5769 self,
5770 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5771 {
5772 (self.inner, self.is_terminated)
5773 }
5774
5775 fn from_inner(
5776 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5777 is_terminated: bool,
5778 ) -> Self {
5779 Self { inner, is_terminated }
5780 }
5781}
5782
5783impl futures::Stream for ManagerRequestStream {
5784 type Item = Result<ManagerRequest, fidl::Error>;
5785
5786 fn poll_next(
5787 mut self: std::pin::Pin<&mut Self>,
5788 cx: &mut std::task::Context<'_>,
5789 ) -> std::task::Poll<Option<Self::Item>> {
5790 let this = &mut *self;
5791 if this.inner.check_shutdown(cx) {
5792 this.is_terminated = true;
5793 return std::task::Poll::Ready(None);
5794 }
5795 if this.is_terminated {
5796 panic!("polled ManagerRequestStream after completion");
5797 }
5798 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5799 |bytes, handles| {
5800 match this.inner.channel().read_etc(cx, bytes, handles) {
5801 std::task::Poll::Ready(Ok(())) => {}
5802 std::task::Poll::Pending => return std::task::Poll::Pending,
5803 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5804 this.is_terminated = true;
5805 return std::task::Poll::Ready(None);
5806 }
5807 std::task::Poll::Ready(Err(e)) => {
5808 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5809 e.into(),
5810 ))))
5811 }
5812 }
5813
5814 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5816
5817 std::task::Poll::Ready(Some(match header.ordinal {
5818 0x1620cd742a89f064 => {
5819 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5820 let mut req = fidl::new_empty!(
5821 ManagerConnectRequest,
5822 fidl::encoding::DefaultFuchsiaResourceDialect
5823 );
5824 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerConnectRequest>(&header, _body_bytes, handles, &mut req)?;
5825 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5826 Ok(ManagerRequest::Connect {
5827 fuzzer_url: req.fuzzer_url,
5828 controller: req.controller,
5829
5830 responder: ManagerConnectResponder {
5831 control_handle: std::mem::ManuallyDrop::new(control_handle),
5832 tx_id: header.tx_id,
5833 },
5834 })
5835 }
5836 0x755c28eecf20a88d => {
5837 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5838 let mut req = fidl::new_empty!(
5839 ManagerGetOutputRequest,
5840 fidl::encoding::DefaultFuchsiaResourceDialect
5841 );
5842 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetOutputRequest>(&header, _body_bytes, handles, &mut req)?;
5843 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5844 Ok(ManagerRequest::GetOutput {
5845 fuzzer_url: req.fuzzer_url,
5846 output: req.output,
5847 socket: req.socket,
5848
5849 responder: ManagerGetOutputResponder {
5850 control_handle: std::mem::ManuallyDrop::new(control_handle),
5851 tx_id: header.tx_id,
5852 },
5853 })
5854 }
5855 0x27e53d86badd21f3 => {
5856 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5857 let mut req = fidl::new_empty!(
5858 ManagerStopRequest,
5859 fidl::encoding::DefaultFuchsiaResourceDialect
5860 );
5861 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerStopRequest>(&header, _body_bytes, handles, &mut req)?;
5862 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5863 Ok(ManagerRequest::Stop {
5864 fuzzer_url: req.fuzzer_url,
5865
5866 responder: ManagerStopResponder {
5867 control_handle: std::mem::ManuallyDrop::new(control_handle),
5868 tx_id: header.tx_id,
5869 },
5870 })
5871 }
5872 _ => Err(fidl::Error::UnknownOrdinal {
5873 ordinal: header.ordinal,
5874 protocol_name:
5875 <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5876 }),
5877 }))
5878 },
5879 )
5880 }
5881}
5882
5883#[derive(Debug)]
5889pub enum ManagerRequest {
5890 Connect {
5917 fuzzer_url: String,
5918 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5919 responder: ManagerConnectResponder,
5920 },
5921 GetOutput {
5936 fuzzer_url: String,
5937 output: TestOutput,
5938 socket: fidl::Socket,
5939 responder: ManagerGetOutputResponder,
5940 },
5941 Stop { fuzzer_url: String, responder: ManagerStopResponder },
5947}
5948
5949impl ManagerRequest {
5950 #[allow(irrefutable_let_patterns)]
5951 pub fn into_connect(
5952 self,
5953 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, ManagerConnectResponder)>
5954 {
5955 if let ManagerRequest::Connect { fuzzer_url, controller, responder } = self {
5956 Some((fuzzer_url, controller, responder))
5957 } else {
5958 None
5959 }
5960 }
5961
5962 #[allow(irrefutable_let_patterns)]
5963 pub fn into_get_output(
5964 self,
5965 ) -> Option<(String, TestOutput, fidl::Socket, ManagerGetOutputResponder)> {
5966 if let ManagerRequest::GetOutput { fuzzer_url, output, socket, responder } = self {
5967 Some((fuzzer_url, output, socket, responder))
5968 } else {
5969 None
5970 }
5971 }
5972
5973 #[allow(irrefutable_let_patterns)]
5974 pub fn into_stop(self) -> Option<(String, ManagerStopResponder)> {
5975 if let ManagerRequest::Stop { fuzzer_url, responder } = self {
5976 Some((fuzzer_url, responder))
5977 } else {
5978 None
5979 }
5980 }
5981
5982 pub fn method_name(&self) -> &'static str {
5984 match *self {
5985 ManagerRequest::Connect { .. } => "connect",
5986 ManagerRequest::GetOutput { .. } => "get_output",
5987 ManagerRequest::Stop { .. } => "stop",
5988 }
5989 }
5990}
5991
5992#[derive(Debug, Clone)]
5993pub struct ManagerControlHandle {
5994 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5995}
5996
5997impl fidl::endpoints::ControlHandle for ManagerControlHandle {
5998 fn shutdown(&self) {
5999 self.inner.shutdown()
6000 }
6001 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6002 self.inner.shutdown_with_epitaph(status)
6003 }
6004
6005 fn is_closed(&self) -> bool {
6006 self.inner.channel().is_closed()
6007 }
6008 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6009 self.inner.channel().on_closed()
6010 }
6011
6012 #[cfg(target_os = "fuchsia")]
6013 fn signal_peer(
6014 &self,
6015 clear_mask: zx::Signals,
6016 set_mask: zx::Signals,
6017 ) -> Result<(), zx_status::Status> {
6018 use fidl::Peered;
6019 self.inner.channel().signal_peer(clear_mask, set_mask)
6020 }
6021}
6022
6023impl ManagerControlHandle {}
6024
6025#[must_use = "FIDL methods require a response to be sent"]
6026#[derive(Debug)]
6027pub struct ManagerConnectResponder {
6028 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6029 tx_id: u32,
6030}
6031
6032impl std::ops::Drop for ManagerConnectResponder {
6036 fn drop(&mut self) {
6037 self.control_handle.shutdown();
6038 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6040 }
6041}
6042
6043impl fidl::endpoints::Responder for ManagerConnectResponder {
6044 type ControlHandle = ManagerControlHandle;
6045
6046 fn control_handle(&self) -> &ManagerControlHandle {
6047 &self.control_handle
6048 }
6049
6050 fn drop_without_shutdown(mut self) {
6051 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6053 std::mem::forget(self);
6055 }
6056}
6057
6058impl ManagerConnectResponder {
6059 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6063 let _result = self.send_raw(result);
6064 if _result.is_err() {
6065 self.control_handle.shutdown();
6066 }
6067 self.drop_without_shutdown();
6068 _result
6069 }
6070
6071 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6073 let _result = self.send_raw(result);
6074 self.drop_without_shutdown();
6075 _result
6076 }
6077
6078 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6079 self.control_handle
6080 .inner
6081 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6082 result,
6083 self.tx_id,
6084 0x1620cd742a89f064,
6085 fidl::encoding::DynamicFlags::empty(),
6086 )
6087 }
6088}
6089
6090#[must_use = "FIDL methods require a response to be sent"]
6091#[derive(Debug)]
6092pub struct ManagerGetOutputResponder {
6093 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6094 tx_id: u32,
6095}
6096
6097impl std::ops::Drop for ManagerGetOutputResponder {
6101 fn drop(&mut self) {
6102 self.control_handle.shutdown();
6103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6105 }
6106}
6107
6108impl fidl::endpoints::Responder for ManagerGetOutputResponder {
6109 type ControlHandle = ManagerControlHandle;
6110
6111 fn control_handle(&self) -> &ManagerControlHandle {
6112 &self.control_handle
6113 }
6114
6115 fn drop_without_shutdown(mut self) {
6116 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6118 std::mem::forget(self);
6120 }
6121}
6122
6123impl ManagerGetOutputResponder {
6124 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6128 let _result = self.send_raw(result);
6129 if _result.is_err() {
6130 self.control_handle.shutdown();
6131 }
6132 self.drop_without_shutdown();
6133 _result
6134 }
6135
6136 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6138 let _result = self.send_raw(result);
6139 self.drop_without_shutdown();
6140 _result
6141 }
6142
6143 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6144 self.control_handle
6145 .inner
6146 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6147 result,
6148 self.tx_id,
6149 0x755c28eecf20a88d,
6150 fidl::encoding::DynamicFlags::empty(),
6151 )
6152 }
6153}
6154
6155#[must_use = "FIDL methods require a response to be sent"]
6156#[derive(Debug)]
6157pub struct ManagerStopResponder {
6158 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6159 tx_id: u32,
6160}
6161
6162impl std::ops::Drop for ManagerStopResponder {
6166 fn drop(&mut self) {
6167 self.control_handle.shutdown();
6168 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6170 }
6171}
6172
6173impl fidl::endpoints::Responder for ManagerStopResponder {
6174 type ControlHandle = ManagerControlHandle;
6175
6176 fn control_handle(&self) -> &ManagerControlHandle {
6177 &self.control_handle
6178 }
6179
6180 fn drop_without_shutdown(mut self) {
6181 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6183 std::mem::forget(self);
6185 }
6186}
6187
6188impl ManagerStopResponder {
6189 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6193 let _result = self.send_raw(result);
6194 if _result.is_err() {
6195 self.control_handle.shutdown();
6196 }
6197 self.drop_without_shutdown();
6198 _result
6199 }
6200
6201 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6203 let _result = self.send_raw(result);
6204 self.drop_without_shutdown();
6205 _result
6206 }
6207
6208 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6209 self.control_handle
6210 .inner
6211 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6212 result,
6213 self.tx_id,
6214 0x27e53d86badd21f3,
6215 fidl::encoding::DynamicFlags::empty(),
6216 )
6217 }
6218}
6219
6220#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6221pub struct MonitorMarker;
6222
6223impl fidl::endpoints::ProtocolMarker for MonitorMarker {
6224 type Proxy = MonitorProxy;
6225 type RequestStream = MonitorRequestStream;
6226 #[cfg(target_os = "fuchsia")]
6227 type SynchronousProxy = MonitorSynchronousProxy;
6228
6229 const DEBUG_NAME: &'static str = "(anonymous) Monitor";
6230}
6231
6232pub trait MonitorProxyInterface: Send + Sync {
6233 type UpdateResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6234 fn r#update(&self, reason: UpdateReason, status: &Status) -> Self::UpdateResponseFut;
6235}
6236#[derive(Debug)]
6237#[cfg(target_os = "fuchsia")]
6238pub struct MonitorSynchronousProxy {
6239 client: fidl::client::sync::Client,
6240}
6241
6242#[cfg(target_os = "fuchsia")]
6243impl fidl::endpoints::SynchronousProxy for MonitorSynchronousProxy {
6244 type Proxy = MonitorProxy;
6245 type Protocol = MonitorMarker;
6246
6247 fn from_channel(inner: fidl::Channel) -> Self {
6248 Self::new(inner)
6249 }
6250
6251 fn into_channel(self) -> fidl::Channel {
6252 self.client.into_channel()
6253 }
6254
6255 fn as_channel(&self) -> &fidl::Channel {
6256 self.client.as_channel()
6257 }
6258}
6259
6260#[cfg(target_os = "fuchsia")]
6261impl MonitorSynchronousProxy {
6262 pub fn new(channel: fidl::Channel) -> Self {
6263 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6264 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6265 }
6266
6267 pub fn into_channel(self) -> fidl::Channel {
6268 self.client.into_channel()
6269 }
6270
6271 pub fn wait_for_event(
6274 &self,
6275 deadline: zx::MonotonicInstant,
6276 ) -> Result<MonitorEvent, fidl::Error> {
6277 MonitorEvent::decode(self.client.wait_for_event(deadline)?)
6278 }
6279
6280 pub fn r#update(
6285 &self,
6286 mut reason: UpdateReason,
6287 mut status: &Status,
6288 ___deadline: zx::MonotonicInstant,
6289 ) -> Result<(), fidl::Error> {
6290 let _response =
6291 self.client.send_query::<MonitorUpdateRequest, fidl::encoding::EmptyPayload>(
6292 (reason, status),
6293 0x7c773b93c1e6080f,
6294 fidl::encoding::DynamicFlags::empty(),
6295 ___deadline,
6296 )?;
6297 Ok(_response)
6298 }
6299}
6300
6301#[cfg(target_os = "fuchsia")]
6302impl From<MonitorSynchronousProxy> for zx::Handle {
6303 fn from(value: MonitorSynchronousProxy) -> Self {
6304 value.into_channel().into()
6305 }
6306}
6307
6308#[cfg(target_os = "fuchsia")]
6309impl From<fidl::Channel> for MonitorSynchronousProxy {
6310 fn from(value: fidl::Channel) -> Self {
6311 Self::new(value)
6312 }
6313}
6314
6315#[derive(Debug, Clone)]
6316pub struct MonitorProxy {
6317 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6318}
6319
6320impl fidl::endpoints::Proxy for MonitorProxy {
6321 type Protocol = MonitorMarker;
6322
6323 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6324 Self::new(inner)
6325 }
6326
6327 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6328 self.client.into_channel().map_err(|client| Self { client })
6329 }
6330
6331 fn as_channel(&self) -> &::fidl::AsyncChannel {
6332 self.client.as_channel()
6333 }
6334}
6335
6336impl MonitorProxy {
6337 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6339 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6340 Self { client: fidl::client::Client::new(channel, protocol_name) }
6341 }
6342
6343 pub fn take_event_stream(&self) -> MonitorEventStream {
6349 MonitorEventStream { event_receiver: self.client.take_event_receiver() }
6350 }
6351
6352 pub fn r#update(
6357 &self,
6358 mut reason: UpdateReason,
6359 mut status: &Status,
6360 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6361 MonitorProxyInterface::r#update(self, reason, status)
6362 }
6363}
6364
6365impl MonitorProxyInterface for MonitorProxy {
6366 type UpdateResponseFut =
6367 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6368 fn r#update(&self, mut reason: UpdateReason, mut status: &Status) -> Self::UpdateResponseFut {
6369 fn _decode(
6370 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6371 ) -> Result<(), fidl::Error> {
6372 let _response = fidl::client::decode_transaction_body::<
6373 fidl::encoding::EmptyPayload,
6374 fidl::encoding::DefaultFuchsiaResourceDialect,
6375 0x7c773b93c1e6080f,
6376 >(_buf?)?;
6377 Ok(_response)
6378 }
6379 self.client.send_query_and_decode::<MonitorUpdateRequest, ()>(
6380 (reason, status),
6381 0x7c773b93c1e6080f,
6382 fidl::encoding::DynamicFlags::empty(),
6383 _decode,
6384 )
6385 }
6386}
6387
6388pub struct MonitorEventStream {
6389 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6390}
6391
6392impl std::marker::Unpin for MonitorEventStream {}
6393
6394impl futures::stream::FusedStream for MonitorEventStream {
6395 fn is_terminated(&self) -> bool {
6396 self.event_receiver.is_terminated()
6397 }
6398}
6399
6400impl futures::Stream for MonitorEventStream {
6401 type Item = Result<MonitorEvent, fidl::Error>;
6402
6403 fn poll_next(
6404 mut self: std::pin::Pin<&mut Self>,
6405 cx: &mut std::task::Context<'_>,
6406 ) -> std::task::Poll<Option<Self::Item>> {
6407 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6408 &mut self.event_receiver,
6409 cx
6410 )?) {
6411 Some(buf) => std::task::Poll::Ready(Some(MonitorEvent::decode(buf))),
6412 None => std::task::Poll::Ready(None),
6413 }
6414 }
6415}
6416
6417#[derive(Debug)]
6418pub enum MonitorEvent {}
6419
6420impl MonitorEvent {
6421 fn decode(
6423 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6424 ) -> Result<MonitorEvent, fidl::Error> {
6425 let (bytes, _handles) = buf.split_mut();
6426 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6427 debug_assert_eq!(tx_header.tx_id, 0);
6428 match tx_header.ordinal {
6429 _ => Err(fidl::Error::UnknownOrdinal {
6430 ordinal: tx_header.ordinal,
6431 protocol_name: <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6432 }),
6433 }
6434 }
6435}
6436
6437pub struct MonitorRequestStream {
6439 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6440 is_terminated: bool,
6441}
6442
6443impl std::marker::Unpin for MonitorRequestStream {}
6444
6445impl futures::stream::FusedStream for MonitorRequestStream {
6446 fn is_terminated(&self) -> bool {
6447 self.is_terminated
6448 }
6449}
6450
6451impl fidl::endpoints::RequestStream for MonitorRequestStream {
6452 type Protocol = MonitorMarker;
6453 type ControlHandle = MonitorControlHandle;
6454
6455 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6456 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6457 }
6458
6459 fn control_handle(&self) -> Self::ControlHandle {
6460 MonitorControlHandle { inner: self.inner.clone() }
6461 }
6462
6463 fn into_inner(
6464 self,
6465 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6466 {
6467 (self.inner, self.is_terminated)
6468 }
6469
6470 fn from_inner(
6471 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6472 is_terminated: bool,
6473 ) -> Self {
6474 Self { inner, is_terminated }
6475 }
6476}
6477
6478impl futures::Stream for MonitorRequestStream {
6479 type Item = Result<MonitorRequest, fidl::Error>;
6480
6481 fn poll_next(
6482 mut self: std::pin::Pin<&mut Self>,
6483 cx: &mut std::task::Context<'_>,
6484 ) -> std::task::Poll<Option<Self::Item>> {
6485 let this = &mut *self;
6486 if this.inner.check_shutdown(cx) {
6487 this.is_terminated = true;
6488 return std::task::Poll::Ready(None);
6489 }
6490 if this.is_terminated {
6491 panic!("polled MonitorRequestStream after completion");
6492 }
6493 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6494 |bytes, handles| {
6495 match this.inner.channel().read_etc(cx, bytes, handles) {
6496 std::task::Poll::Ready(Ok(())) => {}
6497 std::task::Poll::Pending => return std::task::Poll::Pending,
6498 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6499 this.is_terminated = true;
6500 return std::task::Poll::Ready(None);
6501 }
6502 std::task::Poll::Ready(Err(e)) => {
6503 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6504 e.into(),
6505 ))))
6506 }
6507 }
6508
6509 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6511
6512 std::task::Poll::Ready(Some(match header.ordinal {
6513 0x7c773b93c1e6080f => {
6514 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6515 let mut req = fidl::new_empty!(
6516 MonitorUpdateRequest,
6517 fidl::encoding::DefaultFuchsiaResourceDialect
6518 );
6519 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MonitorUpdateRequest>(&header, _body_bytes, handles, &mut req)?;
6520 let control_handle = MonitorControlHandle { inner: this.inner.clone() };
6521 Ok(MonitorRequest::Update {
6522 reason: req.reason,
6523 status: req.status,
6524
6525 responder: MonitorUpdateResponder {
6526 control_handle: std::mem::ManuallyDrop::new(control_handle),
6527 tx_id: header.tx_id,
6528 },
6529 })
6530 }
6531 _ => Err(fidl::Error::UnknownOrdinal {
6532 ordinal: header.ordinal,
6533 protocol_name:
6534 <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6535 }),
6536 }))
6537 },
6538 )
6539 }
6540}
6541
6542#[derive(Debug)]
6545pub enum MonitorRequest {
6546 Update { reason: UpdateReason, status: Status, responder: MonitorUpdateResponder },
6551}
6552
6553impl MonitorRequest {
6554 #[allow(irrefutable_let_patterns)]
6555 pub fn into_update(self) -> Option<(UpdateReason, Status, MonitorUpdateResponder)> {
6556 if let MonitorRequest::Update { reason, status, responder } = self {
6557 Some((reason, status, responder))
6558 } else {
6559 None
6560 }
6561 }
6562
6563 pub fn method_name(&self) -> &'static str {
6565 match *self {
6566 MonitorRequest::Update { .. } => "update",
6567 }
6568 }
6569}
6570
6571#[derive(Debug, Clone)]
6572pub struct MonitorControlHandle {
6573 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6574}
6575
6576impl fidl::endpoints::ControlHandle for MonitorControlHandle {
6577 fn shutdown(&self) {
6578 self.inner.shutdown()
6579 }
6580 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6581 self.inner.shutdown_with_epitaph(status)
6582 }
6583
6584 fn is_closed(&self) -> bool {
6585 self.inner.channel().is_closed()
6586 }
6587 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6588 self.inner.channel().on_closed()
6589 }
6590
6591 #[cfg(target_os = "fuchsia")]
6592 fn signal_peer(
6593 &self,
6594 clear_mask: zx::Signals,
6595 set_mask: zx::Signals,
6596 ) -> Result<(), zx_status::Status> {
6597 use fidl::Peered;
6598 self.inner.channel().signal_peer(clear_mask, set_mask)
6599 }
6600}
6601
6602impl MonitorControlHandle {}
6603
6604#[must_use = "FIDL methods require a response to be sent"]
6605#[derive(Debug)]
6606pub struct MonitorUpdateResponder {
6607 control_handle: std::mem::ManuallyDrop<MonitorControlHandle>,
6608 tx_id: u32,
6609}
6610
6611impl std::ops::Drop for MonitorUpdateResponder {
6615 fn drop(&mut self) {
6616 self.control_handle.shutdown();
6617 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6619 }
6620}
6621
6622impl fidl::endpoints::Responder for MonitorUpdateResponder {
6623 type ControlHandle = MonitorControlHandle;
6624
6625 fn control_handle(&self) -> &MonitorControlHandle {
6626 &self.control_handle
6627 }
6628
6629 fn drop_without_shutdown(mut self) {
6630 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6632 std::mem::forget(self);
6634 }
6635}
6636
6637impl MonitorUpdateResponder {
6638 pub fn send(self) -> Result<(), fidl::Error> {
6642 let _result = self.send_raw();
6643 if _result.is_err() {
6644 self.control_handle.shutdown();
6645 }
6646 self.drop_without_shutdown();
6647 _result
6648 }
6649
6650 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6652 let _result = self.send_raw();
6653 self.drop_without_shutdown();
6654 _result
6655 }
6656
6657 fn send_raw(&self) -> Result<(), fidl::Error> {
6658 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6659 (),
6660 self.tx_id,
6661 0x7c773b93c1e6080f,
6662 fidl::encoding::DynamicFlags::empty(),
6663 )
6664 }
6665}
6666
6667#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6668pub struct RegistrarMarker;
6669
6670impl fidl::endpoints::ProtocolMarker for RegistrarMarker {
6671 type Proxy = RegistrarProxy;
6672 type RequestStream = RegistrarRequestStream;
6673 #[cfg(target_os = "fuchsia")]
6674 type SynchronousProxy = RegistrarSynchronousProxy;
6675
6676 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registrar";
6677}
6678impl fidl::endpoints::DiscoverableProtocolMarker for RegistrarMarker {}
6679
6680pub trait RegistrarProxyInterface: Send + Sync {
6681 type RegisterResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6682 fn r#register(
6683 &self,
6684 fuzzer_url: &str,
6685 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6686 ) -> Self::RegisterResponseFut;
6687}
6688#[derive(Debug)]
6689#[cfg(target_os = "fuchsia")]
6690pub struct RegistrarSynchronousProxy {
6691 client: fidl::client::sync::Client,
6692}
6693
6694#[cfg(target_os = "fuchsia")]
6695impl fidl::endpoints::SynchronousProxy for RegistrarSynchronousProxy {
6696 type Proxy = RegistrarProxy;
6697 type Protocol = RegistrarMarker;
6698
6699 fn from_channel(inner: fidl::Channel) -> Self {
6700 Self::new(inner)
6701 }
6702
6703 fn into_channel(self) -> fidl::Channel {
6704 self.client.into_channel()
6705 }
6706
6707 fn as_channel(&self) -> &fidl::Channel {
6708 self.client.as_channel()
6709 }
6710}
6711
6712#[cfg(target_os = "fuchsia")]
6713impl RegistrarSynchronousProxy {
6714 pub fn new(channel: fidl::Channel) -> Self {
6715 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6716 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6717 }
6718
6719 pub fn into_channel(self) -> fidl::Channel {
6720 self.client.into_channel()
6721 }
6722
6723 pub fn wait_for_event(
6726 &self,
6727 deadline: zx::MonotonicInstant,
6728 ) -> Result<RegistrarEvent, fidl::Error> {
6729 RegistrarEvent::decode(self.client.wait_for_event(deadline)?)
6730 }
6731
6732 pub fn r#register(
6743 &self,
6744 mut fuzzer_url: &str,
6745 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6746 ___deadline: zx::MonotonicInstant,
6747 ) -> Result<(), fidl::Error> {
6748 let _response =
6749 self.client.send_query::<RegistrarRegisterRequest, fidl::encoding::EmptyPayload>(
6750 (fuzzer_url, provider),
6751 0x1716ac38e74b2840,
6752 fidl::encoding::DynamicFlags::empty(),
6753 ___deadline,
6754 )?;
6755 Ok(_response)
6756 }
6757}
6758
6759#[cfg(target_os = "fuchsia")]
6760impl From<RegistrarSynchronousProxy> for zx::Handle {
6761 fn from(value: RegistrarSynchronousProxy) -> Self {
6762 value.into_channel().into()
6763 }
6764}
6765
6766#[cfg(target_os = "fuchsia")]
6767impl From<fidl::Channel> for RegistrarSynchronousProxy {
6768 fn from(value: fidl::Channel) -> Self {
6769 Self::new(value)
6770 }
6771}
6772
6773#[derive(Debug, Clone)]
6774pub struct RegistrarProxy {
6775 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6776}
6777
6778impl fidl::endpoints::Proxy for RegistrarProxy {
6779 type Protocol = RegistrarMarker;
6780
6781 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6782 Self::new(inner)
6783 }
6784
6785 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6786 self.client.into_channel().map_err(|client| Self { client })
6787 }
6788
6789 fn as_channel(&self) -> &::fidl::AsyncChannel {
6790 self.client.as_channel()
6791 }
6792}
6793
6794impl RegistrarProxy {
6795 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6797 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6798 Self { client: fidl::client::Client::new(channel, protocol_name) }
6799 }
6800
6801 pub fn take_event_stream(&self) -> RegistrarEventStream {
6807 RegistrarEventStream { event_receiver: self.client.take_event_receiver() }
6808 }
6809
6810 pub fn r#register(
6821 &self,
6822 mut fuzzer_url: &str,
6823 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6824 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6825 RegistrarProxyInterface::r#register(self, fuzzer_url, provider)
6826 }
6827}
6828
6829impl RegistrarProxyInterface for RegistrarProxy {
6830 type RegisterResponseFut =
6831 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6832 fn r#register(
6833 &self,
6834 mut fuzzer_url: &str,
6835 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6836 ) -> Self::RegisterResponseFut {
6837 fn _decode(
6838 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6839 ) -> Result<(), fidl::Error> {
6840 let _response = fidl::client::decode_transaction_body::<
6841 fidl::encoding::EmptyPayload,
6842 fidl::encoding::DefaultFuchsiaResourceDialect,
6843 0x1716ac38e74b2840,
6844 >(_buf?)?;
6845 Ok(_response)
6846 }
6847 self.client.send_query_and_decode::<RegistrarRegisterRequest, ()>(
6848 (fuzzer_url, provider),
6849 0x1716ac38e74b2840,
6850 fidl::encoding::DynamicFlags::empty(),
6851 _decode,
6852 )
6853 }
6854}
6855
6856pub struct RegistrarEventStream {
6857 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6858}
6859
6860impl std::marker::Unpin for RegistrarEventStream {}
6861
6862impl futures::stream::FusedStream for RegistrarEventStream {
6863 fn is_terminated(&self) -> bool {
6864 self.event_receiver.is_terminated()
6865 }
6866}
6867
6868impl futures::Stream for RegistrarEventStream {
6869 type Item = Result<RegistrarEvent, fidl::Error>;
6870
6871 fn poll_next(
6872 mut self: std::pin::Pin<&mut Self>,
6873 cx: &mut std::task::Context<'_>,
6874 ) -> std::task::Poll<Option<Self::Item>> {
6875 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6876 &mut self.event_receiver,
6877 cx
6878 )?) {
6879 Some(buf) => std::task::Poll::Ready(Some(RegistrarEvent::decode(buf))),
6880 None => std::task::Poll::Ready(None),
6881 }
6882 }
6883}
6884
6885#[derive(Debug)]
6886pub enum RegistrarEvent {}
6887
6888impl RegistrarEvent {
6889 fn decode(
6891 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6892 ) -> Result<RegistrarEvent, fidl::Error> {
6893 let (bytes, _handles) = buf.split_mut();
6894 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6895 debug_assert_eq!(tx_header.tx_id, 0);
6896 match tx_header.ordinal {
6897 _ => Err(fidl::Error::UnknownOrdinal {
6898 ordinal: tx_header.ordinal,
6899 protocol_name: <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6900 }),
6901 }
6902 }
6903}
6904
6905pub struct RegistrarRequestStream {
6907 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6908 is_terminated: bool,
6909}
6910
6911impl std::marker::Unpin for RegistrarRequestStream {}
6912
6913impl futures::stream::FusedStream for RegistrarRequestStream {
6914 fn is_terminated(&self) -> bool {
6915 self.is_terminated
6916 }
6917}
6918
6919impl fidl::endpoints::RequestStream for RegistrarRequestStream {
6920 type Protocol = RegistrarMarker;
6921 type ControlHandle = RegistrarControlHandle;
6922
6923 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6924 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6925 }
6926
6927 fn control_handle(&self) -> Self::ControlHandle {
6928 RegistrarControlHandle { inner: self.inner.clone() }
6929 }
6930
6931 fn into_inner(
6932 self,
6933 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6934 {
6935 (self.inner, self.is_terminated)
6936 }
6937
6938 fn from_inner(
6939 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6940 is_terminated: bool,
6941 ) -> Self {
6942 Self { inner, is_terminated }
6943 }
6944}
6945
6946impl futures::Stream for RegistrarRequestStream {
6947 type Item = Result<RegistrarRequest, fidl::Error>;
6948
6949 fn poll_next(
6950 mut self: std::pin::Pin<&mut Self>,
6951 cx: &mut std::task::Context<'_>,
6952 ) -> std::task::Poll<Option<Self::Item>> {
6953 let this = &mut *self;
6954 if this.inner.check_shutdown(cx) {
6955 this.is_terminated = true;
6956 return std::task::Poll::Ready(None);
6957 }
6958 if this.is_terminated {
6959 panic!("polled RegistrarRequestStream after completion");
6960 }
6961 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6962 |bytes, handles| {
6963 match this.inner.channel().read_etc(cx, bytes, handles) {
6964 std::task::Poll::Ready(Ok(())) => {}
6965 std::task::Poll::Pending => return std::task::Poll::Pending,
6966 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6967 this.is_terminated = true;
6968 return std::task::Poll::Ready(None);
6969 }
6970 std::task::Poll::Ready(Err(e)) => {
6971 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6972 e.into(),
6973 ))))
6974 }
6975 }
6976
6977 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6979
6980 std::task::Poll::Ready(Some(match header.ordinal {
6981 0x1716ac38e74b2840 => {
6982 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6983 let mut req = fidl::new_empty!(
6984 RegistrarRegisterRequest,
6985 fidl::encoding::DefaultFuchsiaResourceDialect
6986 );
6987 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistrarRegisterRequest>(&header, _body_bytes, handles, &mut req)?;
6988 let control_handle = RegistrarControlHandle { inner: this.inner.clone() };
6989 Ok(RegistrarRequest::Register {
6990 fuzzer_url: req.fuzzer_url,
6991 provider: req.provider,
6992
6993 responder: RegistrarRegisterResponder {
6994 control_handle: std::mem::ManuallyDrop::new(control_handle),
6995 tx_id: header.tx_id,
6996 },
6997 })
6998 }
6999 _ => Err(fidl::Error::UnknownOrdinal {
7000 ordinal: header.ordinal,
7001 protocol_name:
7002 <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7003 }),
7004 }))
7005 },
7006 )
7007 }
7008}
7009
7010#[derive(Debug)]
7015pub enum RegistrarRequest {
7016 Register {
7027 fuzzer_url: String,
7028 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7029 responder: RegistrarRegisterResponder,
7030 },
7031}
7032
7033impl RegistrarRequest {
7034 #[allow(irrefutable_let_patterns)]
7035 pub fn into_register(
7036 self,
7037 ) -> Option<(
7038 String,
7039 fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7040 RegistrarRegisterResponder,
7041 )> {
7042 if let RegistrarRequest::Register { fuzzer_url, provider, responder } = self {
7043 Some((fuzzer_url, provider, responder))
7044 } else {
7045 None
7046 }
7047 }
7048
7049 pub fn method_name(&self) -> &'static str {
7051 match *self {
7052 RegistrarRequest::Register { .. } => "register",
7053 }
7054 }
7055}
7056
7057#[derive(Debug, Clone)]
7058pub struct RegistrarControlHandle {
7059 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7060}
7061
7062impl fidl::endpoints::ControlHandle for RegistrarControlHandle {
7063 fn shutdown(&self) {
7064 self.inner.shutdown()
7065 }
7066 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7067 self.inner.shutdown_with_epitaph(status)
7068 }
7069
7070 fn is_closed(&self) -> bool {
7071 self.inner.channel().is_closed()
7072 }
7073 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7074 self.inner.channel().on_closed()
7075 }
7076
7077 #[cfg(target_os = "fuchsia")]
7078 fn signal_peer(
7079 &self,
7080 clear_mask: zx::Signals,
7081 set_mask: zx::Signals,
7082 ) -> Result<(), zx_status::Status> {
7083 use fidl::Peered;
7084 self.inner.channel().signal_peer(clear_mask, set_mask)
7085 }
7086}
7087
7088impl RegistrarControlHandle {}
7089
7090#[must_use = "FIDL methods require a response to be sent"]
7091#[derive(Debug)]
7092pub struct RegistrarRegisterResponder {
7093 control_handle: std::mem::ManuallyDrop<RegistrarControlHandle>,
7094 tx_id: u32,
7095}
7096
7097impl std::ops::Drop for RegistrarRegisterResponder {
7101 fn drop(&mut self) {
7102 self.control_handle.shutdown();
7103 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7105 }
7106}
7107
7108impl fidl::endpoints::Responder for RegistrarRegisterResponder {
7109 type ControlHandle = RegistrarControlHandle;
7110
7111 fn control_handle(&self) -> &RegistrarControlHandle {
7112 &self.control_handle
7113 }
7114
7115 fn drop_without_shutdown(mut self) {
7116 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7118 std::mem::forget(self);
7120 }
7121}
7122
7123impl RegistrarRegisterResponder {
7124 pub fn send(self) -> Result<(), fidl::Error> {
7128 let _result = self.send_raw();
7129 if _result.is_err() {
7130 self.control_handle.shutdown();
7131 }
7132 self.drop_without_shutdown();
7133 _result
7134 }
7135
7136 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
7138 let _result = self.send_raw();
7139 self.drop_without_shutdown();
7140 _result
7141 }
7142
7143 fn send_raw(&self) -> Result<(), fidl::Error> {
7144 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
7145 (),
7146 self.tx_id,
7147 0x1716ac38e74b2840,
7148 fidl::encoding::DynamicFlags::empty(),
7149 )
7150 }
7151}
7152
7153#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7154pub struct RegistryMarker;
7155
7156impl fidl::endpoints::ProtocolMarker for RegistryMarker {
7157 type Proxy = RegistryProxy;
7158 type RequestStream = RegistryRequestStream;
7159 #[cfg(target_os = "fuchsia")]
7160 type SynchronousProxy = RegistrySynchronousProxy;
7161
7162 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registry";
7163}
7164impl fidl::endpoints::DiscoverableProtocolMarker for RegistryMarker {}
7165pub type RegistryConnectResult = Result<(), i32>;
7166pub type RegistryDisconnectResult = Result<(), i32>;
7167
7168pub trait RegistryProxyInterface: Send + Sync {
7169 type ConnectResponseFut: std::future::Future<Output = Result<RegistryConnectResult, fidl::Error>>
7170 + Send;
7171 fn r#connect(
7172 &self,
7173 fuzzer_url: &str,
7174 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7175 timeout: i64,
7176 ) -> Self::ConnectResponseFut;
7177 type DisconnectResponseFut: std::future::Future<Output = Result<RegistryDisconnectResult, fidl::Error>>
7178 + Send;
7179 fn r#disconnect(&self, fuzzer_url: &str) -> Self::DisconnectResponseFut;
7180}
7181#[derive(Debug)]
7182#[cfg(target_os = "fuchsia")]
7183pub struct RegistrySynchronousProxy {
7184 client: fidl::client::sync::Client,
7185}
7186
7187#[cfg(target_os = "fuchsia")]
7188impl fidl::endpoints::SynchronousProxy for RegistrySynchronousProxy {
7189 type Proxy = RegistryProxy;
7190 type Protocol = RegistryMarker;
7191
7192 fn from_channel(inner: fidl::Channel) -> Self {
7193 Self::new(inner)
7194 }
7195
7196 fn into_channel(self) -> fidl::Channel {
7197 self.client.into_channel()
7198 }
7199
7200 fn as_channel(&self) -> &fidl::Channel {
7201 self.client.as_channel()
7202 }
7203}
7204
7205#[cfg(target_os = "fuchsia")]
7206impl RegistrySynchronousProxy {
7207 pub fn new(channel: fidl::Channel) -> Self {
7208 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7209 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7210 }
7211
7212 pub fn into_channel(self) -> fidl::Channel {
7213 self.client.into_channel()
7214 }
7215
7216 pub fn wait_for_event(
7219 &self,
7220 deadline: zx::MonotonicInstant,
7221 ) -> Result<RegistryEvent, fidl::Error> {
7222 RegistryEvent::decode(self.client.wait_for_event(deadline)?)
7223 }
7224
7225 pub fn r#connect(
7241 &self,
7242 mut fuzzer_url: &str,
7243 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7244 mut timeout: i64,
7245 ___deadline: zx::MonotonicInstant,
7246 ) -> Result<RegistryConnectResult, fidl::Error> {
7247 let _response = self.client.send_query::<
7248 RegistryConnectRequest,
7249 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7250 >(
7251 (fuzzer_url, controller, timeout,),
7252 0x5128cb31967a446f,
7253 fidl::encoding::DynamicFlags::empty(),
7254 ___deadline,
7255 )?;
7256 Ok(_response.map(|x| x))
7257 }
7258
7259 pub fn r#disconnect(
7266 &self,
7267 mut fuzzer_url: &str,
7268 ___deadline: zx::MonotonicInstant,
7269 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7270 let _response = self.client.send_query::<
7271 RegistryDisconnectRequest,
7272 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7273 >(
7274 (fuzzer_url,),
7275 0x7bb4b7591146d4cb,
7276 fidl::encoding::DynamicFlags::empty(),
7277 ___deadline,
7278 )?;
7279 Ok(_response.map(|x| x))
7280 }
7281}
7282
7283#[cfg(target_os = "fuchsia")]
7284impl From<RegistrySynchronousProxy> for zx::Handle {
7285 fn from(value: RegistrySynchronousProxy) -> Self {
7286 value.into_channel().into()
7287 }
7288}
7289
7290#[cfg(target_os = "fuchsia")]
7291impl From<fidl::Channel> for RegistrySynchronousProxy {
7292 fn from(value: fidl::Channel) -> Self {
7293 Self::new(value)
7294 }
7295}
7296
7297#[derive(Debug, Clone)]
7298pub struct RegistryProxy {
7299 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7300}
7301
7302impl fidl::endpoints::Proxy for RegistryProxy {
7303 type Protocol = RegistryMarker;
7304
7305 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7306 Self::new(inner)
7307 }
7308
7309 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7310 self.client.into_channel().map_err(|client| Self { client })
7311 }
7312
7313 fn as_channel(&self) -> &::fidl::AsyncChannel {
7314 self.client.as_channel()
7315 }
7316}
7317
7318impl RegistryProxy {
7319 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7321 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7322 Self { client: fidl::client::Client::new(channel, protocol_name) }
7323 }
7324
7325 pub fn take_event_stream(&self) -> RegistryEventStream {
7331 RegistryEventStream { event_receiver: self.client.take_event_receiver() }
7332 }
7333
7334 pub fn r#connect(
7350 &self,
7351 mut fuzzer_url: &str,
7352 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7353 mut timeout: i64,
7354 ) -> fidl::client::QueryResponseFut<
7355 RegistryConnectResult,
7356 fidl::encoding::DefaultFuchsiaResourceDialect,
7357 > {
7358 RegistryProxyInterface::r#connect(self, fuzzer_url, controller, timeout)
7359 }
7360
7361 pub fn r#disconnect(
7368 &self,
7369 mut fuzzer_url: &str,
7370 ) -> fidl::client::QueryResponseFut<
7371 RegistryDisconnectResult,
7372 fidl::encoding::DefaultFuchsiaResourceDialect,
7373 > {
7374 RegistryProxyInterface::r#disconnect(self, fuzzer_url)
7375 }
7376}
7377
7378impl RegistryProxyInterface for RegistryProxy {
7379 type ConnectResponseFut = fidl::client::QueryResponseFut<
7380 RegistryConnectResult,
7381 fidl::encoding::DefaultFuchsiaResourceDialect,
7382 >;
7383 fn r#connect(
7384 &self,
7385 mut fuzzer_url: &str,
7386 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7387 mut timeout: i64,
7388 ) -> Self::ConnectResponseFut {
7389 fn _decode(
7390 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7391 ) -> Result<RegistryConnectResult, fidl::Error> {
7392 let _response = fidl::client::decode_transaction_body::<
7393 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7394 fidl::encoding::DefaultFuchsiaResourceDialect,
7395 0x5128cb31967a446f,
7396 >(_buf?)?;
7397 Ok(_response.map(|x| x))
7398 }
7399 self.client.send_query_and_decode::<RegistryConnectRequest, RegistryConnectResult>(
7400 (fuzzer_url, controller, timeout),
7401 0x5128cb31967a446f,
7402 fidl::encoding::DynamicFlags::empty(),
7403 _decode,
7404 )
7405 }
7406
7407 type DisconnectResponseFut = fidl::client::QueryResponseFut<
7408 RegistryDisconnectResult,
7409 fidl::encoding::DefaultFuchsiaResourceDialect,
7410 >;
7411 fn r#disconnect(&self, mut fuzzer_url: &str) -> Self::DisconnectResponseFut {
7412 fn _decode(
7413 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7414 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7415 let _response = fidl::client::decode_transaction_body::<
7416 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7417 fidl::encoding::DefaultFuchsiaResourceDialect,
7418 0x7bb4b7591146d4cb,
7419 >(_buf?)?;
7420 Ok(_response.map(|x| x))
7421 }
7422 self.client.send_query_and_decode::<RegistryDisconnectRequest, RegistryDisconnectResult>(
7423 (fuzzer_url,),
7424 0x7bb4b7591146d4cb,
7425 fidl::encoding::DynamicFlags::empty(),
7426 _decode,
7427 )
7428 }
7429}
7430
7431pub struct RegistryEventStream {
7432 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7433}
7434
7435impl std::marker::Unpin for RegistryEventStream {}
7436
7437impl futures::stream::FusedStream for RegistryEventStream {
7438 fn is_terminated(&self) -> bool {
7439 self.event_receiver.is_terminated()
7440 }
7441}
7442
7443impl futures::Stream for RegistryEventStream {
7444 type Item = Result<RegistryEvent, fidl::Error>;
7445
7446 fn poll_next(
7447 mut self: std::pin::Pin<&mut Self>,
7448 cx: &mut std::task::Context<'_>,
7449 ) -> std::task::Poll<Option<Self::Item>> {
7450 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7451 &mut self.event_receiver,
7452 cx
7453 )?) {
7454 Some(buf) => std::task::Poll::Ready(Some(RegistryEvent::decode(buf))),
7455 None => std::task::Poll::Ready(None),
7456 }
7457 }
7458}
7459
7460#[derive(Debug)]
7461pub enum RegistryEvent {}
7462
7463impl RegistryEvent {
7464 fn decode(
7466 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7467 ) -> Result<RegistryEvent, fidl::Error> {
7468 let (bytes, _handles) = buf.split_mut();
7469 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7470 debug_assert_eq!(tx_header.tx_id, 0);
7471 match tx_header.ordinal {
7472 _ => Err(fidl::Error::UnknownOrdinal {
7473 ordinal: tx_header.ordinal,
7474 protocol_name: <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7475 }),
7476 }
7477 }
7478}
7479
7480pub struct RegistryRequestStream {
7482 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7483 is_terminated: bool,
7484}
7485
7486impl std::marker::Unpin for RegistryRequestStream {}
7487
7488impl futures::stream::FusedStream for RegistryRequestStream {
7489 fn is_terminated(&self) -> bool {
7490 self.is_terminated
7491 }
7492}
7493
7494impl fidl::endpoints::RequestStream for RegistryRequestStream {
7495 type Protocol = RegistryMarker;
7496 type ControlHandle = RegistryControlHandle;
7497
7498 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7499 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7500 }
7501
7502 fn control_handle(&self) -> Self::ControlHandle {
7503 RegistryControlHandle { inner: self.inner.clone() }
7504 }
7505
7506 fn into_inner(
7507 self,
7508 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7509 {
7510 (self.inner, self.is_terminated)
7511 }
7512
7513 fn from_inner(
7514 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7515 is_terminated: bool,
7516 ) -> Self {
7517 Self { inner, is_terminated }
7518 }
7519}
7520
7521impl futures::Stream for RegistryRequestStream {
7522 type Item = Result<RegistryRequest, fidl::Error>;
7523
7524 fn poll_next(
7525 mut self: std::pin::Pin<&mut Self>,
7526 cx: &mut std::task::Context<'_>,
7527 ) -> std::task::Poll<Option<Self::Item>> {
7528 let this = &mut *self;
7529 if this.inner.check_shutdown(cx) {
7530 this.is_terminated = true;
7531 return std::task::Poll::Ready(None);
7532 }
7533 if this.is_terminated {
7534 panic!("polled RegistryRequestStream after completion");
7535 }
7536 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7537 |bytes, handles| {
7538 match this.inner.channel().read_etc(cx, bytes, handles) {
7539 std::task::Poll::Ready(Ok(())) => {}
7540 std::task::Poll::Pending => return std::task::Poll::Pending,
7541 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7542 this.is_terminated = true;
7543 return std::task::Poll::Ready(None);
7544 }
7545 std::task::Poll::Ready(Err(e)) => {
7546 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7547 e.into(),
7548 ))))
7549 }
7550 }
7551
7552 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7554
7555 std::task::Poll::Ready(Some(match header.ordinal {
7556 0x5128cb31967a446f => {
7557 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7558 let mut req = fidl::new_empty!(
7559 RegistryConnectRequest,
7560 fidl::encoding::DefaultFuchsiaResourceDialect
7561 );
7562 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryConnectRequest>(&header, _body_bytes, handles, &mut req)?;
7563 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7564 Ok(RegistryRequest::Connect {
7565 fuzzer_url: req.fuzzer_url,
7566 controller: req.controller,
7567 timeout: req.timeout,
7568
7569 responder: RegistryConnectResponder {
7570 control_handle: std::mem::ManuallyDrop::new(control_handle),
7571 tx_id: header.tx_id,
7572 },
7573 })
7574 }
7575 0x7bb4b7591146d4cb => {
7576 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7577 let mut req = fidl::new_empty!(
7578 RegistryDisconnectRequest,
7579 fidl::encoding::DefaultFuchsiaResourceDialect
7580 );
7581 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
7582 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7583 Ok(RegistryRequest::Disconnect {
7584 fuzzer_url: req.fuzzer_url,
7585
7586 responder: RegistryDisconnectResponder {
7587 control_handle: std::mem::ManuallyDrop::new(control_handle),
7588 tx_id: header.tx_id,
7589 },
7590 })
7591 }
7592 _ => Err(fidl::Error::UnknownOrdinal {
7593 ordinal: header.ordinal,
7594 protocol_name:
7595 <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7596 }),
7597 }))
7598 },
7599 )
7600 }
7601}
7602
7603#[derive(Debug)]
7607pub enum RegistryRequest {
7608 Connect {
7624 fuzzer_url: String,
7625 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7626 timeout: i64,
7627 responder: RegistryConnectResponder,
7628 },
7629 Disconnect { fuzzer_url: String, responder: RegistryDisconnectResponder },
7636}
7637
7638impl RegistryRequest {
7639 #[allow(irrefutable_let_patterns)]
7640 pub fn into_connect(
7641 self,
7642 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, i64, RegistryConnectResponder)>
7643 {
7644 if let RegistryRequest::Connect { fuzzer_url, controller, timeout, responder } = self {
7645 Some((fuzzer_url, controller, timeout, responder))
7646 } else {
7647 None
7648 }
7649 }
7650
7651 #[allow(irrefutable_let_patterns)]
7652 pub fn into_disconnect(self) -> Option<(String, RegistryDisconnectResponder)> {
7653 if let RegistryRequest::Disconnect { fuzzer_url, responder } = self {
7654 Some((fuzzer_url, responder))
7655 } else {
7656 None
7657 }
7658 }
7659
7660 pub fn method_name(&self) -> &'static str {
7662 match *self {
7663 RegistryRequest::Connect { .. } => "connect",
7664 RegistryRequest::Disconnect { .. } => "disconnect",
7665 }
7666 }
7667}
7668
7669#[derive(Debug, Clone)]
7670pub struct RegistryControlHandle {
7671 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7672}
7673
7674impl fidl::endpoints::ControlHandle for RegistryControlHandle {
7675 fn shutdown(&self) {
7676 self.inner.shutdown()
7677 }
7678 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7679 self.inner.shutdown_with_epitaph(status)
7680 }
7681
7682 fn is_closed(&self) -> bool {
7683 self.inner.channel().is_closed()
7684 }
7685 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7686 self.inner.channel().on_closed()
7687 }
7688
7689 #[cfg(target_os = "fuchsia")]
7690 fn signal_peer(
7691 &self,
7692 clear_mask: zx::Signals,
7693 set_mask: zx::Signals,
7694 ) -> Result<(), zx_status::Status> {
7695 use fidl::Peered;
7696 self.inner.channel().signal_peer(clear_mask, set_mask)
7697 }
7698}
7699
7700impl RegistryControlHandle {}
7701
7702#[must_use = "FIDL methods require a response to be sent"]
7703#[derive(Debug)]
7704pub struct RegistryConnectResponder {
7705 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7706 tx_id: u32,
7707}
7708
7709impl std::ops::Drop for RegistryConnectResponder {
7713 fn drop(&mut self) {
7714 self.control_handle.shutdown();
7715 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7717 }
7718}
7719
7720impl fidl::endpoints::Responder for RegistryConnectResponder {
7721 type ControlHandle = RegistryControlHandle;
7722
7723 fn control_handle(&self) -> &RegistryControlHandle {
7724 &self.control_handle
7725 }
7726
7727 fn drop_without_shutdown(mut self) {
7728 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7730 std::mem::forget(self);
7732 }
7733}
7734
7735impl RegistryConnectResponder {
7736 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7740 let _result = self.send_raw(result);
7741 if _result.is_err() {
7742 self.control_handle.shutdown();
7743 }
7744 self.drop_without_shutdown();
7745 _result
7746 }
7747
7748 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7750 let _result = self.send_raw(result);
7751 self.drop_without_shutdown();
7752 _result
7753 }
7754
7755 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7756 self.control_handle
7757 .inner
7758 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7759 result,
7760 self.tx_id,
7761 0x5128cb31967a446f,
7762 fidl::encoding::DynamicFlags::empty(),
7763 )
7764 }
7765}
7766
7767#[must_use = "FIDL methods require a response to be sent"]
7768#[derive(Debug)]
7769pub struct RegistryDisconnectResponder {
7770 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7771 tx_id: u32,
7772}
7773
7774impl std::ops::Drop for RegistryDisconnectResponder {
7778 fn drop(&mut self) {
7779 self.control_handle.shutdown();
7780 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7782 }
7783}
7784
7785impl fidl::endpoints::Responder for RegistryDisconnectResponder {
7786 type ControlHandle = RegistryControlHandle;
7787
7788 fn control_handle(&self) -> &RegistryControlHandle {
7789 &self.control_handle
7790 }
7791
7792 fn drop_without_shutdown(mut self) {
7793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7795 std::mem::forget(self);
7797 }
7798}
7799
7800impl RegistryDisconnectResponder {
7801 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7805 let _result = self.send_raw(result);
7806 if _result.is_err() {
7807 self.control_handle.shutdown();
7808 }
7809 self.drop_without_shutdown();
7810 _result
7811 }
7812
7813 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7815 let _result = self.send_raw(result);
7816 self.drop_without_shutdown();
7817 _result
7818 }
7819
7820 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7821 self.control_handle
7822 .inner
7823 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7824 result,
7825 self.tx_id,
7826 0x7bb4b7591146d4cb,
7827 fidl::encoding::DynamicFlags::empty(),
7828 )
7829 }
7830}
7831
7832#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7833pub struct TargetAdapterMarker;
7834
7835impl fidl::endpoints::ProtocolMarker for TargetAdapterMarker {
7836 type Proxy = TargetAdapterProxy;
7837 type RequestStream = TargetAdapterRequestStream;
7838 #[cfg(target_os = "fuchsia")]
7839 type SynchronousProxy = TargetAdapterSynchronousProxy;
7840
7841 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.TargetAdapter";
7842}
7843impl fidl::endpoints::DiscoverableProtocolMarker for TargetAdapterMarker {}
7844
7845pub trait TargetAdapterProxyInterface: Send + Sync {
7846 type GetParametersResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>>
7847 + Send;
7848 fn r#get_parameters(&self) -> Self::GetParametersResponseFut;
7849 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
7850 fn r#connect(
7851 &self,
7852 eventpair: fidl::EventPair,
7853 test_input: fidl::Vmo,
7854 ) -> Self::ConnectResponseFut;
7855}
7856#[derive(Debug)]
7857#[cfg(target_os = "fuchsia")]
7858pub struct TargetAdapterSynchronousProxy {
7859 client: fidl::client::sync::Client,
7860}
7861
7862#[cfg(target_os = "fuchsia")]
7863impl fidl::endpoints::SynchronousProxy for TargetAdapterSynchronousProxy {
7864 type Proxy = TargetAdapterProxy;
7865 type Protocol = TargetAdapterMarker;
7866
7867 fn from_channel(inner: fidl::Channel) -> Self {
7868 Self::new(inner)
7869 }
7870
7871 fn into_channel(self) -> fidl::Channel {
7872 self.client.into_channel()
7873 }
7874
7875 fn as_channel(&self) -> &fidl::Channel {
7876 self.client.as_channel()
7877 }
7878}
7879
7880#[cfg(target_os = "fuchsia")]
7881impl TargetAdapterSynchronousProxy {
7882 pub fn new(channel: fidl::Channel) -> Self {
7883 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7884 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7885 }
7886
7887 pub fn into_channel(self) -> fidl::Channel {
7888 self.client.into_channel()
7889 }
7890
7891 pub fn wait_for_event(
7894 &self,
7895 deadline: zx::MonotonicInstant,
7896 ) -> Result<TargetAdapterEvent, fidl::Error> {
7897 TargetAdapterEvent::decode(self.client.wait_for_event(deadline)?)
7898 }
7899
7900 pub fn r#get_parameters(
7911 &self,
7912 ___deadline: zx::MonotonicInstant,
7913 ) -> Result<Vec<String>, fidl::Error> {
7914 let _response = self
7915 .client
7916 .send_query::<fidl::encoding::EmptyPayload, TargetAdapterGetParametersResponse>(
7917 (),
7918 0x5c7e40a47f753e3e,
7919 fidl::encoding::DynamicFlags::empty(),
7920 ___deadline,
7921 )?;
7922 Ok(_response.parameters)
7923 }
7924
7925 pub fn r#connect(
7934 &self,
7935 mut eventpair: fidl::EventPair,
7936 mut test_input: fidl::Vmo,
7937 ___deadline: zx::MonotonicInstant,
7938 ) -> Result<(), fidl::Error> {
7939 let _response =
7940 self.client.send_query::<TargetAdapterConnectRequest, fidl::encoding::EmptyPayload>(
7941 (eventpair, test_input),
7942 0x7ea603a119866618,
7943 fidl::encoding::DynamicFlags::empty(),
7944 ___deadline,
7945 )?;
7946 Ok(_response)
7947 }
7948}
7949
7950#[cfg(target_os = "fuchsia")]
7951impl From<TargetAdapterSynchronousProxy> for zx::Handle {
7952 fn from(value: TargetAdapterSynchronousProxy) -> Self {
7953 value.into_channel().into()
7954 }
7955}
7956
7957#[cfg(target_os = "fuchsia")]
7958impl From<fidl::Channel> for TargetAdapterSynchronousProxy {
7959 fn from(value: fidl::Channel) -> Self {
7960 Self::new(value)
7961 }
7962}
7963
7964#[derive(Debug, Clone)]
7965pub struct TargetAdapterProxy {
7966 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7967}
7968
7969impl fidl::endpoints::Proxy for TargetAdapterProxy {
7970 type Protocol = TargetAdapterMarker;
7971
7972 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7973 Self::new(inner)
7974 }
7975
7976 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7977 self.client.into_channel().map_err(|client| Self { client })
7978 }
7979
7980 fn as_channel(&self) -> &::fidl::AsyncChannel {
7981 self.client.as_channel()
7982 }
7983}
7984
7985impl TargetAdapterProxy {
7986 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7988 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7989 Self { client: fidl::client::Client::new(channel, protocol_name) }
7990 }
7991
7992 pub fn take_event_stream(&self) -> TargetAdapterEventStream {
7998 TargetAdapterEventStream { event_receiver: self.client.take_event_receiver() }
7999 }
8000
8001 pub fn r#get_parameters(
8012 &self,
8013 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
8014 {
8015 TargetAdapterProxyInterface::r#get_parameters(self)
8016 }
8017
8018 pub fn r#connect(
8027 &self,
8028 mut eventpair: fidl::EventPair,
8029 mut test_input: fidl::Vmo,
8030 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8031 TargetAdapterProxyInterface::r#connect(self, eventpair, test_input)
8032 }
8033}
8034
8035impl TargetAdapterProxyInterface for TargetAdapterProxy {
8036 type GetParametersResponseFut =
8037 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8038 fn r#get_parameters(&self) -> Self::GetParametersResponseFut {
8039 fn _decode(
8040 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8041 ) -> Result<Vec<String>, fidl::Error> {
8042 let _response = fidl::client::decode_transaction_body::<
8043 TargetAdapterGetParametersResponse,
8044 fidl::encoding::DefaultFuchsiaResourceDialect,
8045 0x5c7e40a47f753e3e,
8046 >(_buf?)?;
8047 Ok(_response.parameters)
8048 }
8049 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
8050 (),
8051 0x5c7e40a47f753e3e,
8052 fidl::encoding::DynamicFlags::empty(),
8053 _decode,
8054 )
8055 }
8056
8057 type ConnectResponseFut =
8058 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8059 fn r#connect(
8060 &self,
8061 mut eventpair: fidl::EventPair,
8062 mut test_input: fidl::Vmo,
8063 ) -> Self::ConnectResponseFut {
8064 fn _decode(
8065 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8066 ) -> Result<(), fidl::Error> {
8067 let _response = fidl::client::decode_transaction_body::<
8068 fidl::encoding::EmptyPayload,
8069 fidl::encoding::DefaultFuchsiaResourceDialect,
8070 0x7ea603a119866618,
8071 >(_buf?)?;
8072 Ok(_response)
8073 }
8074 self.client.send_query_and_decode::<TargetAdapterConnectRequest, ()>(
8075 (eventpair, test_input),
8076 0x7ea603a119866618,
8077 fidl::encoding::DynamicFlags::empty(),
8078 _decode,
8079 )
8080 }
8081}
8082
8083pub struct TargetAdapterEventStream {
8084 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8085}
8086
8087impl std::marker::Unpin for TargetAdapterEventStream {}
8088
8089impl futures::stream::FusedStream for TargetAdapterEventStream {
8090 fn is_terminated(&self) -> bool {
8091 self.event_receiver.is_terminated()
8092 }
8093}
8094
8095impl futures::Stream for TargetAdapterEventStream {
8096 type Item = Result<TargetAdapterEvent, fidl::Error>;
8097
8098 fn poll_next(
8099 mut self: std::pin::Pin<&mut Self>,
8100 cx: &mut std::task::Context<'_>,
8101 ) -> std::task::Poll<Option<Self::Item>> {
8102 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8103 &mut self.event_receiver,
8104 cx
8105 )?) {
8106 Some(buf) => std::task::Poll::Ready(Some(TargetAdapterEvent::decode(buf))),
8107 None => std::task::Poll::Ready(None),
8108 }
8109 }
8110}
8111
8112#[derive(Debug)]
8113pub enum TargetAdapterEvent {}
8114
8115impl TargetAdapterEvent {
8116 fn decode(
8118 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8119 ) -> Result<TargetAdapterEvent, fidl::Error> {
8120 let (bytes, _handles) = buf.split_mut();
8121 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8122 debug_assert_eq!(tx_header.tx_id, 0);
8123 match tx_header.ordinal {
8124 _ => Err(fidl::Error::UnknownOrdinal {
8125 ordinal: tx_header.ordinal,
8126 protocol_name: <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8127 }),
8128 }
8129 }
8130}
8131
8132pub struct TargetAdapterRequestStream {
8134 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8135 is_terminated: bool,
8136}
8137
8138impl std::marker::Unpin for TargetAdapterRequestStream {}
8139
8140impl futures::stream::FusedStream for TargetAdapterRequestStream {
8141 fn is_terminated(&self) -> bool {
8142 self.is_terminated
8143 }
8144}
8145
8146impl fidl::endpoints::RequestStream for TargetAdapterRequestStream {
8147 type Protocol = TargetAdapterMarker;
8148 type ControlHandle = TargetAdapterControlHandle;
8149
8150 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8151 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8152 }
8153
8154 fn control_handle(&self) -> Self::ControlHandle {
8155 TargetAdapterControlHandle { inner: self.inner.clone() }
8156 }
8157
8158 fn into_inner(
8159 self,
8160 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8161 {
8162 (self.inner, self.is_terminated)
8163 }
8164
8165 fn from_inner(
8166 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8167 is_terminated: bool,
8168 ) -> Self {
8169 Self { inner, is_terminated }
8170 }
8171}
8172
8173impl futures::Stream for TargetAdapterRequestStream {
8174 type Item = Result<TargetAdapterRequest, fidl::Error>;
8175
8176 fn poll_next(
8177 mut self: std::pin::Pin<&mut Self>,
8178 cx: &mut std::task::Context<'_>,
8179 ) -> std::task::Poll<Option<Self::Item>> {
8180 let this = &mut *self;
8181 if this.inner.check_shutdown(cx) {
8182 this.is_terminated = true;
8183 return std::task::Poll::Ready(None);
8184 }
8185 if this.is_terminated {
8186 panic!("polled TargetAdapterRequestStream after completion");
8187 }
8188 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8189 |bytes, handles| {
8190 match this.inner.channel().read_etc(cx, bytes, handles) {
8191 std::task::Poll::Ready(Ok(())) => {}
8192 std::task::Poll::Pending => return std::task::Poll::Pending,
8193 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8194 this.is_terminated = true;
8195 return std::task::Poll::Ready(None);
8196 }
8197 std::task::Poll::Ready(Err(e)) => {
8198 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8199 e.into(),
8200 ))))
8201 }
8202 }
8203
8204 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8206
8207 std::task::Poll::Ready(Some(match header.ordinal {
8208 0x5c7e40a47f753e3e => {
8209 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8210 let mut req = fidl::new_empty!(
8211 fidl::encoding::EmptyPayload,
8212 fidl::encoding::DefaultFuchsiaResourceDialect
8213 );
8214 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
8215 let control_handle =
8216 TargetAdapterControlHandle { inner: this.inner.clone() };
8217 Ok(TargetAdapterRequest::GetParameters {
8218 responder: TargetAdapterGetParametersResponder {
8219 control_handle: std::mem::ManuallyDrop::new(control_handle),
8220 tx_id: header.tx_id,
8221 },
8222 })
8223 }
8224 0x7ea603a119866618 => {
8225 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8226 let mut req = fidl::new_empty!(
8227 TargetAdapterConnectRequest,
8228 fidl::encoding::DefaultFuchsiaResourceDialect
8229 );
8230 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TargetAdapterConnectRequest>(&header, _body_bytes, handles, &mut req)?;
8231 let control_handle =
8232 TargetAdapterControlHandle { inner: this.inner.clone() };
8233 Ok(TargetAdapterRequest::Connect {
8234 eventpair: req.eventpair,
8235 test_input: req.test_input,
8236
8237 responder: TargetAdapterConnectResponder {
8238 control_handle: std::mem::ManuallyDrop::new(control_handle),
8239 tx_id: header.tx_id,
8240 },
8241 })
8242 }
8243 _ => Err(fidl::Error::UnknownOrdinal {
8244 ordinal: header.ordinal,
8245 protocol_name:
8246 <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8247 }),
8248 }))
8249 },
8250 )
8251 }
8252}
8253
8254#[derive(Debug)]
8262pub enum TargetAdapterRequest {
8263 GetParameters { responder: TargetAdapterGetParametersResponder },
8274 Connect {
8283 eventpair: fidl::EventPair,
8284 test_input: fidl::Vmo,
8285 responder: TargetAdapterConnectResponder,
8286 },
8287}
8288
8289impl TargetAdapterRequest {
8290 #[allow(irrefutable_let_patterns)]
8291 pub fn into_get_parameters(self) -> Option<(TargetAdapterGetParametersResponder)> {
8292 if let TargetAdapterRequest::GetParameters { responder } = self {
8293 Some((responder))
8294 } else {
8295 None
8296 }
8297 }
8298
8299 #[allow(irrefutable_let_patterns)]
8300 pub fn into_connect(
8301 self,
8302 ) -> Option<(fidl::EventPair, fidl::Vmo, TargetAdapterConnectResponder)> {
8303 if let TargetAdapterRequest::Connect { eventpair, test_input, responder } = self {
8304 Some((eventpair, test_input, responder))
8305 } else {
8306 None
8307 }
8308 }
8309
8310 pub fn method_name(&self) -> &'static str {
8312 match *self {
8313 TargetAdapterRequest::GetParameters { .. } => "get_parameters",
8314 TargetAdapterRequest::Connect { .. } => "connect",
8315 }
8316 }
8317}
8318
8319#[derive(Debug, Clone)]
8320pub struct TargetAdapterControlHandle {
8321 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8322}
8323
8324impl fidl::endpoints::ControlHandle for TargetAdapterControlHandle {
8325 fn shutdown(&self) {
8326 self.inner.shutdown()
8327 }
8328 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8329 self.inner.shutdown_with_epitaph(status)
8330 }
8331
8332 fn is_closed(&self) -> bool {
8333 self.inner.channel().is_closed()
8334 }
8335 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8336 self.inner.channel().on_closed()
8337 }
8338
8339 #[cfg(target_os = "fuchsia")]
8340 fn signal_peer(
8341 &self,
8342 clear_mask: zx::Signals,
8343 set_mask: zx::Signals,
8344 ) -> Result<(), zx_status::Status> {
8345 use fidl::Peered;
8346 self.inner.channel().signal_peer(clear_mask, set_mask)
8347 }
8348}
8349
8350impl TargetAdapterControlHandle {}
8351
8352#[must_use = "FIDL methods require a response to be sent"]
8353#[derive(Debug)]
8354pub struct TargetAdapterGetParametersResponder {
8355 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8356 tx_id: u32,
8357}
8358
8359impl std::ops::Drop for TargetAdapterGetParametersResponder {
8363 fn drop(&mut self) {
8364 self.control_handle.shutdown();
8365 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8367 }
8368}
8369
8370impl fidl::endpoints::Responder for TargetAdapterGetParametersResponder {
8371 type ControlHandle = TargetAdapterControlHandle;
8372
8373 fn control_handle(&self) -> &TargetAdapterControlHandle {
8374 &self.control_handle
8375 }
8376
8377 fn drop_without_shutdown(mut self) {
8378 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8380 std::mem::forget(self);
8382 }
8383}
8384
8385impl TargetAdapterGetParametersResponder {
8386 pub fn send(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8390 let _result = self.send_raw(parameters);
8391 if _result.is_err() {
8392 self.control_handle.shutdown();
8393 }
8394 self.drop_without_shutdown();
8395 _result
8396 }
8397
8398 pub fn send_no_shutdown_on_err(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8400 let _result = self.send_raw(parameters);
8401 self.drop_without_shutdown();
8402 _result
8403 }
8404
8405 fn send_raw(&self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8406 self.control_handle.inner.send::<TargetAdapterGetParametersResponse>(
8407 (parameters,),
8408 self.tx_id,
8409 0x5c7e40a47f753e3e,
8410 fidl::encoding::DynamicFlags::empty(),
8411 )
8412 }
8413}
8414
8415#[must_use = "FIDL methods require a response to be sent"]
8416#[derive(Debug)]
8417pub struct TargetAdapterConnectResponder {
8418 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8419 tx_id: u32,
8420}
8421
8422impl std::ops::Drop for TargetAdapterConnectResponder {
8426 fn drop(&mut self) {
8427 self.control_handle.shutdown();
8428 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8430 }
8431}
8432
8433impl fidl::endpoints::Responder for TargetAdapterConnectResponder {
8434 type ControlHandle = TargetAdapterControlHandle;
8435
8436 fn control_handle(&self) -> &TargetAdapterControlHandle {
8437 &self.control_handle
8438 }
8439
8440 fn drop_without_shutdown(mut self) {
8441 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8443 std::mem::forget(self);
8445 }
8446}
8447
8448impl TargetAdapterConnectResponder {
8449 pub fn send(self) -> Result<(), fidl::Error> {
8453 let _result = self.send_raw();
8454 if _result.is_err() {
8455 self.control_handle.shutdown();
8456 }
8457 self.drop_without_shutdown();
8458 _result
8459 }
8460
8461 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8463 let _result = self.send_raw();
8464 self.drop_without_shutdown();
8465 _result
8466 }
8467
8468 fn send_raw(&self) -> Result<(), fidl::Error> {
8469 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8470 (),
8471 self.tx_id,
8472 0x7ea603a119866618,
8473 fidl::encoding::DynamicFlags::empty(),
8474 )
8475 }
8476}
8477
8478mod internal {
8479 use super::*;
8480
8481 impl fidl::encoding::ResourceTypeMarker for ControllerAddMonitorRequest {
8482 type Borrowed<'a> = &'a mut Self;
8483 fn take_or_borrow<'a>(
8484 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8485 ) -> Self::Borrowed<'a> {
8486 value
8487 }
8488 }
8489
8490 unsafe impl fidl::encoding::TypeMarker for ControllerAddMonitorRequest {
8491 type Owned = Self;
8492
8493 #[inline(always)]
8494 fn inline_align(_context: fidl::encoding::Context) -> usize {
8495 4
8496 }
8497
8498 #[inline(always)]
8499 fn inline_size(_context: fidl::encoding::Context) -> usize {
8500 4
8501 }
8502 }
8503
8504 unsafe impl
8505 fidl::encoding::Encode<
8506 ControllerAddMonitorRequest,
8507 fidl::encoding::DefaultFuchsiaResourceDialect,
8508 > for &mut ControllerAddMonitorRequest
8509 {
8510 #[inline]
8511 unsafe fn encode(
8512 self,
8513 encoder: &mut fidl::encoding::Encoder<
8514 '_,
8515 fidl::encoding::DefaultFuchsiaResourceDialect,
8516 >,
8517 offset: usize,
8518 _depth: fidl::encoding::Depth,
8519 ) -> fidl::Result<()> {
8520 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8521 fidl::encoding::Encode::<ControllerAddMonitorRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8523 (
8524 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.monitor),
8525 ),
8526 encoder, offset, _depth
8527 )
8528 }
8529 }
8530 unsafe impl<
8531 T0: fidl::encoding::Encode<
8532 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8533 fidl::encoding::DefaultFuchsiaResourceDialect,
8534 >,
8535 >
8536 fidl::encoding::Encode<
8537 ControllerAddMonitorRequest,
8538 fidl::encoding::DefaultFuchsiaResourceDialect,
8539 > for (T0,)
8540 {
8541 #[inline]
8542 unsafe fn encode(
8543 self,
8544 encoder: &mut fidl::encoding::Encoder<
8545 '_,
8546 fidl::encoding::DefaultFuchsiaResourceDialect,
8547 >,
8548 offset: usize,
8549 depth: fidl::encoding::Depth,
8550 ) -> fidl::Result<()> {
8551 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8552 self.0.encode(encoder, offset + 0, depth)?;
8556 Ok(())
8557 }
8558 }
8559
8560 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8561 for ControllerAddMonitorRequest
8562 {
8563 #[inline(always)]
8564 fn new_empty() -> Self {
8565 Self {
8566 monitor: fidl::new_empty!(
8567 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8568 fidl::encoding::DefaultFuchsiaResourceDialect
8569 ),
8570 }
8571 }
8572
8573 #[inline]
8574 unsafe fn decode(
8575 &mut self,
8576 decoder: &mut fidl::encoding::Decoder<
8577 '_,
8578 fidl::encoding::DefaultFuchsiaResourceDialect,
8579 >,
8580 offset: usize,
8581 _depth: fidl::encoding::Depth,
8582 ) -> fidl::Result<()> {
8583 decoder.debug_check_bounds::<Self>(offset);
8584 fidl::decode!(
8586 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8587 fidl::encoding::DefaultFuchsiaResourceDialect,
8588 &mut self.monitor,
8589 decoder,
8590 offset + 0,
8591 _depth
8592 )?;
8593 Ok(())
8594 }
8595 }
8596
8597 impl fidl::encoding::ResourceTypeMarker for ControllerAddToCorpusRequest {
8598 type Borrowed<'a> = &'a mut Self;
8599 fn take_or_borrow<'a>(
8600 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8601 ) -> Self::Borrowed<'a> {
8602 value
8603 }
8604 }
8605
8606 unsafe impl fidl::encoding::TypeMarker for ControllerAddToCorpusRequest {
8607 type Owned = Self;
8608
8609 #[inline(always)]
8610 fn inline_align(_context: fidl::encoding::Context) -> usize {
8611 8
8612 }
8613
8614 #[inline(always)]
8615 fn inline_size(_context: fidl::encoding::Context) -> usize {
8616 24
8617 }
8618 }
8619
8620 unsafe impl
8621 fidl::encoding::Encode<
8622 ControllerAddToCorpusRequest,
8623 fidl::encoding::DefaultFuchsiaResourceDialect,
8624 > for &mut ControllerAddToCorpusRequest
8625 {
8626 #[inline]
8627 unsafe fn encode(
8628 self,
8629 encoder: &mut fidl::encoding::Encoder<
8630 '_,
8631 fidl::encoding::DefaultFuchsiaResourceDialect,
8632 >,
8633 offset: usize,
8634 _depth: fidl::encoding::Depth,
8635 ) -> fidl::Result<()> {
8636 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8637 fidl::encoding::Encode::<
8639 ControllerAddToCorpusRequest,
8640 fidl::encoding::DefaultFuchsiaResourceDialect,
8641 >::encode(
8642 (
8643 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
8644 <Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.input),
8645 ),
8646 encoder,
8647 offset,
8648 _depth,
8649 )
8650 }
8651 }
8652 unsafe impl<
8653 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
8654 T1: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>,
8655 >
8656 fidl::encoding::Encode<
8657 ControllerAddToCorpusRequest,
8658 fidl::encoding::DefaultFuchsiaResourceDialect,
8659 > for (T0, T1)
8660 {
8661 #[inline]
8662 unsafe fn encode(
8663 self,
8664 encoder: &mut fidl::encoding::Encoder<
8665 '_,
8666 fidl::encoding::DefaultFuchsiaResourceDialect,
8667 >,
8668 offset: usize,
8669 depth: fidl::encoding::Depth,
8670 ) -> fidl::Result<()> {
8671 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8672 unsafe {
8675 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8676 (ptr as *mut u64).write_unaligned(0);
8677 }
8678 self.0.encode(encoder, offset + 0, depth)?;
8680 self.1.encode(encoder, offset + 8, depth)?;
8681 Ok(())
8682 }
8683 }
8684
8685 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8686 for ControllerAddToCorpusRequest
8687 {
8688 #[inline(always)]
8689 fn new_empty() -> Self {
8690 Self {
8691 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
8692 input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8693 }
8694 }
8695
8696 #[inline]
8697 unsafe fn decode(
8698 &mut self,
8699 decoder: &mut fidl::encoding::Decoder<
8700 '_,
8701 fidl::encoding::DefaultFuchsiaResourceDialect,
8702 >,
8703 offset: usize,
8704 _depth: fidl::encoding::Depth,
8705 ) -> fidl::Result<()> {
8706 decoder.debug_check_bounds::<Self>(offset);
8707 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8709 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8710 let mask = 0xffffffffffffff00u64;
8711 let maskedval = padval & mask;
8712 if maskedval != 0 {
8713 return Err(fidl::Error::NonZeroPadding {
8714 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8715 });
8716 }
8717 fidl::decode!(
8718 Corpus,
8719 fidl::encoding::DefaultFuchsiaResourceDialect,
8720 &mut self.corpus,
8721 decoder,
8722 offset + 0,
8723 _depth
8724 )?;
8725 fidl::decode!(
8726 Input,
8727 fidl::encoding::DefaultFuchsiaResourceDialect,
8728 &mut self.input,
8729 decoder,
8730 offset + 8,
8731 _depth
8732 )?;
8733 Ok(())
8734 }
8735 }
8736
8737 impl fidl::encoding::ResourceTypeMarker for ControllerCleanseRequest {
8738 type Borrowed<'a> = &'a mut Self;
8739 fn take_or_borrow<'a>(
8740 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8741 ) -> Self::Borrowed<'a> {
8742 value
8743 }
8744 }
8745
8746 unsafe impl fidl::encoding::TypeMarker for ControllerCleanseRequest {
8747 type Owned = Self;
8748
8749 #[inline(always)]
8750 fn inline_align(_context: fidl::encoding::Context) -> usize {
8751 8
8752 }
8753
8754 #[inline(always)]
8755 fn inline_size(_context: fidl::encoding::Context) -> usize {
8756 16
8757 }
8758 }
8759
8760 unsafe impl
8761 fidl::encoding::Encode<
8762 ControllerCleanseRequest,
8763 fidl::encoding::DefaultFuchsiaResourceDialect,
8764 > for &mut ControllerCleanseRequest
8765 {
8766 #[inline]
8767 unsafe fn encode(
8768 self,
8769 encoder: &mut fidl::encoding::Encoder<
8770 '_,
8771 fidl::encoding::DefaultFuchsiaResourceDialect,
8772 >,
8773 offset: usize,
8774 _depth: fidl::encoding::Depth,
8775 ) -> fidl::Result<()> {
8776 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8777 fidl::encoding::Encode::<
8779 ControllerCleanseRequest,
8780 fidl::encoding::DefaultFuchsiaResourceDialect,
8781 >::encode(
8782 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8783 &mut self.test_input,
8784 ),),
8785 encoder,
8786 offset,
8787 _depth,
8788 )
8789 }
8790 }
8791 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8792 fidl::encoding::Encode<
8793 ControllerCleanseRequest,
8794 fidl::encoding::DefaultFuchsiaResourceDialect,
8795 > for (T0,)
8796 {
8797 #[inline]
8798 unsafe fn encode(
8799 self,
8800 encoder: &mut fidl::encoding::Encoder<
8801 '_,
8802 fidl::encoding::DefaultFuchsiaResourceDialect,
8803 >,
8804 offset: usize,
8805 depth: fidl::encoding::Depth,
8806 ) -> fidl::Result<()> {
8807 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8808 self.0.encode(encoder, offset + 0, depth)?;
8812 Ok(())
8813 }
8814 }
8815
8816 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8817 for ControllerCleanseRequest
8818 {
8819 #[inline(always)]
8820 fn new_empty() -> Self {
8821 Self {
8822 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8823 }
8824 }
8825
8826 #[inline]
8827 unsafe fn decode(
8828 &mut self,
8829 decoder: &mut fidl::encoding::Decoder<
8830 '_,
8831 fidl::encoding::DefaultFuchsiaResourceDialect,
8832 >,
8833 offset: usize,
8834 _depth: fidl::encoding::Depth,
8835 ) -> fidl::Result<()> {
8836 decoder.debug_check_bounds::<Self>(offset);
8837 fidl::decode!(
8839 Input,
8840 fidl::encoding::DefaultFuchsiaResourceDialect,
8841 &mut self.test_input,
8842 decoder,
8843 offset + 0,
8844 _depth
8845 )?;
8846 Ok(())
8847 }
8848 }
8849
8850 impl fidl::encoding::ResourceTypeMarker for ControllerMinimizeRequest {
8851 type Borrowed<'a> = &'a mut Self;
8852 fn take_or_borrow<'a>(
8853 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8854 ) -> Self::Borrowed<'a> {
8855 value
8856 }
8857 }
8858
8859 unsafe impl fidl::encoding::TypeMarker for ControllerMinimizeRequest {
8860 type Owned = Self;
8861
8862 #[inline(always)]
8863 fn inline_align(_context: fidl::encoding::Context) -> usize {
8864 8
8865 }
8866
8867 #[inline(always)]
8868 fn inline_size(_context: fidl::encoding::Context) -> usize {
8869 16
8870 }
8871 }
8872
8873 unsafe impl
8874 fidl::encoding::Encode<
8875 ControllerMinimizeRequest,
8876 fidl::encoding::DefaultFuchsiaResourceDialect,
8877 > for &mut ControllerMinimizeRequest
8878 {
8879 #[inline]
8880 unsafe fn encode(
8881 self,
8882 encoder: &mut fidl::encoding::Encoder<
8883 '_,
8884 fidl::encoding::DefaultFuchsiaResourceDialect,
8885 >,
8886 offset: usize,
8887 _depth: fidl::encoding::Depth,
8888 ) -> fidl::Result<()> {
8889 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
8890 fidl::encoding::Encode::<
8892 ControllerMinimizeRequest,
8893 fidl::encoding::DefaultFuchsiaResourceDialect,
8894 >::encode(
8895 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8896 &mut self.test_input,
8897 ),),
8898 encoder,
8899 offset,
8900 _depth,
8901 )
8902 }
8903 }
8904 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8905 fidl::encoding::Encode<
8906 ControllerMinimizeRequest,
8907 fidl::encoding::DefaultFuchsiaResourceDialect,
8908 > for (T0,)
8909 {
8910 #[inline]
8911 unsafe fn encode(
8912 self,
8913 encoder: &mut fidl::encoding::Encoder<
8914 '_,
8915 fidl::encoding::DefaultFuchsiaResourceDialect,
8916 >,
8917 offset: usize,
8918 depth: fidl::encoding::Depth,
8919 ) -> fidl::Result<()> {
8920 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
8921 self.0.encode(encoder, offset + 0, depth)?;
8925 Ok(())
8926 }
8927 }
8928
8929 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8930 for ControllerMinimizeRequest
8931 {
8932 #[inline(always)]
8933 fn new_empty() -> Self {
8934 Self {
8935 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8936 }
8937 }
8938
8939 #[inline]
8940 unsafe fn decode(
8941 &mut self,
8942 decoder: &mut fidl::encoding::Decoder<
8943 '_,
8944 fidl::encoding::DefaultFuchsiaResourceDialect,
8945 >,
8946 offset: usize,
8947 _depth: fidl::encoding::Depth,
8948 ) -> fidl::Result<()> {
8949 decoder.debug_check_bounds::<Self>(offset);
8950 fidl::decode!(
8952 Input,
8953 fidl::encoding::DefaultFuchsiaResourceDialect,
8954 &mut self.test_input,
8955 decoder,
8956 offset + 0,
8957 _depth
8958 )?;
8959 Ok(())
8960 }
8961 }
8962
8963 impl fidl::encoding::ResourceTypeMarker for ControllerProviderConnectRequest {
8964 type Borrowed<'a> = &'a mut Self;
8965 fn take_or_borrow<'a>(
8966 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8967 ) -> Self::Borrowed<'a> {
8968 value
8969 }
8970 }
8971
8972 unsafe impl fidl::encoding::TypeMarker for ControllerProviderConnectRequest {
8973 type Owned = Self;
8974
8975 #[inline(always)]
8976 fn inline_align(_context: fidl::encoding::Context) -> usize {
8977 4
8978 }
8979
8980 #[inline(always)]
8981 fn inline_size(_context: fidl::encoding::Context) -> usize {
8982 4
8983 }
8984 }
8985
8986 unsafe impl
8987 fidl::encoding::Encode<
8988 ControllerProviderConnectRequest,
8989 fidl::encoding::DefaultFuchsiaResourceDialect,
8990 > for &mut ControllerProviderConnectRequest
8991 {
8992 #[inline]
8993 unsafe fn encode(
8994 self,
8995 encoder: &mut fidl::encoding::Encoder<
8996 '_,
8997 fidl::encoding::DefaultFuchsiaResourceDialect,
8998 >,
8999 offset: usize,
9000 _depth: fidl::encoding::Depth,
9001 ) -> fidl::Result<()> {
9002 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9003 fidl::encoding::Encode::<ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9005 (
9006 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9007 ),
9008 encoder, offset, _depth
9009 )
9010 }
9011 }
9012 unsafe impl<
9013 T0: fidl::encoding::Encode<
9014 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9015 fidl::encoding::DefaultFuchsiaResourceDialect,
9016 >,
9017 >
9018 fidl::encoding::Encode<
9019 ControllerProviderConnectRequest,
9020 fidl::encoding::DefaultFuchsiaResourceDialect,
9021 > for (T0,)
9022 {
9023 #[inline]
9024 unsafe fn encode(
9025 self,
9026 encoder: &mut fidl::encoding::Encoder<
9027 '_,
9028 fidl::encoding::DefaultFuchsiaResourceDialect,
9029 >,
9030 offset: usize,
9031 depth: fidl::encoding::Depth,
9032 ) -> fidl::Result<()> {
9033 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9034 self.0.encode(encoder, offset + 0, depth)?;
9038 Ok(())
9039 }
9040 }
9041
9042 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9043 for ControllerProviderConnectRequest
9044 {
9045 #[inline(always)]
9046 fn new_empty() -> Self {
9047 Self {
9048 controller: fidl::new_empty!(
9049 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9050 fidl::encoding::DefaultFuchsiaResourceDialect
9051 ),
9052 }
9053 }
9054
9055 #[inline]
9056 unsafe fn decode(
9057 &mut self,
9058 decoder: &mut fidl::encoding::Decoder<
9059 '_,
9060 fidl::encoding::DefaultFuchsiaResourceDialect,
9061 >,
9062 offset: usize,
9063 _depth: fidl::encoding::Depth,
9064 ) -> fidl::Result<()> {
9065 decoder.debug_check_bounds::<Self>(offset);
9066 fidl::decode!(
9068 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9069 fidl::encoding::DefaultFuchsiaResourceDialect,
9070 &mut self.controller,
9071 decoder,
9072 offset + 0,
9073 _depth
9074 )?;
9075 Ok(())
9076 }
9077 }
9078
9079 impl fidl::encoding::ResourceTypeMarker for ControllerReadCorpusRequest {
9080 type Borrowed<'a> = &'a mut Self;
9081 fn take_or_borrow<'a>(
9082 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9083 ) -> Self::Borrowed<'a> {
9084 value
9085 }
9086 }
9087
9088 unsafe impl fidl::encoding::TypeMarker for ControllerReadCorpusRequest {
9089 type Owned = Self;
9090
9091 #[inline(always)]
9092 fn inline_align(_context: fidl::encoding::Context) -> usize {
9093 4
9094 }
9095
9096 #[inline(always)]
9097 fn inline_size(_context: fidl::encoding::Context) -> usize {
9098 8
9099 }
9100 }
9101
9102 unsafe impl
9103 fidl::encoding::Encode<
9104 ControllerReadCorpusRequest,
9105 fidl::encoding::DefaultFuchsiaResourceDialect,
9106 > for &mut ControllerReadCorpusRequest
9107 {
9108 #[inline]
9109 unsafe fn encode(
9110 self,
9111 encoder: &mut fidl::encoding::Encoder<
9112 '_,
9113 fidl::encoding::DefaultFuchsiaResourceDialect,
9114 >,
9115 offset: usize,
9116 _depth: fidl::encoding::Depth,
9117 ) -> fidl::Result<()> {
9118 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9119 fidl::encoding::Encode::<ControllerReadCorpusRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9121 (
9122 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
9123 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.corpus_reader),
9124 ),
9125 encoder, offset, _depth
9126 )
9127 }
9128 }
9129 unsafe impl<
9130 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
9131 T1: fidl::encoding::Encode<
9132 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9133 fidl::encoding::DefaultFuchsiaResourceDialect,
9134 >,
9135 >
9136 fidl::encoding::Encode<
9137 ControllerReadCorpusRequest,
9138 fidl::encoding::DefaultFuchsiaResourceDialect,
9139 > for (T0, T1)
9140 {
9141 #[inline]
9142 unsafe fn encode(
9143 self,
9144 encoder: &mut fidl::encoding::Encoder<
9145 '_,
9146 fidl::encoding::DefaultFuchsiaResourceDialect,
9147 >,
9148 offset: usize,
9149 depth: fidl::encoding::Depth,
9150 ) -> fidl::Result<()> {
9151 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9152 unsafe {
9155 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9156 (ptr as *mut u32).write_unaligned(0);
9157 }
9158 self.0.encode(encoder, offset + 0, depth)?;
9160 self.1.encode(encoder, offset + 4, depth)?;
9161 Ok(())
9162 }
9163 }
9164
9165 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9166 for ControllerReadCorpusRequest
9167 {
9168 #[inline(always)]
9169 fn new_empty() -> Self {
9170 Self {
9171 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
9172 corpus_reader: fidl::new_empty!(
9173 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9174 fidl::encoding::DefaultFuchsiaResourceDialect
9175 ),
9176 }
9177 }
9178
9179 #[inline]
9180 unsafe fn decode(
9181 &mut self,
9182 decoder: &mut fidl::encoding::Decoder<
9183 '_,
9184 fidl::encoding::DefaultFuchsiaResourceDialect,
9185 >,
9186 offset: usize,
9187 _depth: fidl::encoding::Depth,
9188 ) -> fidl::Result<()> {
9189 decoder.debug_check_bounds::<Self>(offset);
9190 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9192 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9193 let mask = 0xffffff00u32;
9194 let maskedval = padval & mask;
9195 if maskedval != 0 {
9196 return Err(fidl::Error::NonZeroPadding {
9197 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9198 });
9199 }
9200 fidl::decode!(
9201 Corpus,
9202 fidl::encoding::DefaultFuchsiaResourceDialect,
9203 &mut self.corpus,
9204 decoder,
9205 offset + 0,
9206 _depth
9207 )?;
9208 fidl::decode!(
9209 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9210 fidl::encoding::DefaultFuchsiaResourceDialect,
9211 &mut self.corpus_reader,
9212 decoder,
9213 offset + 4,
9214 _depth
9215 )?;
9216 Ok(())
9217 }
9218 }
9219
9220 impl fidl::encoding::ResourceTypeMarker for ControllerReadDictionaryResponse {
9221 type Borrowed<'a> = &'a mut Self;
9222 fn take_or_borrow<'a>(
9223 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9224 ) -> Self::Borrowed<'a> {
9225 value
9226 }
9227 }
9228
9229 unsafe impl fidl::encoding::TypeMarker for ControllerReadDictionaryResponse {
9230 type Owned = Self;
9231
9232 #[inline(always)]
9233 fn inline_align(_context: fidl::encoding::Context) -> usize {
9234 8
9235 }
9236
9237 #[inline(always)]
9238 fn inline_size(_context: fidl::encoding::Context) -> usize {
9239 16
9240 }
9241 }
9242
9243 unsafe impl
9244 fidl::encoding::Encode<
9245 ControllerReadDictionaryResponse,
9246 fidl::encoding::DefaultFuchsiaResourceDialect,
9247 > for &mut ControllerReadDictionaryResponse
9248 {
9249 #[inline]
9250 unsafe fn encode(
9251 self,
9252 encoder: &mut fidl::encoding::Encoder<
9253 '_,
9254 fidl::encoding::DefaultFuchsiaResourceDialect,
9255 >,
9256 offset: usize,
9257 _depth: fidl::encoding::Depth,
9258 ) -> fidl::Result<()> {
9259 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9260 fidl::encoding::Encode::<
9262 ControllerReadDictionaryResponse,
9263 fidl::encoding::DefaultFuchsiaResourceDialect,
9264 >::encode(
9265 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9266 &mut self.dictionary,
9267 ),),
9268 encoder,
9269 offset,
9270 _depth,
9271 )
9272 }
9273 }
9274 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9275 fidl::encoding::Encode<
9276 ControllerReadDictionaryResponse,
9277 fidl::encoding::DefaultFuchsiaResourceDialect,
9278 > for (T0,)
9279 {
9280 #[inline]
9281 unsafe fn encode(
9282 self,
9283 encoder: &mut fidl::encoding::Encoder<
9284 '_,
9285 fidl::encoding::DefaultFuchsiaResourceDialect,
9286 >,
9287 offset: usize,
9288 depth: fidl::encoding::Depth,
9289 ) -> fidl::Result<()> {
9290 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9291 self.0.encode(encoder, offset + 0, depth)?;
9295 Ok(())
9296 }
9297 }
9298
9299 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9300 for ControllerReadDictionaryResponse
9301 {
9302 #[inline(always)]
9303 fn new_empty() -> Self {
9304 Self {
9305 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9306 }
9307 }
9308
9309 #[inline]
9310 unsafe fn decode(
9311 &mut self,
9312 decoder: &mut fidl::encoding::Decoder<
9313 '_,
9314 fidl::encoding::DefaultFuchsiaResourceDialect,
9315 >,
9316 offset: usize,
9317 _depth: fidl::encoding::Depth,
9318 ) -> fidl::Result<()> {
9319 decoder.debug_check_bounds::<Self>(offset);
9320 fidl::decode!(
9322 Input,
9323 fidl::encoding::DefaultFuchsiaResourceDialect,
9324 &mut self.dictionary,
9325 decoder,
9326 offset + 0,
9327 _depth
9328 )?;
9329 Ok(())
9330 }
9331 }
9332
9333 impl fidl::encoding::ResourceTypeMarker for ControllerTryOneRequest {
9334 type Borrowed<'a> = &'a mut Self;
9335 fn take_or_borrow<'a>(
9336 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9337 ) -> Self::Borrowed<'a> {
9338 value
9339 }
9340 }
9341
9342 unsafe impl fidl::encoding::TypeMarker for ControllerTryOneRequest {
9343 type Owned = Self;
9344
9345 #[inline(always)]
9346 fn inline_align(_context: fidl::encoding::Context) -> usize {
9347 8
9348 }
9349
9350 #[inline(always)]
9351 fn inline_size(_context: fidl::encoding::Context) -> usize {
9352 16
9353 }
9354 }
9355
9356 unsafe impl
9357 fidl::encoding::Encode<
9358 ControllerTryOneRequest,
9359 fidl::encoding::DefaultFuchsiaResourceDialect,
9360 > for &mut ControllerTryOneRequest
9361 {
9362 #[inline]
9363 unsafe fn encode(
9364 self,
9365 encoder: &mut fidl::encoding::Encoder<
9366 '_,
9367 fidl::encoding::DefaultFuchsiaResourceDialect,
9368 >,
9369 offset: usize,
9370 _depth: fidl::encoding::Depth,
9371 ) -> fidl::Result<()> {
9372 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9373 fidl::encoding::Encode::<
9375 ControllerTryOneRequest,
9376 fidl::encoding::DefaultFuchsiaResourceDialect,
9377 >::encode(
9378 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9379 &mut self.test_input,
9380 ),),
9381 encoder,
9382 offset,
9383 _depth,
9384 )
9385 }
9386 }
9387 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9388 fidl::encoding::Encode<
9389 ControllerTryOneRequest,
9390 fidl::encoding::DefaultFuchsiaResourceDialect,
9391 > for (T0,)
9392 {
9393 #[inline]
9394 unsafe fn encode(
9395 self,
9396 encoder: &mut fidl::encoding::Encoder<
9397 '_,
9398 fidl::encoding::DefaultFuchsiaResourceDialect,
9399 >,
9400 offset: usize,
9401 depth: fidl::encoding::Depth,
9402 ) -> fidl::Result<()> {
9403 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9404 self.0.encode(encoder, offset + 0, depth)?;
9408 Ok(())
9409 }
9410 }
9411
9412 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9413 for ControllerTryOneRequest
9414 {
9415 #[inline(always)]
9416 fn new_empty() -> Self {
9417 Self {
9418 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9419 }
9420 }
9421
9422 #[inline]
9423 unsafe fn decode(
9424 &mut self,
9425 decoder: &mut fidl::encoding::Decoder<
9426 '_,
9427 fidl::encoding::DefaultFuchsiaResourceDialect,
9428 >,
9429 offset: usize,
9430 _depth: fidl::encoding::Depth,
9431 ) -> fidl::Result<()> {
9432 decoder.debug_check_bounds::<Self>(offset);
9433 fidl::decode!(
9435 Input,
9436 fidl::encoding::DefaultFuchsiaResourceDialect,
9437 &mut self.test_input,
9438 decoder,
9439 offset + 0,
9440 _depth
9441 )?;
9442 Ok(())
9443 }
9444 }
9445
9446 impl fidl::encoding::ResourceTypeMarker for ControllerWatchArtifactResponse {
9447 type Borrowed<'a> = &'a mut Self;
9448 fn take_or_borrow<'a>(
9449 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9450 ) -> Self::Borrowed<'a> {
9451 value
9452 }
9453 }
9454
9455 unsafe impl fidl::encoding::TypeMarker for ControllerWatchArtifactResponse {
9456 type Owned = Self;
9457
9458 #[inline(always)]
9459 fn inline_align(_context: fidl::encoding::Context) -> usize {
9460 8
9461 }
9462
9463 #[inline(always)]
9464 fn inline_size(_context: fidl::encoding::Context) -> usize {
9465 16
9466 }
9467 }
9468
9469 unsafe impl
9470 fidl::encoding::Encode<
9471 ControllerWatchArtifactResponse,
9472 fidl::encoding::DefaultFuchsiaResourceDialect,
9473 > for &mut ControllerWatchArtifactResponse
9474 {
9475 #[inline]
9476 unsafe fn encode(
9477 self,
9478 encoder: &mut fidl::encoding::Encoder<
9479 '_,
9480 fidl::encoding::DefaultFuchsiaResourceDialect,
9481 >,
9482 offset: usize,
9483 _depth: fidl::encoding::Depth,
9484 ) -> fidl::Result<()> {
9485 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9486 fidl::encoding::Encode::<
9488 ControllerWatchArtifactResponse,
9489 fidl::encoding::DefaultFuchsiaResourceDialect,
9490 >::encode(
9491 (<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9492 &mut self.artifact,
9493 ),),
9494 encoder,
9495 offset,
9496 _depth,
9497 )
9498 }
9499 }
9500 unsafe impl<T0: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>>
9501 fidl::encoding::Encode<
9502 ControllerWatchArtifactResponse,
9503 fidl::encoding::DefaultFuchsiaResourceDialect,
9504 > for (T0,)
9505 {
9506 #[inline]
9507 unsafe fn encode(
9508 self,
9509 encoder: &mut fidl::encoding::Encoder<
9510 '_,
9511 fidl::encoding::DefaultFuchsiaResourceDialect,
9512 >,
9513 offset: usize,
9514 depth: fidl::encoding::Depth,
9515 ) -> fidl::Result<()> {
9516 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9517 self.0.encode(encoder, offset + 0, depth)?;
9521 Ok(())
9522 }
9523 }
9524
9525 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9526 for ControllerWatchArtifactResponse
9527 {
9528 #[inline(always)]
9529 fn new_empty() -> Self {
9530 Self {
9531 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
9532 }
9533 }
9534
9535 #[inline]
9536 unsafe fn decode(
9537 &mut self,
9538 decoder: &mut fidl::encoding::Decoder<
9539 '_,
9540 fidl::encoding::DefaultFuchsiaResourceDialect,
9541 >,
9542 offset: usize,
9543 _depth: fidl::encoding::Depth,
9544 ) -> fidl::Result<()> {
9545 decoder.debug_check_bounds::<Self>(offset);
9546 fidl::decode!(
9548 Artifact,
9549 fidl::encoding::DefaultFuchsiaResourceDialect,
9550 &mut self.artifact,
9551 decoder,
9552 offset + 0,
9553 _depth
9554 )?;
9555 Ok(())
9556 }
9557 }
9558
9559 impl fidl::encoding::ResourceTypeMarker for ControllerWriteDictionaryRequest {
9560 type Borrowed<'a> = &'a mut Self;
9561 fn take_or_borrow<'a>(
9562 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9563 ) -> Self::Borrowed<'a> {
9564 value
9565 }
9566 }
9567
9568 unsafe impl fidl::encoding::TypeMarker for ControllerWriteDictionaryRequest {
9569 type Owned = Self;
9570
9571 #[inline(always)]
9572 fn inline_align(_context: fidl::encoding::Context) -> usize {
9573 8
9574 }
9575
9576 #[inline(always)]
9577 fn inline_size(_context: fidl::encoding::Context) -> usize {
9578 16
9579 }
9580 }
9581
9582 unsafe impl
9583 fidl::encoding::Encode<
9584 ControllerWriteDictionaryRequest,
9585 fidl::encoding::DefaultFuchsiaResourceDialect,
9586 > for &mut ControllerWriteDictionaryRequest
9587 {
9588 #[inline]
9589 unsafe fn encode(
9590 self,
9591 encoder: &mut fidl::encoding::Encoder<
9592 '_,
9593 fidl::encoding::DefaultFuchsiaResourceDialect,
9594 >,
9595 offset: usize,
9596 _depth: fidl::encoding::Depth,
9597 ) -> fidl::Result<()> {
9598 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9599 fidl::encoding::Encode::<
9601 ControllerWriteDictionaryRequest,
9602 fidl::encoding::DefaultFuchsiaResourceDialect,
9603 >::encode(
9604 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9605 &mut self.dictionary,
9606 ),),
9607 encoder,
9608 offset,
9609 _depth,
9610 )
9611 }
9612 }
9613 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9614 fidl::encoding::Encode<
9615 ControllerWriteDictionaryRequest,
9616 fidl::encoding::DefaultFuchsiaResourceDialect,
9617 > for (T0,)
9618 {
9619 #[inline]
9620 unsafe fn encode(
9621 self,
9622 encoder: &mut fidl::encoding::Encoder<
9623 '_,
9624 fidl::encoding::DefaultFuchsiaResourceDialect,
9625 >,
9626 offset: usize,
9627 depth: fidl::encoding::Depth,
9628 ) -> fidl::Result<()> {
9629 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9630 self.0.encode(encoder, offset + 0, depth)?;
9634 Ok(())
9635 }
9636 }
9637
9638 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9639 for ControllerWriteDictionaryRequest
9640 {
9641 #[inline(always)]
9642 fn new_empty() -> Self {
9643 Self {
9644 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9645 }
9646 }
9647
9648 #[inline]
9649 unsafe fn decode(
9650 &mut self,
9651 decoder: &mut fidl::encoding::Decoder<
9652 '_,
9653 fidl::encoding::DefaultFuchsiaResourceDialect,
9654 >,
9655 offset: usize,
9656 _depth: fidl::encoding::Depth,
9657 ) -> fidl::Result<()> {
9658 decoder.debug_check_bounds::<Self>(offset);
9659 fidl::decode!(
9661 Input,
9662 fidl::encoding::DefaultFuchsiaResourceDialect,
9663 &mut self.dictionary,
9664 decoder,
9665 offset + 0,
9666 _depth
9667 )?;
9668 Ok(())
9669 }
9670 }
9671
9672 impl fidl::encoding::ResourceTypeMarker for CorpusReaderNextRequest {
9673 type Borrowed<'a> = &'a mut Self;
9674 fn take_or_borrow<'a>(
9675 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9676 ) -> Self::Borrowed<'a> {
9677 value
9678 }
9679 }
9680
9681 unsafe impl fidl::encoding::TypeMarker for CorpusReaderNextRequest {
9682 type Owned = Self;
9683
9684 #[inline(always)]
9685 fn inline_align(_context: fidl::encoding::Context) -> usize {
9686 8
9687 }
9688
9689 #[inline(always)]
9690 fn inline_size(_context: fidl::encoding::Context) -> usize {
9691 16
9692 }
9693 }
9694
9695 unsafe impl
9696 fidl::encoding::Encode<
9697 CorpusReaderNextRequest,
9698 fidl::encoding::DefaultFuchsiaResourceDialect,
9699 > for &mut CorpusReaderNextRequest
9700 {
9701 #[inline]
9702 unsafe fn encode(
9703 self,
9704 encoder: &mut fidl::encoding::Encoder<
9705 '_,
9706 fidl::encoding::DefaultFuchsiaResourceDialect,
9707 >,
9708 offset: usize,
9709 _depth: fidl::encoding::Depth,
9710 ) -> fidl::Result<()> {
9711 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9712 fidl::encoding::Encode::<
9714 CorpusReaderNextRequest,
9715 fidl::encoding::DefaultFuchsiaResourceDialect,
9716 >::encode(
9717 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9718 &mut self.test_input,
9719 ),),
9720 encoder,
9721 offset,
9722 _depth,
9723 )
9724 }
9725 }
9726 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9727 fidl::encoding::Encode<
9728 CorpusReaderNextRequest,
9729 fidl::encoding::DefaultFuchsiaResourceDialect,
9730 > for (T0,)
9731 {
9732 #[inline]
9733 unsafe fn encode(
9734 self,
9735 encoder: &mut fidl::encoding::Encoder<
9736 '_,
9737 fidl::encoding::DefaultFuchsiaResourceDialect,
9738 >,
9739 offset: usize,
9740 depth: fidl::encoding::Depth,
9741 ) -> fidl::Result<()> {
9742 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9743 self.0.encode(encoder, offset + 0, depth)?;
9747 Ok(())
9748 }
9749 }
9750
9751 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9752 for CorpusReaderNextRequest
9753 {
9754 #[inline(always)]
9755 fn new_empty() -> Self {
9756 Self {
9757 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9758 }
9759 }
9760
9761 #[inline]
9762 unsafe fn decode(
9763 &mut self,
9764 decoder: &mut fidl::encoding::Decoder<
9765 '_,
9766 fidl::encoding::DefaultFuchsiaResourceDialect,
9767 >,
9768 offset: usize,
9769 _depth: fidl::encoding::Depth,
9770 ) -> fidl::Result<()> {
9771 decoder.debug_check_bounds::<Self>(offset);
9772 fidl::decode!(
9774 Input,
9775 fidl::encoding::DefaultFuchsiaResourceDialect,
9776 &mut self.test_input,
9777 decoder,
9778 offset + 0,
9779 _depth
9780 )?;
9781 Ok(())
9782 }
9783 }
9784
9785 impl fidl::encoding::ResourceTypeMarker for CoverageData {
9786 type Borrowed<'a> = &'a mut Self;
9787 fn take_or_borrow<'a>(
9788 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9789 ) -> Self::Borrowed<'a> {
9790 value
9791 }
9792 }
9793
9794 unsafe impl fidl::encoding::TypeMarker for CoverageData {
9795 type Owned = Self;
9796
9797 #[inline(always)]
9798 fn inline_align(_context: fidl::encoding::Context) -> usize {
9799 8
9800 }
9801
9802 #[inline(always)]
9803 fn inline_size(_context: fidl::encoding::Context) -> usize {
9804 24
9805 }
9806 }
9807
9808 unsafe impl fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9809 for &mut CoverageData
9810 {
9811 #[inline]
9812 unsafe fn encode(
9813 self,
9814 encoder: &mut fidl::encoding::Encoder<
9815 '_,
9816 fidl::encoding::DefaultFuchsiaResourceDialect,
9817 >,
9818 offset: usize,
9819 _depth: fidl::encoding::Depth,
9820 ) -> fidl::Result<()> {
9821 encoder.debug_check_bounds::<CoverageData>(offset);
9822 fidl::encoding::Encode::<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9824 (
9825 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.target_id),
9826 <Data as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
9827 ),
9828 encoder, offset, _depth
9829 )
9830 }
9831 }
9832 unsafe impl<
9833 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
9834 T1: fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>,
9835 > fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9836 for (T0, T1)
9837 {
9838 #[inline]
9839 unsafe fn encode(
9840 self,
9841 encoder: &mut fidl::encoding::Encoder<
9842 '_,
9843 fidl::encoding::DefaultFuchsiaResourceDialect,
9844 >,
9845 offset: usize,
9846 depth: fidl::encoding::Depth,
9847 ) -> fidl::Result<()> {
9848 encoder.debug_check_bounds::<CoverageData>(offset);
9849 self.0.encode(encoder, offset + 0, depth)?;
9853 self.1.encode(encoder, offset + 8, depth)?;
9854 Ok(())
9855 }
9856 }
9857
9858 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for CoverageData {
9859 #[inline(always)]
9860 fn new_empty() -> Self {
9861 Self {
9862 target_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
9863 data: fidl::new_empty!(Data, fidl::encoding::DefaultFuchsiaResourceDialect),
9864 }
9865 }
9866
9867 #[inline]
9868 unsafe fn decode(
9869 &mut self,
9870 decoder: &mut fidl::encoding::Decoder<
9871 '_,
9872 fidl::encoding::DefaultFuchsiaResourceDialect,
9873 >,
9874 offset: usize,
9875 _depth: fidl::encoding::Depth,
9876 ) -> fidl::Result<()> {
9877 decoder.debug_check_bounds::<Self>(offset);
9878 fidl::decode!(
9880 u64,
9881 fidl::encoding::DefaultFuchsiaResourceDialect,
9882 &mut self.target_id,
9883 decoder,
9884 offset + 0,
9885 _depth
9886 )?;
9887 fidl::decode!(
9888 Data,
9889 fidl::encoding::DefaultFuchsiaResourceDialect,
9890 &mut self.data,
9891 decoder,
9892 offset + 8,
9893 _depth
9894 )?;
9895 Ok(())
9896 }
9897 }
9898
9899 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9900 type Borrowed<'a> = &'a mut Self;
9901 fn take_or_borrow<'a>(
9902 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9903 ) -> Self::Borrowed<'a> {
9904 value
9905 }
9906 }
9907
9908 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9909 type Owned = Self;
9910
9911 #[inline(always)]
9912 fn inline_align(_context: fidl::encoding::Context) -> usize {
9913 4
9914 }
9915
9916 #[inline(always)]
9917 fn inline_size(_context: fidl::encoding::Context) -> usize {
9918 4
9919 }
9920 }
9921
9922 unsafe impl
9923 fidl::encoding::Encode<
9924 CoverageDataCollectorAddInline8bitCountersRequest,
9925 fidl::encoding::DefaultFuchsiaResourceDialect,
9926 > for &mut CoverageDataCollectorAddInline8bitCountersRequest
9927 {
9928 #[inline]
9929 unsafe fn encode(
9930 self,
9931 encoder: &mut fidl::encoding::Encoder<
9932 '_,
9933 fidl::encoding::DefaultFuchsiaResourceDialect,
9934 >,
9935 offset: usize,
9936 _depth: fidl::encoding::Depth,
9937 ) -> fidl::Result<()> {
9938 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
9939 fidl::encoding::Encode::<
9941 CoverageDataCollectorAddInline8bitCountersRequest,
9942 fidl::encoding::DefaultFuchsiaResourceDialect,
9943 >::encode(
9944 (<fidl::encoding::HandleType<
9945 fidl::Vmo,
9946 { fidl::ObjectType::VMO.into_raw() },
9947 2147483648,
9948 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9949 &mut self.inline_8bit_counters,
9950 ),),
9951 encoder,
9952 offset,
9953 _depth,
9954 )
9955 }
9956 }
9957 unsafe impl<
9958 T0: fidl::encoding::Encode<
9959 fidl::encoding::HandleType<
9960 fidl::Vmo,
9961 { fidl::ObjectType::VMO.into_raw() },
9962 2147483648,
9963 >,
9964 fidl::encoding::DefaultFuchsiaResourceDialect,
9965 >,
9966 >
9967 fidl::encoding::Encode<
9968 CoverageDataCollectorAddInline8bitCountersRequest,
9969 fidl::encoding::DefaultFuchsiaResourceDialect,
9970 > for (T0,)
9971 {
9972 #[inline]
9973 unsafe fn encode(
9974 self,
9975 encoder: &mut fidl::encoding::Encoder<
9976 '_,
9977 fidl::encoding::DefaultFuchsiaResourceDialect,
9978 >,
9979 offset: usize,
9980 depth: fidl::encoding::Depth,
9981 ) -> fidl::Result<()> {
9982 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
9983 self.0.encode(encoder, offset + 0, depth)?;
9987 Ok(())
9988 }
9989 }
9990
9991 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9992 for CoverageDataCollectorAddInline8bitCountersRequest
9993 {
9994 #[inline(always)]
9995 fn new_empty() -> Self {
9996 Self {
9997 inline_8bit_counters: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
9998 }
9999 }
10000
10001 #[inline]
10002 unsafe fn decode(
10003 &mut self,
10004 decoder: &mut fidl::encoding::Decoder<
10005 '_,
10006 fidl::encoding::DefaultFuchsiaResourceDialect,
10007 >,
10008 offset: usize,
10009 _depth: fidl::encoding::Depth,
10010 ) -> fidl::Result<()> {
10011 decoder.debug_check_bounds::<Self>(offset);
10012 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.inline_8bit_counters, decoder, offset + 0, _depth)?;
10014 Ok(())
10015 }
10016 }
10017
10018 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorInitializeRequest {
10019 type Borrowed<'a> = &'a mut Self;
10020 fn take_or_borrow<'a>(
10021 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10022 ) -> Self::Borrowed<'a> {
10023 value
10024 }
10025 }
10026
10027 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorInitializeRequest {
10028 type Owned = Self;
10029
10030 #[inline(always)]
10031 fn inline_align(_context: fidl::encoding::Context) -> usize {
10032 4
10033 }
10034
10035 #[inline(always)]
10036 fn inline_size(_context: fidl::encoding::Context) -> usize {
10037 8
10038 }
10039 }
10040
10041 unsafe impl
10042 fidl::encoding::Encode<
10043 CoverageDataCollectorInitializeRequest,
10044 fidl::encoding::DefaultFuchsiaResourceDialect,
10045 > for &mut CoverageDataCollectorInitializeRequest
10046 {
10047 #[inline]
10048 unsafe fn encode(
10049 self,
10050 encoder: &mut fidl::encoding::Encoder<
10051 '_,
10052 fidl::encoding::DefaultFuchsiaResourceDialect,
10053 >,
10054 offset: usize,
10055 _depth: fidl::encoding::Depth,
10056 ) -> fidl::Result<()> {
10057 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10058 fidl::encoding::Encode::<
10060 CoverageDataCollectorInitializeRequest,
10061 fidl::encoding::DefaultFuchsiaResourceDialect,
10062 >::encode(
10063 (
10064 <fidl::encoding::HandleType<
10065 fidl::EventPair,
10066 { fidl::ObjectType::EVENTPAIR.into_raw() },
10067 2147483648,
10068 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10069 &mut self.eventpair
10070 ),
10071 <fidl::encoding::HandleType<
10072 fidl::Process,
10073 { fidl::ObjectType::PROCESS.into_raw() },
10074 2147483648,
10075 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10076 &mut self.process
10077 ),
10078 ),
10079 encoder,
10080 offset,
10081 _depth,
10082 )
10083 }
10084 }
10085 unsafe impl<
10086 T0: fidl::encoding::Encode<
10087 fidl::encoding::HandleType<
10088 fidl::EventPair,
10089 { fidl::ObjectType::EVENTPAIR.into_raw() },
10090 2147483648,
10091 >,
10092 fidl::encoding::DefaultFuchsiaResourceDialect,
10093 >,
10094 T1: fidl::encoding::Encode<
10095 fidl::encoding::HandleType<
10096 fidl::Process,
10097 { fidl::ObjectType::PROCESS.into_raw() },
10098 2147483648,
10099 >,
10100 fidl::encoding::DefaultFuchsiaResourceDialect,
10101 >,
10102 >
10103 fidl::encoding::Encode<
10104 CoverageDataCollectorInitializeRequest,
10105 fidl::encoding::DefaultFuchsiaResourceDialect,
10106 > for (T0, T1)
10107 {
10108 #[inline]
10109 unsafe fn encode(
10110 self,
10111 encoder: &mut fidl::encoding::Encoder<
10112 '_,
10113 fidl::encoding::DefaultFuchsiaResourceDialect,
10114 >,
10115 offset: usize,
10116 depth: fidl::encoding::Depth,
10117 ) -> fidl::Result<()> {
10118 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10119 self.0.encode(encoder, offset + 0, depth)?;
10123 self.1.encode(encoder, offset + 4, depth)?;
10124 Ok(())
10125 }
10126 }
10127
10128 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10129 for CoverageDataCollectorInitializeRequest
10130 {
10131 #[inline(always)]
10132 fn new_empty() -> Self {
10133 Self {
10134 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10135 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10136 }
10137 }
10138
10139 #[inline]
10140 unsafe fn decode(
10141 &mut self,
10142 decoder: &mut fidl::encoding::Decoder<
10143 '_,
10144 fidl::encoding::DefaultFuchsiaResourceDialect,
10145 >,
10146 offset: usize,
10147 _depth: fidl::encoding::Depth,
10148 ) -> fidl::Result<()> {
10149 decoder.debug_check_bounds::<Self>(offset);
10150 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10152 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10153 Ok(())
10154 }
10155 }
10156
10157 impl fidl::encoding::ResourceTypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10158 type Borrowed<'a> = &'a mut Self;
10159 fn take_or_borrow<'a>(
10160 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10161 ) -> Self::Borrowed<'a> {
10162 value
10163 }
10164 }
10165
10166 unsafe impl fidl::encoding::TypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10167 type Owned = Self;
10168
10169 #[inline(always)]
10170 fn inline_align(_context: fidl::encoding::Context) -> usize {
10171 8
10172 }
10173
10174 #[inline(always)]
10175 fn inline_size(_context: fidl::encoding::Context) -> usize {
10176 16
10177 }
10178 }
10179
10180 unsafe impl
10181 fidl::encoding::Encode<
10182 CoverageDataProviderWatchCoverageDataResponse,
10183 fidl::encoding::DefaultFuchsiaResourceDialect,
10184 > for &mut CoverageDataProviderWatchCoverageDataResponse
10185 {
10186 #[inline]
10187 unsafe fn encode(
10188 self,
10189 encoder: &mut fidl::encoding::Encoder<
10190 '_,
10191 fidl::encoding::DefaultFuchsiaResourceDialect,
10192 >,
10193 offset: usize,
10194 _depth: fidl::encoding::Depth,
10195 ) -> fidl::Result<()> {
10196 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10197 fidl::encoding::Encode::<CoverageDataProviderWatchCoverageDataResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10199 (
10200 <fidl::encoding::Vector<CoverageData, 4096> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.coverage_data),
10201 ),
10202 encoder, offset, _depth
10203 )
10204 }
10205 }
10206 unsafe impl<
10207 T0: fidl::encoding::Encode<
10208 fidl::encoding::Vector<CoverageData, 4096>,
10209 fidl::encoding::DefaultFuchsiaResourceDialect,
10210 >,
10211 >
10212 fidl::encoding::Encode<
10213 CoverageDataProviderWatchCoverageDataResponse,
10214 fidl::encoding::DefaultFuchsiaResourceDialect,
10215 > for (T0,)
10216 {
10217 #[inline]
10218 unsafe fn encode(
10219 self,
10220 encoder: &mut fidl::encoding::Encoder<
10221 '_,
10222 fidl::encoding::DefaultFuchsiaResourceDialect,
10223 >,
10224 offset: usize,
10225 depth: fidl::encoding::Depth,
10226 ) -> fidl::Result<()> {
10227 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10228 self.0.encode(encoder, offset + 0, depth)?;
10232 Ok(())
10233 }
10234 }
10235
10236 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10237 for CoverageDataProviderWatchCoverageDataResponse
10238 {
10239 #[inline(always)]
10240 fn new_empty() -> Self {
10241 Self {
10242 coverage_data: fidl::new_empty!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
10243 }
10244 }
10245
10246 #[inline]
10247 unsafe fn decode(
10248 &mut self,
10249 decoder: &mut fidl::encoding::Decoder<
10250 '_,
10251 fidl::encoding::DefaultFuchsiaResourceDialect,
10252 >,
10253 offset: usize,
10254 _depth: fidl::encoding::Depth,
10255 ) -> fidl::Result<()> {
10256 decoder.debug_check_bounds::<Self>(offset);
10257 fidl::decode!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.coverage_data, decoder, offset + 0, _depth)?;
10259 Ok(())
10260 }
10261 }
10262
10263 impl fidl::encoding::ResourceTypeMarker for Input {
10264 type Borrowed<'a> = &'a mut Self;
10265 fn take_or_borrow<'a>(
10266 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10267 ) -> Self::Borrowed<'a> {
10268 value
10269 }
10270 }
10271
10272 unsafe impl fidl::encoding::TypeMarker for Input {
10273 type Owned = Self;
10274
10275 #[inline(always)]
10276 fn inline_align(_context: fidl::encoding::Context) -> usize {
10277 8
10278 }
10279
10280 #[inline(always)]
10281 fn inline_size(_context: fidl::encoding::Context) -> usize {
10282 16
10283 }
10284 }
10285
10286 unsafe impl fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>
10287 for &mut Input
10288 {
10289 #[inline]
10290 unsafe fn encode(
10291 self,
10292 encoder: &mut fidl::encoding::Encoder<
10293 '_,
10294 fidl::encoding::DefaultFuchsiaResourceDialect,
10295 >,
10296 offset: usize,
10297 _depth: fidl::encoding::Depth,
10298 ) -> fidl::Result<()> {
10299 encoder.debug_check_bounds::<Input>(offset);
10300 fidl::encoding::Encode::<Input, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10302 (
10303 <fidl::encoding::HandleType<
10304 fidl::Socket,
10305 { fidl::ObjectType::SOCKET.into_raw() },
10306 2147483648,
10307 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10308 &mut self.socket
10309 ),
10310 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.size),
10311 ),
10312 encoder,
10313 offset,
10314 _depth,
10315 )
10316 }
10317 }
10318 unsafe impl<
10319 T0: fidl::encoding::Encode<
10320 fidl::encoding::HandleType<
10321 fidl::Socket,
10322 { fidl::ObjectType::SOCKET.into_raw() },
10323 2147483648,
10324 >,
10325 fidl::encoding::DefaultFuchsiaResourceDialect,
10326 >,
10327 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10328 > fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>
10329 for (T0, T1)
10330 {
10331 #[inline]
10332 unsafe fn encode(
10333 self,
10334 encoder: &mut fidl::encoding::Encoder<
10335 '_,
10336 fidl::encoding::DefaultFuchsiaResourceDialect,
10337 >,
10338 offset: usize,
10339 depth: fidl::encoding::Depth,
10340 ) -> fidl::Result<()> {
10341 encoder.debug_check_bounds::<Input>(offset);
10342 unsafe {
10345 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10346 (ptr as *mut u64).write_unaligned(0);
10347 }
10348 self.0.encode(encoder, offset + 0, depth)?;
10350 self.1.encode(encoder, offset + 8, depth)?;
10351 Ok(())
10352 }
10353 }
10354
10355 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Input {
10356 #[inline(always)]
10357 fn new_empty() -> Self {
10358 Self {
10359 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10360 size: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10361 }
10362 }
10363
10364 #[inline]
10365 unsafe fn decode(
10366 &mut self,
10367 decoder: &mut fidl::encoding::Decoder<
10368 '_,
10369 fidl::encoding::DefaultFuchsiaResourceDialect,
10370 >,
10371 offset: usize,
10372 _depth: fidl::encoding::Depth,
10373 ) -> fidl::Result<()> {
10374 decoder.debug_check_bounds::<Self>(offset);
10375 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10377 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10378 let mask = 0xffffffff00000000u64;
10379 let maskedval = padval & mask;
10380 if maskedval != 0 {
10381 return Err(fidl::Error::NonZeroPadding {
10382 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10383 });
10384 }
10385 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
10386 fidl::decode!(
10387 u64,
10388 fidl::encoding::DefaultFuchsiaResourceDialect,
10389 &mut self.size,
10390 decoder,
10391 offset + 8,
10392 _depth
10393 )?;
10394 Ok(())
10395 }
10396 }
10397
10398 impl fidl::encoding::ResourceTypeMarker for InstrumentedProcess {
10399 type Borrowed<'a> = &'a mut Self;
10400 fn take_or_borrow<'a>(
10401 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10402 ) -> Self::Borrowed<'a> {
10403 value
10404 }
10405 }
10406
10407 unsafe impl fidl::encoding::TypeMarker for InstrumentedProcess {
10408 type Owned = Self;
10409
10410 #[inline(always)]
10411 fn inline_align(_context: fidl::encoding::Context) -> usize {
10412 4
10413 }
10414
10415 #[inline(always)]
10416 fn inline_size(_context: fidl::encoding::Context) -> usize {
10417 8
10418 }
10419 }
10420
10421 unsafe impl
10422 fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10423 for &mut InstrumentedProcess
10424 {
10425 #[inline]
10426 unsafe fn encode(
10427 self,
10428 encoder: &mut fidl::encoding::Encoder<
10429 '_,
10430 fidl::encoding::DefaultFuchsiaResourceDialect,
10431 >,
10432 offset: usize,
10433 _depth: fidl::encoding::Depth,
10434 ) -> fidl::Result<()> {
10435 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10436 fidl::encoding::Encode::<
10438 InstrumentedProcess,
10439 fidl::encoding::DefaultFuchsiaResourceDialect,
10440 >::encode(
10441 (
10442 <fidl::encoding::HandleType<
10443 fidl::EventPair,
10444 { fidl::ObjectType::EVENTPAIR.into_raw() },
10445 2147483648,
10446 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10447 &mut self.eventpair
10448 ),
10449 <fidl::encoding::HandleType<
10450 fidl::Process,
10451 { fidl::ObjectType::PROCESS.into_raw() },
10452 2147483648,
10453 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10454 &mut self.process
10455 ),
10456 ),
10457 encoder,
10458 offset,
10459 _depth,
10460 )
10461 }
10462 }
10463 unsafe impl<
10464 T0: fidl::encoding::Encode<
10465 fidl::encoding::HandleType<
10466 fidl::EventPair,
10467 { fidl::ObjectType::EVENTPAIR.into_raw() },
10468 2147483648,
10469 >,
10470 fidl::encoding::DefaultFuchsiaResourceDialect,
10471 >,
10472 T1: fidl::encoding::Encode<
10473 fidl::encoding::HandleType<
10474 fidl::Process,
10475 { fidl::ObjectType::PROCESS.into_raw() },
10476 2147483648,
10477 >,
10478 fidl::encoding::DefaultFuchsiaResourceDialect,
10479 >,
10480 >
10481 fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10482 for (T0, T1)
10483 {
10484 #[inline]
10485 unsafe fn encode(
10486 self,
10487 encoder: &mut fidl::encoding::Encoder<
10488 '_,
10489 fidl::encoding::DefaultFuchsiaResourceDialect,
10490 >,
10491 offset: usize,
10492 depth: fidl::encoding::Depth,
10493 ) -> fidl::Result<()> {
10494 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10495 self.0.encode(encoder, offset + 0, depth)?;
10499 self.1.encode(encoder, offset + 4, depth)?;
10500 Ok(())
10501 }
10502 }
10503
10504 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10505 for InstrumentedProcess
10506 {
10507 #[inline(always)]
10508 fn new_empty() -> Self {
10509 Self {
10510 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10511 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10512 }
10513 }
10514
10515 #[inline]
10516 unsafe fn decode(
10517 &mut self,
10518 decoder: &mut fidl::encoding::Decoder<
10519 '_,
10520 fidl::encoding::DefaultFuchsiaResourceDialect,
10521 >,
10522 offset: usize,
10523 _depth: fidl::encoding::Depth,
10524 ) -> fidl::Result<()> {
10525 decoder.debug_check_bounds::<Self>(offset);
10526 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10528 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10529 Ok(())
10530 }
10531 }
10532
10533 impl fidl::encoding::ResourceTypeMarker for ManagerConnectRequest {
10534 type Borrowed<'a> = &'a mut Self;
10535 fn take_or_borrow<'a>(
10536 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10537 ) -> Self::Borrowed<'a> {
10538 value
10539 }
10540 }
10541
10542 unsafe impl fidl::encoding::TypeMarker for ManagerConnectRequest {
10543 type Owned = Self;
10544
10545 #[inline(always)]
10546 fn inline_align(_context: fidl::encoding::Context) -> usize {
10547 8
10548 }
10549
10550 #[inline(always)]
10551 fn inline_size(_context: fidl::encoding::Context) -> usize {
10552 24
10553 }
10554 }
10555
10556 unsafe impl
10557 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10558 for &mut ManagerConnectRequest
10559 {
10560 #[inline]
10561 unsafe fn encode(
10562 self,
10563 encoder: &mut fidl::encoding::Encoder<
10564 '_,
10565 fidl::encoding::DefaultFuchsiaResourceDialect,
10566 >,
10567 offset: usize,
10568 _depth: fidl::encoding::Depth,
10569 ) -> fidl::Result<()> {
10570 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10571 fidl::encoding::Encode::<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10573 (
10574 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10575 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
10576 ),
10577 encoder, offset, _depth
10578 )
10579 }
10580 }
10581 unsafe impl<
10582 T0: fidl::encoding::Encode<
10583 fidl::encoding::BoundedString<4096>,
10584 fidl::encoding::DefaultFuchsiaResourceDialect,
10585 >,
10586 T1: fidl::encoding::Encode<
10587 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10588 fidl::encoding::DefaultFuchsiaResourceDialect,
10589 >,
10590 >
10591 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10592 for (T0, T1)
10593 {
10594 #[inline]
10595 unsafe fn encode(
10596 self,
10597 encoder: &mut fidl::encoding::Encoder<
10598 '_,
10599 fidl::encoding::DefaultFuchsiaResourceDialect,
10600 >,
10601 offset: usize,
10602 depth: fidl::encoding::Depth,
10603 ) -> fidl::Result<()> {
10604 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10605 unsafe {
10608 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10609 (ptr as *mut u64).write_unaligned(0);
10610 }
10611 self.0.encode(encoder, offset + 0, depth)?;
10613 self.1.encode(encoder, offset + 16, depth)?;
10614 Ok(())
10615 }
10616 }
10617
10618 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10619 for ManagerConnectRequest
10620 {
10621 #[inline(always)]
10622 fn new_empty() -> Self {
10623 Self {
10624 fuzzer_url: fidl::new_empty!(
10625 fidl::encoding::BoundedString<4096>,
10626 fidl::encoding::DefaultFuchsiaResourceDialect
10627 ),
10628 controller: fidl::new_empty!(
10629 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10630 fidl::encoding::DefaultFuchsiaResourceDialect
10631 ),
10632 }
10633 }
10634
10635 #[inline]
10636 unsafe fn decode(
10637 &mut self,
10638 decoder: &mut fidl::encoding::Decoder<
10639 '_,
10640 fidl::encoding::DefaultFuchsiaResourceDialect,
10641 >,
10642 offset: usize,
10643 _depth: fidl::encoding::Depth,
10644 ) -> fidl::Result<()> {
10645 decoder.debug_check_bounds::<Self>(offset);
10646 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10648 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10649 let mask = 0xffffffff00000000u64;
10650 let maskedval = padval & mask;
10651 if maskedval != 0 {
10652 return Err(fidl::Error::NonZeroPadding {
10653 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10654 });
10655 }
10656 fidl::decode!(
10657 fidl::encoding::BoundedString<4096>,
10658 fidl::encoding::DefaultFuchsiaResourceDialect,
10659 &mut self.fuzzer_url,
10660 decoder,
10661 offset + 0,
10662 _depth
10663 )?;
10664 fidl::decode!(
10665 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10666 fidl::encoding::DefaultFuchsiaResourceDialect,
10667 &mut self.controller,
10668 decoder,
10669 offset + 16,
10670 _depth
10671 )?;
10672 Ok(())
10673 }
10674 }
10675
10676 impl fidl::encoding::ResourceTypeMarker for ManagerGetOutputRequest {
10677 type Borrowed<'a> = &'a mut Self;
10678 fn take_or_borrow<'a>(
10679 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10680 ) -> Self::Borrowed<'a> {
10681 value
10682 }
10683 }
10684
10685 unsafe impl fidl::encoding::TypeMarker for ManagerGetOutputRequest {
10686 type Owned = Self;
10687
10688 #[inline(always)]
10689 fn inline_align(_context: fidl::encoding::Context) -> usize {
10690 8
10691 }
10692
10693 #[inline(always)]
10694 fn inline_size(_context: fidl::encoding::Context) -> usize {
10695 24
10696 }
10697 }
10698
10699 unsafe impl
10700 fidl::encoding::Encode<
10701 ManagerGetOutputRequest,
10702 fidl::encoding::DefaultFuchsiaResourceDialect,
10703 > for &mut ManagerGetOutputRequest
10704 {
10705 #[inline]
10706 unsafe fn encode(
10707 self,
10708 encoder: &mut fidl::encoding::Encoder<
10709 '_,
10710 fidl::encoding::DefaultFuchsiaResourceDialect,
10711 >,
10712 offset: usize,
10713 _depth: fidl::encoding::Depth,
10714 ) -> fidl::Result<()> {
10715 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10716 fidl::encoding::Encode::<ManagerGetOutputRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10718 (
10719 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10720 <TestOutput as fidl::encoding::ValueTypeMarker>::borrow(&self.output),
10721 <fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.socket),
10722 ),
10723 encoder, offset, _depth
10724 )
10725 }
10726 }
10727 unsafe impl<
10728 T0: fidl::encoding::Encode<
10729 fidl::encoding::BoundedString<4096>,
10730 fidl::encoding::DefaultFuchsiaResourceDialect,
10731 >,
10732 T1: fidl::encoding::Encode<TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect>,
10733 T2: fidl::encoding::Encode<
10734 fidl::encoding::HandleType<
10735 fidl::Socket,
10736 { fidl::ObjectType::SOCKET.into_raw() },
10737 2147483648,
10738 >,
10739 fidl::encoding::DefaultFuchsiaResourceDialect,
10740 >,
10741 >
10742 fidl::encoding::Encode<
10743 ManagerGetOutputRequest,
10744 fidl::encoding::DefaultFuchsiaResourceDialect,
10745 > for (T0, T1, T2)
10746 {
10747 #[inline]
10748 unsafe fn encode(
10749 self,
10750 encoder: &mut fidl::encoding::Encoder<
10751 '_,
10752 fidl::encoding::DefaultFuchsiaResourceDialect,
10753 >,
10754 offset: usize,
10755 depth: fidl::encoding::Depth,
10756 ) -> fidl::Result<()> {
10757 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10758 self.0.encode(encoder, offset + 0, depth)?;
10762 self.1.encode(encoder, offset + 16, depth)?;
10763 self.2.encode(encoder, offset + 20, depth)?;
10764 Ok(())
10765 }
10766 }
10767
10768 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10769 for ManagerGetOutputRequest
10770 {
10771 #[inline(always)]
10772 fn new_empty() -> Self {
10773 Self {
10774 fuzzer_url: fidl::new_empty!(
10775 fidl::encoding::BoundedString<4096>,
10776 fidl::encoding::DefaultFuchsiaResourceDialect
10777 ),
10778 output: fidl::new_empty!(TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect),
10779 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10780 }
10781 }
10782
10783 #[inline]
10784 unsafe fn decode(
10785 &mut self,
10786 decoder: &mut fidl::encoding::Decoder<
10787 '_,
10788 fidl::encoding::DefaultFuchsiaResourceDialect,
10789 >,
10790 offset: usize,
10791 _depth: fidl::encoding::Depth,
10792 ) -> fidl::Result<()> {
10793 decoder.debug_check_bounds::<Self>(offset);
10794 fidl::decode!(
10796 fidl::encoding::BoundedString<4096>,
10797 fidl::encoding::DefaultFuchsiaResourceDialect,
10798 &mut self.fuzzer_url,
10799 decoder,
10800 offset + 0,
10801 _depth
10802 )?;
10803 fidl::decode!(
10804 TestOutput,
10805 fidl::encoding::DefaultFuchsiaResourceDialect,
10806 &mut self.output,
10807 decoder,
10808 offset + 16,
10809 _depth
10810 )?;
10811 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 20, _depth)?;
10812 Ok(())
10813 }
10814 }
10815
10816 impl fidl::encoding::ResourceTypeMarker for RegistrarRegisterRequest {
10817 type Borrowed<'a> = &'a mut Self;
10818 fn take_or_borrow<'a>(
10819 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10820 ) -> Self::Borrowed<'a> {
10821 value
10822 }
10823 }
10824
10825 unsafe impl fidl::encoding::TypeMarker for RegistrarRegisterRequest {
10826 type Owned = Self;
10827
10828 #[inline(always)]
10829 fn inline_align(_context: fidl::encoding::Context) -> usize {
10830 8
10831 }
10832
10833 #[inline(always)]
10834 fn inline_size(_context: fidl::encoding::Context) -> usize {
10835 24
10836 }
10837 }
10838
10839 unsafe impl
10840 fidl::encoding::Encode<
10841 RegistrarRegisterRequest,
10842 fidl::encoding::DefaultFuchsiaResourceDialect,
10843 > for &mut RegistrarRegisterRequest
10844 {
10845 #[inline]
10846 unsafe fn encode(
10847 self,
10848 encoder: &mut fidl::encoding::Encoder<
10849 '_,
10850 fidl::encoding::DefaultFuchsiaResourceDialect,
10851 >,
10852 offset: usize,
10853 _depth: fidl::encoding::Depth,
10854 ) -> fidl::Result<()> {
10855 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10856 fidl::encoding::Encode::<RegistrarRegisterRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10858 (
10859 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10860 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.provider),
10861 ),
10862 encoder, offset, _depth
10863 )
10864 }
10865 }
10866 unsafe impl<
10867 T0: fidl::encoding::Encode<
10868 fidl::encoding::BoundedString<4096>,
10869 fidl::encoding::DefaultFuchsiaResourceDialect,
10870 >,
10871 T1: fidl::encoding::Encode<
10872 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
10873 fidl::encoding::DefaultFuchsiaResourceDialect,
10874 >,
10875 >
10876 fidl::encoding::Encode<
10877 RegistrarRegisterRequest,
10878 fidl::encoding::DefaultFuchsiaResourceDialect,
10879 > for (T0, T1)
10880 {
10881 #[inline]
10882 unsafe fn encode(
10883 self,
10884 encoder: &mut fidl::encoding::Encoder<
10885 '_,
10886 fidl::encoding::DefaultFuchsiaResourceDialect,
10887 >,
10888 offset: usize,
10889 depth: fidl::encoding::Depth,
10890 ) -> fidl::Result<()> {
10891 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10892 unsafe {
10895 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10896 (ptr as *mut u64).write_unaligned(0);
10897 }
10898 self.0.encode(encoder, offset + 0, depth)?;
10900 self.1.encode(encoder, offset + 16, depth)?;
10901 Ok(())
10902 }
10903 }
10904
10905 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10906 for RegistrarRegisterRequest
10907 {
10908 #[inline(always)]
10909 fn new_empty() -> Self {
10910 Self {
10911 fuzzer_url: fidl::new_empty!(
10912 fidl::encoding::BoundedString<4096>,
10913 fidl::encoding::DefaultFuchsiaResourceDialect
10914 ),
10915 provider: fidl::new_empty!(
10916 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
10917 fidl::encoding::DefaultFuchsiaResourceDialect
10918 ),
10919 }
10920 }
10921
10922 #[inline]
10923 unsafe fn decode(
10924 &mut self,
10925 decoder: &mut fidl::encoding::Decoder<
10926 '_,
10927 fidl::encoding::DefaultFuchsiaResourceDialect,
10928 >,
10929 offset: usize,
10930 _depth: fidl::encoding::Depth,
10931 ) -> fidl::Result<()> {
10932 decoder.debug_check_bounds::<Self>(offset);
10933 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10935 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10936 let mask = 0xffffffff00000000u64;
10937 let maskedval = padval & mask;
10938 if maskedval != 0 {
10939 return Err(fidl::Error::NonZeroPadding {
10940 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10941 });
10942 }
10943 fidl::decode!(
10944 fidl::encoding::BoundedString<4096>,
10945 fidl::encoding::DefaultFuchsiaResourceDialect,
10946 &mut self.fuzzer_url,
10947 decoder,
10948 offset + 0,
10949 _depth
10950 )?;
10951 fidl::decode!(
10952 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
10953 fidl::encoding::DefaultFuchsiaResourceDialect,
10954 &mut self.provider,
10955 decoder,
10956 offset + 16,
10957 _depth
10958 )?;
10959 Ok(())
10960 }
10961 }
10962
10963 impl fidl::encoding::ResourceTypeMarker for RegistryConnectRequest {
10964 type Borrowed<'a> = &'a mut Self;
10965 fn take_or_borrow<'a>(
10966 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10967 ) -> Self::Borrowed<'a> {
10968 value
10969 }
10970 }
10971
10972 unsafe impl fidl::encoding::TypeMarker for RegistryConnectRequest {
10973 type Owned = Self;
10974
10975 #[inline(always)]
10976 fn inline_align(_context: fidl::encoding::Context) -> usize {
10977 8
10978 }
10979
10980 #[inline(always)]
10981 fn inline_size(_context: fidl::encoding::Context) -> usize {
10982 32
10983 }
10984 }
10985
10986 unsafe impl
10987 fidl::encoding::Encode<
10988 RegistryConnectRequest,
10989 fidl::encoding::DefaultFuchsiaResourceDialect,
10990 > for &mut RegistryConnectRequest
10991 {
10992 #[inline]
10993 unsafe fn encode(
10994 self,
10995 encoder: &mut fidl::encoding::Encoder<
10996 '_,
10997 fidl::encoding::DefaultFuchsiaResourceDialect,
10998 >,
10999 offset: usize,
11000 _depth: fidl::encoding::Depth,
11001 ) -> fidl::Result<()> {
11002 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11003 fidl::encoding::Encode::<RegistryConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
11005 (
11006 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
11007 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
11008 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
11009 ),
11010 encoder, offset, _depth
11011 )
11012 }
11013 }
11014 unsafe impl<
11015 T0: fidl::encoding::Encode<
11016 fidl::encoding::BoundedString<4096>,
11017 fidl::encoding::DefaultFuchsiaResourceDialect,
11018 >,
11019 T1: fidl::encoding::Encode<
11020 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11021 fidl::encoding::DefaultFuchsiaResourceDialect,
11022 >,
11023 T2: fidl::encoding::Encode<i64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11024 >
11025 fidl::encoding::Encode<
11026 RegistryConnectRequest,
11027 fidl::encoding::DefaultFuchsiaResourceDialect,
11028 > for (T0, T1, T2)
11029 {
11030 #[inline]
11031 unsafe fn encode(
11032 self,
11033 encoder: &mut fidl::encoding::Encoder<
11034 '_,
11035 fidl::encoding::DefaultFuchsiaResourceDialect,
11036 >,
11037 offset: usize,
11038 depth: fidl::encoding::Depth,
11039 ) -> fidl::Result<()> {
11040 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11041 unsafe {
11044 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
11045 (ptr as *mut u64).write_unaligned(0);
11046 }
11047 self.0.encode(encoder, offset + 0, depth)?;
11049 self.1.encode(encoder, offset + 16, depth)?;
11050 self.2.encode(encoder, offset + 24, depth)?;
11051 Ok(())
11052 }
11053 }
11054
11055 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11056 for RegistryConnectRequest
11057 {
11058 #[inline(always)]
11059 fn new_empty() -> Self {
11060 Self {
11061 fuzzer_url: fidl::new_empty!(
11062 fidl::encoding::BoundedString<4096>,
11063 fidl::encoding::DefaultFuchsiaResourceDialect
11064 ),
11065 controller: fidl::new_empty!(
11066 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11067 fidl::encoding::DefaultFuchsiaResourceDialect
11068 ),
11069 timeout: fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect),
11070 }
11071 }
11072
11073 #[inline]
11074 unsafe fn decode(
11075 &mut self,
11076 decoder: &mut fidl::encoding::Decoder<
11077 '_,
11078 fidl::encoding::DefaultFuchsiaResourceDialect,
11079 >,
11080 offset: usize,
11081 _depth: fidl::encoding::Depth,
11082 ) -> fidl::Result<()> {
11083 decoder.debug_check_bounds::<Self>(offset);
11084 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11086 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11087 let mask = 0xffffffff00000000u64;
11088 let maskedval = padval & mask;
11089 if maskedval != 0 {
11090 return Err(fidl::Error::NonZeroPadding {
11091 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11092 });
11093 }
11094 fidl::decode!(
11095 fidl::encoding::BoundedString<4096>,
11096 fidl::encoding::DefaultFuchsiaResourceDialect,
11097 &mut self.fuzzer_url,
11098 decoder,
11099 offset + 0,
11100 _depth
11101 )?;
11102 fidl::decode!(
11103 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11104 fidl::encoding::DefaultFuchsiaResourceDialect,
11105 &mut self.controller,
11106 decoder,
11107 offset + 16,
11108 _depth
11109 )?;
11110 fidl::decode!(
11111 i64,
11112 fidl::encoding::DefaultFuchsiaResourceDialect,
11113 &mut self.timeout,
11114 decoder,
11115 offset + 24,
11116 _depth
11117 )?;
11118 Ok(())
11119 }
11120 }
11121
11122 impl fidl::encoding::ResourceTypeMarker for TargetAdapterConnectRequest {
11123 type Borrowed<'a> = &'a mut Self;
11124 fn take_or_borrow<'a>(
11125 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11126 ) -> Self::Borrowed<'a> {
11127 value
11128 }
11129 }
11130
11131 unsafe impl fidl::encoding::TypeMarker for TargetAdapterConnectRequest {
11132 type Owned = Self;
11133
11134 #[inline(always)]
11135 fn inline_align(_context: fidl::encoding::Context) -> usize {
11136 4
11137 }
11138
11139 #[inline(always)]
11140 fn inline_size(_context: fidl::encoding::Context) -> usize {
11141 8
11142 }
11143 }
11144
11145 unsafe impl
11146 fidl::encoding::Encode<
11147 TargetAdapterConnectRequest,
11148 fidl::encoding::DefaultFuchsiaResourceDialect,
11149 > for &mut TargetAdapterConnectRequest
11150 {
11151 #[inline]
11152 unsafe fn encode(
11153 self,
11154 encoder: &mut fidl::encoding::Encoder<
11155 '_,
11156 fidl::encoding::DefaultFuchsiaResourceDialect,
11157 >,
11158 offset: usize,
11159 _depth: fidl::encoding::Depth,
11160 ) -> fidl::Result<()> {
11161 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11162 fidl::encoding::Encode::<
11164 TargetAdapterConnectRequest,
11165 fidl::encoding::DefaultFuchsiaResourceDialect,
11166 >::encode(
11167 (
11168 <fidl::encoding::HandleType<
11169 fidl::EventPair,
11170 { fidl::ObjectType::EVENTPAIR.into_raw() },
11171 2147483648,
11172 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11173 &mut self.eventpair
11174 ),
11175 <fidl::encoding::HandleType<
11176 fidl::Vmo,
11177 { fidl::ObjectType::VMO.into_raw() },
11178 2147483648,
11179 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11180 &mut self.test_input
11181 ),
11182 ),
11183 encoder,
11184 offset,
11185 _depth,
11186 )
11187 }
11188 }
11189 unsafe impl<
11190 T0: fidl::encoding::Encode<
11191 fidl::encoding::HandleType<
11192 fidl::EventPair,
11193 { fidl::ObjectType::EVENTPAIR.into_raw() },
11194 2147483648,
11195 >,
11196 fidl::encoding::DefaultFuchsiaResourceDialect,
11197 >,
11198 T1: fidl::encoding::Encode<
11199 fidl::encoding::HandleType<
11200 fidl::Vmo,
11201 { fidl::ObjectType::VMO.into_raw() },
11202 2147483648,
11203 >,
11204 fidl::encoding::DefaultFuchsiaResourceDialect,
11205 >,
11206 >
11207 fidl::encoding::Encode<
11208 TargetAdapterConnectRequest,
11209 fidl::encoding::DefaultFuchsiaResourceDialect,
11210 > for (T0, T1)
11211 {
11212 #[inline]
11213 unsafe fn encode(
11214 self,
11215 encoder: &mut fidl::encoding::Encoder<
11216 '_,
11217 fidl::encoding::DefaultFuchsiaResourceDialect,
11218 >,
11219 offset: usize,
11220 depth: fidl::encoding::Depth,
11221 ) -> fidl::Result<()> {
11222 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11223 self.0.encode(encoder, offset + 0, depth)?;
11227 self.1.encode(encoder, offset + 4, depth)?;
11228 Ok(())
11229 }
11230 }
11231
11232 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11233 for TargetAdapterConnectRequest
11234 {
11235 #[inline(always)]
11236 fn new_empty() -> Self {
11237 Self {
11238 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11239 test_input: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11240 }
11241 }
11242
11243 #[inline]
11244 unsafe fn decode(
11245 &mut self,
11246 decoder: &mut fidl::encoding::Decoder<
11247 '_,
11248 fidl::encoding::DefaultFuchsiaResourceDialect,
11249 >,
11250 offset: usize,
11251 _depth: fidl::encoding::Depth,
11252 ) -> fidl::Result<()> {
11253 decoder.debug_check_bounds::<Self>(offset);
11254 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
11256 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.test_input, decoder, offset + 4, _depth)?;
11257 Ok(())
11258 }
11259 }
11260
11261 impl Artifact {
11262 #[inline(always)]
11263 fn max_ordinal_present(&self) -> u64 {
11264 if let Some(_) = self.error {
11265 return 3;
11266 }
11267 if let Some(_) = self.input {
11268 return 2;
11269 }
11270 if let Some(_) = self.result {
11271 return 1;
11272 }
11273 0
11274 }
11275 }
11276
11277 impl fidl::encoding::ResourceTypeMarker for Artifact {
11278 type Borrowed<'a> = &'a mut Self;
11279 fn take_or_borrow<'a>(
11280 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11281 ) -> Self::Borrowed<'a> {
11282 value
11283 }
11284 }
11285
11286 unsafe impl fidl::encoding::TypeMarker for Artifact {
11287 type Owned = Self;
11288
11289 #[inline(always)]
11290 fn inline_align(_context: fidl::encoding::Context) -> usize {
11291 8
11292 }
11293
11294 #[inline(always)]
11295 fn inline_size(_context: fidl::encoding::Context) -> usize {
11296 16
11297 }
11298 }
11299
11300 unsafe impl fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
11301 for &mut Artifact
11302 {
11303 unsafe fn encode(
11304 self,
11305 encoder: &mut fidl::encoding::Encoder<
11306 '_,
11307 fidl::encoding::DefaultFuchsiaResourceDialect,
11308 >,
11309 offset: usize,
11310 mut depth: fidl::encoding::Depth,
11311 ) -> fidl::Result<()> {
11312 encoder.debug_check_bounds::<Artifact>(offset);
11313 let max_ordinal: u64 = self.max_ordinal_present();
11315 encoder.write_num(max_ordinal, offset);
11316 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11317 if max_ordinal == 0 {
11319 return Ok(());
11320 }
11321 depth.increment()?;
11322 let envelope_size = 8;
11323 let bytes_len = max_ordinal as usize * envelope_size;
11324 #[allow(unused_variables)]
11325 let offset = encoder.out_of_line_offset(bytes_len);
11326 let mut _prev_end_offset: usize = 0;
11327 if 1 > max_ordinal {
11328 return Ok(());
11329 }
11330
11331 let cur_offset: usize = (1 - 1) * envelope_size;
11334
11335 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11337
11338 fidl::encoding::encode_in_envelope_optional::<
11343 Result_,
11344 fidl::encoding::DefaultFuchsiaResourceDialect,
11345 >(
11346 self.result.as_ref().map(<Result_ as fidl::encoding::ValueTypeMarker>::borrow),
11347 encoder,
11348 offset + cur_offset,
11349 depth,
11350 )?;
11351
11352 _prev_end_offset = cur_offset + envelope_size;
11353 if 2 > max_ordinal {
11354 return Ok(());
11355 }
11356
11357 let cur_offset: usize = (2 - 1) * envelope_size;
11360
11361 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11363
11364 fidl::encoding::encode_in_envelope_optional::<
11369 Input,
11370 fidl::encoding::DefaultFuchsiaResourceDialect,
11371 >(
11372 self.input
11373 .as_mut()
11374 .map(<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11375 encoder,
11376 offset + cur_offset,
11377 depth,
11378 )?;
11379
11380 _prev_end_offset = cur_offset + envelope_size;
11381 if 3 > max_ordinal {
11382 return Ok(());
11383 }
11384
11385 let cur_offset: usize = (3 - 1) * envelope_size;
11388
11389 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11391
11392 fidl::encoding::encode_in_envelope_optional::<
11397 i32,
11398 fidl::encoding::DefaultFuchsiaResourceDialect,
11399 >(
11400 self.error.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
11401 encoder,
11402 offset + cur_offset,
11403 depth,
11404 )?;
11405
11406 _prev_end_offset = cur_offset + envelope_size;
11407
11408 Ok(())
11409 }
11410 }
11411
11412 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {
11413 #[inline(always)]
11414 fn new_empty() -> Self {
11415 Self::default()
11416 }
11417
11418 unsafe fn decode(
11419 &mut self,
11420 decoder: &mut fidl::encoding::Decoder<
11421 '_,
11422 fidl::encoding::DefaultFuchsiaResourceDialect,
11423 >,
11424 offset: usize,
11425 mut depth: fidl::encoding::Depth,
11426 ) -> fidl::Result<()> {
11427 decoder.debug_check_bounds::<Self>(offset);
11428 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11429 None => return Err(fidl::Error::NotNullable),
11430 Some(len) => len,
11431 };
11432 if len == 0 {
11434 return Ok(());
11435 };
11436 depth.increment()?;
11437 let envelope_size = 8;
11438 let bytes_len = len * envelope_size;
11439 let offset = decoder.out_of_line_offset(bytes_len)?;
11440 let mut _next_ordinal_to_read = 0;
11442 let mut next_offset = offset;
11443 let end_offset = offset + bytes_len;
11444 _next_ordinal_to_read += 1;
11445 if next_offset >= end_offset {
11446 return Ok(());
11447 }
11448
11449 while _next_ordinal_to_read < 1 {
11451 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11452 _next_ordinal_to_read += 1;
11453 next_offset += envelope_size;
11454 }
11455
11456 let next_out_of_line = decoder.next_out_of_line();
11457 let handles_before = decoder.remaining_handles();
11458 if let Some((inlined, num_bytes, num_handles)) =
11459 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11460 {
11461 let member_inline_size =
11462 <Result_ as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11463 if inlined != (member_inline_size <= 4) {
11464 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11465 }
11466 let inner_offset;
11467 let mut inner_depth = depth.clone();
11468 if inlined {
11469 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11470 inner_offset = next_offset;
11471 } else {
11472 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11473 inner_depth.increment()?;
11474 }
11475 let val_ref = self.result.get_or_insert_with(|| {
11476 fidl::new_empty!(Result_, fidl::encoding::DefaultFuchsiaResourceDialect)
11477 });
11478 fidl::decode!(
11479 Result_,
11480 fidl::encoding::DefaultFuchsiaResourceDialect,
11481 val_ref,
11482 decoder,
11483 inner_offset,
11484 inner_depth
11485 )?;
11486 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11487 {
11488 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11489 }
11490 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11491 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11492 }
11493 }
11494
11495 next_offset += envelope_size;
11496 _next_ordinal_to_read += 1;
11497 if next_offset >= end_offset {
11498 return Ok(());
11499 }
11500
11501 while _next_ordinal_to_read < 2 {
11503 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11504 _next_ordinal_to_read += 1;
11505 next_offset += envelope_size;
11506 }
11507
11508 let next_out_of_line = decoder.next_out_of_line();
11509 let handles_before = decoder.remaining_handles();
11510 if let Some((inlined, num_bytes, num_handles)) =
11511 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11512 {
11513 let member_inline_size =
11514 <Input as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11515 if inlined != (member_inline_size <= 4) {
11516 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11517 }
11518 let inner_offset;
11519 let mut inner_depth = depth.clone();
11520 if inlined {
11521 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11522 inner_offset = next_offset;
11523 } else {
11524 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11525 inner_depth.increment()?;
11526 }
11527 let val_ref = self.input.get_or_insert_with(|| {
11528 fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect)
11529 });
11530 fidl::decode!(
11531 Input,
11532 fidl::encoding::DefaultFuchsiaResourceDialect,
11533 val_ref,
11534 decoder,
11535 inner_offset,
11536 inner_depth
11537 )?;
11538 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11539 {
11540 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11541 }
11542 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11543 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11544 }
11545 }
11546
11547 next_offset += envelope_size;
11548 _next_ordinal_to_read += 1;
11549 if next_offset >= end_offset {
11550 return Ok(());
11551 }
11552
11553 while _next_ordinal_to_read < 3 {
11555 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11556 _next_ordinal_to_read += 1;
11557 next_offset += envelope_size;
11558 }
11559
11560 let next_out_of_line = decoder.next_out_of_line();
11561 let handles_before = decoder.remaining_handles();
11562 if let Some((inlined, num_bytes, num_handles)) =
11563 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11564 {
11565 let member_inline_size =
11566 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11567 if inlined != (member_inline_size <= 4) {
11568 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11569 }
11570 let inner_offset;
11571 let mut inner_depth = depth.clone();
11572 if inlined {
11573 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11574 inner_offset = next_offset;
11575 } else {
11576 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11577 inner_depth.increment()?;
11578 }
11579 let val_ref = self.error.get_or_insert_with(|| {
11580 fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect)
11581 });
11582 fidl::decode!(
11583 i32,
11584 fidl::encoding::DefaultFuchsiaResourceDialect,
11585 val_ref,
11586 decoder,
11587 inner_offset,
11588 inner_depth
11589 )?;
11590 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11591 {
11592 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11593 }
11594 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11595 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11596 }
11597 }
11598
11599 next_offset += envelope_size;
11600
11601 while next_offset < end_offset {
11603 _next_ordinal_to_read += 1;
11604 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11605 next_offset += envelope_size;
11606 }
11607
11608 Ok(())
11609 }
11610 }
11611
11612 impl fidl::encoding::ResourceTypeMarker for Data {
11613 type Borrowed<'a> = &'a mut Self;
11614 fn take_or_borrow<'a>(
11615 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11616 ) -> Self::Borrowed<'a> {
11617 value
11618 }
11619 }
11620
11621 unsafe impl fidl::encoding::TypeMarker for Data {
11622 type Owned = Self;
11623
11624 #[inline(always)]
11625 fn inline_align(_context: fidl::encoding::Context) -> usize {
11626 8
11627 }
11628
11629 #[inline(always)]
11630 fn inline_size(_context: fidl::encoding::Context) -> usize {
11631 16
11632 }
11633 }
11634
11635 unsafe impl fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>
11636 for &mut Data
11637 {
11638 #[inline]
11639 unsafe fn encode(
11640 self,
11641 encoder: &mut fidl::encoding::Encoder<
11642 '_,
11643 fidl::encoding::DefaultFuchsiaResourceDialect,
11644 >,
11645 offset: usize,
11646 _depth: fidl::encoding::Depth,
11647 ) -> fidl::Result<()> {
11648 encoder.debug_check_bounds::<Data>(offset);
11649 encoder.write_num::<u64>(self.ordinal(), offset);
11650 match self {
11651 Data::Instrumented(ref mut val) => fidl::encoding::encode_in_envelope::<
11652 InstrumentedProcess,
11653 fidl::encoding::DefaultFuchsiaResourceDialect,
11654 >(
11655 <InstrumentedProcess as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11656 val,
11657 ),
11658 encoder,
11659 offset + 8,
11660 _depth,
11661 ),
11662 Data::Inline8bitCounters(ref mut val) => fidl::encoding::encode_in_envelope::<
11663 fidl::encoding::HandleType<
11664 fidl::Vmo,
11665 { fidl::ObjectType::VMO.into_raw() },
11666 2147483648,
11667 >,
11668 fidl::encoding::DefaultFuchsiaResourceDialect,
11669 >(
11670 <fidl::encoding::HandleType<
11671 fidl::Vmo,
11672 { fidl::ObjectType::VMO.into_raw() },
11673 2147483648,
11674 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11675 val
11676 ),
11677 encoder,
11678 offset + 8,
11679 _depth,
11680 ),
11681 Data::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
11682 }
11683 }
11684 }
11685
11686 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Data {
11687 #[inline(always)]
11688 fn new_empty() -> Self {
11689 Self::__SourceBreaking { unknown_ordinal: 0 }
11690 }
11691
11692 #[inline]
11693 unsafe fn decode(
11694 &mut self,
11695 decoder: &mut fidl::encoding::Decoder<
11696 '_,
11697 fidl::encoding::DefaultFuchsiaResourceDialect,
11698 >,
11699 offset: usize,
11700 mut depth: fidl::encoding::Depth,
11701 ) -> fidl::Result<()> {
11702 decoder.debug_check_bounds::<Self>(offset);
11703 #[allow(unused_variables)]
11704 let next_out_of_line = decoder.next_out_of_line();
11705 let handles_before = decoder.remaining_handles();
11706 let (ordinal, inlined, num_bytes, num_handles) =
11707 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
11708
11709 let member_inline_size = match ordinal {
11710 1 => <InstrumentedProcess as fidl::encoding::TypeMarker>::inline_size(
11711 decoder.context,
11712 ),
11713 2 => <fidl::encoding::HandleType<
11714 fidl::Vmo,
11715 { fidl::ObjectType::VMO.into_raw() },
11716 2147483648,
11717 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11718 0 => return Err(fidl::Error::UnknownUnionTag),
11719 _ => num_bytes as usize,
11720 };
11721
11722 if inlined != (member_inline_size <= 4) {
11723 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11724 }
11725 let _inner_offset;
11726 if inlined {
11727 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
11728 _inner_offset = offset + 8;
11729 } else {
11730 depth.increment()?;
11731 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11732 }
11733 match ordinal {
11734 1 => {
11735 #[allow(irrefutable_let_patterns)]
11736 if let Data::Instrumented(_) = self {
11737 } else {
11739 *self = Data::Instrumented(fidl::new_empty!(
11741 InstrumentedProcess,
11742 fidl::encoding::DefaultFuchsiaResourceDialect
11743 ));
11744 }
11745 #[allow(irrefutable_let_patterns)]
11746 if let Data::Instrumented(ref mut val) = self {
11747 fidl::decode!(
11748 InstrumentedProcess,
11749 fidl::encoding::DefaultFuchsiaResourceDialect,
11750 val,
11751 decoder,
11752 _inner_offset,
11753 depth
11754 )?;
11755 } else {
11756 unreachable!()
11757 }
11758 }
11759 2 => {
11760 #[allow(irrefutable_let_patterns)]
11761 if let Data::Inline8bitCounters(_) = self {
11762 } else {
11764 *self = Data::Inline8bitCounters(
11766 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11767 );
11768 }
11769 #[allow(irrefutable_let_patterns)]
11770 if let Data::Inline8bitCounters(ref mut val) = self {
11771 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
11772 } else {
11773 unreachable!()
11774 }
11775 }
11776 #[allow(deprecated)]
11777 ordinal => {
11778 for _ in 0..num_handles {
11779 decoder.drop_next_handle()?;
11780 }
11781 *self = Data::__SourceBreaking { unknown_ordinal: ordinal };
11782 }
11783 }
11784 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
11785 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11786 }
11787 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11788 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11789 }
11790 Ok(())
11791 }
11792 }
11793}