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#[cfg(target_os = "fuchsia")]
802impl fidl::endpoints::FromClient for ControllerSynchronousProxy {
803 type Protocol = ControllerMarker;
804
805 fn from_client(value: fidl::endpoints::ClientEnd<ControllerMarker>) -> Self {
806 Self::new(value.into_channel())
807 }
808}
809
810#[derive(Debug, Clone)]
811pub struct ControllerProxy {
812 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
813}
814
815impl fidl::endpoints::Proxy for ControllerProxy {
816 type Protocol = ControllerMarker;
817
818 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
819 Self::new(inner)
820 }
821
822 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
823 self.client.into_channel().map_err(|client| Self { client })
824 }
825
826 fn as_channel(&self) -> &::fidl::AsyncChannel {
827 self.client.as_channel()
828 }
829}
830
831impl ControllerProxy {
832 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
834 let protocol_name = <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
835 Self { client: fidl::client::Client::new(channel, protocol_name) }
836 }
837
838 pub fn take_event_stream(&self) -> ControllerEventStream {
844 ControllerEventStream { event_receiver: self.client.take_event_receiver() }
845 }
846
847 pub fn r#configure(
861 &self,
862 mut options: &Options,
863 ) -> fidl::client::QueryResponseFut<
864 ControllerConfigureResult,
865 fidl::encoding::DefaultFuchsiaResourceDialect,
866 > {
867 ControllerProxyInterface::r#configure(self, options)
868 }
869
870 pub fn r#get_options(
875 &self,
876 ) -> fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
877 {
878 ControllerProxyInterface::r#get_options(self)
879 }
880
881 pub fn r#add_to_corpus(
891 &self,
892 mut corpus: Corpus,
893 mut input: Input,
894 ) -> fidl::client::QueryResponseFut<
895 ControllerAddToCorpusResult,
896 fidl::encoding::DefaultFuchsiaResourceDialect,
897 > {
898 ControllerProxyInterface::r#add_to_corpus(self, corpus, input)
899 }
900
901 pub fn r#read_corpus(
906 &self,
907 mut corpus: Corpus,
908 mut corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
909 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
910 ControllerProxyInterface::r#read_corpus(self, corpus, corpus_reader)
911 }
912
913 pub fn r#write_dictionary(
925 &self,
926 mut dictionary: Input,
927 ) -> fidl::client::QueryResponseFut<
928 ControllerWriteDictionaryResult,
929 fidl::encoding::DefaultFuchsiaResourceDialect,
930 > {
931 ControllerProxyInterface::r#write_dictionary(self, dictionary)
932 }
933
934 pub fn r#read_dictionary(
938 &self,
939 ) -> fidl::client::QueryResponseFut<Input, fidl::encoding::DefaultFuchsiaResourceDialect> {
940 ControllerProxyInterface::r#read_dictionary(self)
941 }
942
943 pub fn r#add_monitor(
948 &self,
949 mut monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
950 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
951 ControllerProxyInterface::r#add_monitor(self, monitor)
952 }
953
954 pub fn r#fuzz(
975 &self,
976 ) -> fidl::client::QueryResponseFut<
977 ControllerFuzzResult,
978 fidl::encoding::DefaultFuchsiaResourceDialect,
979 > {
980 ControllerProxyInterface::r#fuzz(self)
981 }
982
983 pub fn r#try_one(
994 &self,
995 mut test_input: Input,
996 ) -> fidl::client::QueryResponseFut<
997 ControllerTryOneResult,
998 fidl::encoding::DefaultFuchsiaResourceDialect,
999 > {
1000 ControllerProxyInterface::r#try_one(self, test_input)
1001 }
1002
1003 pub fn r#minimize(
1018 &self,
1019 mut test_input: Input,
1020 ) -> fidl::client::QueryResponseFut<
1021 ControllerMinimizeResult,
1022 fidl::encoding::DefaultFuchsiaResourceDialect,
1023 > {
1024 ControllerProxyInterface::r#minimize(self, test_input)
1025 }
1026
1027 pub fn r#cleanse(
1043 &self,
1044 mut test_input: Input,
1045 ) -> fidl::client::QueryResponseFut<
1046 ControllerCleanseResult,
1047 fidl::encoding::DefaultFuchsiaResourceDialect,
1048 > {
1049 ControllerProxyInterface::r#cleanse(self, test_input)
1050 }
1051
1052 pub fn r#merge(
1066 &self,
1067 ) -> fidl::client::QueryResponseFut<
1068 ControllerMergeResult,
1069 fidl::encoding::DefaultFuchsiaResourceDialect,
1070 > {
1071 ControllerProxyInterface::r#merge(self)
1072 }
1073
1074 pub fn r#get_status(
1078 &self,
1079 ) -> fidl::client::QueryResponseFut<Status, fidl::encoding::DefaultFuchsiaResourceDialect> {
1080 ControllerProxyInterface::r#get_status(self)
1081 }
1082
1083 pub fn r#watch_artifact(
1113 &self,
1114 ) -> fidl::client::QueryResponseFut<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
1115 {
1116 ControllerProxyInterface::r#watch_artifact(self)
1117 }
1118}
1119
1120impl ControllerProxyInterface for ControllerProxy {
1121 type ConfigureResponseFut = fidl::client::QueryResponseFut<
1122 ControllerConfigureResult,
1123 fidl::encoding::DefaultFuchsiaResourceDialect,
1124 >;
1125 fn r#configure(&self, mut options: &Options) -> Self::ConfigureResponseFut {
1126 fn _decode(
1127 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1128 ) -> Result<ControllerConfigureResult, fidl::Error> {
1129 let _response = fidl::client::decode_transaction_body::<
1130 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1131 fidl::encoding::DefaultFuchsiaResourceDialect,
1132 0x35c8cba7fa3d32e4,
1133 >(_buf?)?;
1134 Ok(_response.map(|x| x))
1135 }
1136 self.client.send_query_and_decode::<ControllerConfigureRequest, ControllerConfigureResult>(
1137 (options,),
1138 0x35c8cba7fa3d32e4,
1139 fidl::encoding::DynamicFlags::empty(),
1140 _decode,
1141 )
1142 }
1143
1144 type GetOptionsResponseFut =
1145 fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>;
1146 fn r#get_options(&self) -> Self::GetOptionsResponseFut {
1147 fn _decode(
1148 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1149 ) -> Result<Options, fidl::Error> {
1150 let _response = fidl::client::decode_transaction_body::<
1151 ControllerGetOptionsResponse,
1152 fidl::encoding::DefaultFuchsiaResourceDialect,
1153 0x683d93332504b9cd,
1154 >(_buf?)?;
1155 Ok(_response.options)
1156 }
1157 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Options>(
1158 (),
1159 0x683d93332504b9cd,
1160 fidl::encoding::DynamicFlags::empty(),
1161 _decode,
1162 )
1163 }
1164
1165 type AddToCorpusResponseFut = fidl::client::QueryResponseFut<
1166 ControllerAddToCorpusResult,
1167 fidl::encoding::DefaultFuchsiaResourceDialect,
1168 >;
1169 fn r#add_to_corpus(
1170 &self,
1171 mut corpus: Corpus,
1172 mut input: Input,
1173 ) -> Self::AddToCorpusResponseFut {
1174 fn _decode(
1175 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1176 ) -> Result<ControllerAddToCorpusResult, fidl::Error> {
1177 let _response = fidl::client::decode_transaction_body::<
1178 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1179 fidl::encoding::DefaultFuchsiaResourceDialect,
1180 0x7bdf8336ab534cee,
1181 >(_buf?)?;
1182 Ok(_response.map(|x| x))
1183 }
1184 self.client
1185 .send_query_and_decode::<ControllerAddToCorpusRequest, ControllerAddToCorpusResult>(
1186 (corpus, &mut input),
1187 0x7bdf8336ab534cee,
1188 fidl::encoding::DynamicFlags::empty(),
1189 _decode,
1190 )
1191 }
1192
1193 type ReadCorpusResponseFut =
1194 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1195 fn r#read_corpus(
1196 &self,
1197 mut corpus: Corpus,
1198 mut corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
1199 ) -> Self::ReadCorpusResponseFut {
1200 fn _decode(
1201 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1202 ) -> Result<(), fidl::Error> {
1203 let _response = fidl::client::decode_transaction_body::<
1204 fidl::encoding::EmptyPayload,
1205 fidl::encoding::DefaultFuchsiaResourceDialect,
1206 0x501279b430b34514,
1207 >(_buf?)?;
1208 Ok(_response)
1209 }
1210 self.client.send_query_and_decode::<ControllerReadCorpusRequest, ()>(
1211 (corpus, corpus_reader),
1212 0x501279b430b34514,
1213 fidl::encoding::DynamicFlags::empty(),
1214 _decode,
1215 )
1216 }
1217
1218 type WriteDictionaryResponseFut = fidl::client::QueryResponseFut<
1219 ControllerWriteDictionaryResult,
1220 fidl::encoding::DefaultFuchsiaResourceDialect,
1221 >;
1222 fn r#write_dictionary(&self, mut dictionary: Input) -> Self::WriteDictionaryResponseFut {
1223 fn _decode(
1224 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1225 ) -> Result<ControllerWriteDictionaryResult, fidl::Error> {
1226 let _response = fidl::client::decode_transaction_body::<
1227 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1228 fidl::encoding::DefaultFuchsiaResourceDialect,
1229 0x4ecfc1274fe4a70b,
1230 >(_buf?)?;
1231 Ok(_response.map(|x| x))
1232 }
1233 self.client.send_query_and_decode::<
1234 ControllerWriteDictionaryRequest,
1235 ControllerWriteDictionaryResult,
1236 >(
1237 (&mut dictionary,),
1238 0x4ecfc1274fe4a70b,
1239 fidl::encoding::DynamicFlags::empty(),
1240 _decode,
1241 )
1242 }
1243
1244 type ReadDictionaryResponseFut =
1245 fidl::client::QueryResponseFut<Input, fidl::encoding::DefaultFuchsiaResourceDialect>;
1246 fn r#read_dictionary(&self) -> Self::ReadDictionaryResponseFut {
1247 fn _decode(
1248 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1249 ) -> Result<Input, fidl::Error> {
1250 let _response = fidl::client::decode_transaction_body::<
1251 ControllerReadDictionaryResponse,
1252 fidl::encoding::DefaultFuchsiaResourceDialect,
1253 0x1be6724c87b51c37,
1254 >(_buf?)?;
1255 Ok(_response.dictionary)
1256 }
1257 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Input>(
1258 (),
1259 0x1be6724c87b51c37,
1260 fidl::encoding::DynamicFlags::empty(),
1261 _decode,
1262 )
1263 }
1264
1265 type AddMonitorResponseFut =
1266 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
1267 fn r#add_monitor(
1268 &self,
1269 mut monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
1270 ) -> Self::AddMonitorResponseFut {
1271 fn _decode(
1272 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1273 ) -> Result<(), fidl::Error> {
1274 let _response = fidl::client::decode_transaction_body::<
1275 fidl::encoding::EmptyPayload,
1276 fidl::encoding::DefaultFuchsiaResourceDialect,
1277 0x2efbf7d3dc21438e,
1278 >(_buf?)?;
1279 Ok(_response)
1280 }
1281 self.client.send_query_and_decode::<ControllerAddMonitorRequest, ()>(
1282 (monitor,),
1283 0x2efbf7d3dc21438e,
1284 fidl::encoding::DynamicFlags::empty(),
1285 _decode,
1286 )
1287 }
1288
1289 type FuzzResponseFut = fidl::client::QueryResponseFut<
1290 ControllerFuzzResult,
1291 fidl::encoding::DefaultFuchsiaResourceDialect,
1292 >;
1293 fn r#fuzz(&self) -> Self::FuzzResponseFut {
1294 fn _decode(
1295 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1296 ) -> Result<ControllerFuzzResult, fidl::Error> {
1297 let _response = fidl::client::decode_transaction_body::<
1298 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1299 fidl::encoding::DefaultFuchsiaResourceDialect,
1300 0x62fe3684ea23af62,
1301 >(_buf?)?;
1302 Ok(_response.map(|x| x))
1303 }
1304 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerFuzzResult>(
1305 (),
1306 0x62fe3684ea23af62,
1307 fidl::encoding::DynamicFlags::empty(),
1308 _decode,
1309 )
1310 }
1311
1312 type TryOneResponseFut = fidl::client::QueryResponseFut<
1313 ControllerTryOneResult,
1314 fidl::encoding::DefaultFuchsiaResourceDialect,
1315 >;
1316 fn r#try_one(&self, mut test_input: Input) -> Self::TryOneResponseFut {
1317 fn _decode(
1318 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1319 ) -> Result<ControllerTryOneResult, fidl::Error> {
1320 let _response = fidl::client::decode_transaction_body::<
1321 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1322 fidl::encoding::DefaultFuchsiaResourceDialect,
1323 0x368dc762d8e16d46,
1324 >(_buf?)?;
1325 Ok(_response.map(|x| x))
1326 }
1327 self.client.send_query_and_decode::<ControllerTryOneRequest, ControllerTryOneResult>(
1328 (&mut test_input,),
1329 0x368dc762d8e16d46,
1330 fidl::encoding::DynamicFlags::empty(),
1331 _decode,
1332 )
1333 }
1334
1335 type MinimizeResponseFut = fidl::client::QueryResponseFut<
1336 ControllerMinimizeResult,
1337 fidl::encoding::DefaultFuchsiaResourceDialect,
1338 >;
1339 fn r#minimize(&self, mut test_input: Input) -> Self::MinimizeResponseFut {
1340 fn _decode(
1341 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1342 ) -> Result<ControllerMinimizeResult, fidl::Error> {
1343 let _response = fidl::client::decode_transaction_body::<
1344 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1345 fidl::encoding::DefaultFuchsiaResourceDialect,
1346 0x105a242ee0552794,
1347 >(_buf?)?;
1348 Ok(_response.map(|x| x))
1349 }
1350 self.client.send_query_and_decode::<ControllerMinimizeRequest, ControllerMinimizeResult>(
1351 (&mut test_input,),
1352 0x105a242ee0552794,
1353 fidl::encoding::DynamicFlags::empty(),
1354 _decode,
1355 )
1356 }
1357
1358 type CleanseResponseFut = fidl::client::QueryResponseFut<
1359 ControllerCleanseResult,
1360 fidl::encoding::DefaultFuchsiaResourceDialect,
1361 >;
1362 fn r#cleanse(&self, mut test_input: Input) -> Self::CleanseResponseFut {
1363 fn _decode(
1364 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1365 ) -> Result<ControllerCleanseResult, fidl::Error> {
1366 let _response = fidl::client::decode_transaction_body::<
1367 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1368 fidl::encoding::DefaultFuchsiaResourceDialect,
1369 0x6d7892f62735f3e0,
1370 >(_buf?)?;
1371 Ok(_response.map(|x| x))
1372 }
1373 self.client.send_query_and_decode::<ControllerCleanseRequest, ControllerCleanseResult>(
1374 (&mut test_input,),
1375 0x6d7892f62735f3e0,
1376 fidl::encoding::DynamicFlags::empty(),
1377 _decode,
1378 )
1379 }
1380
1381 type MergeResponseFut = fidl::client::QueryResponseFut<
1382 ControllerMergeResult,
1383 fidl::encoding::DefaultFuchsiaResourceDialect,
1384 >;
1385 fn r#merge(&self) -> Self::MergeResponseFut {
1386 fn _decode(
1387 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1388 ) -> Result<ControllerMergeResult, fidl::Error> {
1389 let _response = fidl::client::decode_transaction_body::<
1390 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
1391 fidl::encoding::DefaultFuchsiaResourceDialect,
1392 0x3614e5c39413b5eb,
1393 >(_buf?)?;
1394 Ok(_response.map(|x| x))
1395 }
1396 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ControllerMergeResult>(
1397 (),
1398 0x3614e5c39413b5eb,
1399 fidl::encoding::DynamicFlags::empty(),
1400 _decode,
1401 )
1402 }
1403
1404 type GetStatusResponseFut =
1405 fidl::client::QueryResponseFut<Status, fidl::encoding::DefaultFuchsiaResourceDialect>;
1406 fn r#get_status(&self) -> Self::GetStatusResponseFut {
1407 fn _decode(
1408 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1409 ) -> Result<Status, fidl::Error> {
1410 let _response = fidl::client::decode_transaction_body::<
1411 ControllerGetStatusResponse,
1412 fidl::encoding::DefaultFuchsiaResourceDialect,
1413 0x51db4975d93ce768,
1414 >(_buf?)?;
1415 Ok(_response.status)
1416 }
1417 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Status>(
1418 (),
1419 0x51db4975d93ce768,
1420 fidl::encoding::DynamicFlags::empty(),
1421 _decode,
1422 )
1423 }
1424
1425 type WatchArtifactResponseFut =
1426 fidl::client::QueryResponseFut<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>;
1427 fn r#watch_artifact(&self) -> Self::WatchArtifactResponseFut {
1428 fn _decode(
1429 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1430 ) -> Result<Artifact, fidl::Error> {
1431 let _response = fidl::client::decode_transaction_body::<
1432 ControllerWatchArtifactResponse,
1433 fidl::encoding::DefaultFuchsiaResourceDialect,
1434 0x6cfca3730944a414,
1435 >(_buf?)?;
1436 Ok(_response.artifact)
1437 }
1438 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Artifact>(
1439 (),
1440 0x6cfca3730944a414,
1441 fidl::encoding::DynamicFlags::empty(),
1442 _decode,
1443 )
1444 }
1445}
1446
1447pub struct ControllerEventStream {
1448 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1449}
1450
1451impl std::marker::Unpin for ControllerEventStream {}
1452
1453impl futures::stream::FusedStream for ControllerEventStream {
1454 fn is_terminated(&self) -> bool {
1455 self.event_receiver.is_terminated()
1456 }
1457}
1458
1459impl futures::Stream for ControllerEventStream {
1460 type Item = Result<ControllerEvent, fidl::Error>;
1461
1462 fn poll_next(
1463 mut self: std::pin::Pin<&mut Self>,
1464 cx: &mut std::task::Context<'_>,
1465 ) -> std::task::Poll<Option<Self::Item>> {
1466 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1467 &mut self.event_receiver,
1468 cx
1469 )?) {
1470 Some(buf) => std::task::Poll::Ready(Some(ControllerEvent::decode(buf))),
1471 None => std::task::Poll::Ready(None),
1472 }
1473 }
1474}
1475
1476#[derive(Debug)]
1477pub enum ControllerEvent {}
1478
1479impl ControllerEvent {
1480 fn decode(
1482 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1483 ) -> Result<ControllerEvent, fidl::Error> {
1484 let (bytes, _handles) = buf.split_mut();
1485 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1486 debug_assert_eq!(tx_header.tx_id, 0);
1487 match tx_header.ordinal {
1488 _ => Err(fidl::Error::UnknownOrdinal {
1489 ordinal: tx_header.ordinal,
1490 protocol_name: <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1491 }),
1492 }
1493 }
1494}
1495
1496pub struct ControllerRequestStream {
1498 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1499 is_terminated: bool,
1500}
1501
1502impl std::marker::Unpin for ControllerRequestStream {}
1503
1504impl futures::stream::FusedStream for ControllerRequestStream {
1505 fn is_terminated(&self) -> bool {
1506 self.is_terminated
1507 }
1508}
1509
1510impl fidl::endpoints::RequestStream for ControllerRequestStream {
1511 type Protocol = ControllerMarker;
1512 type ControlHandle = ControllerControlHandle;
1513
1514 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1515 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1516 }
1517
1518 fn control_handle(&self) -> Self::ControlHandle {
1519 ControllerControlHandle { inner: self.inner.clone() }
1520 }
1521
1522 fn into_inner(
1523 self,
1524 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1525 {
1526 (self.inner, self.is_terminated)
1527 }
1528
1529 fn from_inner(
1530 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1531 is_terminated: bool,
1532 ) -> Self {
1533 Self { inner, is_terminated }
1534 }
1535}
1536
1537impl futures::Stream for ControllerRequestStream {
1538 type Item = Result<ControllerRequest, fidl::Error>;
1539
1540 fn poll_next(
1541 mut self: std::pin::Pin<&mut Self>,
1542 cx: &mut std::task::Context<'_>,
1543 ) -> std::task::Poll<Option<Self::Item>> {
1544 let this = &mut *self;
1545 if this.inner.check_shutdown(cx) {
1546 this.is_terminated = true;
1547 return std::task::Poll::Ready(None);
1548 }
1549 if this.is_terminated {
1550 panic!("polled ControllerRequestStream after completion");
1551 }
1552 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1553 |bytes, handles| {
1554 match this.inner.channel().read_etc(cx, bytes, handles) {
1555 std::task::Poll::Ready(Ok(())) => {}
1556 std::task::Poll::Pending => return std::task::Poll::Pending,
1557 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1558 this.is_terminated = true;
1559 return std::task::Poll::Ready(None);
1560 }
1561 std::task::Poll::Ready(Err(e)) => {
1562 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1563 e.into(),
1564 ))))
1565 }
1566 }
1567
1568 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1570
1571 std::task::Poll::Ready(Some(match header.ordinal {
1572 0x35c8cba7fa3d32e4 => {
1573 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1574 let mut req = fidl::new_empty!(
1575 ControllerConfigureRequest,
1576 fidl::encoding::DefaultFuchsiaResourceDialect
1577 );
1578 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerConfigureRequest>(&header, _body_bytes, handles, &mut req)?;
1579 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1580 Ok(ControllerRequest::Configure {
1581 options: req.options,
1582
1583 responder: ControllerConfigureResponder {
1584 control_handle: std::mem::ManuallyDrop::new(control_handle),
1585 tx_id: header.tx_id,
1586 },
1587 })
1588 }
1589 0x683d93332504b9cd => {
1590 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1591 let mut req = fidl::new_empty!(
1592 fidl::encoding::EmptyPayload,
1593 fidl::encoding::DefaultFuchsiaResourceDialect
1594 );
1595 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1596 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1597 Ok(ControllerRequest::GetOptions {
1598 responder: ControllerGetOptionsResponder {
1599 control_handle: std::mem::ManuallyDrop::new(control_handle),
1600 tx_id: header.tx_id,
1601 },
1602 })
1603 }
1604 0x7bdf8336ab534cee => {
1605 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1606 let mut req = fidl::new_empty!(
1607 ControllerAddToCorpusRequest,
1608 fidl::encoding::DefaultFuchsiaResourceDialect
1609 );
1610 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddToCorpusRequest>(&header, _body_bytes, handles, &mut req)?;
1611 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1612 Ok(ControllerRequest::AddToCorpus {
1613 corpus: req.corpus,
1614 input: req.input,
1615
1616 responder: ControllerAddToCorpusResponder {
1617 control_handle: std::mem::ManuallyDrop::new(control_handle),
1618 tx_id: header.tx_id,
1619 },
1620 })
1621 }
1622 0x501279b430b34514 => {
1623 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1624 let mut req = fidl::new_empty!(
1625 ControllerReadCorpusRequest,
1626 fidl::encoding::DefaultFuchsiaResourceDialect
1627 );
1628 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerReadCorpusRequest>(&header, _body_bytes, handles, &mut req)?;
1629 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1630 Ok(ControllerRequest::ReadCorpus {
1631 corpus: req.corpus,
1632 corpus_reader: req.corpus_reader,
1633
1634 responder: ControllerReadCorpusResponder {
1635 control_handle: std::mem::ManuallyDrop::new(control_handle),
1636 tx_id: header.tx_id,
1637 },
1638 })
1639 }
1640 0x4ecfc1274fe4a70b => {
1641 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1642 let mut req = fidl::new_empty!(
1643 ControllerWriteDictionaryRequest,
1644 fidl::encoding::DefaultFuchsiaResourceDialect
1645 );
1646 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerWriteDictionaryRequest>(&header, _body_bytes, handles, &mut req)?;
1647 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1648 Ok(ControllerRequest::WriteDictionary {
1649 dictionary: req.dictionary,
1650
1651 responder: ControllerWriteDictionaryResponder {
1652 control_handle: std::mem::ManuallyDrop::new(control_handle),
1653 tx_id: header.tx_id,
1654 },
1655 })
1656 }
1657 0x1be6724c87b51c37 => {
1658 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1659 let mut req = fidl::new_empty!(
1660 fidl::encoding::EmptyPayload,
1661 fidl::encoding::DefaultFuchsiaResourceDialect
1662 );
1663 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1664 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1665 Ok(ControllerRequest::ReadDictionary {
1666 responder: ControllerReadDictionaryResponder {
1667 control_handle: std::mem::ManuallyDrop::new(control_handle),
1668 tx_id: header.tx_id,
1669 },
1670 })
1671 }
1672 0x2efbf7d3dc21438e => {
1673 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1674 let mut req = fidl::new_empty!(
1675 ControllerAddMonitorRequest,
1676 fidl::encoding::DefaultFuchsiaResourceDialect
1677 );
1678 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerAddMonitorRequest>(&header, _body_bytes, handles, &mut req)?;
1679 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1680 Ok(ControllerRequest::AddMonitor {
1681 monitor: req.monitor,
1682
1683 responder: ControllerAddMonitorResponder {
1684 control_handle: std::mem::ManuallyDrop::new(control_handle),
1685 tx_id: header.tx_id,
1686 },
1687 })
1688 }
1689 0x62fe3684ea23af62 => {
1690 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1691 let mut req = fidl::new_empty!(
1692 fidl::encoding::EmptyPayload,
1693 fidl::encoding::DefaultFuchsiaResourceDialect
1694 );
1695 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1696 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1697 Ok(ControllerRequest::Fuzz {
1698 responder: ControllerFuzzResponder {
1699 control_handle: std::mem::ManuallyDrop::new(control_handle),
1700 tx_id: header.tx_id,
1701 },
1702 })
1703 }
1704 0x368dc762d8e16d46 => {
1705 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1706 let mut req = fidl::new_empty!(
1707 ControllerTryOneRequest,
1708 fidl::encoding::DefaultFuchsiaResourceDialect
1709 );
1710 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerTryOneRequest>(&header, _body_bytes, handles, &mut req)?;
1711 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1712 Ok(ControllerRequest::TryOne {
1713 test_input: req.test_input,
1714
1715 responder: ControllerTryOneResponder {
1716 control_handle: std::mem::ManuallyDrop::new(control_handle),
1717 tx_id: header.tx_id,
1718 },
1719 })
1720 }
1721 0x105a242ee0552794 => {
1722 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1723 let mut req = fidl::new_empty!(
1724 ControllerMinimizeRequest,
1725 fidl::encoding::DefaultFuchsiaResourceDialect
1726 );
1727 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerMinimizeRequest>(&header, _body_bytes, handles, &mut req)?;
1728 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1729 Ok(ControllerRequest::Minimize {
1730 test_input: req.test_input,
1731
1732 responder: ControllerMinimizeResponder {
1733 control_handle: std::mem::ManuallyDrop::new(control_handle),
1734 tx_id: header.tx_id,
1735 },
1736 })
1737 }
1738 0x6d7892f62735f3e0 => {
1739 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1740 let mut req = fidl::new_empty!(
1741 ControllerCleanseRequest,
1742 fidl::encoding::DefaultFuchsiaResourceDialect
1743 );
1744 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerCleanseRequest>(&header, _body_bytes, handles, &mut req)?;
1745 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1746 Ok(ControllerRequest::Cleanse {
1747 test_input: req.test_input,
1748
1749 responder: ControllerCleanseResponder {
1750 control_handle: std::mem::ManuallyDrop::new(control_handle),
1751 tx_id: header.tx_id,
1752 },
1753 })
1754 }
1755 0x3614e5c39413b5eb => {
1756 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1757 let mut req = fidl::new_empty!(
1758 fidl::encoding::EmptyPayload,
1759 fidl::encoding::DefaultFuchsiaResourceDialect
1760 );
1761 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1762 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1763 Ok(ControllerRequest::Merge {
1764 responder: ControllerMergeResponder {
1765 control_handle: std::mem::ManuallyDrop::new(control_handle),
1766 tx_id: header.tx_id,
1767 },
1768 })
1769 }
1770 0x51db4975d93ce768 => {
1771 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1772 let mut req = fidl::new_empty!(
1773 fidl::encoding::EmptyPayload,
1774 fidl::encoding::DefaultFuchsiaResourceDialect
1775 );
1776 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1777 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1778 Ok(ControllerRequest::GetStatus {
1779 responder: ControllerGetStatusResponder {
1780 control_handle: std::mem::ManuallyDrop::new(control_handle),
1781 tx_id: header.tx_id,
1782 },
1783 })
1784 }
1785 0x6cfca3730944a414 => {
1786 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1787 let mut req = fidl::new_empty!(
1788 fidl::encoding::EmptyPayload,
1789 fidl::encoding::DefaultFuchsiaResourceDialect
1790 );
1791 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1792 let control_handle = ControllerControlHandle { inner: this.inner.clone() };
1793 Ok(ControllerRequest::WatchArtifact {
1794 responder: ControllerWatchArtifactResponder {
1795 control_handle: std::mem::ManuallyDrop::new(control_handle),
1796 tx_id: header.tx_id,
1797 },
1798 })
1799 }
1800 _ => Err(fidl::Error::UnknownOrdinal {
1801 ordinal: header.ordinal,
1802 protocol_name:
1803 <ControllerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1804 }),
1805 }))
1806 },
1807 )
1808 }
1809}
1810
1811#[derive(Debug)]
1819pub enum ControllerRequest {
1820 Configure { options: Options, responder: ControllerConfigureResponder },
1834 GetOptions { responder: ControllerGetOptionsResponder },
1839 AddToCorpus { corpus: Corpus, input: Input, responder: ControllerAddToCorpusResponder },
1849 ReadCorpus {
1854 corpus: Corpus,
1855 corpus_reader: fidl::endpoints::ClientEnd<CorpusReaderMarker>,
1856 responder: ControllerReadCorpusResponder,
1857 },
1858 WriteDictionary { dictionary: Input, responder: ControllerWriteDictionaryResponder },
1870 ReadDictionary { responder: ControllerReadDictionaryResponder },
1874 AddMonitor {
1879 monitor: fidl::endpoints::ClientEnd<MonitorMarker>,
1880 responder: ControllerAddMonitorResponder,
1881 },
1882 Fuzz { responder: ControllerFuzzResponder },
1903 TryOne { test_input: Input, responder: ControllerTryOneResponder },
1914 Minimize { test_input: Input, responder: ControllerMinimizeResponder },
1929 Cleanse { test_input: Input, responder: ControllerCleanseResponder },
1945 Merge { responder: ControllerMergeResponder },
1959 GetStatus { responder: ControllerGetStatusResponder },
1963 WatchArtifact { responder: ControllerWatchArtifactResponder },
1993}
1994
1995impl ControllerRequest {
1996 #[allow(irrefutable_let_patterns)]
1997 pub fn into_configure(self) -> Option<(Options, ControllerConfigureResponder)> {
1998 if let ControllerRequest::Configure { options, responder } = self {
1999 Some((options, responder))
2000 } else {
2001 None
2002 }
2003 }
2004
2005 #[allow(irrefutable_let_patterns)]
2006 pub fn into_get_options(self) -> Option<(ControllerGetOptionsResponder)> {
2007 if let ControllerRequest::GetOptions { responder } = self {
2008 Some((responder))
2009 } else {
2010 None
2011 }
2012 }
2013
2014 #[allow(irrefutable_let_patterns)]
2015 pub fn into_add_to_corpus(self) -> Option<(Corpus, Input, ControllerAddToCorpusResponder)> {
2016 if let ControllerRequest::AddToCorpus { corpus, input, responder } = self {
2017 Some((corpus, input, responder))
2018 } else {
2019 None
2020 }
2021 }
2022
2023 #[allow(irrefutable_let_patterns)]
2024 pub fn into_read_corpus(
2025 self,
2026 ) -> Option<(
2027 Corpus,
2028 fidl::endpoints::ClientEnd<CorpusReaderMarker>,
2029 ControllerReadCorpusResponder,
2030 )> {
2031 if let ControllerRequest::ReadCorpus { corpus, corpus_reader, responder } = self {
2032 Some((corpus, corpus_reader, responder))
2033 } else {
2034 None
2035 }
2036 }
2037
2038 #[allow(irrefutable_let_patterns)]
2039 pub fn into_write_dictionary(self) -> Option<(Input, ControllerWriteDictionaryResponder)> {
2040 if let ControllerRequest::WriteDictionary { dictionary, responder } = self {
2041 Some((dictionary, responder))
2042 } else {
2043 None
2044 }
2045 }
2046
2047 #[allow(irrefutable_let_patterns)]
2048 pub fn into_read_dictionary(self) -> Option<(ControllerReadDictionaryResponder)> {
2049 if let ControllerRequest::ReadDictionary { responder } = self {
2050 Some((responder))
2051 } else {
2052 None
2053 }
2054 }
2055
2056 #[allow(irrefutable_let_patterns)]
2057 pub fn into_add_monitor(
2058 self,
2059 ) -> Option<(fidl::endpoints::ClientEnd<MonitorMarker>, ControllerAddMonitorResponder)> {
2060 if let ControllerRequest::AddMonitor { monitor, responder } = self {
2061 Some((monitor, responder))
2062 } else {
2063 None
2064 }
2065 }
2066
2067 #[allow(irrefutable_let_patterns)]
2068 pub fn into_fuzz(self) -> Option<(ControllerFuzzResponder)> {
2069 if let ControllerRequest::Fuzz { responder } = self {
2070 Some((responder))
2071 } else {
2072 None
2073 }
2074 }
2075
2076 #[allow(irrefutable_let_patterns)]
2077 pub fn into_try_one(self) -> Option<(Input, ControllerTryOneResponder)> {
2078 if let ControllerRequest::TryOne { 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_minimize(self) -> Option<(Input, ControllerMinimizeResponder)> {
2087 if let ControllerRequest::Minimize { 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_cleanse(self) -> Option<(Input, ControllerCleanseResponder)> {
2096 if let ControllerRequest::Cleanse { test_input, responder } = self {
2097 Some((test_input, responder))
2098 } else {
2099 None
2100 }
2101 }
2102
2103 #[allow(irrefutable_let_patterns)]
2104 pub fn into_merge(self) -> Option<(ControllerMergeResponder)> {
2105 if let ControllerRequest::Merge { responder } = self {
2106 Some((responder))
2107 } else {
2108 None
2109 }
2110 }
2111
2112 #[allow(irrefutable_let_patterns)]
2113 pub fn into_get_status(self) -> Option<(ControllerGetStatusResponder)> {
2114 if let ControllerRequest::GetStatus { responder } = self {
2115 Some((responder))
2116 } else {
2117 None
2118 }
2119 }
2120
2121 #[allow(irrefutable_let_patterns)]
2122 pub fn into_watch_artifact(self) -> Option<(ControllerWatchArtifactResponder)> {
2123 if let ControllerRequest::WatchArtifact { responder } = self {
2124 Some((responder))
2125 } else {
2126 None
2127 }
2128 }
2129
2130 pub fn method_name(&self) -> &'static str {
2132 match *self {
2133 ControllerRequest::Configure { .. } => "configure",
2134 ControllerRequest::GetOptions { .. } => "get_options",
2135 ControllerRequest::AddToCorpus { .. } => "add_to_corpus",
2136 ControllerRequest::ReadCorpus { .. } => "read_corpus",
2137 ControllerRequest::WriteDictionary { .. } => "write_dictionary",
2138 ControllerRequest::ReadDictionary { .. } => "read_dictionary",
2139 ControllerRequest::AddMonitor { .. } => "add_monitor",
2140 ControllerRequest::Fuzz { .. } => "fuzz",
2141 ControllerRequest::TryOne { .. } => "try_one",
2142 ControllerRequest::Minimize { .. } => "minimize",
2143 ControllerRequest::Cleanse { .. } => "cleanse",
2144 ControllerRequest::Merge { .. } => "merge",
2145 ControllerRequest::GetStatus { .. } => "get_status",
2146 ControllerRequest::WatchArtifact { .. } => "watch_artifact",
2147 }
2148 }
2149}
2150
2151#[derive(Debug, Clone)]
2152pub struct ControllerControlHandle {
2153 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2154}
2155
2156impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2157 fn shutdown(&self) {
2158 self.inner.shutdown()
2159 }
2160 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2161 self.inner.shutdown_with_epitaph(status)
2162 }
2163
2164 fn is_closed(&self) -> bool {
2165 self.inner.channel().is_closed()
2166 }
2167 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2168 self.inner.channel().on_closed()
2169 }
2170
2171 #[cfg(target_os = "fuchsia")]
2172 fn signal_peer(
2173 &self,
2174 clear_mask: zx::Signals,
2175 set_mask: zx::Signals,
2176 ) -> Result<(), zx_status::Status> {
2177 use fidl::Peered;
2178 self.inner.channel().signal_peer(clear_mask, set_mask)
2179 }
2180}
2181
2182impl ControllerControlHandle {}
2183
2184#[must_use = "FIDL methods require a response to be sent"]
2185#[derive(Debug)]
2186pub struct ControllerConfigureResponder {
2187 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2188 tx_id: u32,
2189}
2190
2191impl std::ops::Drop for ControllerConfigureResponder {
2195 fn drop(&mut self) {
2196 self.control_handle.shutdown();
2197 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2199 }
2200}
2201
2202impl fidl::endpoints::Responder for ControllerConfigureResponder {
2203 type ControlHandle = ControllerControlHandle;
2204
2205 fn control_handle(&self) -> &ControllerControlHandle {
2206 &self.control_handle
2207 }
2208
2209 fn drop_without_shutdown(mut self) {
2210 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2212 std::mem::forget(self);
2214 }
2215}
2216
2217impl ControllerConfigureResponder {
2218 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2222 let _result = self.send_raw(result);
2223 if _result.is_err() {
2224 self.control_handle.shutdown();
2225 }
2226 self.drop_without_shutdown();
2227 _result
2228 }
2229
2230 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2232 let _result = self.send_raw(result);
2233 self.drop_without_shutdown();
2234 _result
2235 }
2236
2237 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2238 self.control_handle
2239 .inner
2240 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2241 result,
2242 self.tx_id,
2243 0x35c8cba7fa3d32e4,
2244 fidl::encoding::DynamicFlags::empty(),
2245 )
2246 }
2247}
2248
2249#[must_use = "FIDL methods require a response to be sent"]
2250#[derive(Debug)]
2251pub struct ControllerGetOptionsResponder {
2252 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2253 tx_id: u32,
2254}
2255
2256impl std::ops::Drop for ControllerGetOptionsResponder {
2260 fn drop(&mut self) {
2261 self.control_handle.shutdown();
2262 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2264 }
2265}
2266
2267impl fidl::endpoints::Responder for ControllerGetOptionsResponder {
2268 type ControlHandle = ControllerControlHandle;
2269
2270 fn control_handle(&self) -> &ControllerControlHandle {
2271 &self.control_handle
2272 }
2273
2274 fn drop_without_shutdown(mut self) {
2275 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2277 std::mem::forget(self);
2279 }
2280}
2281
2282impl ControllerGetOptionsResponder {
2283 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
2287 let _result = self.send_raw(options);
2288 if _result.is_err() {
2289 self.control_handle.shutdown();
2290 }
2291 self.drop_without_shutdown();
2292 _result
2293 }
2294
2295 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
2297 let _result = self.send_raw(options);
2298 self.drop_without_shutdown();
2299 _result
2300 }
2301
2302 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
2303 self.control_handle.inner.send::<ControllerGetOptionsResponse>(
2304 (options,),
2305 self.tx_id,
2306 0x683d93332504b9cd,
2307 fidl::encoding::DynamicFlags::empty(),
2308 )
2309 }
2310}
2311
2312#[must_use = "FIDL methods require a response to be sent"]
2313#[derive(Debug)]
2314pub struct ControllerAddToCorpusResponder {
2315 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2316 tx_id: u32,
2317}
2318
2319impl std::ops::Drop for ControllerAddToCorpusResponder {
2323 fn drop(&mut self) {
2324 self.control_handle.shutdown();
2325 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2327 }
2328}
2329
2330impl fidl::endpoints::Responder for ControllerAddToCorpusResponder {
2331 type ControlHandle = ControllerControlHandle;
2332
2333 fn control_handle(&self) -> &ControllerControlHandle {
2334 &self.control_handle
2335 }
2336
2337 fn drop_without_shutdown(mut self) {
2338 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2340 std::mem::forget(self);
2342 }
2343}
2344
2345impl ControllerAddToCorpusResponder {
2346 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2350 let _result = self.send_raw(result);
2351 if _result.is_err() {
2352 self.control_handle.shutdown();
2353 }
2354 self.drop_without_shutdown();
2355 _result
2356 }
2357
2358 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2360 let _result = self.send_raw(result);
2361 self.drop_without_shutdown();
2362 _result
2363 }
2364
2365 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2366 self.control_handle
2367 .inner
2368 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2369 result,
2370 self.tx_id,
2371 0x7bdf8336ab534cee,
2372 fidl::encoding::DynamicFlags::empty(),
2373 )
2374 }
2375}
2376
2377#[must_use = "FIDL methods require a response to be sent"]
2378#[derive(Debug)]
2379pub struct ControllerReadCorpusResponder {
2380 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2381 tx_id: u32,
2382}
2383
2384impl std::ops::Drop for ControllerReadCorpusResponder {
2388 fn drop(&mut self) {
2389 self.control_handle.shutdown();
2390 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2392 }
2393}
2394
2395impl fidl::endpoints::Responder for ControllerReadCorpusResponder {
2396 type ControlHandle = ControllerControlHandle;
2397
2398 fn control_handle(&self) -> &ControllerControlHandle {
2399 &self.control_handle
2400 }
2401
2402 fn drop_without_shutdown(mut self) {
2403 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2405 std::mem::forget(self);
2407 }
2408}
2409
2410impl ControllerReadCorpusResponder {
2411 pub fn send(self) -> Result<(), fidl::Error> {
2415 let _result = self.send_raw();
2416 if _result.is_err() {
2417 self.control_handle.shutdown();
2418 }
2419 self.drop_without_shutdown();
2420 _result
2421 }
2422
2423 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2425 let _result = self.send_raw();
2426 self.drop_without_shutdown();
2427 _result
2428 }
2429
2430 fn send_raw(&self) -> Result<(), fidl::Error> {
2431 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2432 (),
2433 self.tx_id,
2434 0x501279b430b34514,
2435 fidl::encoding::DynamicFlags::empty(),
2436 )
2437 }
2438}
2439
2440#[must_use = "FIDL methods require a response to be sent"]
2441#[derive(Debug)]
2442pub struct ControllerWriteDictionaryResponder {
2443 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2444 tx_id: u32,
2445}
2446
2447impl std::ops::Drop for ControllerWriteDictionaryResponder {
2451 fn drop(&mut self) {
2452 self.control_handle.shutdown();
2453 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2455 }
2456}
2457
2458impl fidl::endpoints::Responder for ControllerWriteDictionaryResponder {
2459 type ControlHandle = ControllerControlHandle;
2460
2461 fn control_handle(&self) -> &ControllerControlHandle {
2462 &self.control_handle
2463 }
2464
2465 fn drop_without_shutdown(mut self) {
2466 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2468 std::mem::forget(self);
2470 }
2471}
2472
2473impl ControllerWriteDictionaryResponder {
2474 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2478 let _result = self.send_raw(result);
2479 if _result.is_err() {
2480 self.control_handle.shutdown();
2481 }
2482 self.drop_without_shutdown();
2483 _result
2484 }
2485
2486 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2488 let _result = self.send_raw(result);
2489 self.drop_without_shutdown();
2490 _result
2491 }
2492
2493 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2494 self.control_handle
2495 .inner
2496 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2497 result,
2498 self.tx_id,
2499 0x4ecfc1274fe4a70b,
2500 fidl::encoding::DynamicFlags::empty(),
2501 )
2502 }
2503}
2504
2505#[must_use = "FIDL methods require a response to be sent"]
2506#[derive(Debug)]
2507pub struct ControllerReadDictionaryResponder {
2508 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2509 tx_id: u32,
2510}
2511
2512impl std::ops::Drop for ControllerReadDictionaryResponder {
2516 fn drop(&mut self) {
2517 self.control_handle.shutdown();
2518 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2520 }
2521}
2522
2523impl fidl::endpoints::Responder for ControllerReadDictionaryResponder {
2524 type ControlHandle = ControllerControlHandle;
2525
2526 fn control_handle(&self) -> &ControllerControlHandle {
2527 &self.control_handle
2528 }
2529
2530 fn drop_without_shutdown(mut self) {
2531 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2533 std::mem::forget(self);
2535 }
2536}
2537
2538impl ControllerReadDictionaryResponder {
2539 pub fn send(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2543 let _result = self.send_raw(dictionary);
2544 if _result.is_err() {
2545 self.control_handle.shutdown();
2546 }
2547 self.drop_without_shutdown();
2548 _result
2549 }
2550
2551 pub fn send_no_shutdown_on_err(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2553 let _result = self.send_raw(dictionary);
2554 self.drop_without_shutdown();
2555 _result
2556 }
2557
2558 fn send_raw(&self, mut dictionary: Input) -> Result<(), fidl::Error> {
2559 self.control_handle.inner.send::<ControllerReadDictionaryResponse>(
2560 (&mut dictionary,),
2561 self.tx_id,
2562 0x1be6724c87b51c37,
2563 fidl::encoding::DynamicFlags::empty(),
2564 )
2565 }
2566}
2567
2568#[must_use = "FIDL methods require a response to be sent"]
2569#[derive(Debug)]
2570pub struct ControllerAddMonitorResponder {
2571 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2572 tx_id: u32,
2573}
2574
2575impl std::ops::Drop for ControllerAddMonitorResponder {
2579 fn drop(&mut self) {
2580 self.control_handle.shutdown();
2581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2583 }
2584}
2585
2586impl fidl::endpoints::Responder for ControllerAddMonitorResponder {
2587 type ControlHandle = ControllerControlHandle;
2588
2589 fn control_handle(&self) -> &ControllerControlHandle {
2590 &self.control_handle
2591 }
2592
2593 fn drop_without_shutdown(mut self) {
2594 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2596 std::mem::forget(self);
2598 }
2599}
2600
2601impl ControllerAddMonitorResponder {
2602 pub fn send(self) -> Result<(), fidl::Error> {
2606 let _result = self.send_raw();
2607 if _result.is_err() {
2608 self.control_handle.shutdown();
2609 }
2610 self.drop_without_shutdown();
2611 _result
2612 }
2613
2614 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2616 let _result = self.send_raw();
2617 self.drop_without_shutdown();
2618 _result
2619 }
2620
2621 fn send_raw(&self) -> Result<(), fidl::Error> {
2622 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2623 (),
2624 self.tx_id,
2625 0x2efbf7d3dc21438e,
2626 fidl::encoding::DynamicFlags::empty(),
2627 )
2628 }
2629}
2630
2631#[must_use = "FIDL methods require a response to be sent"]
2632#[derive(Debug)]
2633pub struct ControllerFuzzResponder {
2634 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2635 tx_id: u32,
2636}
2637
2638impl std::ops::Drop for ControllerFuzzResponder {
2642 fn drop(&mut self) {
2643 self.control_handle.shutdown();
2644 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2646 }
2647}
2648
2649impl fidl::endpoints::Responder for ControllerFuzzResponder {
2650 type ControlHandle = ControllerControlHandle;
2651
2652 fn control_handle(&self) -> &ControllerControlHandle {
2653 &self.control_handle
2654 }
2655
2656 fn drop_without_shutdown(mut self) {
2657 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2659 std::mem::forget(self);
2661 }
2662}
2663
2664impl ControllerFuzzResponder {
2665 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2669 let _result = self.send_raw(result);
2670 if _result.is_err() {
2671 self.control_handle.shutdown();
2672 }
2673 self.drop_without_shutdown();
2674 _result
2675 }
2676
2677 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2679 let _result = self.send_raw(result);
2680 self.drop_without_shutdown();
2681 _result
2682 }
2683
2684 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2685 self.control_handle
2686 .inner
2687 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2688 result,
2689 self.tx_id,
2690 0x62fe3684ea23af62,
2691 fidl::encoding::DynamicFlags::empty(),
2692 )
2693 }
2694}
2695
2696#[must_use = "FIDL methods require a response to be sent"]
2697#[derive(Debug)]
2698pub struct ControllerTryOneResponder {
2699 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2700 tx_id: u32,
2701}
2702
2703impl std::ops::Drop for ControllerTryOneResponder {
2707 fn drop(&mut self) {
2708 self.control_handle.shutdown();
2709 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2711 }
2712}
2713
2714impl fidl::endpoints::Responder for ControllerTryOneResponder {
2715 type ControlHandle = ControllerControlHandle;
2716
2717 fn control_handle(&self) -> &ControllerControlHandle {
2718 &self.control_handle
2719 }
2720
2721 fn drop_without_shutdown(mut self) {
2722 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2724 std::mem::forget(self);
2726 }
2727}
2728
2729impl ControllerTryOneResponder {
2730 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2734 let _result = self.send_raw(result);
2735 if _result.is_err() {
2736 self.control_handle.shutdown();
2737 }
2738 self.drop_without_shutdown();
2739 _result
2740 }
2741
2742 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2744 let _result = self.send_raw(result);
2745 self.drop_without_shutdown();
2746 _result
2747 }
2748
2749 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2750 self.control_handle
2751 .inner
2752 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2753 result,
2754 self.tx_id,
2755 0x368dc762d8e16d46,
2756 fidl::encoding::DynamicFlags::empty(),
2757 )
2758 }
2759}
2760
2761#[must_use = "FIDL methods require a response to be sent"]
2762#[derive(Debug)]
2763pub struct ControllerMinimizeResponder {
2764 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2765 tx_id: u32,
2766}
2767
2768impl std::ops::Drop for ControllerMinimizeResponder {
2772 fn drop(&mut self) {
2773 self.control_handle.shutdown();
2774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2776 }
2777}
2778
2779impl fidl::endpoints::Responder for ControllerMinimizeResponder {
2780 type ControlHandle = ControllerControlHandle;
2781
2782 fn control_handle(&self) -> &ControllerControlHandle {
2783 &self.control_handle
2784 }
2785
2786 fn drop_without_shutdown(mut self) {
2787 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2789 std::mem::forget(self);
2791 }
2792}
2793
2794impl ControllerMinimizeResponder {
2795 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2799 let _result = self.send_raw(result);
2800 if _result.is_err() {
2801 self.control_handle.shutdown();
2802 }
2803 self.drop_without_shutdown();
2804 _result
2805 }
2806
2807 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2809 let _result = self.send_raw(result);
2810 self.drop_without_shutdown();
2811 _result
2812 }
2813
2814 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2815 self.control_handle
2816 .inner
2817 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2818 result,
2819 self.tx_id,
2820 0x105a242ee0552794,
2821 fidl::encoding::DynamicFlags::empty(),
2822 )
2823 }
2824}
2825
2826#[must_use = "FIDL methods require a response to be sent"]
2827#[derive(Debug)]
2828pub struct ControllerCleanseResponder {
2829 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2830 tx_id: u32,
2831}
2832
2833impl std::ops::Drop for ControllerCleanseResponder {
2837 fn drop(&mut self) {
2838 self.control_handle.shutdown();
2839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2841 }
2842}
2843
2844impl fidl::endpoints::Responder for ControllerCleanseResponder {
2845 type ControlHandle = ControllerControlHandle;
2846
2847 fn control_handle(&self) -> &ControllerControlHandle {
2848 &self.control_handle
2849 }
2850
2851 fn drop_without_shutdown(mut self) {
2852 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2854 std::mem::forget(self);
2856 }
2857}
2858
2859impl ControllerCleanseResponder {
2860 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2864 let _result = self.send_raw(result);
2865 if _result.is_err() {
2866 self.control_handle.shutdown();
2867 }
2868 self.drop_without_shutdown();
2869 _result
2870 }
2871
2872 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2874 let _result = self.send_raw(result);
2875 self.drop_without_shutdown();
2876 _result
2877 }
2878
2879 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2880 self.control_handle
2881 .inner
2882 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2883 result,
2884 self.tx_id,
2885 0x6d7892f62735f3e0,
2886 fidl::encoding::DynamicFlags::empty(),
2887 )
2888 }
2889}
2890
2891#[must_use = "FIDL methods require a response to be sent"]
2892#[derive(Debug)]
2893pub struct ControllerMergeResponder {
2894 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2895 tx_id: u32,
2896}
2897
2898impl std::ops::Drop for ControllerMergeResponder {
2902 fn drop(&mut self) {
2903 self.control_handle.shutdown();
2904 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2906 }
2907}
2908
2909impl fidl::endpoints::Responder for ControllerMergeResponder {
2910 type ControlHandle = ControllerControlHandle;
2911
2912 fn control_handle(&self) -> &ControllerControlHandle {
2913 &self.control_handle
2914 }
2915
2916 fn drop_without_shutdown(mut self) {
2917 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2919 std::mem::forget(self);
2921 }
2922}
2923
2924impl ControllerMergeResponder {
2925 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2929 let _result = self.send_raw(result);
2930 if _result.is_err() {
2931 self.control_handle.shutdown();
2932 }
2933 self.drop_without_shutdown();
2934 _result
2935 }
2936
2937 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2939 let _result = self.send_raw(result);
2940 self.drop_without_shutdown();
2941 _result
2942 }
2943
2944 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2945 self.control_handle
2946 .inner
2947 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2948 result,
2949 self.tx_id,
2950 0x3614e5c39413b5eb,
2951 fidl::encoding::DynamicFlags::empty(),
2952 )
2953 }
2954}
2955
2956#[must_use = "FIDL methods require a response to be sent"]
2957#[derive(Debug)]
2958pub struct ControllerGetStatusResponder {
2959 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2960 tx_id: u32,
2961}
2962
2963impl std::ops::Drop for ControllerGetStatusResponder {
2967 fn drop(&mut self) {
2968 self.control_handle.shutdown();
2969 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2971 }
2972}
2973
2974impl fidl::endpoints::Responder for ControllerGetStatusResponder {
2975 type ControlHandle = ControllerControlHandle;
2976
2977 fn control_handle(&self) -> &ControllerControlHandle {
2978 &self.control_handle
2979 }
2980
2981 fn drop_without_shutdown(mut self) {
2982 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2984 std::mem::forget(self);
2986 }
2987}
2988
2989impl ControllerGetStatusResponder {
2990 pub fn send(self, mut status: &Status) -> Result<(), fidl::Error> {
2994 let _result = self.send_raw(status);
2995 if _result.is_err() {
2996 self.control_handle.shutdown();
2997 }
2998 self.drop_without_shutdown();
2999 _result
3000 }
3001
3002 pub fn send_no_shutdown_on_err(self, mut status: &Status) -> Result<(), fidl::Error> {
3004 let _result = self.send_raw(status);
3005 self.drop_without_shutdown();
3006 _result
3007 }
3008
3009 fn send_raw(&self, mut status: &Status) -> Result<(), fidl::Error> {
3010 self.control_handle.inner.send::<ControllerGetStatusResponse>(
3011 (status,),
3012 self.tx_id,
3013 0x51db4975d93ce768,
3014 fidl::encoding::DynamicFlags::empty(),
3015 )
3016 }
3017}
3018
3019#[must_use = "FIDL methods require a response to be sent"]
3020#[derive(Debug)]
3021pub struct ControllerWatchArtifactResponder {
3022 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
3023 tx_id: u32,
3024}
3025
3026impl std::ops::Drop for ControllerWatchArtifactResponder {
3030 fn drop(&mut self) {
3031 self.control_handle.shutdown();
3032 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3034 }
3035}
3036
3037impl fidl::endpoints::Responder for ControllerWatchArtifactResponder {
3038 type ControlHandle = ControllerControlHandle;
3039
3040 fn control_handle(&self) -> &ControllerControlHandle {
3041 &self.control_handle
3042 }
3043
3044 fn drop_without_shutdown(mut self) {
3045 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3047 std::mem::forget(self);
3049 }
3050}
3051
3052impl ControllerWatchArtifactResponder {
3053 pub fn send(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3057 let _result = self.send_raw(artifact);
3058 if _result.is_err() {
3059 self.control_handle.shutdown();
3060 }
3061 self.drop_without_shutdown();
3062 _result
3063 }
3064
3065 pub fn send_no_shutdown_on_err(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3067 let _result = self.send_raw(artifact);
3068 self.drop_without_shutdown();
3069 _result
3070 }
3071
3072 fn send_raw(&self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3073 self.control_handle.inner.send::<ControllerWatchArtifactResponse>(
3074 (&mut artifact,),
3075 self.tx_id,
3076 0x6cfca3730944a414,
3077 fidl::encoding::DynamicFlags::empty(),
3078 )
3079 }
3080}
3081
3082#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3083pub struct ControllerProviderMarker;
3084
3085impl fidl::endpoints::ProtocolMarker for ControllerProviderMarker {
3086 type Proxy = ControllerProviderProxy;
3087 type RequestStream = ControllerProviderRequestStream;
3088 #[cfg(target_os = "fuchsia")]
3089 type SynchronousProxy = ControllerProviderSynchronousProxy;
3090
3091 const DEBUG_NAME: &'static str = "(anonymous) ControllerProvider";
3092}
3093
3094pub trait ControllerProviderProxyInterface: Send + Sync {
3095 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
3096 fn r#connect(
3097 &self,
3098 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3099 ) -> Self::ConnectResponseFut;
3100 fn r#stop(&self) -> Result<(), fidl::Error>;
3101}
3102#[derive(Debug)]
3103#[cfg(target_os = "fuchsia")]
3104pub struct ControllerProviderSynchronousProxy {
3105 client: fidl::client::sync::Client,
3106}
3107
3108#[cfg(target_os = "fuchsia")]
3109impl fidl::endpoints::SynchronousProxy for ControllerProviderSynchronousProxy {
3110 type Proxy = ControllerProviderProxy;
3111 type Protocol = ControllerProviderMarker;
3112
3113 fn from_channel(inner: fidl::Channel) -> Self {
3114 Self::new(inner)
3115 }
3116
3117 fn into_channel(self) -> fidl::Channel {
3118 self.client.into_channel()
3119 }
3120
3121 fn as_channel(&self) -> &fidl::Channel {
3122 self.client.as_channel()
3123 }
3124}
3125
3126#[cfg(target_os = "fuchsia")]
3127impl ControllerProviderSynchronousProxy {
3128 pub fn new(channel: fidl::Channel) -> Self {
3129 let protocol_name =
3130 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3131 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3132 }
3133
3134 pub fn into_channel(self) -> fidl::Channel {
3135 self.client.into_channel()
3136 }
3137
3138 pub fn wait_for_event(
3141 &self,
3142 deadline: zx::MonotonicInstant,
3143 ) -> Result<ControllerProviderEvent, fidl::Error> {
3144 ControllerProviderEvent::decode(self.client.wait_for_event(deadline)?)
3145 }
3146
3147 pub fn r#connect(
3160 &self,
3161 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3162 ___deadline: zx::MonotonicInstant,
3163 ) -> Result<(), fidl::Error> {
3164 let _response = self
3165 .client
3166 .send_query::<ControllerProviderConnectRequest, fidl::encoding::EmptyPayload>(
3167 (controller,),
3168 0xc0325f0732defcb,
3169 fidl::encoding::DynamicFlags::empty(),
3170 ___deadline,
3171 )?;
3172 Ok(_response)
3173 }
3174
3175 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3178 self.client.send::<fidl::encoding::EmptyPayload>(
3179 (),
3180 0x6cd6a98fc38bcbf2,
3181 fidl::encoding::DynamicFlags::empty(),
3182 )
3183 }
3184}
3185
3186#[cfg(target_os = "fuchsia")]
3187impl From<ControllerProviderSynchronousProxy> for zx::Handle {
3188 fn from(value: ControllerProviderSynchronousProxy) -> Self {
3189 value.into_channel().into()
3190 }
3191}
3192
3193#[cfg(target_os = "fuchsia")]
3194impl From<fidl::Channel> for ControllerProviderSynchronousProxy {
3195 fn from(value: fidl::Channel) -> Self {
3196 Self::new(value)
3197 }
3198}
3199
3200#[cfg(target_os = "fuchsia")]
3201impl fidl::endpoints::FromClient for ControllerProviderSynchronousProxy {
3202 type Protocol = ControllerProviderMarker;
3203
3204 fn from_client(value: fidl::endpoints::ClientEnd<ControllerProviderMarker>) -> Self {
3205 Self::new(value.into_channel())
3206 }
3207}
3208
3209#[derive(Debug, Clone)]
3210pub struct ControllerProviderProxy {
3211 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3212}
3213
3214impl fidl::endpoints::Proxy for ControllerProviderProxy {
3215 type Protocol = ControllerProviderMarker;
3216
3217 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3218 Self::new(inner)
3219 }
3220
3221 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3222 self.client.into_channel().map_err(|client| Self { client })
3223 }
3224
3225 fn as_channel(&self) -> &::fidl::AsyncChannel {
3226 self.client.as_channel()
3227 }
3228}
3229
3230impl ControllerProviderProxy {
3231 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3233 let protocol_name =
3234 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3235 Self { client: fidl::client::Client::new(channel, protocol_name) }
3236 }
3237
3238 pub fn take_event_stream(&self) -> ControllerProviderEventStream {
3244 ControllerProviderEventStream { event_receiver: self.client.take_event_receiver() }
3245 }
3246
3247 pub fn r#connect(
3260 &self,
3261 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3262 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
3263 ControllerProviderProxyInterface::r#connect(self, controller)
3264 }
3265
3266 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3269 ControllerProviderProxyInterface::r#stop(self)
3270 }
3271}
3272
3273impl ControllerProviderProxyInterface for ControllerProviderProxy {
3274 type ConnectResponseFut =
3275 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3276 fn r#connect(
3277 &self,
3278 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3279 ) -> Self::ConnectResponseFut {
3280 fn _decode(
3281 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3282 ) -> Result<(), fidl::Error> {
3283 let _response = fidl::client::decode_transaction_body::<
3284 fidl::encoding::EmptyPayload,
3285 fidl::encoding::DefaultFuchsiaResourceDialect,
3286 0xc0325f0732defcb,
3287 >(_buf?)?;
3288 Ok(_response)
3289 }
3290 self.client.send_query_and_decode::<ControllerProviderConnectRequest, ()>(
3291 (controller,),
3292 0xc0325f0732defcb,
3293 fidl::encoding::DynamicFlags::empty(),
3294 _decode,
3295 )
3296 }
3297
3298 fn r#stop(&self) -> Result<(), fidl::Error> {
3299 self.client.send::<fidl::encoding::EmptyPayload>(
3300 (),
3301 0x6cd6a98fc38bcbf2,
3302 fidl::encoding::DynamicFlags::empty(),
3303 )
3304 }
3305}
3306
3307pub struct ControllerProviderEventStream {
3308 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3309}
3310
3311impl std::marker::Unpin for ControllerProviderEventStream {}
3312
3313impl futures::stream::FusedStream for ControllerProviderEventStream {
3314 fn is_terminated(&self) -> bool {
3315 self.event_receiver.is_terminated()
3316 }
3317}
3318
3319impl futures::Stream for ControllerProviderEventStream {
3320 type Item = Result<ControllerProviderEvent, fidl::Error>;
3321
3322 fn poll_next(
3323 mut self: std::pin::Pin<&mut Self>,
3324 cx: &mut std::task::Context<'_>,
3325 ) -> std::task::Poll<Option<Self::Item>> {
3326 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3327 &mut self.event_receiver,
3328 cx
3329 )?) {
3330 Some(buf) => std::task::Poll::Ready(Some(ControllerProviderEvent::decode(buf))),
3331 None => std::task::Poll::Ready(None),
3332 }
3333 }
3334}
3335
3336#[derive(Debug)]
3337pub enum ControllerProviderEvent {}
3338
3339impl ControllerProviderEvent {
3340 fn decode(
3342 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3343 ) -> Result<ControllerProviderEvent, fidl::Error> {
3344 let (bytes, _handles) = buf.split_mut();
3345 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3346 debug_assert_eq!(tx_header.tx_id, 0);
3347 match tx_header.ordinal {
3348 _ => Err(fidl::Error::UnknownOrdinal {
3349 ordinal: tx_header.ordinal,
3350 protocol_name:
3351 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3352 }),
3353 }
3354 }
3355}
3356
3357pub struct ControllerProviderRequestStream {
3359 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3360 is_terminated: bool,
3361}
3362
3363impl std::marker::Unpin for ControllerProviderRequestStream {}
3364
3365impl futures::stream::FusedStream for ControllerProviderRequestStream {
3366 fn is_terminated(&self) -> bool {
3367 self.is_terminated
3368 }
3369}
3370
3371impl fidl::endpoints::RequestStream for ControllerProviderRequestStream {
3372 type Protocol = ControllerProviderMarker;
3373 type ControlHandle = ControllerProviderControlHandle;
3374
3375 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3376 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3377 }
3378
3379 fn control_handle(&self) -> Self::ControlHandle {
3380 ControllerProviderControlHandle { inner: self.inner.clone() }
3381 }
3382
3383 fn into_inner(
3384 self,
3385 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3386 {
3387 (self.inner, self.is_terminated)
3388 }
3389
3390 fn from_inner(
3391 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3392 is_terminated: bool,
3393 ) -> Self {
3394 Self { inner, is_terminated }
3395 }
3396}
3397
3398impl futures::Stream for ControllerProviderRequestStream {
3399 type Item = Result<ControllerProviderRequest, fidl::Error>;
3400
3401 fn poll_next(
3402 mut self: std::pin::Pin<&mut Self>,
3403 cx: &mut std::task::Context<'_>,
3404 ) -> std::task::Poll<Option<Self::Item>> {
3405 let this = &mut *self;
3406 if this.inner.check_shutdown(cx) {
3407 this.is_terminated = true;
3408 return std::task::Poll::Ready(None);
3409 }
3410 if this.is_terminated {
3411 panic!("polled ControllerProviderRequestStream after completion");
3412 }
3413 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3414 |bytes, handles| {
3415 match this.inner.channel().read_etc(cx, bytes, handles) {
3416 std::task::Poll::Ready(Ok(())) => {}
3417 std::task::Poll::Pending => return std::task::Poll::Pending,
3418 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3419 this.is_terminated = true;
3420 return std::task::Poll::Ready(None);
3421 }
3422 std::task::Poll::Ready(Err(e)) => {
3423 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3424 e.into(),
3425 ))))
3426 }
3427 }
3428
3429 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3431
3432 std::task::Poll::Ready(Some(match header.ordinal {
3433 0xc0325f0732defcb => {
3434 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3435 let mut req = fidl::new_empty!(ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
3436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerProviderConnectRequest>(&header, _body_bytes, handles, &mut req)?;
3437 let control_handle = ControllerProviderControlHandle {
3438 inner: this.inner.clone(),
3439 };
3440 Ok(ControllerProviderRequest::Connect {controller: req.controller,
3441
3442 responder: ControllerProviderConnectResponder {
3443 control_handle: std::mem::ManuallyDrop::new(control_handle),
3444 tx_id: header.tx_id,
3445 },
3446 })
3447 }
3448 0x6cd6a98fc38bcbf2 => {
3449 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3450 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
3451 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3452 let control_handle = ControllerProviderControlHandle {
3453 inner: this.inner.clone(),
3454 };
3455 Ok(ControllerProviderRequest::Stop {
3456 control_handle,
3457 })
3458 }
3459 _ => Err(fidl::Error::UnknownOrdinal {
3460 ordinal: header.ordinal,
3461 protocol_name: <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3462 }),
3463 }))
3464 },
3465 )
3466 }
3467}
3468
3469#[derive(Debug)]
3479pub enum ControllerProviderRequest {
3480 Connect {
3493 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3494 responder: ControllerProviderConnectResponder,
3495 },
3496 Stop { control_handle: ControllerProviderControlHandle },
3499}
3500
3501impl ControllerProviderRequest {
3502 #[allow(irrefutable_let_patterns)]
3503 pub fn into_connect(
3504 self,
3505 ) -> Option<(fidl::endpoints::ServerEnd<ControllerMarker>, ControllerProviderConnectResponder)>
3506 {
3507 if let ControllerProviderRequest::Connect { controller, responder } = self {
3508 Some((controller, responder))
3509 } else {
3510 None
3511 }
3512 }
3513
3514 #[allow(irrefutable_let_patterns)]
3515 pub fn into_stop(self) -> Option<(ControllerProviderControlHandle)> {
3516 if let ControllerProviderRequest::Stop { control_handle } = self {
3517 Some((control_handle))
3518 } else {
3519 None
3520 }
3521 }
3522
3523 pub fn method_name(&self) -> &'static str {
3525 match *self {
3526 ControllerProviderRequest::Connect { .. } => "connect",
3527 ControllerProviderRequest::Stop { .. } => "stop",
3528 }
3529 }
3530}
3531
3532#[derive(Debug, Clone)]
3533pub struct ControllerProviderControlHandle {
3534 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3535}
3536
3537impl fidl::endpoints::ControlHandle for ControllerProviderControlHandle {
3538 fn shutdown(&self) {
3539 self.inner.shutdown()
3540 }
3541 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3542 self.inner.shutdown_with_epitaph(status)
3543 }
3544
3545 fn is_closed(&self) -> bool {
3546 self.inner.channel().is_closed()
3547 }
3548 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3549 self.inner.channel().on_closed()
3550 }
3551
3552 #[cfg(target_os = "fuchsia")]
3553 fn signal_peer(
3554 &self,
3555 clear_mask: zx::Signals,
3556 set_mask: zx::Signals,
3557 ) -> Result<(), zx_status::Status> {
3558 use fidl::Peered;
3559 self.inner.channel().signal_peer(clear_mask, set_mask)
3560 }
3561}
3562
3563impl ControllerProviderControlHandle {}
3564
3565#[must_use = "FIDL methods require a response to be sent"]
3566#[derive(Debug)]
3567pub struct ControllerProviderConnectResponder {
3568 control_handle: std::mem::ManuallyDrop<ControllerProviderControlHandle>,
3569 tx_id: u32,
3570}
3571
3572impl std::ops::Drop for ControllerProviderConnectResponder {
3576 fn drop(&mut self) {
3577 self.control_handle.shutdown();
3578 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3580 }
3581}
3582
3583impl fidl::endpoints::Responder for ControllerProviderConnectResponder {
3584 type ControlHandle = ControllerProviderControlHandle;
3585
3586 fn control_handle(&self) -> &ControllerProviderControlHandle {
3587 &self.control_handle
3588 }
3589
3590 fn drop_without_shutdown(mut self) {
3591 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3593 std::mem::forget(self);
3595 }
3596}
3597
3598impl ControllerProviderConnectResponder {
3599 pub fn send(self) -> Result<(), fidl::Error> {
3603 let _result = self.send_raw();
3604 if _result.is_err() {
3605 self.control_handle.shutdown();
3606 }
3607 self.drop_without_shutdown();
3608 _result
3609 }
3610
3611 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3613 let _result = self.send_raw();
3614 self.drop_without_shutdown();
3615 _result
3616 }
3617
3618 fn send_raw(&self) -> Result<(), fidl::Error> {
3619 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3620 (),
3621 self.tx_id,
3622 0xc0325f0732defcb,
3623 fidl::encoding::DynamicFlags::empty(),
3624 )
3625 }
3626}
3627
3628#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3629pub struct CorpusReaderMarker;
3630
3631impl fidl::endpoints::ProtocolMarker for CorpusReaderMarker {
3632 type Proxy = CorpusReaderProxy;
3633 type RequestStream = CorpusReaderRequestStream;
3634 #[cfg(target_os = "fuchsia")]
3635 type SynchronousProxy = CorpusReaderSynchronousProxy;
3636
3637 const DEBUG_NAME: &'static str = "(anonymous) CorpusReader";
3638}
3639
3640pub trait CorpusReaderProxyInterface: Send + Sync {
3641 type NextResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
3642 fn r#next(&self, test_input: Input) -> Self::NextResponseFut;
3643}
3644#[derive(Debug)]
3645#[cfg(target_os = "fuchsia")]
3646pub struct CorpusReaderSynchronousProxy {
3647 client: fidl::client::sync::Client,
3648}
3649
3650#[cfg(target_os = "fuchsia")]
3651impl fidl::endpoints::SynchronousProxy for CorpusReaderSynchronousProxy {
3652 type Proxy = CorpusReaderProxy;
3653 type Protocol = CorpusReaderMarker;
3654
3655 fn from_channel(inner: fidl::Channel) -> Self {
3656 Self::new(inner)
3657 }
3658
3659 fn into_channel(self) -> fidl::Channel {
3660 self.client.into_channel()
3661 }
3662
3663 fn as_channel(&self) -> &fidl::Channel {
3664 self.client.as_channel()
3665 }
3666}
3667
3668#[cfg(target_os = "fuchsia")]
3669impl CorpusReaderSynchronousProxy {
3670 pub fn new(channel: fidl::Channel) -> Self {
3671 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3672 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3673 }
3674
3675 pub fn into_channel(self) -> fidl::Channel {
3676 self.client.into_channel()
3677 }
3678
3679 pub fn wait_for_event(
3682 &self,
3683 deadline: zx::MonotonicInstant,
3684 ) -> Result<CorpusReaderEvent, fidl::Error> {
3685 CorpusReaderEvent::decode(self.client.wait_for_event(deadline)?)
3686 }
3687
3688 pub fn r#next(
3696 &self,
3697 mut test_input: Input,
3698 ___deadline: zx::MonotonicInstant,
3699 ) -> Result<i32, fidl::Error> {
3700 let _response =
3701 self.client.send_query::<CorpusReaderNextRequest, CorpusReaderNextResponse>(
3702 (&mut test_input,),
3703 0x68d19e55ea635356,
3704 fidl::encoding::DynamicFlags::empty(),
3705 ___deadline,
3706 )?;
3707 Ok(_response.result)
3708 }
3709}
3710
3711#[cfg(target_os = "fuchsia")]
3712impl From<CorpusReaderSynchronousProxy> for zx::Handle {
3713 fn from(value: CorpusReaderSynchronousProxy) -> Self {
3714 value.into_channel().into()
3715 }
3716}
3717
3718#[cfg(target_os = "fuchsia")]
3719impl From<fidl::Channel> for CorpusReaderSynchronousProxy {
3720 fn from(value: fidl::Channel) -> Self {
3721 Self::new(value)
3722 }
3723}
3724
3725#[cfg(target_os = "fuchsia")]
3726impl fidl::endpoints::FromClient for CorpusReaderSynchronousProxy {
3727 type Protocol = CorpusReaderMarker;
3728
3729 fn from_client(value: fidl::endpoints::ClientEnd<CorpusReaderMarker>) -> Self {
3730 Self::new(value.into_channel())
3731 }
3732}
3733
3734#[derive(Debug, Clone)]
3735pub struct CorpusReaderProxy {
3736 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3737}
3738
3739impl fidl::endpoints::Proxy for CorpusReaderProxy {
3740 type Protocol = CorpusReaderMarker;
3741
3742 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3743 Self::new(inner)
3744 }
3745
3746 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3747 self.client.into_channel().map_err(|client| Self { client })
3748 }
3749
3750 fn as_channel(&self) -> &::fidl::AsyncChannel {
3751 self.client.as_channel()
3752 }
3753}
3754
3755impl CorpusReaderProxy {
3756 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3758 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3759 Self { client: fidl::client::Client::new(channel, protocol_name) }
3760 }
3761
3762 pub fn take_event_stream(&self) -> CorpusReaderEventStream {
3768 CorpusReaderEventStream { event_receiver: self.client.take_event_receiver() }
3769 }
3770
3771 pub fn r#next(
3779 &self,
3780 mut test_input: Input,
3781 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
3782 CorpusReaderProxyInterface::r#next(self, test_input)
3783 }
3784}
3785
3786impl CorpusReaderProxyInterface for CorpusReaderProxy {
3787 type NextResponseFut =
3788 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3789 fn r#next(&self, mut test_input: Input) -> Self::NextResponseFut {
3790 fn _decode(
3791 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3792 ) -> Result<i32, fidl::Error> {
3793 let _response = fidl::client::decode_transaction_body::<
3794 CorpusReaderNextResponse,
3795 fidl::encoding::DefaultFuchsiaResourceDialect,
3796 0x68d19e55ea635356,
3797 >(_buf?)?;
3798 Ok(_response.result)
3799 }
3800 self.client.send_query_and_decode::<CorpusReaderNextRequest, i32>(
3801 (&mut test_input,),
3802 0x68d19e55ea635356,
3803 fidl::encoding::DynamicFlags::empty(),
3804 _decode,
3805 )
3806 }
3807}
3808
3809pub struct CorpusReaderEventStream {
3810 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3811}
3812
3813impl std::marker::Unpin for CorpusReaderEventStream {}
3814
3815impl futures::stream::FusedStream for CorpusReaderEventStream {
3816 fn is_terminated(&self) -> bool {
3817 self.event_receiver.is_terminated()
3818 }
3819}
3820
3821impl futures::Stream for CorpusReaderEventStream {
3822 type Item = Result<CorpusReaderEvent, fidl::Error>;
3823
3824 fn poll_next(
3825 mut self: std::pin::Pin<&mut Self>,
3826 cx: &mut std::task::Context<'_>,
3827 ) -> std::task::Poll<Option<Self::Item>> {
3828 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3829 &mut self.event_receiver,
3830 cx
3831 )?) {
3832 Some(buf) => std::task::Poll::Ready(Some(CorpusReaderEvent::decode(buf))),
3833 None => std::task::Poll::Ready(None),
3834 }
3835 }
3836}
3837
3838#[derive(Debug)]
3839pub enum CorpusReaderEvent {}
3840
3841impl CorpusReaderEvent {
3842 fn decode(
3844 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3845 ) -> Result<CorpusReaderEvent, fidl::Error> {
3846 let (bytes, _handles) = buf.split_mut();
3847 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3848 debug_assert_eq!(tx_header.tx_id, 0);
3849 match tx_header.ordinal {
3850 _ => Err(fidl::Error::UnknownOrdinal {
3851 ordinal: tx_header.ordinal,
3852 protocol_name: <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3853 }),
3854 }
3855 }
3856}
3857
3858pub struct CorpusReaderRequestStream {
3860 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3861 is_terminated: bool,
3862}
3863
3864impl std::marker::Unpin for CorpusReaderRequestStream {}
3865
3866impl futures::stream::FusedStream for CorpusReaderRequestStream {
3867 fn is_terminated(&self) -> bool {
3868 self.is_terminated
3869 }
3870}
3871
3872impl fidl::endpoints::RequestStream for CorpusReaderRequestStream {
3873 type Protocol = CorpusReaderMarker;
3874 type ControlHandle = CorpusReaderControlHandle;
3875
3876 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3877 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3878 }
3879
3880 fn control_handle(&self) -> Self::ControlHandle {
3881 CorpusReaderControlHandle { inner: self.inner.clone() }
3882 }
3883
3884 fn into_inner(
3885 self,
3886 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3887 {
3888 (self.inner, self.is_terminated)
3889 }
3890
3891 fn from_inner(
3892 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3893 is_terminated: bool,
3894 ) -> Self {
3895 Self { inner, is_terminated }
3896 }
3897}
3898
3899impl futures::Stream for CorpusReaderRequestStream {
3900 type Item = Result<CorpusReaderRequest, fidl::Error>;
3901
3902 fn poll_next(
3903 mut self: std::pin::Pin<&mut Self>,
3904 cx: &mut std::task::Context<'_>,
3905 ) -> std::task::Poll<Option<Self::Item>> {
3906 let this = &mut *self;
3907 if this.inner.check_shutdown(cx) {
3908 this.is_terminated = true;
3909 return std::task::Poll::Ready(None);
3910 }
3911 if this.is_terminated {
3912 panic!("polled CorpusReaderRequestStream after completion");
3913 }
3914 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3915 |bytes, handles| {
3916 match this.inner.channel().read_etc(cx, bytes, handles) {
3917 std::task::Poll::Ready(Ok(())) => {}
3918 std::task::Poll::Pending => return std::task::Poll::Pending,
3919 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3920 this.is_terminated = true;
3921 return std::task::Poll::Ready(None);
3922 }
3923 std::task::Poll::Ready(Err(e)) => {
3924 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3925 e.into(),
3926 ))))
3927 }
3928 }
3929
3930 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3932
3933 std::task::Poll::Ready(Some(match header.ordinal {
3934 0x68d19e55ea635356 => {
3935 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3936 let mut req = fidl::new_empty!(
3937 CorpusReaderNextRequest,
3938 fidl::encoding::DefaultFuchsiaResourceDialect
3939 );
3940 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CorpusReaderNextRequest>(&header, _body_bytes, handles, &mut req)?;
3941 let control_handle =
3942 CorpusReaderControlHandle { inner: this.inner.clone() };
3943 Ok(CorpusReaderRequest::Next {
3944 test_input: req.test_input,
3945
3946 responder: CorpusReaderNextResponder {
3947 control_handle: std::mem::ManuallyDrop::new(control_handle),
3948 tx_id: header.tx_id,
3949 },
3950 })
3951 }
3952 _ => Err(fidl::Error::UnknownOrdinal {
3953 ordinal: header.ordinal,
3954 protocol_name:
3955 <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3956 }),
3957 }))
3958 },
3959 )
3960 }
3961}
3962
3963#[derive(Debug)]
3965pub enum CorpusReaderRequest {
3966 Next { test_input: Input, responder: CorpusReaderNextResponder },
3974}
3975
3976impl CorpusReaderRequest {
3977 #[allow(irrefutable_let_patterns)]
3978 pub fn into_next(self) -> Option<(Input, CorpusReaderNextResponder)> {
3979 if let CorpusReaderRequest::Next { test_input, responder } = self {
3980 Some((test_input, responder))
3981 } else {
3982 None
3983 }
3984 }
3985
3986 pub fn method_name(&self) -> &'static str {
3988 match *self {
3989 CorpusReaderRequest::Next { .. } => "next",
3990 }
3991 }
3992}
3993
3994#[derive(Debug, Clone)]
3995pub struct CorpusReaderControlHandle {
3996 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3997}
3998
3999impl fidl::endpoints::ControlHandle for CorpusReaderControlHandle {
4000 fn shutdown(&self) {
4001 self.inner.shutdown()
4002 }
4003 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4004 self.inner.shutdown_with_epitaph(status)
4005 }
4006
4007 fn is_closed(&self) -> bool {
4008 self.inner.channel().is_closed()
4009 }
4010 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4011 self.inner.channel().on_closed()
4012 }
4013
4014 #[cfg(target_os = "fuchsia")]
4015 fn signal_peer(
4016 &self,
4017 clear_mask: zx::Signals,
4018 set_mask: zx::Signals,
4019 ) -> Result<(), zx_status::Status> {
4020 use fidl::Peered;
4021 self.inner.channel().signal_peer(clear_mask, set_mask)
4022 }
4023}
4024
4025impl CorpusReaderControlHandle {}
4026
4027#[must_use = "FIDL methods require a response to be sent"]
4028#[derive(Debug)]
4029pub struct CorpusReaderNextResponder {
4030 control_handle: std::mem::ManuallyDrop<CorpusReaderControlHandle>,
4031 tx_id: u32,
4032}
4033
4034impl std::ops::Drop for CorpusReaderNextResponder {
4038 fn drop(&mut self) {
4039 self.control_handle.shutdown();
4040 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4042 }
4043}
4044
4045impl fidl::endpoints::Responder for CorpusReaderNextResponder {
4046 type ControlHandle = CorpusReaderControlHandle;
4047
4048 fn control_handle(&self) -> &CorpusReaderControlHandle {
4049 &self.control_handle
4050 }
4051
4052 fn drop_without_shutdown(mut self) {
4053 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4055 std::mem::forget(self);
4057 }
4058}
4059
4060impl CorpusReaderNextResponder {
4061 pub fn send(self, mut result: i32) -> Result<(), fidl::Error> {
4065 let _result = self.send_raw(result);
4066 if _result.is_err() {
4067 self.control_handle.shutdown();
4068 }
4069 self.drop_without_shutdown();
4070 _result
4071 }
4072
4073 pub fn send_no_shutdown_on_err(self, mut result: i32) -> Result<(), fidl::Error> {
4075 let _result = self.send_raw(result);
4076 self.drop_without_shutdown();
4077 _result
4078 }
4079
4080 fn send_raw(&self, mut result: i32) -> Result<(), fidl::Error> {
4081 self.control_handle.inner.send::<CorpusReaderNextResponse>(
4082 (result,),
4083 self.tx_id,
4084 0x68d19e55ea635356,
4085 fidl::encoding::DynamicFlags::empty(),
4086 )
4087 }
4088}
4089
4090#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4091pub struct CoverageDataCollectorMarker;
4092
4093impl fidl::endpoints::ProtocolMarker for CoverageDataCollectorMarker {
4094 type Proxy = CoverageDataCollectorProxy;
4095 type RequestStream = CoverageDataCollectorRequestStream;
4096 #[cfg(target_os = "fuchsia")]
4097 type SynchronousProxy = CoverageDataCollectorSynchronousProxy;
4098
4099 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataCollector";
4100}
4101impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataCollectorMarker {}
4102
4103pub trait CoverageDataCollectorProxyInterface: Send + Sync {
4104 type InitializeResponseFut: std::future::Future<Output = Result<Options, fidl::Error>> + Send;
4105 fn r#initialize(
4106 &self,
4107 eventpair: fidl::EventPair,
4108 process: fidl::Process,
4109 ) -> Self::InitializeResponseFut;
4110 type AddInline8bitCountersResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4111 + Send;
4112 fn r#add_inline8bit_counters(
4113 &self,
4114 inline_8bit_counters: fidl::Vmo,
4115 ) -> Self::AddInline8bitCountersResponseFut;
4116}
4117#[derive(Debug)]
4118#[cfg(target_os = "fuchsia")]
4119pub struct CoverageDataCollectorSynchronousProxy {
4120 client: fidl::client::sync::Client,
4121}
4122
4123#[cfg(target_os = "fuchsia")]
4124impl fidl::endpoints::SynchronousProxy for CoverageDataCollectorSynchronousProxy {
4125 type Proxy = CoverageDataCollectorProxy;
4126 type Protocol = CoverageDataCollectorMarker;
4127
4128 fn from_channel(inner: fidl::Channel) -> Self {
4129 Self::new(inner)
4130 }
4131
4132 fn into_channel(self) -> fidl::Channel {
4133 self.client.into_channel()
4134 }
4135
4136 fn as_channel(&self) -> &fidl::Channel {
4137 self.client.as_channel()
4138 }
4139}
4140
4141#[cfg(target_os = "fuchsia")]
4142impl CoverageDataCollectorSynchronousProxy {
4143 pub fn new(channel: fidl::Channel) -> Self {
4144 let protocol_name =
4145 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4146 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4147 }
4148
4149 pub fn into_channel(self) -> fidl::Channel {
4150 self.client.into_channel()
4151 }
4152
4153 pub fn wait_for_event(
4156 &self,
4157 deadline: zx::MonotonicInstant,
4158 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4159 CoverageDataCollectorEvent::decode(self.client.wait_for_event(deadline)?)
4160 }
4161
4162 pub fn r#initialize(
4179 &self,
4180 mut eventpair: fidl::EventPair,
4181 mut process: fidl::Process,
4182 ___deadline: zx::MonotonicInstant,
4183 ) -> Result<Options, fidl::Error> {
4184 let _response = self.client.send_query::<
4185 CoverageDataCollectorInitializeRequest,
4186 CoverageDataCollectorInitializeResponse,
4187 >(
4188 (eventpair, process,),
4189 0x51d6f91d6f02d9d6,
4190 fidl::encoding::DynamicFlags::empty(),
4191 ___deadline,
4192 )?;
4193 Ok(_response.options)
4194 }
4195
4196 pub fn r#add_inline8bit_counters(
4215 &self,
4216 mut inline_8bit_counters: fidl::Vmo,
4217 ___deadline: zx::MonotonicInstant,
4218 ) -> Result<(), fidl::Error> {
4219 let _response = self.client.send_query::<
4220 CoverageDataCollectorAddInline8bitCountersRequest,
4221 fidl::encoding::EmptyPayload,
4222 >(
4223 (inline_8bit_counters,),
4224 0x75f87cadfc94d1be,
4225 fidl::encoding::DynamicFlags::empty(),
4226 ___deadline,
4227 )?;
4228 Ok(_response)
4229 }
4230}
4231
4232#[cfg(target_os = "fuchsia")]
4233impl From<CoverageDataCollectorSynchronousProxy> for zx::Handle {
4234 fn from(value: CoverageDataCollectorSynchronousProxy) -> Self {
4235 value.into_channel().into()
4236 }
4237}
4238
4239#[cfg(target_os = "fuchsia")]
4240impl From<fidl::Channel> for CoverageDataCollectorSynchronousProxy {
4241 fn from(value: fidl::Channel) -> Self {
4242 Self::new(value)
4243 }
4244}
4245
4246#[cfg(target_os = "fuchsia")]
4247impl fidl::endpoints::FromClient for CoverageDataCollectorSynchronousProxy {
4248 type Protocol = CoverageDataCollectorMarker;
4249
4250 fn from_client(value: fidl::endpoints::ClientEnd<CoverageDataCollectorMarker>) -> Self {
4251 Self::new(value.into_channel())
4252 }
4253}
4254
4255#[derive(Debug, Clone)]
4256pub struct CoverageDataCollectorProxy {
4257 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4258}
4259
4260impl fidl::endpoints::Proxy for CoverageDataCollectorProxy {
4261 type Protocol = CoverageDataCollectorMarker;
4262
4263 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4264 Self::new(inner)
4265 }
4266
4267 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4268 self.client.into_channel().map_err(|client| Self { client })
4269 }
4270
4271 fn as_channel(&self) -> &::fidl::AsyncChannel {
4272 self.client.as_channel()
4273 }
4274}
4275
4276impl CoverageDataCollectorProxy {
4277 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4279 let protocol_name =
4280 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4281 Self { client: fidl::client::Client::new(channel, protocol_name) }
4282 }
4283
4284 pub fn take_event_stream(&self) -> CoverageDataCollectorEventStream {
4290 CoverageDataCollectorEventStream { event_receiver: self.client.take_event_receiver() }
4291 }
4292
4293 pub fn r#initialize(
4310 &self,
4311 mut eventpair: fidl::EventPair,
4312 mut process: fidl::Process,
4313 ) -> fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
4314 {
4315 CoverageDataCollectorProxyInterface::r#initialize(self, eventpair, process)
4316 }
4317
4318 pub fn r#add_inline8bit_counters(
4337 &self,
4338 mut inline_8bit_counters: fidl::Vmo,
4339 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4340 CoverageDataCollectorProxyInterface::r#add_inline8bit_counters(self, inline_8bit_counters)
4341 }
4342}
4343
4344impl CoverageDataCollectorProxyInterface for CoverageDataCollectorProxy {
4345 type InitializeResponseFut =
4346 fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>;
4347 fn r#initialize(
4348 &self,
4349 mut eventpair: fidl::EventPair,
4350 mut process: fidl::Process,
4351 ) -> Self::InitializeResponseFut {
4352 fn _decode(
4353 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4354 ) -> Result<Options, fidl::Error> {
4355 let _response = fidl::client::decode_transaction_body::<
4356 CoverageDataCollectorInitializeResponse,
4357 fidl::encoding::DefaultFuchsiaResourceDialect,
4358 0x51d6f91d6f02d9d6,
4359 >(_buf?)?;
4360 Ok(_response.options)
4361 }
4362 self.client.send_query_and_decode::<CoverageDataCollectorInitializeRequest, Options>(
4363 (eventpair, process),
4364 0x51d6f91d6f02d9d6,
4365 fidl::encoding::DynamicFlags::empty(),
4366 _decode,
4367 )
4368 }
4369
4370 type AddInline8bitCountersResponseFut =
4371 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4372 fn r#add_inline8bit_counters(
4373 &self,
4374 mut inline_8bit_counters: fidl::Vmo,
4375 ) -> Self::AddInline8bitCountersResponseFut {
4376 fn _decode(
4377 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4378 ) -> Result<(), fidl::Error> {
4379 let _response = fidl::client::decode_transaction_body::<
4380 fidl::encoding::EmptyPayload,
4381 fidl::encoding::DefaultFuchsiaResourceDialect,
4382 0x75f87cadfc94d1be,
4383 >(_buf?)?;
4384 Ok(_response)
4385 }
4386 self.client.send_query_and_decode::<CoverageDataCollectorAddInline8bitCountersRequest, ()>(
4387 (inline_8bit_counters,),
4388 0x75f87cadfc94d1be,
4389 fidl::encoding::DynamicFlags::empty(),
4390 _decode,
4391 )
4392 }
4393}
4394
4395pub struct CoverageDataCollectorEventStream {
4396 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4397}
4398
4399impl std::marker::Unpin for CoverageDataCollectorEventStream {}
4400
4401impl futures::stream::FusedStream for CoverageDataCollectorEventStream {
4402 fn is_terminated(&self) -> bool {
4403 self.event_receiver.is_terminated()
4404 }
4405}
4406
4407impl futures::Stream for CoverageDataCollectorEventStream {
4408 type Item = Result<CoverageDataCollectorEvent, fidl::Error>;
4409
4410 fn poll_next(
4411 mut self: std::pin::Pin<&mut Self>,
4412 cx: &mut std::task::Context<'_>,
4413 ) -> std::task::Poll<Option<Self::Item>> {
4414 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4415 &mut self.event_receiver,
4416 cx
4417 )?) {
4418 Some(buf) => std::task::Poll::Ready(Some(CoverageDataCollectorEvent::decode(buf))),
4419 None => std::task::Poll::Ready(None),
4420 }
4421 }
4422}
4423
4424#[derive(Debug)]
4425pub enum CoverageDataCollectorEvent {}
4426
4427impl CoverageDataCollectorEvent {
4428 fn decode(
4430 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4431 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4432 let (bytes, _handles) = buf.split_mut();
4433 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4434 debug_assert_eq!(tx_header.tx_id, 0);
4435 match tx_header.ordinal {
4436 _ => Err(fidl::Error::UnknownOrdinal {
4437 ordinal: tx_header.ordinal,
4438 protocol_name:
4439 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4440 }),
4441 }
4442 }
4443}
4444
4445pub struct CoverageDataCollectorRequestStream {
4447 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4448 is_terminated: bool,
4449}
4450
4451impl std::marker::Unpin for CoverageDataCollectorRequestStream {}
4452
4453impl futures::stream::FusedStream for CoverageDataCollectorRequestStream {
4454 fn is_terminated(&self) -> bool {
4455 self.is_terminated
4456 }
4457}
4458
4459impl fidl::endpoints::RequestStream for CoverageDataCollectorRequestStream {
4460 type Protocol = CoverageDataCollectorMarker;
4461 type ControlHandle = CoverageDataCollectorControlHandle;
4462
4463 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4464 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4465 }
4466
4467 fn control_handle(&self) -> Self::ControlHandle {
4468 CoverageDataCollectorControlHandle { inner: self.inner.clone() }
4469 }
4470
4471 fn into_inner(
4472 self,
4473 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4474 {
4475 (self.inner, self.is_terminated)
4476 }
4477
4478 fn from_inner(
4479 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4480 is_terminated: bool,
4481 ) -> Self {
4482 Self { inner, is_terminated }
4483 }
4484}
4485
4486impl futures::Stream for CoverageDataCollectorRequestStream {
4487 type Item = Result<CoverageDataCollectorRequest, fidl::Error>;
4488
4489 fn poll_next(
4490 mut self: std::pin::Pin<&mut Self>,
4491 cx: &mut std::task::Context<'_>,
4492 ) -> std::task::Poll<Option<Self::Item>> {
4493 let this = &mut *self;
4494 if this.inner.check_shutdown(cx) {
4495 this.is_terminated = true;
4496 return std::task::Poll::Ready(None);
4497 }
4498 if this.is_terminated {
4499 panic!("polled CoverageDataCollectorRequestStream after completion");
4500 }
4501 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4502 |bytes, handles| {
4503 match this.inner.channel().read_etc(cx, bytes, handles) {
4504 std::task::Poll::Ready(Ok(())) => {}
4505 std::task::Poll::Pending => return std::task::Poll::Pending,
4506 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4507 this.is_terminated = true;
4508 return std::task::Poll::Ready(None);
4509 }
4510 std::task::Poll::Ready(Err(e)) => {
4511 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4512 e.into(),
4513 ))))
4514 }
4515 }
4516
4517 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4519
4520 std::task::Poll::Ready(Some(match header.ordinal {
4521 0x51d6f91d6f02d9d6 => {
4522 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4523 let mut req = fidl::new_empty!(CoverageDataCollectorInitializeRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4524 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorInitializeRequest>(&header, _body_bytes, handles, &mut req)?;
4525 let control_handle = CoverageDataCollectorControlHandle {
4526 inner: this.inner.clone(),
4527 };
4528 Ok(CoverageDataCollectorRequest::Initialize {eventpair: req.eventpair,
4529process: req.process,
4530
4531 responder: CoverageDataCollectorInitializeResponder {
4532 control_handle: std::mem::ManuallyDrop::new(control_handle),
4533 tx_id: header.tx_id,
4534 },
4535 })
4536 }
4537 0x75f87cadfc94d1be => {
4538 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4539 let mut req = fidl::new_empty!(CoverageDataCollectorAddInline8bitCountersRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4540 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorAddInline8bitCountersRequest>(&header, _body_bytes, handles, &mut req)?;
4541 let control_handle = CoverageDataCollectorControlHandle {
4542 inner: this.inner.clone(),
4543 };
4544 Ok(CoverageDataCollectorRequest::AddInline8bitCounters {inline_8bit_counters: req.inline_8bit_counters,
4545
4546 responder: CoverageDataCollectorAddInline8bitCountersResponder {
4547 control_handle: std::mem::ManuallyDrop::new(control_handle),
4548 tx_id: header.tx_id,
4549 },
4550 })
4551 }
4552 _ => Err(fidl::Error::UnknownOrdinal {
4553 ordinal: header.ordinal,
4554 protocol_name: <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4555 }),
4556 }))
4557 },
4558 )
4559 }
4560}
4561
4562#[derive(Debug)]
4569pub enum CoverageDataCollectorRequest {
4570 Initialize {
4587 eventpair: fidl::EventPair,
4588 process: fidl::Process,
4589 responder: CoverageDataCollectorInitializeResponder,
4590 },
4591 AddInline8bitCounters {
4610 inline_8bit_counters: fidl::Vmo,
4611 responder: CoverageDataCollectorAddInline8bitCountersResponder,
4612 },
4613}
4614
4615impl CoverageDataCollectorRequest {
4616 #[allow(irrefutable_let_patterns)]
4617 pub fn into_initialize(
4618 self,
4619 ) -> Option<(fidl::EventPair, fidl::Process, CoverageDataCollectorInitializeResponder)> {
4620 if let CoverageDataCollectorRequest::Initialize { eventpair, process, responder } = self {
4621 Some((eventpair, process, responder))
4622 } else {
4623 None
4624 }
4625 }
4626
4627 #[allow(irrefutable_let_patterns)]
4628 pub fn into_add_inline8bit_counters(
4629 self,
4630 ) -> Option<(fidl::Vmo, CoverageDataCollectorAddInline8bitCountersResponder)> {
4631 if let CoverageDataCollectorRequest::AddInline8bitCounters {
4632 inline_8bit_counters,
4633 responder,
4634 } = self
4635 {
4636 Some((inline_8bit_counters, responder))
4637 } else {
4638 None
4639 }
4640 }
4641
4642 pub fn method_name(&self) -> &'static str {
4644 match *self {
4645 CoverageDataCollectorRequest::Initialize { .. } => "initialize",
4646 CoverageDataCollectorRequest::AddInline8bitCounters { .. } => "add_inline8bit_counters",
4647 }
4648 }
4649}
4650
4651#[derive(Debug, Clone)]
4652pub struct CoverageDataCollectorControlHandle {
4653 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4654}
4655
4656impl fidl::endpoints::ControlHandle for CoverageDataCollectorControlHandle {
4657 fn shutdown(&self) {
4658 self.inner.shutdown()
4659 }
4660 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4661 self.inner.shutdown_with_epitaph(status)
4662 }
4663
4664 fn is_closed(&self) -> bool {
4665 self.inner.channel().is_closed()
4666 }
4667 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4668 self.inner.channel().on_closed()
4669 }
4670
4671 #[cfg(target_os = "fuchsia")]
4672 fn signal_peer(
4673 &self,
4674 clear_mask: zx::Signals,
4675 set_mask: zx::Signals,
4676 ) -> Result<(), zx_status::Status> {
4677 use fidl::Peered;
4678 self.inner.channel().signal_peer(clear_mask, set_mask)
4679 }
4680}
4681
4682impl CoverageDataCollectorControlHandle {}
4683
4684#[must_use = "FIDL methods require a response to be sent"]
4685#[derive(Debug)]
4686pub struct CoverageDataCollectorInitializeResponder {
4687 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4688 tx_id: u32,
4689}
4690
4691impl std::ops::Drop for CoverageDataCollectorInitializeResponder {
4695 fn drop(&mut self) {
4696 self.control_handle.shutdown();
4697 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4699 }
4700}
4701
4702impl fidl::endpoints::Responder for CoverageDataCollectorInitializeResponder {
4703 type ControlHandle = CoverageDataCollectorControlHandle;
4704
4705 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4706 &self.control_handle
4707 }
4708
4709 fn drop_without_shutdown(mut self) {
4710 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4712 std::mem::forget(self);
4714 }
4715}
4716
4717impl CoverageDataCollectorInitializeResponder {
4718 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
4722 let _result = self.send_raw(options);
4723 if _result.is_err() {
4724 self.control_handle.shutdown();
4725 }
4726 self.drop_without_shutdown();
4727 _result
4728 }
4729
4730 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
4732 let _result = self.send_raw(options);
4733 self.drop_without_shutdown();
4734 _result
4735 }
4736
4737 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
4738 self.control_handle.inner.send::<CoverageDataCollectorInitializeResponse>(
4739 (options,),
4740 self.tx_id,
4741 0x51d6f91d6f02d9d6,
4742 fidl::encoding::DynamicFlags::empty(),
4743 )
4744 }
4745}
4746
4747#[must_use = "FIDL methods require a response to be sent"]
4748#[derive(Debug)]
4749pub struct CoverageDataCollectorAddInline8bitCountersResponder {
4750 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4751 tx_id: u32,
4752}
4753
4754impl std::ops::Drop for CoverageDataCollectorAddInline8bitCountersResponder {
4758 fn drop(&mut self) {
4759 self.control_handle.shutdown();
4760 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4762 }
4763}
4764
4765impl fidl::endpoints::Responder for CoverageDataCollectorAddInline8bitCountersResponder {
4766 type ControlHandle = CoverageDataCollectorControlHandle;
4767
4768 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4769 &self.control_handle
4770 }
4771
4772 fn drop_without_shutdown(mut self) {
4773 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4775 std::mem::forget(self);
4777 }
4778}
4779
4780impl CoverageDataCollectorAddInline8bitCountersResponder {
4781 pub fn send(self) -> Result<(), fidl::Error> {
4785 let _result = self.send_raw();
4786 if _result.is_err() {
4787 self.control_handle.shutdown();
4788 }
4789 self.drop_without_shutdown();
4790 _result
4791 }
4792
4793 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4795 let _result = self.send_raw();
4796 self.drop_without_shutdown();
4797 _result
4798 }
4799
4800 fn send_raw(&self) -> Result<(), fidl::Error> {
4801 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4802 (),
4803 self.tx_id,
4804 0x75f87cadfc94d1be,
4805 fidl::encoding::DynamicFlags::empty(),
4806 )
4807 }
4808}
4809
4810#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4811pub struct CoverageDataProviderMarker;
4812
4813impl fidl::endpoints::ProtocolMarker for CoverageDataProviderMarker {
4814 type Proxy = CoverageDataProviderProxy;
4815 type RequestStream = CoverageDataProviderRequestStream;
4816 #[cfg(target_os = "fuchsia")]
4817 type SynchronousProxy = CoverageDataProviderSynchronousProxy;
4818
4819 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataProvider";
4820}
4821impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataProviderMarker {}
4822
4823pub trait CoverageDataProviderProxyInterface: Send + Sync {
4824 fn r#set_options(&self, options: &Options) -> Result<(), fidl::Error>;
4825 type WatchCoverageDataResponseFut: std::future::Future<Output = Result<Vec<CoverageData>, fidl::Error>>
4826 + Send;
4827 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut;
4828}
4829#[derive(Debug)]
4830#[cfg(target_os = "fuchsia")]
4831pub struct CoverageDataProviderSynchronousProxy {
4832 client: fidl::client::sync::Client,
4833}
4834
4835#[cfg(target_os = "fuchsia")]
4836impl fidl::endpoints::SynchronousProxy for CoverageDataProviderSynchronousProxy {
4837 type Proxy = CoverageDataProviderProxy;
4838 type Protocol = CoverageDataProviderMarker;
4839
4840 fn from_channel(inner: fidl::Channel) -> Self {
4841 Self::new(inner)
4842 }
4843
4844 fn into_channel(self) -> fidl::Channel {
4845 self.client.into_channel()
4846 }
4847
4848 fn as_channel(&self) -> &fidl::Channel {
4849 self.client.as_channel()
4850 }
4851}
4852
4853#[cfg(target_os = "fuchsia")]
4854impl CoverageDataProviderSynchronousProxy {
4855 pub fn new(channel: fidl::Channel) -> Self {
4856 let protocol_name =
4857 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4858 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4859 }
4860
4861 pub fn into_channel(self) -> fidl::Channel {
4862 self.client.into_channel()
4863 }
4864
4865 pub fn wait_for_event(
4868 &self,
4869 deadline: zx::MonotonicInstant,
4870 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
4871 CoverageDataProviderEvent::decode(self.client.wait_for_event(deadline)?)
4872 }
4873
4874 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4876 self.client.send::<CoverageDataProviderSetOptionsRequest>(
4877 (options,),
4878 0x4873c4a5c7683384,
4879 fidl::encoding::DynamicFlags::empty(),
4880 )
4881 }
4882
4883 pub fn r#watch_coverage_data(
4895 &self,
4896 ___deadline: zx::MonotonicInstant,
4897 ) -> Result<Vec<CoverageData>, fidl::Error> {
4898 let _response = self.client.send_query::<
4899 fidl::encoding::EmptyPayload,
4900 CoverageDataProviderWatchCoverageDataResponse,
4901 >(
4902 (),
4903 0x34a92fc9c73bea5a,
4904 fidl::encoding::DynamicFlags::empty(),
4905 ___deadline,
4906 )?;
4907 Ok(_response.coverage_data)
4908 }
4909}
4910
4911#[cfg(target_os = "fuchsia")]
4912impl From<CoverageDataProviderSynchronousProxy> for zx::Handle {
4913 fn from(value: CoverageDataProviderSynchronousProxy) -> Self {
4914 value.into_channel().into()
4915 }
4916}
4917
4918#[cfg(target_os = "fuchsia")]
4919impl From<fidl::Channel> for CoverageDataProviderSynchronousProxy {
4920 fn from(value: fidl::Channel) -> Self {
4921 Self::new(value)
4922 }
4923}
4924
4925#[cfg(target_os = "fuchsia")]
4926impl fidl::endpoints::FromClient for CoverageDataProviderSynchronousProxy {
4927 type Protocol = CoverageDataProviderMarker;
4928
4929 fn from_client(value: fidl::endpoints::ClientEnd<CoverageDataProviderMarker>) -> Self {
4930 Self::new(value.into_channel())
4931 }
4932}
4933
4934#[derive(Debug, Clone)]
4935pub struct CoverageDataProviderProxy {
4936 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4937}
4938
4939impl fidl::endpoints::Proxy for CoverageDataProviderProxy {
4940 type Protocol = CoverageDataProviderMarker;
4941
4942 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4943 Self::new(inner)
4944 }
4945
4946 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4947 self.client.into_channel().map_err(|client| Self { client })
4948 }
4949
4950 fn as_channel(&self) -> &::fidl::AsyncChannel {
4951 self.client.as_channel()
4952 }
4953}
4954
4955impl CoverageDataProviderProxy {
4956 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4958 let protocol_name =
4959 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4960 Self { client: fidl::client::Client::new(channel, protocol_name) }
4961 }
4962
4963 pub fn take_event_stream(&self) -> CoverageDataProviderEventStream {
4969 CoverageDataProviderEventStream { event_receiver: self.client.take_event_receiver() }
4970 }
4971
4972 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4974 CoverageDataProviderProxyInterface::r#set_options(self, options)
4975 }
4976
4977 pub fn r#watch_coverage_data(
4989 &self,
4990 ) -> fidl::client::QueryResponseFut<
4991 Vec<CoverageData>,
4992 fidl::encoding::DefaultFuchsiaResourceDialect,
4993 > {
4994 CoverageDataProviderProxyInterface::r#watch_coverage_data(self)
4995 }
4996}
4997
4998impl CoverageDataProviderProxyInterface for CoverageDataProviderProxy {
4999 fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
5000 self.client.send::<CoverageDataProviderSetOptionsRequest>(
5001 (options,),
5002 0x4873c4a5c7683384,
5003 fidl::encoding::DynamicFlags::empty(),
5004 )
5005 }
5006
5007 type WatchCoverageDataResponseFut = fidl::client::QueryResponseFut<
5008 Vec<CoverageData>,
5009 fidl::encoding::DefaultFuchsiaResourceDialect,
5010 >;
5011 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut {
5012 fn _decode(
5013 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5014 ) -> Result<Vec<CoverageData>, fidl::Error> {
5015 let _response = fidl::client::decode_transaction_body::<
5016 CoverageDataProviderWatchCoverageDataResponse,
5017 fidl::encoding::DefaultFuchsiaResourceDialect,
5018 0x34a92fc9c73bea5a,
5019 >(_buf?)?;
5020 Ok(_response.coverage_data)
5021 }
5022 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<CoverageData>>(
5023 (),
5024 0x34a92fc9c73bea5a,
5025 fidl::encoding::DynamicFlags::empty(),
5026 _decode,
5027 )
5028 }
5029}
5030
5031pub struct CoverageDataProviderEventStream {
5032 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5033}
5034
5035impl std::marker::Unpin for CoverageDataProviderEventStream {}
5036
5037impl futures::stream::FusedStream for CoverageDataProviderEventStream {
5038 fn is_terminated(&self) -> bool {
5039 self.event_receiver.is_terminated()
5040 }
5041}
5042
5043impl futures::Stream for CoverageDataProviderEventStream {
5044 type Item = Result<CoverageDataProviderEvent, fidl::Error>;
5045
5046 fn poll_next(
5047 mut self: std::pin::Pin<&mut Self>,
5048 cx: &mut std::task::Context<'_>,
5049 ) -> std::task::Poll<Option<Self::Item>> {
5050 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5051 &mut self.event_receiver,
5052 cx
5053 )?) {
5054 Some(buf) => std::task::Poll::Ready(Some(CoverageDataProviderEvent::decode(buf))),
5055 None => std::task::Poll::Ready(None),
5056 }
5057 }
5058}
5059
5060#[derive(Debug)]
5061pub enum CoverageDataProviderEvent {}
5062
5063impl CoverageDataProviderEvent {
5064 fn decode(
5066 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5067 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
5068 let (bytes, _handles) = buf.split_mut();
5069 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5070 debug_assert_eq!(tx_header.tx_id, 0);
5071 match tx_header.ordinal {
5072 _ => Err(fidl::Error::UnknownOrdinal {
5073 ordinal: tx_header.ordinal,
5074 protocol_name:
5075 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5076 }),
5077 }
5078 }
5079}
5080
5081pub struct CoverageDataProviderRequestStream {
5083 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5084 is_terminated: bool,
5085}
5086
5087impl std::marker::Unpin for CoverageDataProviderRequestStream {}
5088
5089impl futures::stream::FusedStream for CoverageDataProviderRequestStream {
5090 fn is_terminated(&self) -> bool {
5091 self.is_terminated
5092 }
5093}
5094
5095impl fidl::endpoints::RequestStream for CoverageDataProviderRequestStream {
5096 type Protocol = CoverageDataProviderMarker;
5097 type ControlHandle = CoverageDataProviderControlHandle;
5098
5099 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5100 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5101 }
5102
5103 fn control_handle(&self) -> Self::ControlHandle {
5104 CoverageDataProviderControlHandle { inner: self.inner.clone() }
5105 }
5106
5107 fn into_inner(
5108 self,
5109 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5110 {
5111 (self.inner, self.is_terminated)
5112 }
5113
5114 fn from_inner(
5115 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5116 is_terminated: bool,
5117 ) -> Self {
5118 Self { inner, is_terminated }
5119 }
5120}
5121
5122impl futures::Stream for CoverageDataProviderRequestStream {
5123 type Item = Result<CoverageDataProviderRequest, fidl::Error>;
5124
5125 fn poll_next(
5126 mut self: std::pin::Pin<&mut Self>,
5127 cx: &mut std::task::Context<'_>,
5128 ) -> std::task::Poll<Option<Self::Item>> {
5129 let this = &mut *self;
5130 if this.inner.check_shutdown(cx) {
5131 this.is_terminated = true;
5132 return std::task::Poll::Ready(None);
5133 }
5134 if this.is_terminated {
5135 panic!("polled CoverageDataProviderRequestStream after completion");
5136 }
5137 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5138 |bytes, handles| {
5139 match this.inner.channel().read_etc(cx, bytes, handles) {
5140 std::task::Poll::Ready(Ok(())) => {}
5141 std::task::Poll::Pending => return std::task::Poll::Pending,
5142 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5143 this.is_terminated = true;
5144 return std::task::Poll::Ready(None);
5145 }
5146 std::task::Poll::Ready(Err(e)) => {
5147 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5148 e.into(),
5149 ))))
5150 }
5151 }
5152
5153 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5155
5156 std::task::Poll::Ready(Some(match header.ordinal {
5157 0x4873c4a5c7683384 => {
5158 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5159 let mut req = fidl::new_empty!(CoverageDataProviderSetOptionsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5160 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataProviderSetOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
5161 let control_handle = CoverageDataProviderControlHandle {
5162 inner: this.inner.clone(),
5163 };
5164 Ok(CoverageDataProviderRequest::SetOptions {options: req.options,
5165
5166 control_handle,
5167 })
5168 }
5169 0x34a92fc9c73bea5a => {
5170 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5171 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
5172 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5173 let control_handle = CoverageDataProviderControlHandle {
5174 inner: this.inner.clone(),
5175 };
5176 Ok(CoverageDataProviderRequest::WatchCoverageData {
5177 responder: CoverageDataProviderWatchCoverageDataResponder {
5178 control_handle: std::mem::ManuallyDrop::new(control_handle),
5179 tx_id: header.tx_id,
5180 },
5181 })
5182 }
5183 _ => Err(fidl::Error::UnknownOrdinal {
5184 ordinal: header.ordinal,
5185 protocol_name: <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5186 }),
5187 }))
5188 },
5189 )
5190 }
5191}
5192
5193#[derive(Debug)]
5202pub enum CoverageDataProviderRequest {
5203 SetOptions { options: Options, control_handle: CoverageDataProviderControlHandle },
5205 WatchCoverageData { responder: CoverageDataProviderWatchCoverageDataResponder },
5217}
5218
5219impl CoverageDataProviderRequest {
5220 #[allow(irrefutable_let_patterns)]
5221 pub fn into_set_options(self) -> Option<(Options, CoverageDataProviderControlHandle)> {
5222 if let CoverageDataProviderRequest::SetOptions { options, control_handle } = self {
5223 Some((options, control_handle))
5224 } else {
5225 None
5226 }
5227 }
5228
5229 #[allow(irrefutable_let_patterns)]
5230 pub fn into_watch_coverage_data(
5231 self,
5232 ) -> Option<(CoverageDataProviderWatchCoverageDataResponder)> {
5233 if let CoverageDataProviderRequest::WatchCoverageData { responder } = self {
5234 Some((responder))
5235 } else {
5236 None
5237 }
5238 }
5239
5240 pub fn method_name(&self) -> &'static str {
5242 match *self {
5243 CoverageDataProviderRequest::SetOptions { .. } => "set_options",
5244 CoverageDataProviderRequest::WatchCoverageData { .. } => "watch_coverage_data",
5245 }
5246 }
5247}
5248
5249#[derive(Debug, Clone)]
5250pub struct CoverageDataProviderControlHandle {
5251 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5252}
5253
5254impl fidl::endpoints::ControlHandle for CoverageDataProviderControlHandle {
5255 fn shutdown(&self) {
5256 self.inner.shutdown()
5257 }
5258 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5259 self.inner.shutdown_with_epitaph(status)
5260 }
5261
5262 fn is_closed(&self) -> bool {
5263 self.inner.channel().is_closed()
5264 }
5265 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5266 self.inner.channel().on_closed()
5267 }
5268
5269 #[cfg(target_os = "fuchsia")]
5270 fn signal_peer(
5271 &self,
5272 clear_mask: zx::Signals,
5273 set_mask: zx::Signals,
5274 ) -> Result<(), zx_status::Status> {
5275 use fidl::Peered;
5276 self.inner.channel().signal_peer(clear_mask, set_mask)
5277 }
5278}
5279
5280impl CoverageDataProviderControlHandle {}
5281
5282#[must_use = "FIDL methods require a response to be sent"]
5283#[derive(Debug)]
5284pub struct CoverageDataProviderWatchCoverageDataResponder {
5285 control_handle: std::mem::ManuallyDrop<CoverageDataProviderControlHandle>,
5286 tx_id: u32,
5287}
5288
5289impl std::ops::Drop for CoverageDataProviderWatchCoverageDataResponder {
5293 fn drop(&mut self) {
5294 self.control_handle.shutdown();
5295 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5297 }
5298}
5299
5300impl fidl::endpoints::Responder for CoverageDataProviderWatchCoverageDataResponder {
5301 type ControlHandle = CoverageDataProviderControlHandle;
5302
5303 fn control_handle(&self) -> &CoverageDataProviderControlHandle {
5304 &self.control_handle
5305 }
5306
5307 fn drop_without_shutdown(mut self) {
5308 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5310 std::mem::forget(self);
5312 }
5313}
5314
5315impl CoverageDataProviderWatchCoverageDataResponder {
5316 pub fn send(self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5320 let _result = self.send_raw(coverage_data);
5321 if _result.is_err() {
5322 self.control_handle.shutdown();
5323 }
5324 self.drop_without_shutdown();
5325 _result
5326 }
5327
5328 pub fn send_no_shutdown_on_err(
5330 self,
5331 mut coverage_data: Vec<CoverageData>,
5332 ) -> Result<(), fidl::Error> {
5333 let _result = self.send_raw(coverage_data);
5334 self.drop_without_shutdown();
5335 _result
5336 }
5337
5338 fn send_raw(&self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5339 self.control_handle.inner.send::<CoverageDataProviderWatchCoverageDataResponse>(
5340 (coverage_data.as_mut(),),
5341 self.tx_id,
5342 0x34a92fc9c73bea5a,
5343 fidl::encoding::DynamicFlags::empty(),
5344 )
5345 }
5346}
5347
5348#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5349pub struct ManagerMarker;
5350
5351impl fidl::endpoints::ProtocolMarker for ManagerMarker {
5352 type Proxy = ManagerProxy;
5353 type RequestStream = ManagerRequestStream;
5354 #[cfg(target_os = "fuchsia")]
5355 type SynchronousProxy = ManagerSynchronousProxy;
5356
5357 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Manager";
5358}
5359impl fidl::endpoints::DiscoverableProtocolMarker for ManagerMarker {}
5360pub type ManagerConnectResult = Result<(), i32>;
5361pub type ManagerGetOutputResult = Result<(), i32>;
5362pub type ManagerStopResult = Result<(), i32>;
5363
5364pub trait ManagerProxyInterface: Send + Sync {
5365 type ConnectResponseFut: std::future::Future<Output = Result<ManagerConnectResult, fidl::Error>>
5366 + Send;
5367 fn r#connect(
5368 &self,
5369 fuzzer_url: &str,
5370 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5371 ) -> Self::ConnectResponseFut;
5372 type GetOutputResponseFut: std::future::Future<Output = Result<ManagerGetOutputResult, fidl::Error>>
5373 + Send;
5374 fn r#get_output(
5375 &self,
5376 fuzzer_url: &str,
5377 output: TestOutput,
5378 socket: fidl::Socket,
5379 ) -> Self::GetOutputResponseFut;
5380 type StopResponseFut: std::future::Future<Output = Result<ManagerStopResult, fidl::Error>>
5381 + Send;
5382 fn r#stop(&self, fuzzer_url: &str) -> Self::StopResponseFut;
5383}
5384#[derive(Debug)]
5385#[cfg(target_os = "fuchsia")]
5386pub struct ManagerSynchronousProxy {
5387 client: fidl::client::sync::Client,
5388}
5389
5390#[cfg(target_os = "fuchsia")]
5391impl fidl::endpoints::SynchronousProxy for ManagerSynchronousProxy {
5392 type Proxy = ManagerProxy;
5393 type Protocol = ManagerMarker;
5394
5395 fn from_channel(inner: fidl::Channel) -> Self {
5396 Self::new(inner)
5397 }
5398
5399 fn into_channel(self) -> fidl::Channel {
5400 self.client.into_channel()
5401 }
5402
5403 fn as_channel(&self) -> &fidl::Channel {
5404 self.client.as_channel()
5405 }
5406}
5407
5408#[cfg(target_os = "fuchsia")]
5409impl ManagerSynchronousProxy {
5410 pub fn new(channel: fidl::Channel) -> Self {
5411 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5412 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5413 }
5414
5415 pub fn into_channel(self) -> fidl::Channel {
5416 self.client.into_channel()
5417 }
5418
5419 pub fn wait_for_event(
5422 &self,
5423 deadline: zx::MonotonicInstant,
5424 ) -> Result<ManagerEvent, fidl::Error> {
5425 ManagerEvent::decode(self.client.wait_for_event(deadline)?)
5426 }
5427
5428 pub fn r#connect(
5455 &self,
5456 mut fuzzer_url: &str,
5457 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5458 ___deadline: zx::MonotonicInstant,
5459 ) -> Result<ManagerConnectResult, fidl::Error> {
5460 let _response = self.client.send_query::<
5461 ManagerConnectRequest,
5462 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5463 >(
5464 (fuzzer_url, controller,),
5465 0x1620cd742a89f064,
5466 fidl::encoding::DynamicFlags::empty(),
5467 ___deadline,
5468 )?;
5469 Ok(_response.map(|x| x))
5470 }
5471
5472 pub fn r#get_output(
5487 &self,
5488 mut fuzzer_url: &str,
5489 mut output: TestOutput,
5490 mut socket: fidl::Socket,
5491 ___deadline: zx::MonotonicInstant,
5492 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5493 let _response = self.client.send_query::<
5494 ManagerGetOutputRequest,
5495 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5496 >(
5497 (fuzzer_url, output, socket,),
5498 0x755c28eecf20a88d,
5499 fidl::encoding::DynamicFlags::empty(),
5500 ___deadline,
5501 )?;
5502 Ok(_response.map(|x| x))
5503 }
5504
5505 pub fn r#stop(
5511 &self,
5512 mut fuzzer_url: &str,
5513 ___deadline: zx::MonotonicInstant,
5514 ) -> Result<ManagerStopResult, fidl::Error> {
5515 let _response = self.client.send_query::<
5516 ManagerStopRequest,
5517 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5518 >(
5519 (fuzzer_url,),
5520 0x27e53d86badd21f3,
5521 fidl::encoding::DynamicFlags::empty(),
5522 ___deadline,
5523 )?;
5524 Ok(_response.map(|x| x))
5525 }
5526}
5527
5528#[cfg(target_os = "fuchsia")]
5529impl From<ManagerSynchronousProxy> for zx::Handle {
5530 fn from(value: ManagerSynchronousProxy) -> Self {
5531 value.into_channel().into()
5532 }
5533}
5534
5535#[cfg(target_os = "fuchsia")]
5536impl From<fidl::Channel> for ManagerSynchronousProxy {
5537 fn from(value: fidl::Channel) -> Self {
5538 Self::new(value)
5539 }
5540}
5541
5542#[cfg(target_os = "fuchsia")]
5543impl fidl::endpoints::FromClient for ManagerSynchronousProxy {
5544 type Protocol = ManagerMarker;
5545
5546 fn from_client(value: fidl::endpoints::ClientEnd<ManagerMarker>) -> Self {
5547 Self::new(value.into_channel())
5548 }
5549}
5550
5551#[derive(Debug, Clone)]
5552pub struct ManagerProxy {
5553 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5554}
5555
5556impl fidl::endpoints::Proxy for ManagerProxy {
5557 type Protocol = ManagerMarker;
5558
5559 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5560 Self::new(inner)
5561 }
5562
5563 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5564 self.client.into_channel().map_err(|client| Self { client })
5565 }
5566
5567 fn as_channel(&self) -> &::fidl::AsyncChannel {
5568 self.client.as_channel()
5569 }
5570}
5571
5572impl ManagerProxy {
5573 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5575 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5576 Self { client: fidl::client::Client::new(channel, protocol_name) }
5577 }
5578
5579 pub fn take_event_stream(&self) -> ManagerEventStream {
5585 ManagerEventStream { event_receiver: self.client.take_event_receiver() }
5586 }
5587
5588 pub fn r#connect(
5615 &self,
5616 mut fuzzer_url: &str,
5617 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5618 ) -> fidl::client::QueryResponseFut<
5619 ManagerConnectResult,
5620 fidl::encoding::DefaultFuchsiaResourceDialect,
5621 > {
5622 ManagerProxyInterface::r#connect(self, fuzzer_url, controller)
5623 }
5624
5625 pub fn r#get_output(
5640 &self,
5641 mut fuzzer_url: &str,
5642 mut output: TestOutput,
5643 mut socket: fidl::Socket,
5644 ) -> fidl::client::QueryResponseFut<
5645 ManagerGetOutputResult,
5646 fidl::encoding::DefaultFuchsiaResourceDialect,
5647 > {
5648 ManagerProxyInterface::r#get_output(self, fuzzer_url, output, socket)
5649 }
5650
5651 pub fn r#stop(
5657 &self,
5658 mut fuzzer_url: &str,
5659 ) -> fidl::client::QueryResponseFut<
5660 ManagerStopResult,
5661 fidl::encoding::DefaultFuchsiaResourceDialect,
5662 > {
5663 ManagerProxyInterface::r#stop(self, fuzzer_url)
5664 }
5665}
5666
5667impl ManagerProxyInterface for ManagerProxy {
5668 type ConnectResponseFut = fidl::client::QueryResponseFut<
5669 ManagerConnectResult,
5670 fidl::encoding::DefaultFuchsiaResourceDialect,
5671 >;
5672 fn r#connect(
5673 &self,
5674 mut fuzzer_url: &str,
5675 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5676 ) -> Self::ConnectResponseFut {
5677 fn _decode(
5678 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5679 ) -> Result<ManagerConnectResult, fidl::Error> {
5680 let _response = fidl::client::decode_transaction_body::<
5681 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5682 fidl::encoding::DefaultFuchsiaResourceDialect,
5683 0x1620cd742a89f064,
5684 >(_buf?)?;
5685 Ok(_response.map(|x| x))
5686 }
5687 self.client.send_query_and_decode::<ManagerConnectRequest, ManagerConnectResult>(
5688 (fuzzer_url, controller),
5689 0x1620cd742a89f064,
5690 fidl::encoding::DynamicFlags::empty(),
5691 _decode,
5692 )
5693 }
5694
5695 type GetOutputResponseFut = fidl::client::QueryResponseFut<
5696 ManagerGetOutputResult,
5697 fidl::encoding::DefaultFuchsiaResourceDialect,
5698 >;
5699 fn r#get_output(
5700 &self,
5701 mut fuzzer_url: &str,
5702 mut output: TestOutput,
5703 mut socket: fidl::Socket,
5704 ) -> Self::GetOutputResponseFut {
5705 fn _decode(
5706 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5707 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5708 let _response = fidl::client::decode_transaction_body::<
5709 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5710 fidl::encoding::DefaultFuchsiaResourceDialect,
5711 0x755c28eecf20a88d,
5712 >(_buf?)?;
5713 Ok(_response.map(|x| x))
5714 }
5715 self.client.send_query_and_decode::<ManagerGetOutputRequest, ManagerGetOutputResult>(
5716 (fuzzer_url, output, socket),
5717 0x755c28eecf20a88d,
5718 fidl::encoding::DynamicFlags::empty(),
5719 _decode,
5720 )
5721 }
5722
5723 type StopResponseFut = fidl::client::QueryResponseFut<
5724 ManagerStopResult,
5725 fidl::encoding::DefaultFuchsiaResourceDialect,
5726 >;
5727 fn r#stop(&self, mut fuzzer_url: &str) -> Self::StopResponseFut {
5728 fn _decode(
5729 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5730 ) -> Result<ManagerStopResult, fidl::Error> {
5731 let _response = fidl::client::decode_transaction_body::<
5732 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5733 fidl::encoding::DefaultFuchsiaResourceDialect,
5734 0x27e53d86badd21f3,
5735 >(_buf?)?;
5736 Ok(_response.map(|x| x))
5737 }
5738 self.client.send_query_and_decode::<ManagerStopRequest, ManagerStopResult>(
5739 (fuzzer_url,),
5740 0x27e53d86badd21f3,
5741 fidl::encoding::DynamicFlags::empty(),
5742 _decode,
5743 )
5744 }
5745}
5746
5747pub struct ManagerEventStream {
5748 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5749}
5750
5751impl std::marker::Unpin for ManagerEventStream {}
5752
5753impl futures::stream::FusedStream for ManagerEventStream {
5754 fn is_terminated(&self) -> bool {
5755 self.event_receiver.is_terminated()
5756 }
5757}
5758
5759impl futures::Stream for ManagerEventStream {
5760 type Item = Result<ManagerEvent, fidl::Error>;
5761
5762 fn poll_next(
5763 mut self: std::pin::Pin<&mut Self>,
5764 cx: &mut std::task::Context<'_>,
5765 ) -> std::task::Poll<Option<Self::Item>> {
5766 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5767 &mut self.event_receiver,
5768 cx
5769 )?) {
5770 Some(buf) => std::task::Poll::Ready(Some(ManagerEvent::decode(buf))),
5771 None => std::task::Poll::Ready(None),
5772 }
5773 }
5774}
5775
5776#[derive(Debug)]
5777pub enum ManagerEvent {}
5778
5779impl ManagerEvent {
5780 fn decode(
5782 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5783 ) -> Result<ManagerEvent, fidl::Error> {
5784 let (bytes, _handles) = buf.split_mut();
5785 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5786 debug_assert_eq!(tx_header.tx_id, 0);
5787 match tx_header.ordinal {
5788 _ => Err(fidl::Error::UnknownOrdinal {
5789 ordinal: tx_header.ordinal,
5790 protocol_name: <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5791 }),
5792 }
5793 }
5794}
5795
5796pub struct ManagerRequestStream {
5798 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5799 is_terminated: bool,
5800}
5801
5802impl std::marker::Unpin for ManagerRequestStream {}
5803
5804impl futures::stream::FusedStream for ManagerRequestStream {
5805 fn is_terminated(&self) -> bool {
5806 self.is_terminated
5807 }
5808}
5809
5810impl fidl::endpoints::RequestStream for ManagerRequestStream {
5811 type Protocol = ManagerMarker;
5812 type ControlHandle = ManagerControlHandle;
5813
5814 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5815 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5816 }
5817
5818 fn control_handle(&self) -> Self::ControlHandle {
5819 ManagerControlHandle { inner: self.inner.clone() }
5820 }
5821
5822 fn into_inner(
5823 self,
5824 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5825 {
5826 (self.inner, self.is_terminated)
5827 }
5828
5829 fn from_inner(
5830 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5831 is_terminated: bool,
5832 ) -> Self {
5833 Self { inner, is_terminated }
5834 }
5835}
5836
5837impl futures::Stream for ManagerRequestStream {
5838 type Item = Result<ManagerRequest, fidl::Error>;
5839
5840 fn poll_next(
5841 mut self: std::pin::Pin<&mut Self>,
5842 cx: &mut std::task::Context<'_>,
5843 ) -> std::task::Poll<Option<Self::Item>> {
5844 let this = &mut *self;
5845 if this.inner.check_shutdown(cx) {
5846 this.is_terminated = true;
5847 return std::task::Poll::Ready(None);
5848 }
5849 if this.is_terminated {
5850 panic!("polled ManagerRequestStream after completion");
5851 }
5852 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5853 |bytes, handles| {
5854 match this.inner.channel().read_etc(cx, bytes, handles) {
5855 std::task::Poll::Ready(Ok(())) => {}
5856 std::task::Poll::Pending => return std::task::Poll::Pending,
5857 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5858 this.is_terminated = true;
5859 return std::task::Poll::Ready(None);
5860 }
5861 std::task::Poll::Ready(Err(e)) => {
5862 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5863 e.into(),
5864 ))))
5865 }
5866 }
5867
5868 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5870
5871 std::task::Poll::Ready(Some(match header.ordinal {
5872 0x1620cd742a89f064 => {
5873 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5874 let mut req = fidl::new_empty!(
5875 ManagerConnectRequest,
5876 fidl::encoding::DefaultFuchsiaResourceDialect
5877 );
5878 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerConnectRequest>(&header, _body_bytes, handles, &mut req)?;
5879 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5880 Ok(ManagerRequest::Connect {
5881 fuzzer_url: req.fuzzer_url,
5882 controller: req.controller,
5883
5884 responder: ManagerConnectResponder {
5885 control_handle: std::mem::ManuallyDrop::new(control_handle),
5886 tx_id: header.tx_id,
5887 },
5888 })
5889 }
5890 0x755c28eecf20a88d => {
5891 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5892 let mut req = fidl::new_empty!(
5893 ManagerGetOutputRequest,
5894 fidl::encoding::DefaultFuchsiaResourceDialect
5895 );
5896 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetOutputRequest>(&header, _body_bytes, handles, &mut req)?;
5897 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5898 Ok(ManagerRequest::GetOutput {
5899 fuzzer_url: req.fuzzer_url,
5900 output: req.output,
5901 socket: req.socket,
5902
5903 responder: ManagerGetOutputResponder {
5904 control_handle: std::mem::ManuallyDrop::new(control_handle),
5905 tx_id: header.tx_id,
5906 },
5907 })
5908 }
5909 0x27e53d86badd21f3 => {
5910 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5911 let mut req = fidl::new_empty!(
5912 ManagerStopRequest,
5913 fidl::encoding::DefaultFuchsiaResourceDialect
5914 );
5915 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerStopRequest>(&header, _body_bytes, handles, &mut req)?;
5916 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5917 Ok(ManagerRequest::Stop {
5918 fuzzer_url: req.fuzzer_url,
5919
5920 responder: ManagerStopResponder {
5921 control_handle: std::mem::ManuallyDrop::new(control_handle),
5922 tx_id: header.tx_id,
5923 },
5924 })
5925 }
5926 _ => Err(fidl::Error::UnknownOrdinal {
5927 ordinal: header.ordinal,
5928 protocol_name:
5929 <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5930 }),
5931 }))
5932 },
5933 )
5934 }
5935}
5936
5937#[derive(Debug)]
5943pub enum ManagerRequest {
5944 Connect {
5971 fuzzer_url: String,
5972 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5973 responder: ManagerConnectResponder,
5974 },
5975 GetOutput {
5990 fuzzer_url: String,
5991 output: TestOutput,
5992 socket: fidl::Socket,
5993 responder: ManagerGetOutputResponder,
5994 },
5995 Stop { fuzzer_url: String, responder: ManagerStopResponder },
6001}
6002
6003impl ManagerRequest {
6004 #[allow(irrefutable_let_patterns)]
6005 pub fn into_connect(
6006 self,
6007 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, ManagerConnectResponder)>
6008 {
6009 if let ManagerRequest::Connect { fuzzer_url, controller, responder } = self {
6010 Some((fuzzer_url, controller, responder))
6011 } else {
6012 None
6013 }
6014 }
6015
6016 #[allow(irrefutable_let_patterns)]
6017 pub fn into_get_output(
6018 self,
6019 ) -> Option<(String, TestOutput, fidl::Socket, ManagerGetOutputResponder)> {
6020 if let ManagerRequest::GetOutput { fuzzer_url, output, socket, responder } = self {
6021 Some((fuzzer_url, output, socket, responder))
6022 } else {
6023 None
6024 }
6025 }
6026
6027 #[allow(irrefutable_let_patterns)]
6028 pub fn into_stop(self) -> Option<(String, ManagerStopResponder)> {
6029 if let ManagerRequest::Stop { fuzzer_url, responder } = self {
6030 Some((fuzzer_url, responder))
6031 } else {
6032 None
6033 }
6034 }
6035
6036 pub fn method_name(&self) -> &'static str {
6038 match *self {
6039 ManagerRequest::Connect { .. } => "connect",
6040 ManagerRequest::GetOutput { .. } => "get_output",
6041 ManagerRequest::Stop { .. } => "stop",
6042 }
6043 }
6044}
6045
6046#[derive(Debug, Clone)]
6047pub struct ManagerControlHandle {
6048 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6049}
6050
6051impl fidl::endpoints::ControlHandle for ManagerControlHandle {
6052 fn shutdown(&self) {
6053 self.inner.shutdown()
6054 }
6055 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6056 self.inner.shutdown_with_epitaph(status)
6057 }
6058
6059 fn is_closed(&self) -> bool {
6060 self.inner.channel().is_closed()
6061 }
6062 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6063 self.inner.channel().on_closed()
6064 }
6065
6066 #[cfg(target_os = "fuchsia")]
6067 fn signal_peer(
6068 &self,
6069 clear_mask: zx::Signals,
6070 set_mask: zx::Signals,
6071 ) -> Result<(), zx_status::Status> {
6072 use fidl::Peered;
6073 self.inner.channel().signal_peer(clear_mask, set_mask)
6074 }
6075}
6076
6077impl ManagerControlHandle {}
6078
6079#[must_use = "FIDL methods require a response to be sent"]
6080#[derive(Debug)]
6081pub struct ManagerConnectResponder {
6082 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6083 tx_id: u32,
6084}
6085
6086impl std::ops::Drop for ManagerConnectResponder {
6090 fn drop(&mut self) {
6091 self.control_handle.shutdown();
6092 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6094 }
6095}
6096
6097impl fidl::endpoints::Responder for ManagerConnectResponder {
6098 type ControlHandle = ManagerControlHandle;
6099
6100 fn control_handle(&self) -> &ManagerControlHandle {
6101 &self.control_handle
6102 }
6103
6104 fn drop_without_shutdown(mut self) {
6105 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6107 std::mem::forget(self);
6109 }
6110}
6111
6112impl ManagerConnectResponder {
6113 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6117 let _result = self.send_raw(result);
6118 if _result.is_err() {
6119 self.control_handle.shutdown();
6120 }
6121 self.drop_without_shutdown();
6122 _result
6123 }
6124
6125 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6127 let _result = self.send_raw(result);
6128 self.drop_without_shutdown();
6129 _result
6130 }
6131
6132 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6133 self.control_handle
6134 .inner
6135 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6136 result,
6137 self.tx_id,
6138 0x1620cd742a89f064,
6139 fidl::encoding::DynamicFlags::empty(),
6140 )
6141 }
6142}
6143
6144#[must_use = "FIDL methods require a response to be sent"]
6145#[derive(Debug)]
6146pub struct ManagerGetOutputResponder {
6147 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6148 tx_id: u32,
6149}
6150
6151impl std::ops::Drop for ManagerGetOutputResponder {
6155 fn drop(&mut self) {
6156 self.control_handle.shutdown();
6157 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6159 }
6160}
6161
6162impl fidl::endpoints::Responder for ManagerGetOutputResponder {
6163 type ControlHandle = ManagerControlHandle;
6164
6165 fn control_handle(&self) -> &ManagerControlHandle {
6166 &self.control_handle
6167 }
6168
6169 fn drop_without_shutdown(mut self) {
6170 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6172 std::mem::forget(self);
6174 }
6175}
6176
6177impl ManagerGetOutputResponder {
6178 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6182 let _result = self.send_raw(result);
6183 if _result.is_err() {
6184 self.control_handle.shutdown();
6185 }
6186 self.drop_without_shutdown();
6187 _result
6188 }
6189
6190 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6192 let _result = self.send_raw(result);
6193 self.drop_without_shutdown();
6194 _result
6195 }
6196
6197 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6198 self.control_handle
6199 .inner
6200 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6201 result,
6202 self.tx_id,
6203 0x755c28eecf20a88d,
6204 fidl::encoding::DynamicFlags::empty(),
6205 )
6206 }
6207}
6208
6209#[must_use = "FIDL methods require a response to be sent"]
6210#[derive(Debug)]
6211pub struct ManagerStopResponder {
6212 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6213 tx_id: u32,
6214}
6215
6216impl std::ops::Drop for ManagerStopResponder {
6220 fn drop(&mut self) {
6221 self.control_handle.shutdown();
6222 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6224 }
6225}
6226
6227impl fidl::endpoints::Responder for ManagerStopResponder {
6228 type ControlHandle = ManagerControlHandle;
6229
6230 fn control_handle(&self) -> &ManagerControlHandle {
6231 &self.control_handle
6232 }
6233
6234 fn drop_without_shutdown(mut self) {
6235 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6237 std::mem::forget(self);
6239 }
6240}
6241
6242impl ManagerStopResponder {
6243 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6247 let _result = self.send_raw(result);
6248 if _result.is_err() {
6249 self.control_handle.shutdown();
6250 }
6251 self.drop_without_shutdown();
6252 _result
6253 }
6254
6255 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6257 let _result = self.send_raw(result);
6258 self.drop_without_shutdown();
6259 _result
6260 }
6261
6262 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6263 self.control_handle
6264 .inner
6265 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6266 result,
6267 self.tx_id,
6268 0x27e53d86badd21f3,
6269 fidl::encoding::DynamicFlags::empty(),
6270 )
6271 }
6272}
6273
6274#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6275pub struct MonitorMarker;
6276
6277impl fidl::endpoints::ProtocolMarker for MonitorMarker {
6278 type Proxy = MonitorProxy;
6279 type RequestStream = MonitorRequestStream;
6280 #[cfg(target_os = "fuchsia")]
6281 type SynchronousProxy = MonitorSynchronousProxy;
6282
6283 const DEBUG_NAME: &'static str = "(anonymous) Monitor";
6284}
6285
6286pub trait MonitorProxyInterface: Send + Sync {
6287 type UpdateResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6288 fn r#update(&self, reason: UpdateReason, status: &Status) -> Self::UpdateResponseFut;
6289}
6290#[derive(Debug)]
6291#[cfg(target_os = "fuchsia")]
6292pub struct MonitorSynchronousProxy {
6293 client: fidl::client::sync::Client,
6294}
6295
6296#[cfg(target_os = "fuchsia")]
6297impl fidl::endpoints::SynchronousProxy for MonitorSynchronousProxy {
6298 type Proxy = MonitorProxy;
6299 type Protocol = MonitorMarker;
6300
6301 fn from_channel(inner: fidl::Channel) -> Self {
6302 Self::new(inner)
6303 }
6304
6305 fn into_channel(self) -> fidl::Channel {
6306 self.client.into_channel()
6307 }
6308
6309 fn as_channel(&self) -> &fidl::Channel {
6310 self.client.as_channel()
6311 }
6312}
6313
6314#[cfg(target_os = "fuchsia")]
6315impl MonitorSynchronousProxy {
6316 pub fn new(channel: fidl::Channel) -> Self {
6317 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6318 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6319 }
6320
6321 pub fn into_channel(self) -> fidl::Channel {
6322 self.client.into_channel()
6323 }
6324
6325 pub fn wait_for_event(
6328 &self,
6329 deadline: zx::MonotonicInstant,
6330 ) -> Result<MonitorEvent, fidl::Error> {
6331 MonitorEvent::decode(self.client.wait_for_event(deadline)?)
6332 }
6333
6334 pub fn r#update(
6339 &self,
6340 mut reason: UpdateReason,
6341 mut status: &Status,
6342 ___deadline: zx::MonotonicInstant,
6343 ) -> Result<(), fidl::Error> {
6344 let _response =
6345 self.client.send_query::<MonitorUpdateRequest, fidl::encoding::EmptyPayload>(
6346 (reason, status),
6347 0x7c773b93c1e6080f,
6348 fidl::encoding::DynamicFlags::empty(),
6349 ___deadline,
6350 )?;
6351 Ok(_response)
6352 }
6353}
6354
6355#[cfg(target_os = "fuchsia")]
6356impl From<MonitorSynchronousProxy> for zx::Handle {
6357 fn from(value: MonitorSynchronousProxy) -> Self {
6358 value.into_channel().into()
6359 }
6360}
6361
6362#[cfg(target_os = "fuchsia")]
6363impl From<fidl::Channel> for MonitorSynchronousProxy {
6364 fn from(value: fidl::Channel) -> Self {
6365 Self::new(value)
6366 }
6367}
6368
6369#[cfg(target_os = "fuchsia")]
6370impl fidl::endpoints::FromClient for MonitorSynchronousProxy {
6371 type Protocol = MonitorMarker;
6372
6373 fn from_client(value: fidl::endpoints::ClientEnd<MonitorMarker>) -> Self {
6374 Self::new(value.into_channel())
6375 }
6376}
6377
6378#[derive(Debug, Clone)]
6379pub struct MonitorProxy {
6380 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6381}
6382
6383impl fidl::endpoints::Proxy for MonitorProxy {
6384 type Protocol = MonitorMarker;
6385
6386 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6387 Self::new(inner)
6388 }
6389
6390 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6391 self.client.into_channel().map_err(|client| Self { client })
6392 }
6393
6394 fn as_channel(&self) -> &::fidl::AsyncChannel {
6395 self.client.as_channel()
6396 }
6397}
6398
6399impl MonitorProxy {
6400 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6402 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6403 Self { client: fidl::client::Client::new(channel, protocol_name) }
6404 }
6405
6406 pub fn take_event_stream(&self) -> MonitorEventStream {
6412 MonitorEventStream { event_receiver: self.client.take_event_receiver() }
6413 }
6414
6415 pub fn r#update(
6420 &self,
6421 mut reason: UpdateReason,
6422 mut status: &Status,
6423 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6424 MonitorProxyInterface::r#update(self, reason, status)
6425 }
6426}
6427
6428impl MonitorProxyInterface for MonitorProxy {
6429 type UpdateResponseFut =
6430 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6431 fn r#update(&self, mut reason: UpdateReason, mut status: &Status) -> Self::UpdateResponseFut {
6432 fn _decode(
6433 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6434 ) -> Result<(), fidl::Error> {
6435 let _response = fidl::client::decode_transaction_body::<
6436 fidl::encoding::EmptyPayload,
6437 fidl::encoding::DefaultFuchsiaResourceDialect,
6438 0x7c773b93c1e6080f,
6439 >(_buf?)?;
6440 Ok(_response)
6441 }
6442 self.client.send_query_and_decode::<MonitorUpdateRequest, ()>(
6443 (reason, status),
6444 0x7c773b93c1e6080f,
6445 fidl::encoding::DynamicFlags::empty(),
6446 _decode,
6447 )
6448 }
6449}
6450
6451pub struct MonitorEventStream {
6452 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6453}
6454
6455impl std::marker::Unpin for MonitorEventStream {}
6456
6457impl futures::stream::FusedStream for MonitorEventStream {
6458 fn is_terminated(&self) -> bool {
6459 self.event_receiver.is_terminated()
6460 }
6461}
6462
6463impl futures::Stream for MonitorEventStream {
6464 type Item = Result<MonitorEvent, fidl::Error>;
6465
6466 fn poll_next(
6467 mut self: std::pin::Pin<&mut Self>,
6468 cx: &mut std::task::Context<'_>,
6469 ) -> std::task::Poll<Option<Self::Item>> {
6470 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6471 &mut self.event_receiver,
6472 cx
6473 )?) {
6474 Some(buf) => std::task::Poll::Ready(Some(MonitorEvent::decode(buf))),
6475 None => std::task::Poll::Ready(None),
6476 }
6477 }
6478}
6479
6480#[derive(Debug)]
6481pub enum MonitorEvent {}
6482
6483impl MonitorEvent {
6484 fn decode(
6486 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6487 ) -> Result<MonitorEvent, fidl::Error> {
6488 let (bytes, _handles) = buf.split_mut();
6489 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6490 debug_assert_eq!(tx_header.tx_id, 0);
6491 match tx_header.ordinal {
6492 _ => Err(fidl::Error::UnknownOrdinal {
6493 ordinal: tx_header.ordinal,
6494 protocol_name: <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6495 }),
6496 }
6497 }
6498}
6499
6500pub struct MonitorRequestStream {
6502 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6503 is_terminated: bool,
6504}
6505
6506impl std::marker::Unpin for MonitorRequestStream {}
6507
6508impl futures::stream::FusedStream for MonitorRequestStream {
6509 fn is_terminated(&self) -> bool {
6510 self.is_terminated
6511 }
6512}
6513
6514impl fidl::endpoints::RequestStream for MonitorRequestStream {
6515 type Protocol = MonitorMarker;
6516 type ControlHandle = MonitorControlHandle;
6517
6518 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6519 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6520 }
6521
6522 fn control_handle(&self) -> Self::ControlHandle {
6523 MonitorControlHandle { inner: self.inner.clone() }
6524 }
6525
6526 fn into_inner(
6527 self,
6528 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6529 {
6530 (self.inner, self.is_terminated)
6531 }
6532
6533 fn from_inner(
6534 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6535 is_terminated: bool,
6536 ) -> Self {
6537 Self { inner, is_terminated }
6538 }
6539}
6540
6541impl futures::Stream for MonitorRequestStream {
6542 type Item = Result<MonitorRequest, fidl::Error>;
6543
6544 fn poll_next(
6545 mut self: std::pin::Pin<&mut Self>,
6546 cx: &mut std::task::Context<'_>,
6547 ) -> std::task::Poll<Option<Self::Item>> {
6548 let this = &mut *self;
6549 if this.inner.check_shutdown(cx) {
6550 this.is_terminated = true;
6551 return std::task::Poll::Ready(None);
6552 }
6553 if this.is_terminated {
6554 panic!("polled MonitorRequestStream after completion");
6555 }
6556 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6557 |bytes, handles| {
6558 match this.inner.channel().read_etc(cx, bytes, handles) {
6559 std::task::Poll::Ready(Ok(())) => {}
6560 std::task::Poll::Pending => return std::task::Poll::Pending,
6561 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6562 this.is_terminated = true;
6563 return std::task::Poll::Ready(None);
6564 }
6565 std::task::Poll::Ready(Err(e)) => {
6566 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6567 e.into(),
6568 ))))
6569 }
6570 }
6571
6572 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6574
6575 std::task::Poll::Ready(Some(match header.ordinal {
6576 0x7c773b93c1e6080f => {
6577 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6578 let mut req = fidl::new_empty!(
6579 MonitorUpdateRequest,
6580 fidl::encoding::DefaultFuchsiaResourceDialect
6581 );
6582 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MonitorUpdateRequest>(&header, _body_bytes, handles, &mut req)?;
6583 let control_handle = MonitorControlHandle { inner: this.inner.clone() };
6584 Ok(MonitorRequest::Update {
6585 reason: req.reason,
6586 status: req.status,
6587
6588 responder: MonitorUpdateResponder {
6589 control_handle: std::mem::ManuallyDrop::new(control_handle),
6590 tx_id: header.tx_id,
6591 },
6592 })
6593 }
6594 _ => Err(fidl::Error::UnknownOrdinal {
6595 ordinal: header.ordinal,
6596 protocol_name:
6597 <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6598 }),
6599 }))
6600 },
6601 )
6602 }
6603}
6604
6605#[derive(Debug)]
6608pub enum MonitorRequest {
6609 Update { reason: UpdateReason, status: Status, responder: MonitorUpdateResponder },
6614}
6615
6616impl MonitorRequest {
6617 #[allow(irrefutable_let_patterns)]
6618 pub fn into_update(self) -> Option<(UpdateReason, Status, MonitorUpdateResponder)> {
6619 if let MonitorRequest::Update { reason, status, responder } = self {
6620 Some((reason, status, responder))
6621 } else {
6622 None
6623 }
6624 }
6625
6626 pub fn method_name(&self) -> &'static str {
6628 match *self {
6629 MonitorRequest::Update { .. } => "update",
6630 }
6631 }
6632}
6633
6634#[derive(Debug, Clone)]
6635pub struct MonitorControlHandle {
6636 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6637}
6638
6639impl fidl::endpoints::ControlHandle for MonitorControlHandle {
6640 fn shutdown(&self) {
6641 self.inner.shutdown()
6642 }
6643 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6644 self.inner.shutdown_with_epitaph(status)
6645 }
6646
6647 fn is_closed(&self) -> bool {
6648 self.inner.channel().is_closed()
6649 }
6650 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6651 self.inner.channel().on_closed()
6652 }
6653
6654 #[cfg(target_os = "fuchsia")]
6655 fn signal_peer(
6656 &self,
6657 clear_mask: zx::Signals,
6658 set_mask: zx::Signals,
6659 ) -> Result<(), zx_status::Status> {
6660 use fidl::Peered;
6661 self.inner.channel().signal_peer(clear_mask, set_mask)
6662 }
6663}
6664
6665impl MonitorControlHandle {}
6666
6667#[must_use = "FIDL methods require a response to be sent"]
6668#[derive(Debug)]
6669pub struct MonitorUpdateResponder {
6670 control_handle: std::mem::ManuallyDrop<MonitorControlHandle>,
6671 tx_id: u32,
6672}
6673
6674impl std::ops::Drop for MonitorUpdateResponder {
6678 fn drop(&mut self) {
6679 self.control_handle.shutdown();
6680 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6682 }
6683}
6684
6685impl fidl::endpoints::Responder for MonitorUpdateResponder {
6686 type ControlHandle = MonitorControlHandle;
6687
6688 fn control_handle(&self) -> &MonitorControlHandle {
6689 &self.control_handle
6690 }
6691
6692 fn drop_without_shutdown(mut self) {
6693 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6695 std::mem::forget(self);
6697 }
6698}
6699
6700impl MonitorUpdateResponder {
6701 pub fn send(self) -> Result<(), fidl::Error> {
6705 let _result = self.send_raw();
6706 if _result.is_err() {
6707 self.control_handle.shutdown();
6708 }
6709 self.drop_without_shutdown();
6710 _result
6711 }
6712
6713 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6715 let _result = self.send_raw();
6716 self.drop_without_shutdown();
6717 _result
6718 }
6719
6720 fn send_raw(&self) -> Result<(), fidl::Error> {
6721 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6722 (),
6723 self.tx_id,
6724 0x7c773b93c1e6080f,
6725 fidl::encoding::DynamicFlags::empty(),
6726 )
6727 }
6728}
6729
6730#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6731pub struct RegistrarMarker;
6732
6733impl fidl::endpoints::ProtocolMarker for RegistrarMarker {
6734 type Proxy = RegistrarProxy;
6735 type RequestStream = RegistrarRequestStream;
6736 #[cfg(target_os = "fuchsia")]
6737 type SynchronousProxy = RegistrarSynchronousProxy;
6738
6739 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registrar";
6740}
6741impl fidl::endpoints::DiscoverableProtocolMarker for RegistrarMarker {}
6742
6743pub trait RegistrarProxyInterface: Send + Sync {
6744 type RegisterResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6745 fn r#register(
6746 &self,
6747 fuzzer_url: &str,
6748 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6749 ) -> Self::RegisterResponseFut;
6750}
6751#[derive(Debug)]
6752#[cfg(target_os = "fuchsia")]
6753pub struct RegistrarSynchronousProxy {
6754 client: fidl::client::sync::Client,
6755}
6756
6757#[cfg(target_os = "fuchsia")]
6758impl fidl::endpoints::SynchronousProxy for RegistrarSynchronousProxy {
6759 type Proxy = RegistrarProxy;
6760 type Protocol = RegistrarMarker;
6761
6762 fn from_channel(inner: fidl::Channel) -> Self {
6763 Self::new(inner)
6764 }
6765
6766 fn into_channel(self) -> fidl::Channel {
6767 self.client.into_channel()
6768 }
6769
6770 fn as_channel(&self) -> &fidl::Channel {
6771 self.client.as_channel()
6772 }
6773}
6774
6775#[cfg(target_os = "fuchsia")]
6776impl RegistrarSynchronousProxy {
6777 pub fn new(channel: fidl::Channel) -> Self {
6778 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6779 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6780 }
6781
6782 pub fn into_channel(self) -> fidl::Channel {
6783 self.client.into_channel()
6784 }
6785
6786 pub fn wait_for_event(
6789 &self,
6790 deadline: zx::MonotonicInstant,
6791 ) -> Result<RegistrarEvent, fidl::Error> {
6792 RegistrarEvent::decode(self.client.wait_for_event(deadline)?)
6793 }
6794
6795 pub fn r#register(
6806 &self,
6807 mut fuzzer_url: &str,
6808 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6809 ___deadline: zx::MonotonicInstant,
6810 ) -> Result<(), fidl::Error> {
6811 let _response =
6812 self.client.send_query::<RegistrarRegisterRequest, fidl::encoding::EmptyPayload>(
6813 (fuzzer_url, provider),
6814 0x1716ac38e74b2840,
6815 fidl::encoding::DynamicFlags::empty(),
6816 ___deadline,
6817 )?;
6818 Ok(_response)
6819 }
6820}
6821
6822#[cfg(target_os = "fuchsia")]
6823impl From<RegistrarSynchronousProxy> for zx::Handle {
6824 fn from(value: RegistrarSynchronousProxy) -> Self {
6825 value.into_channel().into()
6826 }
6827}
6828
6829#[cfg(target_os = "fuchsia")]
6830impl From<fidl::Channel> for RegistrarSynchronousProxy {
6831 fn from(value: fidl::Channel) -> Self {
6832 Self::new(value)
6833 }
6834}
6835
6836#[cfg(target_os = "fuchsia")]
6837impl fidl::endpoints::FromClient for RegistrarSynchronousProxy {
6838 type Protocol = RegistrarMarker;
6839
6840 fn from_client(value: fidl::endpoints::ClientEnd<RegistrarMarker>) -> Self {
6841 Self::new(value.into_channel())
6842 }
6843}
6844
6845#[derive(Debug, Clone)]
6846pub struct RegistrarProxy {
6847 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6848}
6849
6850impl fidl::endpoints::Proxy for RegistrarProxy {
6851 type Protocol = RegistrarMarker;
6852
6853 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6854 Self::new(inner)
6855 }
6856
6857 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6858 self.client.into_channel().map_err(|client| Self { client })
6859 }
6860
6861 fn as_channel(&self) -> &::fidl::AsyncChannel {
6862 self.client.as_channel()
6863 }
6864}
6865
6866impl RegistrarProxy {
6867 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6869 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6870 Self { client: fidl::client::Client::new(channel, protocol_name) }
6871 }
6872
6873 pub fn take_event_stream(&self) -> RegistrarEventStream {
6879 RegistrarEventStream { event_receiver: self.client.take_event_receiver() }
6880 }
6881
6882 pub fn r#register(
6893 &self,
6894 mut fuzzer_url: &str,
6895 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6896 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6897 RegistrarProxyInterface::r#register(self, fuzzer_url, provider)
6898 }
6899}
6900
6901impl RegistrarProxyInterface for RegistrarProxy {
6902 type RegisterResponseFut =
6903 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6904 fn r#register(
6905 &self,
6906 mut fuzzer_url: &str,
6907 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6908 ) -> Self::RegisterResponseFut {
6909 fn _decode(
6910 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6911 ) -> Result<(), fidl::Error> {
6912 let _response = fidl::client::decode_transaction_body::<
6913 fidl::encoding::EmptyPayload,
6914 fidl::encoding::DefaultFuchsiaResourceDialect,
6915 0x1716ac38e74b2840,
6916 >(_buf?)?;
6917 Ok(_response)
6918 }
6919 self.client.send_query_and_decode::<RegistrarRegisterRequest, ()>(
6920 (fuzzer_url, provider),
6921 0x1716ac38e74b2840,
6922 fidl::encoding::DynamicFlags::empty(),
6923 _decode,
6924 )
6925 }
6926}
6927
6928pub struct RegistrarEventStream {
6929 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6930}
6931
6932impl std::marker::Unpin for RegistrarEventStream {}
6933
6934impl futures::stream::FusedStream for RegistrarEventStream {
6935 fn is_terminated(&self) -> bool {
6936 self.event_receiver.is_terminated()
6937 }
6938}
6939
6940impl futures::Stream for RegistrarEventStream {
6941 type Item = Result<RegistrarEvent, fidl::Error>;
6942
6943 fn poll_next(
6944 mut self: std::pin::Pin<&mut Self>,
6945 cx: &mut std::task::Context<'_>,
6946 ) -> std::task::Poll<Option<Self::Item>> {
6947 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6948 &mut self.event_receiver,
6949 cx
6950 )?) {
6951 Some(buf) => std::task::Poll::Ready(Some(RegistrarEvent::decode(buf))),
6952 None => std::task::Poll::Ready(None),
6953 }
6954 }
6955}
6956
6957#[derive(Debug)]
6958pub enum RegistrarEvent {}
6959
6960impl RegistrarEvent {
6961 fn decode(
6963 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6964 ) -> Result<RegistrarEvent, fidl::Error> {
6965 let (bytes, _handles) = buf.split_mut();
6966 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6967 debug_assert_eq!(tx_header.tx_id, 0);
6968 match tx_header.ordinal {
6969 _ => Err(fidl::Error::UnknownOrdinal {
6970 ordinal: tx_header.ordinal,
6971 protocol_name: <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6972 }),
6973 }
6974 }
6975}
6976
6977pub struct RegistrarRequestStream {
6979 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6980 is_terminated: bool,
6981}
6982
6983impl std::marker::Unpin for RegistrarRequestStream {}
6984
6985impl futures::stream::FusedStream for RegistrarRequestStream {
6986 fn is_terminated(&self) -> bool {
6987 self.is_terminated
6988 }
6989}
6990
6991impl fidl::endpoints::RequestStream for RegistrarRequestStream {
6992 type Protocol = RegistrarMarker;
6993 type ControlHandle = RegistrarControlHandle;
6994
6995 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6996 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6997 }
6998
6999 fn control_handle(&self) -> Self::ControlHandle {
7000 RegistrarControlHandle { inner: self.inner.clone() }
7001 }
7002
7003 fn into_inner(
7004 self,
7005 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7006 {
7007 (self.inner, self.is_terminated)
7008 }
7009
7010 fn from_inner(
7011 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7012 is_terminated: bool,
7013 ) -> Self {
7014 Self { inner, is_terminated }
7015 }
7016}
7017
7018impl futures::Stream for RegistrarRequestStream {
7019 type Item = Result<RegistrarRequest, fidl::Error>;
7020
7021 fn poll_next(
7022 mut self: std::pin::Pin<&mut Self>,
7023 cx: &mut std::task::Context<'_>,
7024 ) -> std::task::Poll<Option<Self::Item>> {
7025 let this = &mut *self;
7026 if this.inner.check_shutdown(cx) {
7027 this.is_terminated = true;
7028 return std::task::Poll::Ready(None);
7029 }
7030 if this.is_terminated {
7031 panic!("polled RegistrarRequestStream after completion");
7032 }
7033 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7034 |bytes, handles| {
7035 match this.inner.channel().read_etc(cx, bytes, handles) {
7036 std::task::Poll::Ready(Ok(())) => {}
7037 std::task::Poll::Pending => return std::task::Poll::Pending,
7038 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7039 this.is_terminated = true;
7040 return std::task::Poll::Ready(None);
7041 }
7042 std::task::Poll::Ready(Err(e)) => {
7043 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7044 e.into(),
7045 ))))
7046 }
7047 }
7048
7049 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7051
7052 std::task::Poll::Ready(Some(match header.ordinal {
7053 0x1716ac38e74b2840 => {
7054 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7055 let mut req = fidl::new_empty!(
7056 RegistrarRegisterRequest,
7057 fidl::encoding::DefaultFuchsiaResourceDialect
7058 );
7059 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistrarRegisterRequest>(&header, _body_bytes, handles, &mut req)?;
7060 let control_handle = RegistrarControlHandle { inner: this.inner.clone() };
7061 Ok(RegistrarRequest::Register {
7062 fuzzer_url: req.fuzzer_url,
7063 provider: req.provider,
7064
7065 responder: RegistrarRegisterResponder {
7066 control_handle: std::mem::ManuallyDrop::new(control_handle),
7067 tx_id: header.tx_id,
7068 },
7069 })
7070 }
7071 _ => Err(fidl::Error::UnknownOrdinal {
7072 ordinal: header.ordinal,
7073 protocol_name:
7074 <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7075 }),
7076 }))
7077 },
7078 )
7079 }
7080}
7081
7082#[derive(Debug)]
7087pub enum RegistrarRequest {
7088 Register {
7099 fuzzer_url: String,
7100 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7101 responder: RegistrarRegisterResponder,
7102 },
7103}
7104
7105impl RegistrarRequest {
7106 #[allow(irrefutable_let_patterns)]
7107 pub fn into_register(
7108 self,
7109 ) -> Option<(
7110 String,
7111 fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7112 RegistrarRegisterResponder,
7113 )> {
7114 if let RegistrarRequest::Register { fuzzer_url, provider, responder } = self {
7115 Some((fuzzer_url, provider, responder))
7116 } else {
7117 None
7118 }
7119 }
7120
7121 pub fn method_name(&self) -> &'static str {
7123 match *self {
7124 RegistrarRequest::Register { .. } => "register",
7125 }
7126 }
7127}
7128
7129#[derive(Debug, Clone)]
7130pub struct RegistrarControlHandle {
7131 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7132}
7133
7134impl fidl::endpoints::ControlHandle for RegistrarControlHandle {
7135 fn shutdown(&self) {
7136 self.inner.shutdown()
7137 }
7138 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7139 self.inner.shutdown_with_epitaph(status)
7140 }
7141
7142 fn is_closed(&self) -> bool {
7143 self.inner.channel().is_closed()
7144 }
7145 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7146 self.inner.channel().on_closed()
7147 }
7148
7149 #[cfg(target_os = "fuchsia")]
7150 fn signal_peer(
7151 &self,
7152 clear_mask: zx::Signals,
7153 set_mask: zx::Signals,
7154 ) -> Result<(), zx_status::Status> {
7155 use fidl::Peered;
7156 self.inner.channel().signal_peer(clear_mask, set_mask)
7157 }
7158}
7159
7160impl RegistrarControlHandle {}
7161
7162#[must_use = "FIDL methods require a response to be sent"]
7163#[derive(Debug)]
7164pub struct RegistrarRegisterResponder {
7165 control_handle: std::mem::ManuallyDrop<RegistrarControlHandle>,
7166 tx_id: u32,
7167}
7168
7169impl std::ops::Drop for RegistrarRegisterResponder {
7173 fn drop(&mut self) {
7174 self.control_handle.shutdown();
7175 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7177 }
7178}
7179
7180impl fidl::endpoints::Responder for RegistrarRegisterResponder {
7181 type ControlHandle = RegistrarControlHandle;
7182
7183 fn control_handle(&self) -> &RegistrarControlHandle {
7184 &self.control_handle
7185 }
7186
7187 fn drop_without_shutdown(mut self) {
7188 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7190 std::mem::forget(self);
7192 }
7193}
7194
7195impl RegistrarRegisterResponder {
7196 pub fn send(self) -> Result<(), fidl::Error> {
7200 let _result = self.send_raw();
7201 if _result.is_err() {
7202 self.control_handle.shutdown();
7203 }
7204 self.drop_without_shutdown();
7205 _result
7206 }
7207
7208 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
7210 let _result = self.send_raw();
7211 self.drop_without_shutdown();
7212 _result
7213 }
7214
7215 fn send_raw(&self) -> Result<(), fidl::Error> {
7216 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
7217 (),
7218 self.tx_id,
7219 0x1716ac38e74b2840,
7220 fidl::encoding::DynamicFlags::empty(),
7221 )
7222 }
7223}
7224
7225#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7226pub struct RegistryMarker;
7227
7228impl fidl::endpoints::ProtocolMarker for RegistryMarker {
7229 type Proxy = RegistryProxy;
7230 type RequestStream = RegistryRequestStream;
7231 #[cfg(target_os = "fuchsia")]
7232 type SynchronousProxy = RegistrySynchronousProxy;
7233
7234 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registry";
7235}
7236impl fidl::endpoints::DiscoverableProtocolMarker for RegistryMarker {}
7237pub type RegistryConnectResult = Result<(), i32>;
7238pub type RegistryDisconnectResult = Result<(), i32>;
7239
7240pub trait RegistryProxyInterface: Send + Sync {
7241 type ConnectResponseFut: std::future::Future<Output = Result<RegistryConnectResult, fidl::Error>>
7242 + Send;
7243 fn r#connect(
7244 &self,
7245 fuzzer_url: &str,
7246 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7247 timeout: i64,
7248 ) -> Self::ConnectResponseFut;
7249 type DisconnectResponseFut: std::future::Future<Output = Result<RegistryDisconnectResult, fidl::Error>>
7250 + Send;
7251 fn r#disconnect(&self, fuzzer_url: &str) -> Self::DisconnectResponseFut;
7252}
7253#[derive(Debug)]
7254#[cfg(target_os = "fuchsia")]
7255pub struct RegistrySynchronousProxy {
7256 client: fidl::client::sync::Client,
7257}
7258
7259#[cfg(target_os = "fuchsia")]
7260impl fidl::endpoints::SynchronousProxy for RegistrySynchronousProxy {
7261 type Proxy = RegistryProxy;
7262 type Protocol = RegistryMarker;
7263
7264 fn from_channel(inner: fidl::Channel) -> Self {
7265 Self::new(inner)
7266 }
7267
7268 fn into_channel(self) -> fidl::Channel {
7269 self.client.into_channel()
7270 }
7271
7272 fn as_channel(&self) -> &fidl::Channel {
7273 self.client.as_channel()
7274 }
7275}
7276
7277#[cfg(target_os = "fuchsia")]
7278impl RegistrySynchronousProxy {
7279 pub fn new(channel: fidl::Channel) -> Self {
7280 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7281 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7282 }
7283
7284 pub fn into_channel(self) -> fidl::Channel {
7285 self.client.into_channel()
7286 }
7287
7288 pub fn wait_for_event(
7291 &self,
7292 deadline: zx::MonotonicInstant,
7293 ) -> Result<RegistryEvent, fidl::Error> {
7294 RegistryEvent::decode(self.client.wait_for_event(deadline)?)
7295 }
7296
7297 pub fn r#connect(
7313 &self,
7314 mut fuzzer_url: &str,
7315 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7316 mut timeout: i64,
7317 ___deadline: zx::MonotonicInstant,
7318 ) -> Result<RegistryConnectResult, fidl::Error> {
7319 let _response = self.client.send_query::<
7320 RegistryConnectRequest,
7321 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7322 >(
7323 (fuzzer_url, controller, timeout,),
7324 0x5128cb31967a446f,
7325 fidl::encoding::DynamicFlags::empty(),
7326 ___deadline,
7327 )?;
7328 Ok(_response.map(|x| x))
7329 }
7330
7331 pub fn r#disconnect(
7338 &self,
7339 mut fuzzer_url: &str,
7340 ___deadline: zx::MonotonicInstant,
7341 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7342 let _response = self.client.send_query::<
7343 RegistryDisconnectRequest,
7344 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7345 >(
7346 (fuzzer_url,),
7347 0x7bb4b7591146d4cb,
7348 fidl::encoding::DynamicFlags::empty(),
7349 ___deadline,
7350 )?;
7351 Ok(_response.map(|x| x))
7352 }
7353}
7354
7355#[cfg(target_os = "fuchsia")]
7356impl From<RegistrySynchronousProxy> for zx::Handle {
7357 fn from(value: RegistrySynchronousProxy) -> Self {
7358 value.into_channel().into()
7359 }
7360}
7361
7362#[cfg(target_os = "fuchsia")]
7363impl From<fidl::Channel> for RegistrySynchronousProxy {
7364 fn from(value: fidl::Channel) -> Self {
7365 Self::new(value)
7366 }
7367}
7368
7369#[cfg(target_os = "fuchsia")]
7370impl fidl::endpoints::FromClient for RegistrySynchronousProxy {
7371 type Protocol = RegistryMarker;
7372
7373 fn from_client(value: fidl::endpoints::ClientEnd<RegistryMarker>) -> Self {
7374 Self::new(value.into_channel())
7375 }
7376}
7377
7378#[derive(Debug, Clone)]
7379pub struct RegistryProxy {
7380 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7381}
7382
7383impl fidl::endpoints::Proxy for RegistryProxy {
7384 type Protocol = RegistryMarker;
7385
7386 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7387 Self::new(inner)
7388 }
7389
7390 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7391 self.client.into_channel().map_err(|client| Self { client })
7392 }
7393
7394 fn as_channel(&self) -> &::fidl::AsyncChannel {
7395 self.client.as_channel()
7396 }
7397}
7398
7399impl RegistryProxy {
7400 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7402 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7403 Self { client: fidl::client::Client::new(channel, protocol_name) }
7404 }
7405
7406 pub fn take_event_stream(&self) -> RegistryEventStream {
7412 RegistryEventStream { event_receiver: self.client.take_event_receiver() }
7413 }
7414
7415 pub fn r#connect(
7431 &self,
7432 mut fuzzer_url: &str,
7433 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7434 mut timeout: i64,
7435 ) -> fidl::client::QueryResponseFut<
7436 RegistryConnectResult,
7437 fidl::encoding::DefaultFuchsiaResourceDialect,
7438 > {
7439 RegistryProxyInterface::r#connect(self, fuzzer_url, controller, timeout)
7440 }
7441
7442 pub fn r#disconnect(
7449 &self,
7450 mut fuzzer_url: &str,
7451 ) -> fidl::client::QueryResponseFut<
7452 RegistryDisconnectResult,
7453 fidl::encoding::DefaultFuchsiaResourceDialect,
7454 > {
7455 RegistryProxyInterface::r#disconnect(self, fuzzer_url)
7456 }
7457}
7458
7459impl RegistryProxyInterface for RegistryProxy {
7460 type ConnectResponseFut = fidl::client::QueryResponseFut<
7461 RegistryConnectResult,
7462 fidl::encoding::DefaultFuchsiaResourceDialect,
7463 >;
7464 fn r#connect(
7465 &self,
7466 mut fuzzer_url: &str,
7467 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7468 mut timeout: i64,
7469 ) -> Self::ConnectResponseFut {
7470 fn _decode(
7471 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7472 ) -> Result<RegistryConnectResult, fidl::Error> {
7473 let _response = fidl::client::decode_transaction_body::<
7474 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7475 fidl::encoding::DefaultFuchsiaResourceDialect,
7476 0x5128cb31967a446f,
7477 >(_buf?)?;
7478 Ok(_response.map(|x| x))
7479 }
7480 self.client.send_query_and_decode::<RegistryConnectRequest, RegistryConnectResult>(
7481 (fuzzer_url, controller, timeout),
7482 0x5128cb31967a446f,
7483 fidl::encoding::DynamicFlags::empty(),
7484 _decode,
7485 )
7486 }
7487
7488 type DisconnectResponseFut = fidl::client::QueryResponseFut<
7489 RegistryDisconnectResult,
7490 fidl::encoding::DefaultFuchsiaResourceDialect,
7491 >;
7492 fn r#disconnect(&self, mut fuzzer_url: &str) -> Self::DisconnectResponseFut {
7493 fn _decode(
7494 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7495 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7496 let _response = fidl::client::decode_transaction_body::<
7497 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7498 fidl::encoding::DefaultFuchsiaResourceDialect,
7499 0x7bb4b7591146d4cb,
7500 >(_buf?)?;
7501 Ok(_response.map(|x| x))
7502 }
7503 self.client.send_query_and_decode::<RegistryDisconnectRequest, RegistryDisconnectResult>(
7504 (fuzzer_url,),
7505 0x7bb4b7591146d4cb,
7506 fidl::encoding::DynamicFlags::empty(),
7507 _decode,
7508 )
7509 }
7510}
7511
7512pub struct RegistryEventStream {
7513 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7514}
7515
7516impl std::marker::Unpin for RegistryEventStream {}
7517
7518impl futures::stream::FusedStream for RegistryEventStream {
7519 fn is_terminated(&self) -> bool {
7520 self.event_receiver.is_terminated()
7521 }
7522}
7523
7524impl futures::Stream for RegistryEventStream {
7525 type Item = Result<RegistryEvent, fidl::Error>;
7526
7527 fn poll_next(
7528 mut self: std::pin::Pin<&mut Self>,
7529 cx: &mut std::task::Context<'_>,
7530 ) -> std::task::Poll<Option<Self::Item>> {
7531 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7532 &mut self.event_receiver,
7533 cx
7534 )?) {
7535 Some(buf) => std::task::Poll::Ready(Some(RegistryEvent::decode(buf))),
7536 None => std::task::Poll::Ready(None),
7537 }
7538 }
7539}
7540
7541#[derive(Debug)]
7542pub enum RegistryEvent {}
7543
7544impl RegistryEvent {
7545 fn decode(
7547 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7548 ) -> Result<RegistryEvent, fidl::Error> {
7549 let (bytes, _handles) = buf.split_mut();
7550 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7551 debug_assert_eq!(tx_header.tx_id, 0);
7552 match tx_header.ordinal {
7553 _ => Err(fidl::Error::UnknownOrdinal {
7554 ordinal: tx_header.ordinal,
7555 protocol_name: <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7556 }),
7557 }
7558 }
7559}
7560
7561pub struct RegistryRequestStream {
7563 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7564 is_terminated: bool,
7565}
7566
7567impl std::marker::Unpin for RegistryRequestStream {}
7568
7569impl futures::stream::FusedStream for RegistryRequestStream {
7570 fn is_terminated(&self) -> bool {
7571 self.is_terminated
7572 }
7573}
7574
7575impl fidl::endpoints::RequestStream for RegistryRequestStream {
7576 type Protocol = RegistryMarker;
7577 type ControlHandle = RegistryControlHandle;
7578
7579 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7580 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7581 }
7582
7583 fn control_handle(&self) -> Self::ControlHandle {
7584 RegistryControlHandle { inner: self.inner.clone() }
7585 }
7586
7587 fn into_inner(
7588 self,
7589 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7590 {
7591 (self.inner, self.is_terminated)
7592 }
7593
7594 fn from_inner(
7595 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7596 is_terminated: bool,
7597 ) -> Self {
7598 Self { inner, is_terminated }
7599 }
7600}
7601
7602impl futures::Stream for RegistryRequestStream {
7603 type Item = Result<RegistryRequest, fidl::Error>;
7604
7605 fn poll_next(
7606 mut self: std::pin::Pin<&mut Self>,
7607 cx: &mut std::task::Context<'_>,
7608 ) -> std::task::Poll<Option<Self::Item>> {
7609 let this = &mut *self;
7610 if this.inner.check_shutdown(cx) {
7611 this.is_terminated = true;
7612 return std::task::Poll::Ready(None);
7613 }
7614 if this.is_terminated {
7615 panic!("polled RegistryRequestStream after completion");
7616 }
7617 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7618 |bytes, handles| {
7619 match this.inner.channel().read_etc(cx, bytes, handles) {
7620 std::task::Poll::Ready(Ok(())) => {}
7621 std::task::Poll::Pending => return std::task::Poll::Pending,
7622 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7623 this.is_terminated = true;
7624 return std::task::Poll::Ready(None);
7625 }
7626 std::task::Poll::Ready(Err(e)) => {
7627 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7628 e.into(),
7629 ))))
7630 }
7631 }
7632
7633 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7635
7636 std::task::Poll::Ready(Some(match header.ordinal {
7637 0x5128cb31967a446f => {
7638 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7639 let mut req = fidl::new_empty!(
7640 RegistryConnectRequest,
7641 fidl::encoding::DefaultFuchsiaResourceDialect
7642 );
7643 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryConnectRequest>(&header, _body_bytes, handles, &mut req)?;
7644 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7645 Ok(RegistryRequest::Connect {
7646 fuzzer_url: req.fuzzer_url,
7647 controller: req.controller,
7648 timeout: req.timeout,
7649
7650 responder: RegistryConnectResponder {
7651 control_handle: std::mem::ManuallyDrop::new(control_handle),
7652 tx_id: header.tx_id,
7653 },
7654 })
7655 }
7656 0x7bb4b7591146d4cb => {
7657 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7658 let mut req = fidl::new_empty!(
7659 RegistryDisconnectRequest,
7660 fidl::encoding::DefaultFuchsiaResourceDialect
7661 );
7662 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
7663 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7664 Ok(RegistryRequest::Disconnect {
7665 fuzzer_url: req.fuzzer_url,
7666
7667 responder: RegistryDisconnectResponder {
7668 control_handle: std::mem::ManuallyDrop::new(control_handle),
7669 tx_id: header.tx_id,
7670 },
7671 })
7672 }
7673 _ => Err(fidl::Error::UnknownOrdinal {
7674 ordinal: header.ordinal,
7675 protocol_name:
7676 <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7677 }),
7678 }))
7679 },
7680 )
7681 }
7682}
7683
7684#[derive(Debug)]
7688pub enum RegistryRequest {
7689 Connect {
7705 fuzzer_url: String,
7706 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7707 timeout: i64,
7708 responder: RegistryConnectResponder,
7709 },
7710 Disconnect { fuzzer_url: String, responder: RegistryDisconnectResponder },
7717}
7718
7719impl RegistryRequest {
7720 #[allow(irrefutable_let_patterns)]
7721 pub fn into_connect(
7722 self,
7723 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, i64, RegistryConnectResponder)>
7724 {
7725 if let RegistryRequest::Connect { fuzzer_url, controller, timeout, responder } = self {
7726 Some((fuzzer_url, controller, timeout, responder))
7727 } else {
7728 None
7729 }
7730 }
7731
7732 #[allow(irrefutable_let_patterns)]
7733 pub fn into_disconnect(self) -> Option<(String, RegistryDisconnectResponder)> {
7734 if let RegistryRequest::Disconnect { fuzzer_url, responder } = self {
7735 Some((fuzzer_url, responder))
7736 } else {
7737 None
7738 }
7739 }
7740
7741 pub fn method_name(&self) -> &'static str {
7743 match *self {
7744 RegistryRequest::Connect { .. } => "connect",
7745 RegistryRequest::Disconnect { .. } => "disconnect",
7746 }
7747 }
7748}
7749
7750#[derive(Debug, Clone)]
7751pub struct RegistryControlHandle {
7752 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7753}
7754
7755impl fidl::endpoints::ControlHandle for RegistryControlHandle {
7756 fn shutdown(&self) {
7757 self.inner.shutdown()
7758 }
7759 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7760 self.inner.shutdown_with_epitaph(status)
7761 }
7762
7763 fn is_closed(&self) -> bool {
7764 self.inner.channel().is_closed()
7765 }
7766 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7767 self.inner.channel().on_closed()
7768 }
7769
7770 #[cfg(target_os = "fuchsia")]
7771 fn signal_peer(
7772 &self,
7773 clear_mask: zx::Signals,
7774 set_mask: zx::Signals,
7775 ) -> Result<(), zx_status::Status> {
7776 use fidl::Peered;
7777 self.inner.channel().signal_peer(clear_mask, set_mask)
7778 }
7779}
7780
7781impl RegistryControlHandle {}
7782
7783#[must_use = "FIDL methods require a response to be sent"]
7784#[derive(Debug)]
7785pub struct RegistryConnectResponder {
7786 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7787 tx_id: u32,
7788}
7789
7790impl std::ops::Drop for RegistryConnectResponder {
7794 fn drop(&mut self) {
7795 self.control_handle.shutdown();
7796 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7798 }
7799}
7800
7801impl fidl::endpoints::Responder for RegistryConnectResponder {
7802 type ControlHandle = RegistryControlHandle;
7803
7804 fn control_handle(&self) -> &RegistryControlHandle {
7805 &self.control_handle
7806 }
7807
7808 fn drop_without_shutdown(mut self) {
7809 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7811 std::mem::forget(self);
7813 }
7814}
7815
7816impl RegistryConnectResponder {
7817 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7821 let _result = self.send_raw(result);
7822 if _result.is_err() {
7823 self.control_handle.shutdown();
7824 }
7825 self.drop_without_shutdown();
7826 _result
7827 }
7828
7829 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7831 let _result = self.send_raw(result);
7832 self.drop_without_shutdown();
7833 _result
7834 }
7835
7836 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7837 self.control_handle
7838 .inner
7839 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7840 result,
7841 self.tx_id,
7842 0x5128cb31967a446f,
7843 fidl::encoding::DynamicFlags::empty(),
7844 )
7845 }
7846}
7847
7848#[must_use = "FIDL methods require a response to be sent"]
7849#[derive(Debug)]
7850pub struct RegistryDisconnectResponder {
7851 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7852 tx_id: u32,
7853}
7854
7855impl std::ops::Drop for RegistryDisconnectResponder {
7859 fn drop(&mut self) {
7860 self.control_handle.shutdown();
7861 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7863 }
7864}
7865
7866impl fidl::endpoints::Responder for RegistryDisconnectResponder {
7867 type ControlHandle = RegistryControlHandle;
7868
7869 fn control_handle(&self) -> &RegistryControlHandle {
7870 &self.control_handle
7871 }
7872
7873 fn drop_without_shutdown(mut self) {
7874 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7876 std::mem::forget(self);
7878 }
7879}
7880
7881impl RegistryDisconnectResponder {
7882 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7886 let _result = self.send_raw(result);
7887 if _result.is_err() {
7888 self.control_handle.shutdown();
7889 }
7890 self.drop_without_shutdown();
7891 _result
7892 }
7893
7894 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7896 let _result = self.send_raw(result);
7897 self.drop_without_shutdown();
7898 _result
7899 }
7900
7901 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7902 self.control_handle
7903 .inner
7904 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7905 result,
7906 self.tx_id,
7907 0x7bb4b7591146d4cb,
7908 fidl::encoding::DynamicFlags::empty(),
7909 )
7910 }
7911}
7912
7913#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7914pub struct TargetAdapterMarker;
7915
7916impl fidl::endpoints::ProtocolMarker for TargetAdapterMarker {
7917 type Proxy = TargetAdapterProxy;
7918 type RequestStream = TargetAdapterRequestStream;
7919 #[cfg(target_os = "fuchsia")]
7920 type SynchronousProxy = TargetAdapterSynchronousProxy;
7921
7922 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.TargetAdapter";
7923}
7924impl fidl::endpoints::DiscoverableProtocolMarker for TargetAdapterMarker {}
7925
7926pub trait TargetAdapterProxyInterface: Send + Sync {
7927 type GetParametersResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>>
7928 + Send;
7929 fn r#get_parameters(&self) -> Self::GetParametersResponseFut;
7930 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
7931 fn r#connect(
7932 &self,
7933 eventpair: fidl::EventPair,
7934 test_input: fidl::Vmo,
7935 ) -> Self::ConnectResponseFut;
7936}
7937#[derive(Debug)]
7938#[cfg(target_os = "fuchsia")]
7939pub struct TargetAdapterSynchronousProxy {
7940 client: fidl::client::sync::Client,
7941}
7942
7943#[cfg(target_os = "fuchsia")]
7944impl fidl::endpoints::SynchronousProxy for TargetAdapterSynchronousProxy {
7945 type Proxy = TargetAdapterProxy;
7946 type Protocol = TargetAdapterMarker;
7947
7948 fn from_channel(inner: fidl::Channel) -> Self {
7949 Self::new(inner)
7950 }
7951
7952 fn into_channel(self) -> fidl::Channel {
7953 self.client.into_channel()
7954 }
7955
7956 fn as_channel(&self) -> &fidl::Channel {
7957 self.client.as_channel()
7958 }
7959}
7960
7961#[cfg(target_os = "fuchsia")]
7962impl TargetAdapterSynchronousProxy {
7963 pub fn new(channel: fidl::Channel) -> Self {
7964 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7965 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7966 }
7967
7968 pub fn into_channel(self) -> fidl::Channel {
7969 self.client.into_channel()
7970 }
7971
7972 pub fn wait_for_event(
7975 &self,
7976 deadline: zx::MonotonicInstant,
7977 ) -> Result<TargetAdapterEvent, fidl::Error> {
7978 TargetAdapterEvent::decode(self.client.wait_for_event(deadline)?)
7979 }
7980
7981 pub fn r#get_parameters(
7992 &self,
7993 ___deadline: zx::MonotonicInstant,
7994 ) -> Result<Vec<String>, fidl::Error> {
7995 let _response = self
7996 .client
7997 .send_query::<fidl::encoding::EmptyPayload, TargetAdapterGetParametersResponse>(
7998 (),
7999 0x5c7e40a47f753e3e,
8000 fidl::encoding::DynamicFlags::empty(),
8001 ___deadline,
8002 )?;
8003 Ok(_response.parameters)
8004 }
8005
8006 pub fn r#connect(
8015 &self,
8016 mut eventpair: fidl::EventPair,
8017 mut test_input: fidl::Vmo,
8018 ___deadline: zx::MonotonicInstant,
8019 ) -> Result<(), fidl::Error> {
8020 let _response =
8021 self.client.send_query::<TargetAdapterConnectRequest, fidl::encoding::EmptyPayload>(
8022 (eventpair, test_input),
8023 0x7ea603a119866618,
8024 fidl::encoding::DynamicFlags::empty(),
8025 ___deadline,
8026 )?;
8027 Ok(_response)
8028 }
8029}
8030
8031#[cfg(target_os = "fuchsia")]
8032impl From<TargetAdapterSynchronousProxy> for zx::Handle {
8033 fn from(value: TargetAdapterSynchronousProxy) -> Self {
8034 value.into_channel().into()
8035 }
8036}
8037
8038#[cfg(target_os = "fuchsia")]
8039impl From<fidl::Channel> for TargetAdapterSynchronousProxy {
8040 fn from(value: fidl::Channel) -> Self {
8041 Self::new(value)
8042 }
8043}
8044
8045#[cfg(target_os = "fuchsia")]
8046impl fidl::endpoints::FromClient for TargetAdapterSynchronousProxy {
8047 type Protocol = TargetAdapterMarker;
8048
8049 fn from_client(value: fidl::endpoints::ClientEnd<TargetAdapterMarker>) -> Self {
8050 Self::new(value.into_channel())
8051 }
8052}
8053
8054#[derive(Debug, Clone)]
8055pub struct TargetAdapterProxy {
8056 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8057}
8058
8059impl fidl::endpoints::Proxy for TargetAdapterProxy {
8060 type Protocol = TargetAdapterMarker;
8061
8062 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8063 Self::new(inner)
8064 }
8065
8066 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8067 self.client.into_channel().map_err(|client| Self { client })
8068 }
8069
8070 fn as_channel(&self) -> &::fidl::AsyncChannel {
8071 self.client.as_channel()
8072 }
8073}
8074
8075impl TargetAdapterProxy {
8076 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8078 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8079 Self { client: fidl::client::Client::new(channel, protocol_name) }
8080 }
8081
8082 pub fn take_event_stream(&self) -> TargetAdapterEventStream {
8088 TargetAdapterEventStream { event_receiver: self.client.take_event_receiver() }
8089 }
8090
8091 pub fn r#get_parameters(
8102 &self,
8103 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
8104 {
8105 TargetAdapterProxyInterface::r#get_parameters(self)
8106 }
8107
8108 pub fn r#connect(
8117 &self,
8118 mut eventpair: fidl::EventPair,
8119 mut test_input: fidl::Vmo,
8120 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8121 TargetAdapterProxyInterface::r#connect(self, eventpair, test_input)
8122 }
8123}
8124
8125impl TargetAdapterProxyInterface for TargetAdapterProxy {
8126 type GetParametersResponseFut =
8127 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8128 fn r#get_parameters(&self) -> Self::GetParametersResponseFut {
8129 fn _decode(
8130 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8131 ) -> Result<Vec<String>, fidl::Error> {
8132 let _response = fidl::client::decode_transaction_body::<
8133 TargetAdapterGetParametersResponse,
8134 fidl::encoding::DefaultFuchsiaResourceDialect,
8135 0x5c7e40a47f753e3e,
8136 >(_buf?)?;
8137 Ok(_response.parameters)
8138 }
8139 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
8140 (),
8141 0x5c7e40a47f753e3e,
8142 fidl::encoding::DynamicFlags::empty(),
8143 _decode,
8144 )
8145 }
8146
8147 type ConnectResponseFut =
8148 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8149 fn r#connect(
8150 &self,
8151 mut eventpair: fidl::EventPair,
8152 mut test_input: fidl::Vmo,
8153 ) -> Self::ConnectResponseFut {
8154 fn _decode(
8155 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8156 ) -> Result<(), fidl::Error> {
8157 let _response = fidl::client::decode_transaction_body::<
8158 fidl::encoding::EmptyPayload,
8159 fidl::encoding::DefaultFuchsiaResourceDialect,
8160 0x7ea603a119866618,
8161 >(_buf?)?;
8162 Ok(_response)
8163 }
8164 self.client.send_query_and_decode::<TargetAdapterConnectRequest, ()>(
8165 (eventpair, test_input),
8166 0x7ea603a119866618,
8167 fidl::encoding::DynamicFlags::empty(),
8168 _decode,
8169 )
8170 }
8171}
8172
8173pub struct TargetAdapterEventStream {
8174 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8175}
8176
8177impl std::marker::Unpin for TargetAdapterEventStream {}
8178
8179impl futures::stream::FusedStream for TargetAdapterEventStream {
8180 fn is_terminated(&self) -> bool {
8181 self.event_receiver.is_terminated()
8182 }
8183}
8184
8185impl futures::Stream for TargetAdapterEventStream {
8186 type Item = Result<TargetAdapterEvent, fidl::Error>;
8187
8188 fn poll_next(
8189 mut self: std::pin::Pin<&mut Self>,
8190 cx: &mut std::task::Context<'_>,
8191 ) -> std::task::Poll<Option<Self::Item>> {
8192 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8193 &mut self.event_receiver,
8194 cx
8195 )?) {
8196 Some(buf) => std::task::Poll::Ready(Some(TargetAdapterEvent::decode(buf))),
8197 None => std::task::Poll::Ready(None),
8198 }
8199 }
8200}
8201
8202#[derive(Debug)]
8203pub enum TargetAdapterEvent {}
8204
8205impl TargetAdapterEvent {
8206 fn decode(
8208 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8209 ) -> Result<TargetAdapterEvent, fidl::Error> {
8210 let (bytes, _handles) = buf.split_mut();
8211 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8212 debug_assert_eq!(tx_header.tx_id, 0);
8213 match tx_header.ordinal {
8214 _ => Err(fidl::Error::UnknownOrdinal {
8215 ordinal: tx_header.ordinal,
8216 protocol_name: <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8217 }),
8218 }
8219 }
8220}
8221
8222pub struct TargetAdapterRequestStream {
8224 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8225 is_terminated: bool,
8226}
8227
8228impl std::marker::Unpin for TargetAdapterRequestStream {}
8229
8230impl futures::stream::FusedStream for TargetAdapterRequestStream {
8231 fn is_terminated(&self) -> bool {
8232 self.is_terminated
8233 }
8234}
8235
8236impl fidl::endpoints::RequestStream for TargetAdapterRequestStream {
8237 type Protocol = TargetAdapterMarker;
8238 type ControlHandle = TargetAdapterControlHandle;
8239
8240 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8241 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8242 }
8243
8244 fn control_handle(&self) -> Self::ControlHandle {
8245 TargetAdapterControlHandle { inner: self.inner.clone() }
8246 }
8247
8248 fn into_inner(
8249 self,
8250 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8251 {
8252 (self.inner, self.is_terminated)
8253 }
8254
8255 fn from_inner(
8256 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8257 is_terminated: bool,
8258 ) -> Self {
8259 Self { inner, is_terminated }
8260 }
8261}
8262
8263impl futures::Stream for TargetAdapterRequestStream {
8264 type Item = Result<TargetAdapterRequest, fidl::Error>;
8265
8266 fn poll_next(
8267 mut self: std::pin::Pin<&mut Self>,
8268 cx: &mut std::task::Context<'_>,
8269 ) -> std::task::Poll<Option<Self::Item>> {
8270 let this = &mut *self;
8271 if this.inner.check_shutdown(cx) {
8272 this.is_terminated = true;
8273 return std::task::Poll::Ready(None);
8274 }
8275 if this.is_terminated {
8276 panic!("polled TargetAdapterRequestStream after completion");
8277 }
8278 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8279 |bytes, handles| {
8280 match this.inner.channel().read_etc(cx, bytes, handles) {
8281 std::task::Poll::Ready(Ok(())) => {}
8282 std::task::Poll::Pending => return std::task::Poll::Pending,
8283 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8284 this.is_terminated = true;
8285 return std::task::Poll::Ready(None);
8286 }
8287 std::task::Poll::Ready(Err(e)) => {
8288 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8289 e.into(),
8290 ))))
8291 }
8292 }
8293
8294 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8296
8297 std::task::Poll::Ready(Some(match header.ordinal {
8298 0x5c7e40a47f753e3e => {
8299 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8300 let mut req = fidl::new_empty!(
8301 fidl::encoding::EmptyPayload,
8302 fidl::encoding::DefaultFuchsiaResourceDialect
8303 );
8304 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
8305 let control_handle =
8306 TargetAdapterControlHandle { inner: this.inner.clone() };
8307 Ok(TargetAdapterRequest::GetParameters {
8308 responder: TargetAdapterGetParametersResponder {
8309 control_handle: std::mem::ManuallyDrop::new(control_handle),
8310 tx_id: header.tx_id,
8311 },
8312 })
8313 }
8314 0x7ea603a119866618 => {
8315 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8316 let mut req = fidl::new_empty!(
8317 TargetAdapterConnectRequest,
8318 fidl::encoding::DefaultFuchsiaResourceDialect
8319 );
8320 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TargetAdapterConnectRequest>(&header, _body_bytes, handles, &mut req)?;
8321 let control_handle =
8322 TargetAdapterControlHandle { inner: this.inner.clone() };
8323 Ok(TargetAdapterRequest::Connect {
8324 eventpair: req.eventpair,
8325 test_input: req.test_input,
8326
8327 responder: TargetAdapterConnectResponder {
8328 control_handle: std::mem::ManuallyDrop::new(control_handle),
8329 tx_id: header.tx_id,
8330 },
8331 })
8332 }
8333 _ => Err(fidl::Error::UnknownOrdinal {
8334 ordinal: header.ordinal,
8335 protocol_name:
8336 <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8337 }),
8338 }))
8339 },
8340 )
8341 }
8342}
8343
8344#[derive(Debug)]
8352pub enum TargetAdapterRequest {
8353 GetParameters { responder: TargetAdapterGetParametersResponder },
8364 Connect {
8373 eventpair: fidl::EventPair,
8374 test_input: fidl::Vmo,
8375 responder: TargetAdapterConnectResponder,
8376 },
8377}
8378
8379impl TargetAdapterRequest {
8380 #[allow(irrefutable_let_patterns)]
8381 pub fn into_get_parameters(self) -> Option<(TargetAdapterGetParametersResponder)> {
8382 if let TargetAdapterRequest::GetParameters { responder } = self {
8383 Some((responder))
8384 } else {
8385 None
8386 }
8387 }
8388
8389 #[allow(irrefutable_let_patterns)]
8390 pub fn into_connect(
8391 self,
8392 ) -> Option<(fidl::EventPair, fidl::Vmo, TargetAdapterConnectResponder)> {
8393 if let TargetAdapterRequest::Connect { eventpair, test_input, responder } = self {
8394 Some((eventpair, test_input, responder))
8395 } else {
8396 None
8397 }
8398 }
8399
8400 pub fn method_name(&self) -> &'static str {
8402 match *self {
8403 TargetAdapterRequest::GetParameters { .. } => "get_parameters",
8404 TargetAdapterRequest::Connect { .. } => "connect",
8405 }
8406 }
8407}
8408
8409#[derive(Debug, Clone)]
8410pub struct TargetAdapterControlHandle {
8411 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8412}
8413
8414impl fidl::endpoints::ControlHandle for TargetAdapterControlHandle {
8415 fn shutdown(&self) {
8416 self.inner.shutdown()
8417 }
8418 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8419 self.inner.shutdown_with_epitaph(status)
8420 }
8421
8422 fn is_closed(&self) -> bool {
8423 self.inner.channel().is_closed()
8424 }
8425 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8426 self.inner.channel().on_closed()
8427 }
8428
8429 #[cfg(target_os = "fuchsia")]
8430 fn signal_peer(
8431 &self,
8432 clear_mask: zx::Signals,
8433 set_mask: zx::Signals,
8434 ) -> Result<(), zx_status::Status> {
8435 use fidl::Peered;
8436 self.inner.channel().signal_peer(clear_mask, set_mask)
8437 }
8438}
8439
8440impl TargetAdapterControlHandle {}
8441
8442#[must_use = "FIDL methods require a response to be sent"]
8443#[derive(Debug)]
8444pub struct TargetAdapterGetParametersResponder {
8445 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8446 tx_id: u32,
8447}
8448
8449impl std::ops::Drop for TargetAdapterGetParametersResponder {
8453 fn drop(&mut self) {
8454 self.control_handle.shutdown();
8455 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8457 }
8458}
8459
8460impl fidl::endpoints::Responder for TargetAdapterGetParametersResponder {
8461 type ControlHandle = TargetAdapterControlHandle;
8462
8463 fn control_handle(&self) -> &TargetAdapterControlHandle {
8464 &self.control_handle
8465 }
8466
8467 fn drop_without_shutdown(mut self) {
8468 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8470 std::mem::forget(self);
8472 }
8473}
8474
8475impl TargetAdapterGetParametersResponder {
8476 pub fn send(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8480 let _result = self.send_raw(parameters);
8481 if _result.is_err() {
8482 self.control_handle.shutdown();
8483 }
8484 self.drop_without_shutdown();
8485 _result
8486 }
8487
8488 pub fn send_no_shutdown_on_err(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8490 let _result = self.send_raw(parameters);
8491 self.drop_without_shutdown();
8492 _result
8493 }
8494
8495 fn send_raw(&self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8496 self.control_handle.inner.send::<TargetAdapterGetParametersResponse>(
8497 (parameters,),
8498 self.tx_id,
8499 0x5c7e40a47f753e3e,
8500 fidl::encoding::DynamicFlags::empty(),
8501 )
8502 }
8503}
8504
8505#[must_use = "FIDL methods require a response to be sent"]
8506#[derive(Debug)]
8507pub struct TargetAdapterConnectResponder {
8508 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8509 tx_id: u32,
8510}
8511
8512impl std::ops::Drop for TargetAdapterConnectResponder {
8516 fn drop(&mut self) {
8517 self.control_handle.shutdown();
8518 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8520 }
8521}
8522
8523impl fidl::endpoints::Responder for TargetAdapterConnectResponder {
8524 type ControlHandle = TargetAdapterControlHandle;
8525
8526 fn control_handle(&self) -> &TargetAdapterControlHandle {
8527 &self.control_handle
8528 }
8529
8530 fn drop_without_shutdown(mut self) {
8531 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8533 std::mem::forget(self);
8535 }
8536}
8537
8538impl TargetAdapterConnectResponder {
8539 pub fn send(self) -> Result<(), fidl::Error> {
8543 let _result = self.send_raw();
8544 if _result.is_err() {
8545 self.control_handle.shutdown();
8546 }
8547 self.drop_without_shutdown();
8548 _result
8549 }
8550
8551 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8553 let _result = self.send_raw();
8554 self.drop_without_shutdown();
8555 _result
8556 }
8557
8558 fn send_raw(&self) -> Result<(), fidl::Error> {
8559 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8560 (),
8561 self.tx_id,
8562 0x7ea603a119866618,
8563 fidl::encoding::DynamicFlags::empty(),
8564 )
8565 }
8566}
8567
8568mod internal {
8569 use super::*;
8570
8571 impl fidl::encoding::ResourceTypeMarker for ControllerAddMonitorRequest {
8572 type Borrowed<'a> = &'a mut Self;
8573 fn take_or_borrow<'a>(
8574 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8575 ) -> Self::Borrowed<'a> {
8576 value
8577 }
8578 }
8579
8580 unsafe impl fidl::encoding::TypeMarker for ControllerAddMonitorRequest {
8581 type Owned = Self;
8582
8583 #[inline(always)]
8584 fn inline_align(_context: fidl::encoding::Context) -> usize {
8585 4
8586 }
8587
8588 #[inline(always)]
8589 fn inline_size(_context: fidl::encoding::Context) -> usize {
8590 4
8591 }
8592 }
8593
8594 unsafe impl
8595 fidl::encoding::Encode<
8596 ControllerAddMonitorRequest,
8597 fidl::encoding::DefaultFuchsiaResourceDialect,
8598 > for &mut ControllerAddMonitorRequest
8599 {
8600 #[inline]
8601 unsafe fn encode(
8602 self,
8603 encoder: &mut fidl::encoding::Encoder<
8604 '_,
8605 fidl::encoding::DefaultFuchsiaResourceDialect,
8606 >,
8607 offset: usize,
8608 _depth: fidl::encoding::Depth,
8609 ) -> fidl::Result<()> {
8610 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8611 fidl::encoding::Encode::<ControllerAddMonitorRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8613 (
8614 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.monitor),
8615 ),
8616 encoder, offset, _depth
8617 )
8618 }
8619 }
8620 unsafe impl<
8621 T0: fidl::encoding::Encode<
8622 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8623 fidl::encoding::DefaultFuchsiaResourceDialect,
8624 >,
8625 >
8626 fidl::encoding::Encode<
8627 ControllerAddMonitorRequest,
8628 fidl::encoding::DefaultFuchsiaResourceDialect,
8629 > for (T0,)
8630 {
8631 #[inline]
8632 unsafe fn encode(
8633 self,
8634 encoder: &mut fidl::encoding::Encoder<
8635 '_,
8636 fidl::encoding::DefaultFuchsiaResourceDialect,
8637 >,
8638 offset: usize,
8639 depth: fidl::encoding::Depth,
8640 ) -> fidl::Result<()> {
8641 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8642 self.0.encode(encoder, offset + 0, depth)?;
8646 Ok(())
8647 }
8648 }
8649
8650 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8651 for ControllerAddMonitorRequest
8652 {
8653 #[inline(always)]
8654 fn new_empty() -> Self {
8655 Self {
8656 monitor: fidl::new_empty!(
8657 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8658 fidl::encoding::DefaultFuchsiaResourceDialect
8659 ),
8660 }
8661 }
8662
8663 #[inline]
8664 unsafe fn decode(
8665 &mut self,
8666 decoder: &mut fidl::encoding::Decoder<
8667 '_,
8668 fidl::encoding::DefaultFuchsiaResourceDialect,
8669 >,
8670 offset: usize,
8671 _depth: fidl::encoding::Depth,
8672 ) -> fidl::Result<()> {
8673 decoder.debug_check_bounds::<Self>(offset);
8674 fidl::decode!(
8676 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8677 fidl::encoding::DefaultFuchsiaResourceDialect,
8678 &mut self.monitor,
8679 decoder,
8680 offset + 0,
8681 _depth
8682 )?;
8683 Ok(())
8684 }
8685 }
8686
8687 impl fidl::encoding::ResourceTypeMarker for ControllerAddToCorpusRequest {
8688 type Borrowed<'a> = &'a mut Self;
8689 fn take_or_borrow<'a>(
8690 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8691 ) -> Self::Borrowed<'a> {
8692 value
8693 }
8694 }
8695
8696 unsafe impl fidl::encoding::TypeMarker for ControllerAddToCorpusRequest {
8697 type Owned = Self;
8698
8699 #[inline(always)]
8700 fn inline_align(_context: fidl::encoding::Context) -> usize {
8701 8
8702 }
8703
8704 #[inline(always)]
8705 fn inline_size(_context: fidl::encoding::Context) -> usize {
8706 24
8707 }
8708 }
8709
8710 unsafe impl
8711 fidl::encoding::Encode<
8712 ControllerAddToCorpusRequest,
8713 fidl::encoding::DefaultFuchsiaResourceDialect,
8714 > for &mut ControllerAddToCorpusRequest
8715 {
8716 #[inline]
8717 unsafe fn encode(
8718 self,
8719 encoder: &mut fidl::encoding::Encoder<
8720 '_,
8721 fidl::encoding::DefaultFuchsiaResourceDialect,
8722 >,
8723 offset: usize,
8724 _depth: fidl::encoding::Depth,
8725 ) -> fidl::Result<()> {
8726 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8727 fidl::encoding::Encode::<
8729 ControllerAddToCorpusRequest,
8730 fidl::encoding::DefaultFuchsiaResourceDialect,
8731 >::encode(
8732 (
8733 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
8734 <Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.input),
8735 ),
8736 encoder,
8737 offset,
8738 _depth,
8739 )
8740 }
8741 }
8742 unsafe impl<
8743 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
8744 T1: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>,
8745 >
8746 fidl::encoding::Encode<
8747 ControllerAddToCorpusRequest,
8748 fidl::encoding::DefaultFuchsiaResourceDialect,
8749 > for (T0, T1)
8750 {
8751 #[inline]
8752 unsafe fn encode(
8753 self,
8754 encoder: &mut fidl::encoding::Encoder<
8755 '_,
8756 fidl::encoding::DefaultFuchsiaResourceDialect,
8757 >,
8758 offset: usize,
8759 depth: fidl::encoding::Depth,
8760 ) -> fidl::Result<()> {
8761 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8762 unsafe {
8765 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8766 (ptr as *mut u64).write_unaligned(0);
8767 }
8768 self.0.encode(encoder, offset + 0, depth)?;
8770 self.1.encode(encoder, offset + 8, depth)?;
8771 Ok(())
8772 }
8773 }
8774
8775 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8776 for ControllerAddToCorpusRequest
8777 {
8778 #[inline(always)]
8779 fn new_empty() -> Self {
8780 Self {
8781 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
8782 input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8783 }
8784 }
8785
8786 #[inline]
8787 unsafe fn decode(
8788 &mut self,
8789 decoder: &mut fidl::encoding::Decoder<
8790 '_,
8791 fidl::encoding::DefaultFuchsiaResourceDialect,
8792 >,
8793 offset: usize,
8794 _depth: fidl::encoding::Depth,
8795 ) -> fidl::Result<()> {
8796 decoder.debug_check_bounds::<Self>(offset);
8797 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8799 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8800 let mask = 0xffffffffffffff00u64;
8801 let maskedval = padval & mask;
8802 if maskedval != 0 {
8803 return Err(fidl::Error::NonZeroPadding {
8804 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8805 });
8806 }
8807 fidl::decode!(
8808 Corpus,
8809 fidl::encoding::DefaultFuchsiaResourceDialect,
8810 &mut self.corpus,
8811 decoder,
8812 offset + 0,
8813 _depth
8814 )?;
8815 fidl::decode!(
8816 Input,
8817 fidl::encoding::DefaultFuchsiaResourceDialect,
8818 &mut self.input,
8819 decoder,
8820 offset + 8,
8821 _depth
8822 )?;
8823 Ok(())
8824 }
8825 }
8826
8827 impl fidl::encoding::ResourceTypeMarker for ControllerCleanseRequest {
8828 type Borrowed<'a> = &'a mut Self;
8829 fn take_or_borrow<'a>(
8830 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8831 ) -> Self::Borrowed<'a> {
8832 value
8833 }
8834 }
8835
8836 unsafe impl fidl::encoding::TypeMarker for ControllerCleanseRequest {
8837 type Owned = Self;
8838
8839 #[inline(always)]
8840 fn inline_align(_context: fidl::encoding::Context) -> usize {
8841 8
8842 }
8843
8844 #[inline(always)]
8845 fn inline_size(_context: fidl::encoding::Context) -> usize {
8846 16
8847 }
8848 }
8849
8850 unsafe impl
8851 fidl::encoding::Encode<
8852 ControllerCleanseRequest,
8853 fidl::encoding::DefaultFuchsiaResourceDialect,
8854 > for &mut ControllerCleanseRequest
8855 {
8856 #[inline]
8857 unsafe fn encode(
8858 self,
8859 encoder: &mut fidl::encoding::Encoder<
8860 '_,
8861 fidl::encoding::DefaultFuchsiaResourceDialect,
8862 >,
8863 offset: usize,
8864 _depth: fidl::encoding::Depth,
8865 ) -> fidl::Result<()> {
8866 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8867 fidl::encoding::Encode::<
8869 ControllerCleanseRequest,
8870 fidl::encoding::DefaultFuchsiaResourceDialect,
8871 >::encode(
8872 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8873 &mut self.test_input,
8874 ),),
8875 encoder,
8876 offset,
8877 _depth,
8878 )
8879 }
8880 }
8881 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8882 fidl::encoding::Encode<
8883 ControllerCleanseRequest,
8884 fidl::encoding::DefaultFuchsiaResourceDialect,
8885 > for (T0,)
8886 {
8887 #[inline]
8888 unsafe fn encode(
8889 self,
8890 encoder: &mut fidl::encoding::Encoder<
8891 '_,
8892 fidl::encoding::DefaultFuchsiaResourceDialect,
8893 >,
8894 offset: usize,
8895 depth: fidl::encoding::Depth,
8896 ) -> fidl::Result<()> {
8897 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8898 self.0.encode(encoder, offset + 0, depth)?;
8902 Ok(())
8903 }
8904 }
8905
8906 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8907 for ControllerCleanseRequest
8908 {
8909 #[inline(always)]
8910 fn new_empty() -> Self {
8911 Self {
8912 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8913 }
8914 }
8915
8916 #[inline]
8917 unsafe fn decode(
8918 &mut self,
8919 decoder: &mut fidl::encoding::Decoder<
8920 '_,
8921 fidl::encoding::DefaultFuchsiaResourceDialect,
8922 >,
8923 offset: usize,
8924 _depth: fidl::encoding::Depth,
8925 ) -> fidl::Result<()> {
8926 decoder.debug_check_bounds::<Self>(offset);
8927 fidl::decode!(
8929 Input,
8930 fidl::encoding::DefaultFuchsiaResourceDialect,
8931 &mut self.test_input,
8932 decoder,
8933 offset + 0,
8934 _depth
8935 )?;
8936 Ok(())
8937 }
8938 }
8939
8940 impl fidl::encoding::ResourceTypeMarker for ControllerMinimizeRequest {
8941 type Borrowed<'a> = &'a mut Self;
8942 fn take_or_borrow<'a>(
8943 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8944 ) -> Self::Borrowed<'a> {
8945 value
8946 }
8947 }
8948
8949 unsafe impl fidl::encoding::TypeMarker for ControllerMinimizeRequest {
8950 type Owned = Self;
8951
8952 #[inline(always)]
8953 fn inline_align(_context: fidl::encoding::Context) -> usize {
8954 8
8955 }
8956
8957 #[inline(always)]
8958 fn inline_size(_context: fidl::encoding::Context) -> usize {
8959 16
8960 }
8961 }
8962
8963 unsafe impl
8964 fidl::encoding::Encode<
8965 ControllerMinimizeRequest,
8966 fidl::encoding::DefaultFuchsiaResourceDialect,
8967 > for &mut ControllerMinimizeRequest
8968 {
8969 #[inline]
8970 unsafe fn encode(
8971 self,
8972 encoder: &mut fidl::encoding::Encoder<
8973 '_,
8974 fidl::encoding::DefaultFuchsiaResourceDialect,
8975 >,
8976 offset: usize,
8977 _depth: fidl::encoding::Depth,
8978 ) -> fidl::Result<()> {
8979 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
8980 fidl::encoding::Encode::<
8982 ControllerMinimizeRequest,
8983 fidl::encoding::DefaultFuchsiaResourceDialect,
8984 >::encode(
8985 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8986 &mut self.test_input,
8987 ),),
8988 encoder,
8989 offset,
8990 _depth,
8991 )
8992 }
8993 }
8994 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8995 fidl::encoding::Encode<
8996 ControllerMinimizeRequest,
8997 fidl::encoding::DefaultFuchsiaResourceDialect,
8998 > for (T0,)
8999 {
9000 #[inline]
9001 unsafe fn encode(
9002 self,
9003 encoder: &mut fidl::encoding::Encoder<
9004 '_,
9005 fidl::encoding::DefaultFuchsiaResourceDialect,
9006 >,
9007 offset: usize,
9008 depth: fidl::encoding::Depth,
9009 ) -> fidl::Result<()> {
9010 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
9011 self.0.encode(encoder, offset + 0, depth)?;
9015 Ok(())
9016 }
9017 }
9018
9019 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9020 for ControllerMinimizeRequest
9021 {
9022 #[inline(always)]
9023 fn new_empty() -> Self {
9024 Self {
9025 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9026 }
9027 }
9028
9029 #[inline]
9030 unsafe fn decode(
9031 &mut self,
9032 decoder: &mut fidl::encoding::Decoder<
9033 '_,
9034 fidl::encoding::DefaultFuchsiaResourceDialect,
9035 >,
9036 offset: usize,
9037 _depth: fidl::encoding::Depth,
9038 ) -> fidl::Result<()> {
9039 decoder.debug_check_bounds::<Self>(offset);
9040 fidl::decode!(
9042 Input,
9043 fidl::encoding::DefaultFuchsiaResourceDialect,
9044 &mut self.test_input,
9045 decoder,
9046 offset + 0,
9047 _depth
9048 )?;
9049 Ok(())
9050 }
9051 }
9052
9053 impl fidl::encoding::ResourceTypeMarker for ControllerProviderConnectRequest {
9054 type Borrowed<'a> = &'a mut Self;
9055 fn take_or_borrow<'a>(
9056 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9057 ) -> Self::Borrowed<'a> {
9058 value
9059 }
9060 }
9061
9062 unsafe impl fidl::encoding::TypeMarker for ControllerProviderConnectRequest {
9063 type Owned = Self;
9064
9065 #[inline(always)]
9066 fn inline_align(_context: fidl::encoding::Context) -> usize {
9067 4
9068 }
9069
9070 #[inline(always)]
9071 fn inline_size(_context: fidl::encoding::Context) -> usize {
9072 4
9073 }
9074 }
9075
9076 unsafe impl
9077 fidl::encoding::Encode<
9078 ControllerProviderConnectRequest,
9079 fidl::encoding::DefaultFuchsiaResourceDialect,
9080 > for &mut ControllerProviderConnectRequest
9081 {
9082 #[inline]
9083 unsafe fn encode(
9084 self,
9085 encoder: &mut fidl::encoding::Encoder<
9086 '_,
9087 fidl::encoding::DefaultFuchsiaResourceDialect,
9088 >,
9089 offset: usize,
9090 _depth: fidl::encoding::Depth,
9091 ) -> fidl::Result<()> {
9092 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9093 fidl::encoding::Encode::<ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9095 (
9096 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9097 ),
9098 encoder, offset, _depth
9099 )
9100 }
9101 }
9102 unsafe impl<
9103 T0: fidl::encoding::Encode<
9104 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9105 fidl::encoding::DefaultFuchsiaResourceDialect,
9106 >,
9107 >
9108 fidl::encoding::Encode<
9109 ControllerProviderConnectRequest,
9110 fidl::encoding::DefaultFuchsiaResourceDialect,
9111 > for (T0,)
9112 {
9113 #[inline]
9114 unsafe fn encode(
9115 self,
9116 encoder: &mut fidl::encoding::Encoder<
9117 '_,
9118 fidl::encoding::DefaultFuchsiaResourceDialect,
9119 >,
9120 offset: usize,
9121 depth: fidl::encoding::Depth,
9122 ) -> fidl::Result<()> {
9123 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9124 self.0.encode(encoder, offset + 0, depth)?;
9128 Ok(())
9129 }
9130 }
9131
9132 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9133 for ControllerProviderConnectRequest
9134 {
9135 #[inline(always)]
9136 fn new_empty() -> Self {
9137 Self {
9138 controller: fidl::new_empty!(
9139 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9140 fidl::encoding::DefaultFuchsiaResourceDialect
9141 ),
9142 }
9143 }
9144
9145 #[inline]
9146 unsafe fn decode(
9147 &mut self,
9148 decoder: &mut fidl::encoding::Decoder<
9149 '_,
9150 fidl::encoding::DefaultFuchsiaResourceDialect,
9151 >,
9152 offset: usize,
9153 _depth: fidl::encoding::Depth,
9154 ) -> fidl::Result<()> {
9155 decoder.debug_check_bounds::<Self>(offset);
9156 fidl::decode!(
9158 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9159 fidl::encoding::DefaultFuchsiaResourceDialect,
9160 &mut self.controller,
9161 decoder,
9162 offset + 0,
9163 _depth
9164 )?;
9165 Ok(())
9166 }
9167 }
9168
9169 impl fidl::encoding::ResourceTypeMarker for ControllerReadCorpusRequest {
9170 type Borrowed<'a> = &'a mut Self;
9171 fn take_or_borrow<'a>(
9172 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9173 ) -> Self::Borrowed<'a> {
9174 value
9175 }
9176 }
9177
9178 unsafe impl fidl::encoding::TypeMarker for ControllerReadCorpusRequest {
9179 type Owned = Self;
9180
9181 #[inline(always)]
9182 fn inline_align(_context: fidl::encoding::Context) -> usize {
9183 4
9184 }
9185
9186 #[inline(always)]
9187 fn inline_size(_context: fidl::encoding::Context) -> usize {
9188 8
9189 }
9190 }
9191
9192 unsafe impl
9193 fidl::encoding::Encode<
9194 ControllerReadCorpusRequest,
9195 fidl::encoding::DefaultFuchsiaResourceDialect,
9196 > for &mut ControllerReadCorpusRequest
9197 {
9198 #[inline]
9199 unsafe fn encode(
9200 self,
9201 encoder: &mut fidl::encoding::Encoder<
9202 '_,
9203 fidl::encoding::DefaultFuchsiaResourceDialect,
9204 >,
9205 offset: usize,
9206 _depth: fidl::encoding::Depth,
9207 ) -> fidl::Result<()> {
9208 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9209 fidl::encoding::Encode::<ControllerReadCorpusRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9211 (
9212 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
9213 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.corpus_reader),
9214 ),
9215 encoder, offset, _depth
9216 )
9217 }
9218 }
9219 unsafe impl<
9220 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
9221 T1: fidl::encoding::Encode<
9222 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9223 fidl::encoding::DefaultFuchsiaResourceDialect,
9224 >,
9225 >
9226 fidl::encoding::Encode<
9227 ControllerReadCorpusRequest,
9228 fidl::encoding::DefaultFuchsiaResourceDialect,
9229 > for (T0, T1)
9230 {
9231 #[inline]
9232 unsafe fn encode(
9233 self,
9234 encoder: &mut fidl::encoding::Encoder<
9235 '_,
9236 fidl::encoding::DefaultFuchsiaResourceDialect,
9237 >,
9238 offset: usize,
9239 depth: fidl::encoding::Depth,
9240 ) -> fidl::Result<()> {
9241 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9242 unsafe {
9245 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9246 (ptr as *mut u32).write_unaligned(0);
9247 }
9248 self.0.encode(encoder, offset + 0, depth)?;
9250 self.1.encode(encoder, offset + 4, depth)?;
9251 Ok(())
9252 }
9253 }
9254
9255 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9256 for ControllerReadCorpusRequest
9257 {
9258 #[inline(always)]
9259 fn new_empty() -> Self {
9260 Self {
9261 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
9262 corpus_reader: fidl::new_empty!(
9263 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9264 fidl::encoding::DefaultFuchsiaResourceDialect
9265 ),
9266 }
9267 }
9268
9269 #[inline]
9270 unsafe fn decode(
9271 &mut self,
9272 decoder: &mut fidl::encoding::Decoder<
9273 '_,
9274 fidl::encoding::DefaultFuchsiaResourceDialect,
9275 >,
9276 offset: usize,
9277 _depth: fidl::encoding::Depth,
9278 ) -> fidl::Result<()> {
9279 decoder.debug_check_bounds::<Self>(offset);
9280 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9282 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9283 let mask = 0xffffff00u32;
9284 let maskedval = padval & mask;
9285 if maskedval != 0 {
9286 return Err(fidl::Error::NonZeroPadding {
9287 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9288 });
9289 }
9290 fidl::decode!(
9291 Corpus,
9292 fidl::encoding::DefaultFuchsiaResourceDialect,
9293 &mut self.corpus,
9294 decoder,
9295 offset + 0,
9296 _depth
9297 )?;
9298 fidl::decode!(
9299 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9300 fidl::encoding::DefaultFuchsiaResourceDialect,
9301 &mut self.corpus_reader,
9302 decoder,
9303 offset + 4,
9304 _depth
9305 )?;
9306 Ok(())
9307 }
9308 }
9309
9310 impl fidl::encoding::ResourceTypeMarker for ControllerReadDictionaryResponse {
9311 type Borrowed<'a> = &'a mut Self;
9312 fn take_or_borrow<'a>(
9313 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9314 ) -> Self::Borrowed<'a> {
9315 value
9316 }
9317 }
9318
9319 unsafe impl fidl::encoding::TypeMarker for ControllerReadDictionaryResponse {
9320 type Owned = Self;
9321
9322 #[inline(always)]
9323 fn inline_align(_context: fidl::encoding::Context) -> usize {
9324 8
9325 }
9326
9327 #[inline(always)]
9328 fn inline_size(_context: fidl::encoding::Context) -> usize {
9329 16
9330 }
9331 }
9332
9333 unsafe impl
9334 fidl::encoding::Encode<
9335 ControllerReadDictionaryResponse,
9336 fidl::encoding::DefaultFuchsiaResourceDialect,
9337 > for &mut ControllerReadDictionaryResponse
9338 {
9339 #[inline]
9340 unsafe fn encode(
9341 self,
9342 encoder: &mut fidl::encoding::Encoder<
9343 '_,
9344 fidl::encoding::DefaultFuchsiaResourceDialect,
9345 >,
9346 offset: usize,
9347 _depth: fidl::encoding::Depth,
9348 ) -> fidl::Result<()> {
9349 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9350 fidl::encoding::Encode::<
9352 ControllerReadDictionaryResponse,
9353 fidl::encoding::DefaultFuchsiaResourceDialect,
9354 >::encode(
9355 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9356 &mut self.dictionary,
9357 ),),
9358 encoder,
9359 offset,
9360 _depth,
9361 )
9362 }
9363 }
9364 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9365 fidl::encoding::Encode<
9366 ControllerReadDictionaryResponse,
9367 fidl::encoding::DefaultFuchsiaResourceDialect,
9368 > for (T0,)
9369 {
9370 #[inline]
9371 unsafe fn encode(
9372 self,
9373 encoder: &mut fidl::encoding::Encoder<
9374 '_,
9375 fidl::encoding::DefaultFuchsiaResourceDialect,
9376 >,
9377 offset: usize,
9378 depth: fidl::encoding::Depth,
9379 ) -> fidl::Result<()> {
9380 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9381 self.0.encode(encoder, offset + 0, depth)?;
9385 Ok(())
9386 }
9387 }
9388
9389 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9390 for ControllerReadDictionaryResponse
9391 {
9392 #[inline(always)]
9393 fn new_empty() -> Self {
9394 Self {
9395 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9396 }
9397 }
9398
9399 #[inline]
9400 unsafe fn decode(
9401 &mut self,
9402 decoder: &mut fidl::encoding::Decoder<
9403 '_,
9404 fidl::encoding::DefaultFuchsiaResourceDialect,
9405 >,
9406 offset: usize,
9407 _depth: fidl::encoding::Depth,
9408 ) -> fidl::Result<()> {
9409 decoder.debug_check_bounds::<Self>(offset);
9410 fidl::decode!(
9412 Input,
9413 fidl::encoding::DefaultFuchsiaResourceDialect,
9414 &mut self.dictionary,
9415 decoder,
9416 offset + 0,
9417 _depth
9418 )?;
9419 Ok(())
9420 }
9421 }
9422
9423 impl fidl::encoding::ResourceTypeMarker for ControllerTryOneRequest {
9424 type Borrowed<'a> = &'a mut Self;
9425 fn take_or_borrow<'a>(
9426 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9427 ) -> Self::Borrowed<'a> {
9428 value
9429 }
9430 }
9431
9432 unsafe impl fidl::encoding::TypeMarker for ControllerTryOneRequest {
9433 type Owned = Self;
9434
9435 #[inline(always)]
9436 fn inline_align(_context: fidl::encoding::Context) -> usize {
9437 8
9438 }
9439
9440 #[inline(always)]
9441 fn inline_size(_context: fidl::encoding::Context) -> usize {
9442 16
9443 }
9444 }
9445
9446 unsafe impl
9447 fidl::encoding::Encode<
9448 ControllerTryOneRequest,
9449 fidl::encoding::DefaultFuchsiaResourceDialect,
9450 > for &mut ControllerTryOneRequest
9451 {
9452 #[inline]
9453 unsafe fn encode(
9454 self,
9455 encoder: &mut fidl::encoding::Encoder<
9456 '_,
9457 fidl::encoding::DefaultFuchsiaResourceDialect,
9458 >,
9459 offset: usize,
9460 _depth: fidl::encoding::Depth,
9461 ) -> fidl::Result<()> {
9462 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9463 fidl::encoding::Encode::<
9465 ControllerTryOneRequest,
9466 fidl::encoding::DefaultFuchsiaResourceDialect,
9467 >::encode(
9468 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9469 &mut self.test_input,
9470 ),),
9471 encoder,
9472 offset,
9473 _depth,
9474 )
9475 }
9476 }
9477 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9478 fidl::encoding::Encode<
9479 ControllerTryOneRequest,
9480 fidl::encoding::DefaultFuchsiaResourceDialect,
9481 > for (T0,)
9482 {
9483 #[inline]
9484 unsafe fn encode(
9485 self,
9486 encoder: &mut fidl::encoding::Encoder<
9487 '_,
9488 fidl::encoding::DefaultFuchsiaResourceDialect,
9489 >,
9490 offset: usize,
9491 depth: fidl::encoding::Depth,
9492 ) -> fidl::Result<()> {
9493 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9494 self.0.encode(encoder, offset + 0, depth)?;
9498 Ok(())
9499 }
9500 }
9501
9502 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9503 for ControllerTryOneRequest
9504 {
9505 #[inline(always)]
9506 fn new_empty() -> Self {
9507 Self {
9508 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9509 }
9510 }
9511
9512 #[inline]
9513 unsafe fn decode(
9514 &mut self,
9515 decoder: &mut fidl::encoding::Decoder<
9516 '_,
9517 fidl::encoding::DefaultFuchsiaResourceDialect,
9518 >,
9519 offset: usize,
9520 _depth: fidl::encoding::Depth,
9521 ) -> fidl::Result<()> {
9522 decoder.debug_check_bounds::<Self>(offset);
9523 fidl::decode!(
9525 Input,
9526 fidl::encoding::DefaultFuchsiaResourceDialect,
9527 &mut self.test_input,
9528 decoder,
9529 offset + 0,
9530 _depth
9531 )?;
9532 Ok(())
9533 }
9534 }
9535
9536 impl fidl::encoding::ResourceTypeMarker for ControllerWatchArtifactResponse {
9537 type Borrowed<'a> = &'a mut Self;
9538 fn take_or_borrow<'a>(
9539 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9540 ) -> Self::Borrowed<'a> {
9541 value
9542 }
9543 }
9544
9545 unsafe impl fidl::encoding::TypeMarker for ControllerWatchArtifactResponse {
9546 type Owned = Self;
9547
9548 #[inline(always)]
9549 fn inline_align(_context: fidl::encoding::Context) -> usize {
9550 8
9551 }
9552
9553 #[inline(always)]
9554 fn inline_size(_context: fidl::encoding::Context) -> usize {
9555 16
9556 }
9557 }
9558
9559 unsafe impl
9560 fidl::encoding::Encode<
9561 ControllerWatchArtifactResponse,
9562 fidl::encoding::DefaultFuchsiaResourceDialect,
9563 > for &mut ControllerWatchArtifactResponse
9564 {
9565 #[inline]
9566 unsafe fn encode(
9567 self,
9568 encoder: &mut fidl::encoding::Encoder<
9569 '_,
9570 fidl::encoding::DefaultFuchsiaResourceDialect,
9571 >,
9572 offset: usize,
9573 _depth: fidl::encoding::Depth,
9574 ) -> fidl::Result<()> {
9575 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9576 fidl::encoding::Encode::<
9578 ControllerWatchArtifactResponse,
9579 fidl::encoding::DefaultFuchsiaResourceDialect,
9580 >::encode(
9581 (<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9582 &mut self.artifact,
9583 ),),
9584 encoder,
9585 offset,
9586 _depth,
9587 )
9588 }
9589 }
9590 unsafe impl<T0: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>>
9591 fidl::encoding::Encode<
9592 ControllerWatchArtifactResponse,
9593 fidl::encoding::DefaultFuchsiaResourceDialect,
9594 > for (T0,)
9595 {
9596 #[inline]
9597 unsafe fn encode(
9598 self,
9599 encoder: &mut fidl::encoding::Encoder<
9600 '_,
9601 fidl::encoding::DefaultFuchsiaResourceDialect,
9602 >,
9603 offset: usize,
9604 depth: fidl::encoding::Depth,
9605 ) -> fidl::Result<()> {
9606 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9607 self.0.encode(encoder, offset + 0, depth)?;
9611 Ok(())
9612 }
9613 }
9614
9615 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9616 for ControllerWatchArtifactResponse
9617 {
9618 #[inline(always)]
9619 fn new_empty() -> Self {
9620 Self {
9621 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
9622 }
9623 }
9624
9625 #[inline]
9626 unsafe fn decode(
9627 &mut self,
9628 decoder: &mut fidl::encoding::Decoder<
9629 '_,
9630 fidl::encoding::DefaultFuchsiaResourceDialect,
9631 >,
9632 offset: usize,
9633 _depth: fidl::encoding::Depth,
9634 ) -> fidl::Result<()> {
9635 decoder.debug_check_bounds::<Self>(offset);
9636 fidl::decode!(
9638 Artifact,
9639 fidl::encoding::DefaultFuchsiaResourceDialect,
9640 &mut self.artifact,
9641 decoder,
9642 offset + 0,
9643 _depth
9644 )?;
9645 Ok(())
9646 }
9647 }
9648
9649 impl fidl::encoding::ResourceTypeMarker for ControllerWriteDictionaryRequest {
9650 type Borrowed<'a> = &'a mut Self;
9651 fn take_or_borrow<'a>(
9652 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9653 ) -> Self::Borrowed<'a> {
9654 value
9655 }
9656 }
9657
9658 unsafe impl fidl::encoding::TypeMarker for ControllerWriteDictionaryRequest {
9659 type Owned = Self;
9660
9661 #[inline(always)]
9662 fn inline_align(_context: fidl::encoding::Context) -> usize {
9663 8
9664 }
9665
9666 #[inline(always)]
9667 fn inline_size(_context: fidl::encoding::Context) -> usize {
9668 16
9669 }
9670 }
9671
9672 unsafe impl
9673 fidl::encoding::Encode<
9674 ControllerWriteDictionaryRequest,
9675 fidl::encoding::DefaultFuchsiaResourceDialect,
9676 > for &mut ControllerWriteDictionaryRequest
9677 {
9678 #[inline]
9679 unsafe fn encode(
9680 self,
9681 encoder: &mut fidl::encoding::Encoder<
9682 '_,
9683 fidl::encoding::DefaultFuchsiaResourceDialect,
9684 >,
9685 offset: usize,
9686 _depth: fidl::encoding::Depth,
9687 ) -> fidl::Result<()> {
9688 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9689 fidl::encoding::Encode::<
9691 ControllerWriteDictionaryRequest,
9692 fidl::encoding::DefaultFuchsiaResourceDialect,
9693 >::encode(
9694 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9695 &mut self.dictionary,
9696 ),),
9697 encoder,
9698 offset,
9699 _depth,
9700 )
9701 }
9702 }
9703 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9704 fidl::encoding::Encode<
9705 ControllerWriteDictionaryRequest,
9706 fidl::encoding::DefaultFuchsiaResourceDialect,
9707 > for (T0,)
9708 {
9709 #[inline]
9710 unsafe fn encode(
9711 self,
9712 encoder: &mut fidl::encoding::Encoder<
9713 '_,
9714 fidl::encoding::DefaultFuchsiaResourceDialect,
9715 >,
9716 offset: usize,
9717 depth: fidl::encoding::Depth,
9718 ) -> fidl::Result<()> {
9719 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9720 self.0.encode(encoder, offset + 0, depth)?;
9724 Ok(())
9725 }
9726 }
9727
9728 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9729 for ControllerWriteDictionaryRequest
9730 {
9731 #[inline(always)]
9732 fn new_empty() -> Self {
9733 Self {
9734 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9735 }
9736 }
9737
9738 #[inline]
9739 unsafe fn decode(
9740 &mut self,
9741 decoder: &mut fidl::encoding::Decoder<
9742 '_,
9743 fidl::encoding::DefaultFuchsiaResourceDialect,
9744 >,
9745 offset: usize,
9746 _depth: fidl::encoding::Depth,
9747 ) -> fidl::Result<()> {
9748 decoder.debug_check_bounds::<Self>(offset);
9749 fidl::decode!(
9751 Input,
9752 fidl::encoding::DefaultFuchsiaResourceDialect,
9753 &mut self.dictionary,
9754 decoder,
9755 offset + 0,
9756 _depth
9757 )?;
9758 Ok(())
9759 }
9760 }
9761
9762 impl fidl::encoding::ResourceTypeMarker for CorpusReaderNextRequest {
9763 type Borrowed<'a> = &'a mut Self;
9764 fn take_or_borrow<'a>(
9765 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9766 ) -> Self::Borrowed<'a> {
9767 value
9768 }
9769 }
9770
9771 unsafe impl fidl::encoding::TypeMarker for CorpusReaderNextRequest {
9772 type Owned = Self;
9773
9774 #[inline(always)]
9775 fn inline_align(_context: fidl::encoding::Context) -> usize {
9776 8
9777 }
9778
9779 #[inline(always)]
9780 fn inline_size(_context: fidl::encoding::Context) -> usize {
9781 16
9782 }
9783 }
9784
9785 unsafe impl
9786 fidl::encoding::Encode<
9787 CorpusReaderNextRequest,
9788 fidl::encoding::DefaultFuchsiaResourceDialect,
9789 > for &mut CorpusReaderNextRequest
9790 {
9791 #[inline]
9792 unsafe fn encode(
9793 self,
9794 encoder: &mut fidl::encoding::Encoder<
9795 '_,
9796 fidl::encoding::DefaultFuchsiaResourceDialect,
9797 >,
9798 offset: usize,
9799 _depth: fidl::encoding::Depth,
9800 ) -> fidl::Result<()> {
9801 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9802 fidl::encoding::Encode::<
9804 CorpusReaderNextRequest,
9805 fidl::encoding::DefaultFuchsiaResourceDialect,
9806 >::encode(
9807 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9808 &mut self.test_input,
9809 ),),
9810 encoder,
9811 offset,
9812 _depth,
9813 )
9814 }
9815 }
9816 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9817 fidl::encoding::Encode<
9818 CorpusReaderNextRequest,
9819 fidl::encoding::DefaultFuchsiaResourceDialect,
9820 > for (T0,)
9821 {
9822 #[inline]
9823 unsafe fn encode(
9824 self,
9825 encoder: &mut fidl::encoding::Encoder<
9826 '_,
9827 fidl::encoding::DefaultFuchsiaResourceDialect,
9828 >,
9829 offset: usize,
9830 depth: fidl::encoding::Depth,
9831 ) -> fidl::Result<()> {
9832 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9833 self.0.encode(encoder, offset + 0, depth)?;
9837 Ok(())
9838 }
9839 }
9840
9841 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9842 for CorpusReaderNextRequest
9843 {
9844 #[inline(always)]
9845 fn new_empty() -> Self {
9846 Self {
9847 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9848 }
9849 }
9850
9851 #[inline]
9852 unsafe fn decode(
9853 &mut self,
9854 decoder: &mut fidl::encoding::Decoder<
9855 '_,
9856 fidl::encoding::DefaultFuchsiaResourceDialect,
9857 >,
9858 offset: usize,
9859 _depth: fidl::encoding::Depth,
9860 ) -> fidl::Result<()> {
9861 decoder.debug_check_bounds::<Self>(offset);
9862 fidl::decode!(
9864 Input,
9865 fidl::encoding::DefaultFuchsiaResourceDialect,
9866 &mut self.test_input,
9867 decoder,
9868 offset + 0,
9869 _depth
9870 )?;
9871 Ok(())
9872 }
9873 }
9874
9875 impl fidl::encoding::ResourceTypeMarker for CoverageData {
9876 type Borrowed<'a> = &'a mut Self;
9877 fn take_or_borrow<'a>(
9878 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9879 ) -> Self::Borrowed<'a> {
9880 value
9881 }
9882 }
9883
9884 unsafe impl fidl::encoding::TypeMarker for CoverageData {
9885 type Owned = Self;
9886
9887 #[inline(always)]
9888 fn inline_align(_context: fidl::encoding::Context) -> usize {
9889 8
9890 }
9891
9892 #[inline(always)]
9893 fn inline_size(_context: fidl::encoding::Context) -> usize {
9894 24
9895 }
9896 }
9897
9898 unsafe impl fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9899 for &mut CoverageData
9900 {
9901 #[inline]
9902 unsafe fn encode(
9903 self,
9904 encoder: &mut fidl::encoding::Encoder<
9905 '_,
9906 fidl::encoding::DefaultFuchsiaResourceDialect,
9907 >,
9908 offset: usize,
9909 _depth: fidl::encoding::Depth,
9910 ) -> fidl::Result<()> {
9911 encoder.debug_check_bounds::<CoverageData>(offset);
9912 fidl::encoding::Encode::<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9914 (
9915 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.target_id),
9916 <Data as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
9917 ),
9918 encoder, offset, _depth
9919 )
9920 }
9921 }
9922 unsafe impl<
9923 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
9924 T1: fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>,
9925 > fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9926 for (T0, T1)
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::<CoverageData>(offset);
9939 self.0.encode(encoder, offset + 0, depth)?;
9943 self.1.encode(encoder, offset + 8, depth)?;
9944 Ok(())
9945 }
9946 }
9947
9948 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for CoverageData {
9949 #[inline(always)]
9950 fn new_empty() -> Self {
9951 Self {
9952 target_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
9953 data: fidl::new_empty!(Data, fidl::encoding::DefaultFuchsiaResourceDialect),
9954 }
9955 }
9956
9957 #[inline]
9958 unsafe fn decode(
9959 &mut self,
9960 decoder: &mut fidl::encoding::Decoder<
9961 '_,
9962 fidl::encoding::DefaultFuchsiaResourceDialect,
9963 >,
9964 offset: usize,
9965 _depth: fidl::encoding::Depth,
9966 ) -> fidl::Result<()> {
9967 decoder.debug_check_bounds::<Self>(offset);
9968 fidl::decode!(
9970 u64,
9971 fidl::encoding::DefaultFuchsiaResourceDialect,
9972 &mut self.target_id,
9973 decoder,
9974 offset + 0,
9975 _depth
9976 )?;
9977 fidl::decode!(
9978 Data,
9979 fidl::encoding::DefaultFuchsiaResourceDialect,
9980 &mut self.data,
9981 decoder,
9982 offset + 8,
9983 _depth
9984 )?;
9985 Ok(())
9986 }
9987 }
9988
9989 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9990 type Borrowed<'a> = &'a mut Self;
9991 fn take_or_borrow<'a>(
9992 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9993 ) -> Self::Borrowed<'a> {
9994 value
9995 }
9996 }
9997
9998 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9999 type Owned = Self;
10000
10001 #[inline(always)]
10002 fn inline_align(_context: fidl::encoding::Context) -> usize {
10003 4
10004 }
10005
10006 #[inline(always)]
10007 fn inline_size(_context: fidl::encoding::Context) -> usize {
10008 4
10009 }
10010 }
10011
10012 unsafe impl
10013 fidl::encoding::Encode<
10014 CoverageDataCollectorAddInline8bitCountersRequest,
10015 fidl::encoding::DefaultFuchsiaResourceDialect,
10016 > for &mut CoverageDataCollectorAddInline8bitCountersRequest
10017 {
10018 #[inline]
10019 unsafe fn encode(
10020 self,
10021 encoder: &mut fidl::encoding::Encoder<
10022 '_,
10023 fidl::encoding::DefaultFuchsiaResourceDialect,
10024 >,
10025 offset: usize,
10026 _depth: fidl::encoding::Depth,
10027 ) -> fidl::Result<()> {
10028 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
10029 fidl::encoding::Encode::<
10031 CoverageDataCollectorAddInline8bitCountersRequest,
10032 fidl::encoding::DefaultFuchsiaResourceDialect,
10033 >::encode(
10034 (<fidl::encoding::HandleType<
10035 fidl::Vmo,
10036 { fidl::ObjectType::VMO.into_raw() },
10037 2147483648,
10038 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10039 &mut self.inline_8bit_counters,
10040 ),),
10041 encoder,
10042 offset,
10043 _depth,
10044 )
10045 }
10046 }
10047 unsafe impl<
10048 T0: fidl::encoding::Encode<
10049 fidl::encoding::HandleType<
10050 fidl::Vmo,
10051 { fidl::ObjectType::VMO.into_raw() },
10052 2147483648,
10053 >,
10054 fidl::encoding::DefaultFuchsiaResourceDialect,
10055 >,
10056 >
10057 fidl::encoding::Encode<
10058 CoverageDataCollectorAddInline8bitCountersRequest,
10059 fidl::encoding::DefaultFuchsiaResourceDialect,
10060 > for (T0,)
10061 {
10062 #[inline]
10063 unsafe fn encode(
10064 self,
10065 encoder: &mut fidl::encoding::Encoder<
10066 '_,
10067 fidl::encoding::DefaultFuchsiaResourceDialect,
10068 >,
10069 offset: usize,
10070 depth: fidl::encoding::Depth,
10071 ) -> fidl::Result<()> {
10072 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
10073 self.0.encode(encoder, offset + 0, depth)?;
10077 Ok(())
10078 }
10079 }
10080
10081 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10082 for CoverageDataCollectorAddInline8bitCountersRequest
10083 {
10084 #[inline(always)]
10085 fn new_empty() -> Self {
10086 Self {
10087 inline_8bit_counters: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10088 }
10089 }
10090
10091 #[inline]
10092 unsafe fn decode(
10093 &mut self,
10094 decoder: &mut fidl::encoding::Decoder<
10095 '_,
10096 fidl::encoding::DefaultFuchsiaResourceDialect,
10097 >,
10098 offset: usize,
10099 _depth: fidl::encoding::Depth,
10100 ) -> fidl::Result<()> {
10101 decoder.debug_check_bounds::<Self>(offset);
10102 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)?;
10104 Ok(())
10105 }
10106 }
10107
10108 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorInitializeRequest {
10109 type Borrowed<'a> = &'a mut Self;
10110 fn take_or_borrow<'a>(
10111 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10112 ) -> Self::Borrowed<'a> {
10113 value
10114 }
10115 }
10116
10117 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorInitializeRequest {
10118 type Owned = Self;
10119
10120 #[inline(always)]
10121 fn inline_align(_context: fidl::encoding::Context) -> usize {
10122 4
10123 }
10124
10125 #[inline(always)]
10126 fn inline_size(_context: fidl::encoding::Context) -> usize {
10127 8
10128 }
10129 }
10130
10131 unsafe impl
10132 fidl::encoding::Encode<
10133 CoverageDataCollectorInitializeRequest,
10134 fidl::encoding::DefaultFuchsiaResourceDialect,
10135 > for &mut CoverageDataCollectorInitializeRequest
10136 {
10137 #[inline]
10138 unsafe fn encode(
10139 self,
10140 encoder: &mut fidl::encoding::Encoder<
10141 '_,
10142 fidl::encoding::DefaultFuchsiaResourceDialect,
10143 >,
10144 offset: usize,
10145 _depth: fidl::encoding::Depth,
10146 ) -> fidl::Result<()> {
10147 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10148 fidl::encoding::Encode::<
10150 CoverageDataCollectorInitializeRequest,
10151 fidl::encoding::DefaultFuchsiaResourceDialect,
10152 >::encode(
10153 (
10154 <fidl::encoding::HandleType<
10155 fidl::EventPair,
10156 { fidl::ObjectType::EVENTPAIR.into_raw() },
10157 2147483648,
10158 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10159 &mut self.eventpair
10160 ),
10161 <fidl::encoding::HandleType<
10162 fidl::Process,
10163 { fidl::ObjectType::PROCESS.into_raw() },
10164 2147483648,
10165 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10166 &mut self.process
10167 ),
10168 ),
10169 encoder,
10170 offset,
10171 _depth,
10172 )
10173 }
10174 }
10175 unsafe impl<
10176 T0: fidl::encoding::Encode<
10177 fidl::encoding::HandleType<
10178 fidl::EventPair,
10179 { fidl::ObjectType::EVENTPAIR.into_raw() },
10180 2147483648,
10181 >,
10182 fidl::encoding::DefaultFuchsiaResourceDialect,
10183 >,
10184 T1: fidl::encoding::Encode<
10185 fidl::encoding::HandleType<
10186 fidl::Process,
10187 { fidl::ObjectType::PROCESS.into_raw() },
10188 2147483648,
10189 >,
10190 fidl::encoding::DefaultFuchsiaResourceDialect,
10191 >,
10192 >
10193 fidl::encoding::Encode<
10194 CoverageDataCollectorInitializeRequest,
10195 fidl::encoding::DefaultFuchsiaResourceDialect,
10196 > for (T0, T1)
10197 {
10198 #[inline]
10199 unsafe fn encode(
10200 self,
10201 encoder: &mut fidl::encoding::Encoder<
10202 '_,
10203 fidl::encoding::DefaultFuchsiaResourceDialect,
10204 >,
10205 offset: usize,
10206 depth: fidl::encoding::Depth,
10207 ) -> fidl::Result<()> {
10208 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10209 self.0.encode(encoder, offset + 0, depth)?;
10213 self.1.encode(encoder, offset + 4, depth)?;
10214 Ok(())
10215 }
10216 }
10217
10218 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10219 for CoverageDataCollectorInitializeRequest
10220 {
10221 #[inline(always)]
10222 fn new_empty() -> Self {
10223 Self {
10224 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10225 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10226 }
10227 }
10228
10229 #[inline]
10230 unsafe fn decode(
10231 &mut self,
10232 decoder: &mut fidl::encoding::Decoder<
10233 '_,
10234 fidl::encoding::DefaultFuchsiaResourceDialect,
10235 >,
10236 offset: usize,
10237 _depth: fidl::encoding::Depth,
10238 ) -> fidl::Result<()> {
10239 decoder.debug_check_bounds::<Self>(offset);
10240 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10242 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10243 Ok(())
10244 }
10245 }
10246
10247 impl fidl::encoding::ResourceTypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10248 type Borrowed<'a> = &'a mut Self;
10249 fn take_or_borrow<'a>(
10250 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10251 ) -> Self::Borrowed<'a> {
10252 value
10253 }
10254 }
10255
10256 unsafe impl fidl::encoding::TypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10257 type Owned = Self;
10258
10259 #[inline(always)]
10260 fn inline_align(_context: fidl::encoding::Context) -> usize {
10261 8
10262 }
10263
10264 #[inline(always)]
10265 fn inline_size(_context: fidl::encoding::Context) -> usize {
10266 16
10267 }
10268 }
10269
10270 unsafe impl
10271 fidl::encoding::Encode<
10272 CoverageDataProviderWatchCoverageDataResponse,
10273 fidl::encoding::DefaultFuchsiaResourceDialect,
10274 > for &mut CoverageDataProviderWatchCoverageDataResponse
10275 {
10276 #[inline]
10277 unsafe fn encode(
10278 self,
10279 encoder: &mut fidl::encoding::Encoder<
10280 '_,
10281 fidl::encoding::DefaultFuchsiaResourceDialect,
10282 >,
10283 offset: usize,
10284 _depth: fidl::encoding::Depth,
10285 ) -> fidl::Result<()> {
10286 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10287 fidl::encoding::Encode::<CoverageDataProviderWatchCoverageDataResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10289 (
10290 <fidl::encoding::Vector<CoverageData, 4096> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.coverage_data),
10291 ),
10292 encoder, offset, _depth
10293 )
10294 }
10295 }
10296 unsafe impl<
10297 T0: fidl::encoding::Encode<
10298 fidl::encoding::Vector<CoverageData, 4096>,
10299 fidl::encoding::DefaultFuchsiaResourceDialect,
10300 >,
10301 >
10302 fidl::encoding::Encode<
10303 CoverageDataProviderWatchCoverageDataResponse,
10304 fidl::encoding::DefaultFuchsiaResourceDialect,
10305 > for (T0,)
10306 {
10307 #[inline]
10308 unsafe fn encode(
10309 self,
10310 encoder: &mut fidl::encoding::Encoder<
10311 '_,
10312 fidl::encoding::DefaultFuchsiaResourceDialect,
10313 >,
10314 offset: usize,
10315 depth: fidl::encoding::Depth,
10316 ) -> fidl::Result<()> {
10317 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10318 self.0.encode(encoder, offset + 0, depth)?;
10322 Ok(())
10323 }
10324 }
10325
10326 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10327 for CoverageDataProviderWatchCoverageDataResponse
10328 {
10329 #[inline(always)]
10330 fn new_empty() -> Self {
10331 Self {
10332 coverage_data: fidl::new_empty!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
10333 }
10334 }
10335
10336 #[inline]
10337 unsafe fn decode(
10338 &mut self,
10339 decoder: &mut fidl::encoding::Decoder<
10340 '_,
10341 fidl::encoding::DefaultFuchsiaResourceDialect,
10342 >,
10343 offset: usize,
10344 _depth: fidl::encoding::Depth,
10345 ) -> fidl::Result<()> {
10346 decoder.debug_check_bounds::<Self>(offset);
10347 fidl::decode!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.coverage_data, decoder, offset + 0, _depth)?;
10349 Ok(())
10350 }
10351 }
10352
10353 impl fidl::encoding::ResourceTypeMarker for Input {
10354 type Borrowed<'a> = &'a mut Self;
10355 fn take_or_borrow<'a>(
10356 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10357 ) -> Self::Borrowed<'a> {
10358 value
10359 }
10360 }
10361
10362 unsafe impl fidl::encoding::TypeMarker for Input {
10363 type Owned = Self;
10364
10365 #[inline(always)]
10366 fn inline_align(_context: fidl::encoding::Context) -> usize {
10367 8
10368 }
10369
10370 #[inline(always)]
10371 fn inline_size(_context: fidl::encoding::Context) -> usize {
10372 16
10373 }
10374 }
10375
10376 unsafe impl fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>
10377 for &mut Input
10378 {
10379 #[inline]
10380 unsafe fn encode(
10381 self,
10382 encoder: &mut fidl::encoding::Encoder<
10383 '_,
10384 fidl::encoding::DefaultFuchsiaResourceDialect,
10385 >,
10386 offset: usize,
10387 _depth: fidl::encoding::Depth,
10388 ) -> fidl::Result<()> {
10389 encoder.debug_check_bounds::<Input>(offset);
10390 fidl::encoding::Encode::<Input, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10392 (
10393 <fidl::encoding::HandleType<
10394 fidl::Socket,
10395 { fidl::ObjectType::SOCKET.into_raw() },
10396 2147483648,
10397 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10398 &mut self.socket
10399 ),
10400 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.size),
10401 ),
10402 encoder,
10403 offset,
10404 _depth,
10405 )
10406 }
10407 }
10408 unsafe impl<
10409 T0: fidl::encoding::Encode<
10410 fidl::encoding::HandleType<
10411 fidl::Socket,
10412 { fidl::ObjectType::SOCKET.into_raw() },
10413 2147483648,
10414 >,
10415 fidl::encoding::DefaultFuchsiaResourceDialect,
10416 >,
10417 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10418 > fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>
10419 for (T0, T1)
10420 {
10421 #[inline]
10422 unsafe fn encode(
10423 self,
10424 encoder: &mut fidl::encoding::Encoder<
10425 '_,
10426 fidl::encoding::DefaultFuchsiaResourceDialect,
10427 >,
10428 offset: usize,
10429 depth: fidl::encoding::Depth,
10430 ) -> fidl::Result<()> {
10431 encoder.debug_check_bounds::<Input>(offset);
10432 unsafe {
10435 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10436 (ptr as *mut u64).write_unaligned(0);
10437 }
10438 self.0.encode(encoder, offset + 0, depth)?;
10440 self.1.encode(encoder, offset + 8, depth)?;
10441 Ok(())
10442 }
10443 }
10444
10445 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Input {
10446 #[inline(always)]
10447 fn new_empty() -> Self {
10448 Self {
10449 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10450 size: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10451 }
10452 }
10453
10454 #[inline]
10455 unsafe fn decode(
10456 &mut self,
10457 decoder: &mut fidl::encoding::Decoder<
10458 '_,
10459 fidl::encoding::DefaultFuchsiaResourceDialect,
10460 >,
10461 offset: usize,
10462 _depth: fidl::encoding::Depth,
10463 ) -> fidl::Result<()> {
10464 decoder.debug_check_bounds::<Self>(offset);
10465 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10467 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10468 let mask = 0xffffffff00000000u64;
10469 let maskedval = padval & mask;
10470 if maskedval != 0 {
10471 return Err(fidl::Error::NonZeroPadding {
10472 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10473 });
10474 }
10475 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
10476 fidl::decode!(
10477 u64,
10478 fidl::encoding::DefaultFuchsiaResourceDialect,
10479 &mut self.size,
10480 decoder,
10481 offset + 8,
10482 _depth
10483 )?;
10484 Ok(())
10485 }
10486 }
10487
10488 impl fidl::encoding::ResourceTypeMarker for InstrumentedProcess {
10489 type Borrowed<'a> = &'a mut Self;
10490 fn take_or_borrow<'a>(
10491 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10492 ) -> Self::Borrowed<'a> {
10493 value
10494 }
10495 }
10496
10497 unsafe impl fidl::encoding::TypeMarker for InstrumentedProcess {
10498 type Owned = Self;
10499
10500 #[inline(always)]
10501 fn inline_align(_context: fidl::encoding::Context) -> usize {
10502 4
10503 }
10504
10505 #[inline(always)]
10506 fn inline_size(_context: fidl::encoding::Context) -> usize {
10507 8
10508 }
10509 }
10510
10511 unsafe impl
10512 fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10513 for &mut InstrumentedProcess
10514 {
10515 #[inline]
10516 unsafe fn encode(
10517 self,
10518 encoder: &mut fidl::encoding::Encoder<
10519 '_,
10520 fidl::encoding::DefaultFuchsiaResourceDialect,
10521 >,
10522 offset: usize,
10523 _depth: fidl::encoding::Depth,
10524 ) -> fidl::Result<()> {
10525 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10526 fidl::encoding::Encode::<
10528 InstrumentedProcess,
10529 fidl::encoding::DefaultFuchsiaResourceDialect,
10530 >::encode(
10531 (
10532 <fidl::encoding::HandleType<
10533 fidl::EventPair,
10534 { fidl::ObjectType::EVENTPAIR.into_raw() },
10535 2147483648,
10536 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10537 &mut self.eventpair
10538 ),
10539 <fidl::encoding::HandleType<
10540 fidl::Process,
10541 { fidl::ObjectType::PROCESS.into_raw() },
10542 2147483648,
10543 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10544 &mut self.process
10545 ),
10546 ),
10547 encoder,
10548 offset,
10549 _depth,
10550 )
10551 }
10552 }
10553 unsafe impl<
10554 T0: fidl::encoding::Encode<
10555 fidl::encoding::HandleType<
10556 fidl::EventPair,
10557 { fidl::ObjectType::EVENTPAIR.into_raw() },
10558 2147483648,
10559 >,
10560 fidl::encoding::DefaultFuchsiaResourceDialect,
10561 >,
10562 T1: fidl::encoding::Encode<
10563 fidl::encoding::HandleType<
10564 fidl::Process,
10565 { fidl::ObjectType::PROCESS.into_raw() },
10566 2147483648,
10567 >,
10568 fidl::encoding::DefaultFuchsiaResourceDialect,
10569 >,
10570 >
10571 fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10572 for (T0, T1)
10573 {
10574 #[inline]
10575 unsafe fn encode(
10576 self,
10577 encoder: &mut fidl::encoding::Encoder<
10578 '_,
10579 fidl::encoding::DefaultFuchsiaResourceDialect,
10580 >,
10581 offset: usize,
10582 depth: fidl::encoding::Depth,
10583 ) -> fidl::Result<()> {
10584 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10585 self.0.encode(encoder, offset + 0, depth)?;
10589 self.1.encode(encoder, offset + 4, depth)?;
10590 Ok(())
10591 }
10592 }
10593
10594 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10595 for InstrumentedProcess
10596 {
10597 #[inline(always)]
10598 fn new_empty() -> Self {
10599 Self {
10600 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10601 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10602 }
10603 }
10604
10605 #[inline]
10606 unsafe fn decode(
10607 &mut self,
10608 decoder: &mut fidl::encoding::Decoder<
10609 '_,
10610 fidl::encoding::DefaultFuchsiaResourceDialect,
10611 >,
10612 offset: usize,
10613 _depth: fidl::encoding::Depth,
10614 ) -> fidl::Result<()> {
10615 decoder.debug_check_bounds::<Self>(offset);
10616 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10618 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10619 Ok(())
10620 }
10621 }
10622
10623 impl fidl::encoding::ResourceTypeMarker for ManagerConnectRequest {
10624 type Borrowed<'a> = &'a mut Self;
10625 fn take_or_borrow<'a>(
10626 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10627 ) -> Self::Borrowed<'a> {
10628 value
10629 }
10630 }
10631
10632 unsafe impl fidl::encoding::TypeMarker for ManagerConnectRequest {
10633 type Owned = Self;
10634
10635 #[inline(always)]
10636 fn inline_align(_context: fidl::encoding::Context) -> usize {
10637 8
10638 }
10639
10640 #[inline(always)]
10641 fn inline_size(_context: fidl::encoding::Context) -> usize {
10642 24
10643 }
10644 }
10645
10646 unsafe impl
10647 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10648 for &mut ManagerConnectRequest
10649 {
10650 #[inline]
10651 unsafe fn encode(
10652 self,
10653 encoder: &mut fidl::encoding::Encoder<
10654 '_,
10655 fidl::encoding::DefaultFuchsiaResourceDialect,
10656 >,
10657 offset: usize,
10658 _depth: fidl::encoding::Depth,
10659 ) -> fidl::Result<()> {
10660 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10661 fidl::encoding::Encode::<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10663 (
10664 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10665 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
10666 ),
10667 encoder, offset, _depth
10668 )
10669 }
10670 }
10671 unsafe impl<
10672 T0: fidl::encoding::Encode<
10673 fidl::encoding::BoundedString<4096>,
10674 fidl::encoding::DefaultFuchsiaResourceDialect,
10675 >,
10676 T1: fidl::encoding::Encode<
10677 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10678 fidl::encoding::DefaultFuchsiaResourceDialect,
10679 >,
10680 >
10681 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10682 for (T0, T1)
10683 {
10684 #[inline]
10685 unsafe fn encode(
10686 self,
10687 encoder: &mut fidl::encoding::Encoder<
10688 '_,
10689 fidl::encoding::DefaultFuchsiaResourceDialect,
10690 >,
10691 offset: usize,
10692 depth: fidl::encoding::Depth,
10693 ) -> fidl::Result<()> {
10694 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10695 unsafe {
10698 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10699 (ptr as *mut u64).write_unaligned(0);
10700 }
10701 self.0.encode(encoder, offset + 0, depth)?;
10703 self.1.encode(encoder, offset + 16, depth)?;
10704 Ok(())
10705 }
10706 }
10707
10708 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10709 for ManagerConnectRequest
10710 {
10711 #[inline(always)]
10712 fn new_empty() -> Self {
10713 Self {
10714 fuzzer_url: fidl::new_empty!(
10715 fidl::encoding::BoundedString<4096>,
10716 fidl::encoding::DefaultFuchsiaResourceDialect
10717 ),
10718 controller: fidl::new_empty!(
10719 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10720 fidl::encoding::DefaultFuchsiaResourceDialect
10721 ),
10722 }
10723 }
10724
10725 #[inline]
10726 unsafe fn decode(
10727 &mut self,
10728 decoder: &mut fidl::encoding::Decoder<
10729 '_,
10730 fidl::encoding::DefaultFuchsiaResourceDialect,
10731 >,
10732 offset: usize,
10733 _depth: fidl::encoding::Depth,
10734 ) -> fidl::Result<()> {
10735 decoder.debug_check_bounds::<Self>(offset);
10736 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10738 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10739 let mask = 0xffffffff00000000u64;
10740 let maskedval = padval & mask;
10741 if maskedval != 0 {
10742 return Err(fidl::Error::NonZeroPadding {
10743 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10744 });
10745 }
10746 fidl::decode!(
10747 fidl::encoding::BoundedString<4096>,
10748 fidl::encoding::DefaultFuchsiaResourceDialect,
10749 &mut self.fuzzer_url,
10750 decoder,
10751 offset + 0,
10752 _depth
10753 )?;
10754 fidl::decode!(
10755 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10756 fidl::encoding::DefaultFuchsiaResourceDialect,
10757 &mut self.controller,
10758 decoder,
10759 offset + 16,
10760 _depth
10761 )?;
10762 Ok(())
10763 }
10764 }
10765
10766 impl fidl::encoding::ResourceTypeMarker for ManagerGetOutputRequest {
10767 type Borrowed<'a> = &'a mut Self;
10768 fn take_or_borrow<'a>(
10769 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10770 ) -> Self::Borrowed<'a> {
10771 value
10772 }
10773 }
10774
10775 unsafe impl fidl::encoding::TypeMarker for ManagerGetOutputRequest {
10776 type Owned = Self;
10777
10778 #[inline(always)]
10779 fn inline_align(_context: fidl::encoding::Context) -> usize {
10780 8
10781 }
10782
10783 #[inline(always)]
10784 fn inline_size(_context: fidl::encoding::Context) -> usize {
10785 24
10786 }
10787 }
10788
10789 unsafe impl
10790 fidl::encoding::Encode<
10791 ManagerGetOutputRequest,
10792 fidl::encoding::DefaultFuchsiaResourceDialect,
10793 > for &mut ManagerGetOutputRequest
10794 {
10795 #[inline]
10796 unsafe fn encode(
10797 self,
10798 encoder: &mut fidl::encoding::Encoder<
10799 '_,
10800 fidl::encoding::DefaultFuchsiaResourceDialect,
10801 >,
10802 offset: usize,
10803 _depth: fidl::encoding::Depth,
10804 ) -> fidl::Result<()> {
10805 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10806 fidl::encoding::Encode::<ManagerGetOutputRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10808 (
10809 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10810 <TestOutput as fidl::encoding::ValueTypeMarker>::borrow(&self.output),
10811 <fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.socket),
10812 ),
10813 encoder, offset, _depth
10814 )
10815 }
10816 }
10817 unsafe impl<
10818 T0: fidl::encoding::Encode<
10819 fidl::encoding::BoundedString<4096>,
10820 fidl::encoding::DefaultFuchsiaResourceDialect,
10821 >,
10822 T1: fidl::encoding::Encode<TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect>,
10823 T2: fidl::encoding::Encode<
10824 fidl::encoding::HandleType<
10825 fidl::Socket,
10826 { fidl::ObjectType::SOCKET.into_raw() },
10827 2147483648,
10828 >,
10829 fidl::encoding::DefaultFuchsiaResourceDialect,
10830 >,
10831 >
10832 fidl::encoding::Encode<
10833 ManagerGetOutputRequest,
10834 fidl::encoding::DefaultFuchsiaResourceDialect,
10835 > for (T0, T1, T2)
10836 {
10837 #[inline]
10838 unsafe fn encode(
10839 self,
10840 encoder: &mut fidl::encoding::Encoder<
10841 '_,
10842 fidl::encoding::DefaultFuchsiaResourceDialect,
10843 >,
10844 offset: usize,
10845 depth: fidl::encoding::Depth,
10846 ) -> fidl::Result<()> {
10847 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10848 self.0.encode(encoder, offset + 0, depth)?;
10852 self.1.encode(encoder, offset + 16, depth)?;
10853 self.2.encode(encoder, offset + 20, depth)?;
10854 Ok(())
10855 }
10856 }
10857
10858 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10859 for ManagerGetOutputRequest
10860 {
10861 #[inline(always)]
10862 fn new_empty() -> Self {
10863 Self {
10864 fuzzer_url: fidl::new_empty!(
10865 fidl::encoding::BoundedString<4096>,
10866 fidl::encoding::DefaultFuchsiaResourceDialect
10867 ),
10868 output: fidl::new_empty!(TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect),
10869 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10870 }
10871 }
10872
10873 #[inline]
10874 unsafe fn decode(
10875 &mut self,
10876 decoder: &mut fidl::encoding::Decoder<
10877 '_,
10878 fidl::encoding::DefaultFuchsiaResourceDialect,
10879 >,
10880 offset: usize,
10881 _depth: fidl::encoding::Depth,
10882 ) -> fidl::Result<()> {
10883 decoder.debug_check_bounds::<Self>(offset);
10884 fidl::decode!(
10886 fidl::encoding::BoundedString<4096>,
10887 fidl::encoding::DefaultFuchsiaResourceDialect,
10888 &mut self.fuzzer_url,
10889 decoder,
10890 offset + 0,
10891 _depth
10892 )?;
10893 fidl::decode!(
10894 TestOutput,
10895 fidl::encoding::DefaultFuchsiaResourceDialect,
10896 &mut self.output,
10897 decoder,
10898 offset + 16,
10899 _depth
10900 )?;
10901 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 20, _depth)?;
10902 Ok(())
10903 }
10904 }
10905
10906 impl fidl::encoding::ResourceTypeMarker for RegistrarRegisterRequest {
10907 type Borrowed<'a> = &'a mut Self;
10908 fn take_or_borrow<'a>(
10909 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10910 ) -> Self::Borrowed<'a> {
10911 value
10912 }
10913 }
10914
10915 unsafe impl fidl::encoding::TypeMarker for RegistrarRegisterRequest {
10916 type Owned = Self;
10917
10918 #[inline(always)]
10919 fn inline_align(_context: fidl::encoding::Context) -> usize {
10920 8
10921 }
10922
10923 #[inline(always)]
10924 fn inline_size(_context: fidl::encoding::Context) -> usize {
10925 24
10926 }
10927 }
10928
10929 unsafe impl
10930 fidl::encoding::Encode<
10931 RegistrarRegisterRequest,
10932 fidl::encoding::DefaultFuchsiaResourceDialect,
10933 > for &mut RegistrarRegisterRequest
10934 {
10935 #[inline]
10936 unsafe fn encode(
10937 self,
10938 encoder: &mut fidl::encoding::Encoder<
10939 '_,
10940 fidl::encoding::DefaultFuchsiaResourceDialect,
10941 >,
10942 offset: usize,
10943 _depth: fidl::encoding::Depth,
10944 ) -> fidl::Result<()> {
10945 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10946 fidl::encoding::Encode::<RegistrarRegisterRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10948 (
10949 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10950 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.provider),
10951 ),
10952 encoder, offset, _depth
10953 )
10954 }
10955 }
10956 unsafe impl<
10957 T0: fidl::encoding::Encode<
10958 fidl::encoding::BoundedString<4096>,
10959 fidl::encoding::DefaultFuchsiaResourceDialect,
10960 >,
10961 T1: fidl::encoding::Encode<
10962 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
10963 fidl::encoding::DefaultFuchsiaResourceDialect,
10964 >,
10965 >
10966 fidl::encoding::Encode<
10967 RegistrarRegisterRequest,
10968 fidl::encoding::DefaultFuchsiaResourceDialect,
10969 > for (T0, T1)
10970 {
10971 #[inline]
10972 unsafe fn encode(
10973 self,
10974 encoder: &mut fidl::encoding::Encoder<
10975 '_,
10976 fidl::encoding::DefaultFuchsiaResourceDialect,
10977 >,
10978 offset: usize,
10979 depth: fidl::encoding::Depth,
10980 ) -> fidl::Result<()> {
10981 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10982 unsafe {
10985 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10986 (ptr as *mut u64).write_unaligned(0);
10987 }
10988 self.0.encode(encoder, offset + 0, depth)?;
10990 self.1.encode(encoder, offset + 16, depth)?;
10991 Ok(())
10992 }
10993 }
10994
10995 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10996 for RegistrarRegisterRequest
10997 {
10998 #[inline(always)]
10999 fn new_empty() -> Self {
11000 Self {
11001 fuzzer_url: fidl::new_empty!(
11002 fidl::encoding::BoundedString<4096>,
11003 fidl::encoding::DefaultFuchsiaResourceDialect
11004 ),
11005 provider: fidl::new_empty!(
11006 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
11007 fidl::encoding::DefaultFuchsiaResourceDialect
11008 ),
11009 }
11010 }
11011
11012 #[inline]
11013 unsafe fn decode(
11014 &mut self,
11015 decoder: &mut fidl::encoding::Decoder<
11016 '_,
11017 fidl::encoding::DefaultFuchsiaResourceDialect,
11018 >,
11019 offset: usize,
11020 _depth: fidl::encoding::Depth,
11021 ) -> fidl::Result<()> {
11022 decoder.debug_check_bounds::<Self>(offset);
11023 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11025 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11026 let mask = 0xffffffff00000000u64;
11027 let maskedval = padval & mask;
11028 if maskedval != 0 {
11029 return Err(fidl::Error::NonZeroPadding {
11030 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11031 });
11032 }
11033 fidl::decode!(
11034 fidl::encoding::BoundedString<4096>,
11035 fidl::encoding::DefaultFuchsiaResourceDialect,
11036 &mut self.fuzzer_url,
11037 decoder,
11038 offset + 0,
11039 _depth
11040 )?;
11041 fidl::decode!(
11042 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
11043 fidl::encoding::DefaultFuchsiaResourceDialect,
11044 &mut self.provider,
11045 decoder,
11046 offset + 16,
11047 _depth
11048 )?;
11049 Ok(())
11050 }
11051 }
11052
11053 impl fidl::encoding::ResourceTypeMarker for RegistryConnectRequest {
11054 type Borrowed<'a> = &'a mut Self;
11055 fn take_or_borrow<'a>(
11056 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11057 ) -> Self::Borrowed<'a> {
11058 value
11059 }
11060 }
11061
11062 unsafe impl fidl::encoding::TypeMarker for RegistryConnectRequest {
11063 type Owned = Self;
11064
11065 #[inline(always)]
11066 fn inline_align(_context: fidl::encoding::Context) -> usize {
11067 8
11068 }
11069
11070 #[inline(always)]
11071 fn inline_size(_context: fidl::encoding::Context) -> usize {
11072 32
11073 }
11074 }
11075
11076 unsafe impl
11077 fidl::encoding::Encode<
11078 RegistryConnectRequest,
11079 fidl::encoding::DefaultFuchsiaResourceDialect,
11080 > for &mut RegistryConnectRequest
11081 {
11082 #[inline]
11083 unsafe fn encode(
11084 self,
11085 encoder: &mut fidl::encoding::Encoder<
11086 '_,
11087 fidl::encoding::DefaultFuchsiaResourceDialect,
11088 >,
11089 offset: usize,
11090 _depth: fidl::encoding::Depth,
11091 ) -> fidl::Result<()> {
11092 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11093 fidl::encoding::Encode::<RegistryConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
11095 (
11096 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
11097 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
11098 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
11099 ),
11100 encoder, offset, _depth
11101 )
11102 }
11103 }
11104 unsafe impl<
11105 T0: fidl::encoding::Encode<
11106 fidl::encoding::BoundedString<4096>,
11107 fidl::encoding::DefaultFuchsiaResourceDialect,
11108 >,
11109 T1: fidl::encoding::Encode<
11110 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11111 fidl::encoding::DefaultFuchsiaResourceDialect,
11112 >,
11113 T2: fidl::encoding::Encode<i64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11114 >
11115 fidl::encoding::Encode<
11116 RegistryConnectRequest,
11117 fidl::encoding::DefaultFuchsiaResourceDialect,
11118 > for (T0, T1, T2)
11119 {
11120 #[inline]
11121 unsafe fn encode(
11122 self,
11123 encoder: &mut fidl::encoding::Encoder<
11124 '_,
11125 fidl::encoding::DefaultFuchsiaResourceDialect,
11126 >,
11127 offset: usize,
11128 depth: fidl::encoding::Depth,
11129 ) -> fidl::Result<()> {
11130 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11131 unsafe {
11134 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
11135 (ptr as *mut u64).write_unaligned(0);
11136 }
11137 self.0.encode(encoder, offset + 0, depth)?;
11139 self.1.encode(encoder, offset + 16, depth)?;
11140 self.2.encode(encoder, offset + 24, depth)?;
11141 Ok(())
11142 }
11143 }
11144
11145 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11146 for RegistryConnectRequest
11147 {
11148 #[inline(always)]
11149 fn new_empty() -> Self {
11150 Self {
11151 fuzzer_url: fidl::new_empty!(
11152 fidl::encoding::BoundedString<4096>,
11153 fidl::encoding::DefaultFuchsiaResourceDialect
11154 ),
11155 controller: fidl::new_empty!(
11156 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11157 fidl::encoding::DefaultFuchsiaResourceDialect
11158 ),
11159 timeout: fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect),
11160 }
11161 }
11162
11163 #[inline]
11164 unsafe fn decode(
11165 &mut self,
11166 decoder: &mut fidl::encoding::Decoder<
11167 '_,
11168 fidl::encoding::DefaultFuchsiaResourceDialect,
11169 >,
11170 offset: usize,
11171 _depth: fidl::encoding::Depth,
11172 ) -> fidl::Result<()> {
11173 decoder.debug_check_bounds::<Self>(offset);
11174 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11176 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11177 let mask = 0xffffffff00000000u64;
11178 let maskedval = padval & mask;
11179 if maskedval != 0 {
11180 return Err(fidl::Error::NonZeroPadding {
11181 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11182 });
11183 }
11184 fidl::decode!(
11185 fidl::encoding::BoundedString<4096>,
11186 fidl::encoding::DefaultFuchsiaResourceDialect,
11187 &mut self.fuzzer_url,
11188 decoder,
11189 offset + 0,
11190 _depth
11191 )?;
11192 fidl::decode!(
11193 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11194 fidl::encoding::DefaultFuchsiaResourceDialect,
11195 &mut self.controller,
11196 decoder,
11197 offset + 16,
11198 _depth
11199 )?;
11200 fidl::decode!(
11201 i64,
11202 fidl::encoding::DefaultFuchsiaResourceDialect,
11203 &mut self.timeout,
11204 decoder,
11205 offset + 24,
11206 _depth
11207 )?;
11208 Ok(())
11209 }
11210 }
11211
11212 impl fidl::encoding::ResourceTypeMarker for TargetAdapterConnectRequest {
11213 type Borrowed<'a> = &'a mut Self;
11214 fn take_or_borrow<'a>(
11215 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11216 ) -> Self::Borrowed<'a> {
11217 value
11218 }
11219 }
11220
11221 unsafe impl fidl::encoding::TypeMarker for TargetAdapterConnectRequest {
11222 type Owned = Self;
11223
11224 #[inline(always)]
11225 fn inline_align(_context: fidl::encoding::Context) -> usize {
11226 4
11227 }
11228
11229 #[inline(always)]
11230 fn inline_size(_context: fidl::encoding::Context) -> usize {
11231 8
11232 }
11233 }
11234
11235 unsafe impl
11236 fidl::encoding::Encode<
11237 TargetAdapterConnectRequest,
11238 fidl::encoding::DefaultFuchsiaResourceDialect,
11239 > for &mut TargetAdapterConnectRequest
11240 {
11241 #[inline]
11242 unsafe fn encode(
11243 self,
11244 encoder: &mut fidl::encoding::Encoder<
11245 '_,
11246 fidl::encoding::DefaultFuchsiaResourceDialect,
11247 >,
11248 offset: usize,
11249 _depth: fidl::encoding::Depth,
11250 ) -> fidl::Result<()> {
11251 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11252 fidl::encoding::Encode::<
11254 TargetAdapterConnectRequest,
11255 fidl::encoding::DefaultFuchsiaResourceDialect,
11256 >::encode(
11257 (
11258 <fidl::encoding::HandleType<
11259 fidl::EventPair,
11260 { fidl::ObjectType::EVENTPAIR.into_raw() },
11261 2147483648,
11262 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11263 &mut self.eventpair
11264 ),
11265 <fidl::encoding::HandleType<
11266 fidl::Vmo,
11267 { fidl::ObjectType::VMO.into_raw() },
11268 2147483648,
11269 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11270 &mut self.test_input
11271 ),
11272 ),
11273 encoder,
11274 offset,
11275 _depth,
11276 )
11277 }
11278 }
11279 unsafe impl<
11280 T0: fidl::encoding::Encode<
11281 fidl::encoding::HandleType<
11282 fidl::EventPair,
11283 { fidl::ObjectType::EVENTPAIR.into_raw() },
11284 2147483648,
11285 >,
11286 fidl::encoding::DefaultFuchsiaResourceDialect,
11287 >,
11288 T1: fidl::encoding::Encode<
11289 fidl::encoding::HandleType<
11290 fidl::Vmo,
11291 { fidl::ObjectType::VMO.into_raw() },
11292 2147483648,
11293 >,
11294 fidl::encoding::DefaultFuchsiaResourceDialect,
11295 >,
11296 >
11297 fidl::encoding::Encode<
11298 TargetAdapterConnectRequest,
11299 fidl::encoding::DefaultFuchsiaResourceDialect,
11300 > for (T0, T1)
11301 {
11302 #[inline]
11303 unsafe fn encode(
11304 self,
11305 encoder: &mut fidl::encoding::Encoder<
11306 '_,
11307 fidl::encoding::DefaultFuchsiaResourceDialect,
11308 >,
11309 offset: usize,
11310 depth: fidl::encoding::Depth,
11311 ) -> fidl::Result<()> {
11312 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11313 self.0.encode(encoder, offset + 0, depth)?;
11317 self.1.encode(encoder, offset + 4, depth)?;
11318 Ok(())
11319 }
11320 }
11321
11322 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11323 for TargetAdapterConnectRequest
11324 {
11325 #[inline(always)]
11326 fn new_empty() -> Self {
11327 Self {
11328 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11329 test_input: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11330 }
11331 }
11332
11333 #[inline]
11334 unsafe fn decode(
11335 &mut self,
11336 decoder: &mut fidl::encoding::Decoder<
11337 '_,
11338 fidl::encoding::DefaultFuchsiaResourceDialect,
11339 >,
11340 offset: usize,
11341 _depth: fidl::encoding::Depth,
11342 ) -> fidl::Result<()> {
11343 decoder.debug_check_bounds::<Self>(offset);
11344 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
11346 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.test_input, decoder, offset + 4, _depth)?;
11347 Ok(())
11348 }
11349 }
11350
11351 impl Artifact {
11352 #[inline(always)]
11353 fn max_ordinal_present(&self) -> u64 {
11354 if let Some(_) = self.error {
11355 return 3;
11356 }
11357 if let Some(_) = self.input {
11358 return 2;
11359 }
11360 if let Some(_) = self.result {
11361 return 1;
11362 }
11363 0
11364 }
11365 }
11366
11367 impl fidl::encoding::ResourceTypeMarker for Artifact {
11368 type Borrowed<'a> = &'a mut Self;
11369 fn take_or_borrow<'a>(
11370 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11371 ) -> Self::Borrowed<'a> {
11372 value
11373 }
11374 }
11375
11376 unsafe impl fidl::encoding::TypeMarker for Artifact {
11377 type Owned = Self;
11378
11379 #[inline(always)]
11380 fn inline_align(_context: fidl::encoding::Context) -> usize {
11381 8
11382 }
11383
11384 #[inline(always)]
11385 fn inline_size(_context: fidl::encoding::Context) -> usize {
11386 16
11387 }
11388 }
11389
11390 unsafe impl fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
11391 for &mut Artifact
11392 {
11393 unsafe fn encode(
11394 self,
11395 encoder: &mut fidl::encoding::Encoder<
11396 '_,
11397 fidl::encoding::DefaultFuchsiaResourceDialect,
11398 >,
11399 offset: usize,
11400 mut depth: fidl::encoding::Depth,
11401 ) -> fidl::Result<()> {
11402 encoder.debug_check_bounds::<Artifact>(offset);
11403 let max_ordinal: u64 = self.max_ordinal_present();
11405 encoder.write_num(max_ordinal, offset);
11406 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11407 if max_ordinal == 0 {
11409 return Ok(());
11410 }
11411 depth.increment()?;
11412 let envelope_size = 8;
11413 let bytes_len = max_ordinal as usize * envelope_size;
11414 #[allow(unused_variables)]
11415 let offset = encoder.out_of_line_offset(bytes_len);
11416 let mut _prev_end_offset: usize = 0;
11417 if 1 > max_ordinal {
11418 return Ok(());
11419 }
11420
11421 let cur_offset: usize = (1 - 1) * envelope_size;
11424
11425 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11427
11428 fidl::encoding::encode_in_envelope_optional::<
11433 Result_,
11434 fidl::encoding::DefaultFuchsiaResourceDialect,
11435 >(
11436 self.result.as_ref().map(<Result_ as fidl::encoding::ValueTypeMarker>::borrow),
11437 encoder,
11438 offset + cur_offset,
11439 depth,
11440 )?;
11441
11442 _prev_end_offset = cur_offset + envelope_size;
11443 if 2 > max_ordinal {
11444 return Ok(());
11445 }
11446
11447 let cur_offset: usize = (2 - 1) * envelope_size;
11450
11451 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11453
11454 fidl::encoding::encode_in_envelope_optional::<
11459 Input,
11460 fidl::encoding::DefaultFuchsiaResourceDialect,
11461 >(
11462 self.input
11463 .as_mut()
11464 .map(<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11465 encoder,
11466 offset + cur_offset,
11467 depth,
11468 )?;
11469
11470 _prev_end_offset = cur_offset + envelope_size;
11471 if 3 > max_ordinal {
11472 return Ok(());
11473 }
11474
11475 let cur_offset: usize = (3 - 1) * envelope_size;
11478
11479 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11481
11482 fidl::encoding::encode_in_envelope_optional::<
11487 i32,
11488 fidl::encoding::DefaultFuchsiaResourceDialect,
11489 >(
11490 self.error.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
11491 encoder,
11492 offset + cur_offset,
11493 depth,
11494 )?;
11495
11496 _prev_end_offset = cur_offset + envelope_size;
11497
11498 Ok(())
11499 }
11500 }
11501
11502 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {
11503 #[inline(always)]
11504 fn new_empty() -> Self {
11505 Self::default()
11506 }
11507
11508 unsafe fn decode(
11509 &mut self,
11510 decoder: &mut fidl::encoding::Decoder<
11511 '_,
11512 fidl::encoding::DefaultFuchsiaResourceDialect,
11513 >,
11514 offset: usize,
11515 mut depth: fidl::encoding::Depth,
11516 ) -> fidl::Result<()> {
11517 decoder.debug_check_bounds::<Self>(offset);
11518 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11519 None => return Err(fidl::Error::NotNullable),
11520 Some(len) => len,
11521 };
11522 if len == 0 {
11524 return Ok(());
11525 };
11526 depth.increment()?;
11527 let envelope_size = 8;
11528 let bytes_len = len * envelope_size;
11529 let offset = decoder.out_of_line_offset(bytes_len)?;
11530 let mut _next_ordinal_to_read = 0;
11532 let mut next_offset = offset;
11533 let end_offset = offset + bytes_len;
11534 _next_ordinal_to_read += 1;
11535 if next_offset >= end_offset {
11536 return Ok(());
11537 }
11538
11539 while _next_ordinal_to_read < 1 {
11541 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11542 _next_ordinal_to_read += 1;
11543 next_offset += envelope_size;
11544 }
11545
11546 let next_out_of_line = decoder.next_out_of_line();
11547 let handles_before = decoder.remaining_handles();
11548 if let Some((inlined, num_bytes, num_handles)) =
11549 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11550 {
11551 let member_inline_size =
11552 <Result_ as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11553 if inlined != (member_inline_size <= 4) {
11554 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11555 }
11556 let inner_offset;
11557 let mut inner_depth = depth.clone();
11558 if inlined {
11559 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11560 inner_offset = next_offset;
11561 } else {
11562 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11563 inner_depth.increment()?;
11564 }
11565 let val_ref = self.result.get_or_insert_with(|| {
11566 fidl::new_empty!(Result_, fidl::encoding::DefaultFuchsiaResourceDialect)
11567 });
11568 fidl::decode!(
11569 Result_,
11570 fidl::encoding::DefaultFuchsiaResourceDialect,
11571 val_ref,
11572 decoder,
11573 inner_offset,
11574 inner_depth
11575 )?;
11576 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11577 {
11578 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11579 }
11580 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11581 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11582 }
11583 }
11584
11585 next_offset += envelope_size;
11586 _next_ordinal_to_read += 1;
11587 if next_offset >= end_offset {
11588 return Ok(());
11589 }
11590
11591 while _next_ordinal_to_read < 2 {
11593 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11594 _next_ordinal_to_read += 1;
11595 next_offset += envelope_size;
11596 }
11597
11598 let next_out_of_line = decoder.next_out_of_line();
11599 let handles_before = decoder.remaining_handles();
11600 if let Some((inlined, num_bytes, num_handles)) =
11601 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11602 {
11603 let member_inline_size =
11604 <Input as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11605 if inlined != (member_inline_size <= 4) {
11606 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11607 }
11608 let inner_offset;
11609 let mut inner_depth = depth.clone();
11610 if inlined {
11611 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11612 inner_offset = next_offset;
11613 } else {
11614 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11615 inner_depth.increment()?;
11616 }
11617 let val_ref = self.input.get_or_insert_with(|| {
11618 fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect)
11619 });
11620 fidl::decode!(
11621 Input,
11622 fidl::encoding::DefaultFuchsiaResourceDialect,
11623 val_ref,
11624 decoder,
11625 inner_offset,
11626 inner_depth
11627 )?;
11628 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11629 {
11630 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11631 }
11632 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11633 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11634 }
11635 }
11636
11637 next_offset += envelope_size;
11638 _next_ordinal_to_read += 1;
11639 if next_offset >= end_offset {
11640 return Ok(());
11641 }
11642
11643 while _next_ordinal_to_read < 3 {
11645 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11646 _next_ordinal_to_read += 1;
11647 next_offset += envelope_size;
11648 }
11649
11650 let next_out_of_line = decoder.next_out_of_line();
11651 let handles_before = decoder.remaining_handles();
11652 if let Some((inlined, num_bytes, num_handles)) =
11653 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11654 {
11655 let member_inline_size =
11656 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11657 if inlined != (member_inline_size <= 4) {
11658 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11659 }
11660 let inner_offset;
11661 let mut inner_depth = depth.clone();
11662 if inlined {
11663 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11664 inner_offset = next_offset;
11665 } else {
11666 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11667 inner_depth.increment()?;
11668 }
11669 let val_ref = self.error.get_or_insert_with(|| {
11670 fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect)
11671 });
11672 fidl::decode!(
11673 i32,
11674 fidl::encoding::DefaultFuchsiaResourceDialect,
11675 val_ref,
11676 decoder,
11677 inner_offset,
11678 inner_depth
11679 )?;
11680 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11681 {
11682 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11683 }
11684 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11685 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11686 }
11687 }
11688
11689 next_offset += envelope_size;
11690
11691 while next_offset < end_offset {
11693 _next_ordinal_to_read += 1;
11694 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11695 next_offset += envelope_size;
11696 }
11697
11698 Ok(())
11699 }
11700 }
11701
11702 impl fidl::encoding::ResourceTypeMarker for Data {
11703 type Borrowed<'a> = &'a mut Self;
11704 fn take_or_borrow<'a>(
11705 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11706 ) -> Self::Borrowed<'a> {
11707 value
11708 }
11709 }
11710
11711 unsafe impl fidl::encoding::TypeMarker for Data {
11712 type Owned = Self;
11713
11714 #[inline(always)]
11715 fn inline_align(_context: fidl::encoding::Context) -> usize {
11716 8
11717 }
11718
11719 #[inline(always)]
11720 fn inline_size(_context: fidl::encoding::Context) -> usize {
11721 16
11722 }
11723 }
11724
11725 unsafe impl fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>
11726 for &mut Data
11727 {
11728 #[inline]
11729 unsafe fn encode(
11730 self,
11731 encoder: &mut fidl::encoding::Encoder<
11732 '_,
11733 fidl::encoding::DefaultFuchsiaResourceDialect,
11734 >,
11735 offset: usize,
11736 _depth: fidl::encoding::Depth,
11737 ) -> fidl::Result<()> {
11738 encoder.debug_check_bounds::<Data>(offset);
11739 encoder.write_num::<u64>(self.ordinal(), offset);
11740 match self {
11741 Data::Instrumented(ref mut val) => fidl::encoding::encode_in_envelope::<
11742 InstrumentedProcess,
11743 fidl::encoding::DefaultFuchsiaResourceDialect,
11744 >(
11745 <InstrumentedProcess as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11746 val,
11747 ),
11748 encoder,
11749 offset + 8,
11750 _depth,
11751 ),
11752 Data::Inline8bitCounters(ref mut val) => fidl::encoding::encode_in_envelope::<
11753 fidl::encoding::HandleType<
11754 fidl::Vmo,
11755 { fidl::ObjectType::VMO.into_raw() },
11756 2147483648,
11757 >,
11758 fidl::encoding::DefaultFuchsiaResourceDialect,
11759 >(
11760 <fidl::encoding::HandleType<
11761 fidl::Vmo,
11762 { fidl::ObjectType::VMO.into_raw() },
11763 2147483648,
11764 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11765 val
11766 ),
11767 encoder,
11768 offset + 8,
11769 _depth,
11770 ),
11771 Data::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
11772 }
11773 }
11774 }
11775
11776 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Data {
11777 #[inline(always)]
11778 fn new_empty() -> Self {
11779 Self::__SourceBreaking { unknown_ordinal: 0 }
11780 }
11781
11782 #[inline]
11783 unsafe fn decode(
11784 &mut self,
11785 decoder: &mut fidl::encoding::Decoder<
11786 '_,
11787 fidl::encoding::DefaultFuchsiaResourceDialect,
11788 >,
11789 offset: usize,
11790 mut depth: fidl::encoding::Depth,
11791 ) -> fidl::Result<()> {
11792 decoder.debug_check_bounds::<Self>(offset);
11793 #[allow(unused_variables)]
11794 let next_out_of_line = decoder.next_out_of_line();
11795 let handles_before = decoder.remaining_handles();
11796 let (ordinal, inlined, num_bytes, num_handles) =
11797 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
11798
11799 let member_inline_size = match ordinal {
11800 1 => <InstrumentedProcess as fidl::encoding::TypeMarker>::inline_size(
11801 decoder.context,
11802 ),
11803 2 => <fidl::encoding::HandleType<
11804 fidl::Vmo,
11805 { fidl::ObjectType::VMO.into_raw() },
11806 2147483648,
11807 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11808 0 => return Err(fidl::Error::UnknownUnionTag),
11809 _ => num_bytes as usize,
11810 };
11811
11812 if inlined != (member_inline_size <= 4) {
11813 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11814 }
11815 let _inner_offset;
11816 if inlined {
11817 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
11818 _inner_offset = offset + 8;
11819 } else {
11820 depth.increment()?;
11821 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11822 }
11823 match ordinal {
11824 1 => {
11825 #[allow(irrefutable_let_patterns)]
11826 if let Data::Instrumented(_) = self {
11827 } else {
11829 *self = Data::Instrumented(fidl::new_empty!(
11831 InstrumentedProcess,
11832 fidl::encoding::DefaultFuchsiaResourceDialect
11833 ));
11834 }
11835 #[allow(irrefutable_let_patterns)]
11836 if let Data::Instrumented(ref mut val) = self {
11837 fidl::decode!(
11838 InstrumentedProcess,
11839 fidl::encoding::DefaultFuchsiaResourceDialect,
11840 val,
11841 decoder,
11842 _inner_offset,
11843 depth
11844 )?;
11845 } else {
11846 unreachable!()
11847 }
11848 }
11849 2 => {
11850 #[allow(irrefutable_let_patterns)]
11851 if let Data::Inline8bitCounters(_) = self {
11852 } else {
11854 *self = Data::Inline8bitCounters(
11856 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11857 );
11858 }
11859 #[allow(irrefutable_let_patterns)]
11860 if let Data::Inline8bitCounters(ref mut val) = self {
11861 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
11862 } else {
11863 unreachable!()
11864 }
11865 }
11866 #[allow(deprecated)]
11867 ordinal => {
11868 for _ in 0..num_handles {
11869 decoder.drop_next_handle()?;
11870 }
11871 *self = Data::__SourceBreaking { unknown_ordinal: ordinal };
11872 }
11873 }
11874 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
11875 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11876 }
11877 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11878 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11879 }
11880 Ok(())
11881 }
11882 }
11883}