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::NullableHandle {
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 { Some((responder)) } else { None }
2070 }
2071
2072 #[allow(irrefutable_let_patterns)]
2073 pub fn into_try_one(self) -> Option<(Input, ControllerTryOneResponder)> {
2074 if let ControllerRequest::TryOne { test_input, responder } = self {
2075 Some((test_input, responder))
2076 } else {
2077 None
2078 }
2079 }
2080
2081 #[allow(irrefutable_let_patterns)]
2082 pub fn into_minimize(self) -> Option<(Input, ControllerMinimizeResponder)> {
2083 if let ControllerRequest::Minimize { test_input, responder } = self {
2084 Some((test_input, responder))
2085 } else {
2086 None
2087 }
2088 }
2089
2090 #[allow(irrefutable_let_patterns)]
2091 pub fn into_cleanse(self) -> Option<(Input, ControllerCleanseResponder)> {
2092 if let ControllerRequest::Cleanse { test_input, responder } = self {
2093 Some((test_input, responder))
2094 } else {
2095 None
2096 }
2097 }
2098
2099 #[allow(irrefutable_let_patterns)]
2100 pub fn into_merge(self) -> Option<(ControllerMergeResponder)> {
2101 if let ControllerRequest::Merge { responder } = self { Some((responder)) } else { None }
2102 }
2103
2104 #[allow(irrefutable_let_patterns)]
2105 pub fn into_get_status(self) -> Option<(ControllerGetStatusResponder)> {
2106 if let ControllerRequest::GetStatus { responder } = self { Some((responder)) } else { None }
2107 }
2108
2109 #[allow(irrefutable_let_patterns)]
2110 pub fn into_watch_artifact(self) -> Option<(ControllerWatchArtifactResponder)> {
2111 if let ControllerRequest::WatchArtifact { responder } = self {
2112 Some((responder))
2113 } else {
2114 None
2115 }
2116 }
2117
2118 pub fn method_name(&self) -> &'static str {
2120 match *self {
2121 ControllerRequest::Configure { .. } => "configure",
2122 ControllerRequest::GetOptions { .. } => "get_options",
2123 ControllerRequest::AddToCorpus { .. } => "add_to_corpus",
2124 ControllerRequest::ReadCorpus { .. } => "read_corpus",
2125 ControllerRequest::WriteDictionary { .. } => "write_dictionary",
2126 ControllerRequest::ReadDictionary { .. } => "read_dictionary",
2127 ControllerRequest::AddMonitor { .. } => "add_monitor",
2128 ControllerRequest::Fuzz { .. } => "fuzz",
2129 ControllerRequest::TryOne { .. } => "try_one",
2130 ControllerRequest::Minimize { .. } => "minimize",
2131 ControllerRequest::Cleanse { .. } => "cleanse",
2132 ControllerRequest::Merge { .. } => "merge",
2133 ControllerRequest::GetStatus { .. } => "get_status",
2134 ControllerRequest::WatchArtifact { .. } => "watch_artifact",
2135 }
2136 }
2137}
2138
2139#[derive(Debug, Clone)]
2140pub struct ControllerControlHandle {
2141 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2142}
2143
2144impl fidl::endpoints::ControlHandle for ControllerControlHandle {
2145 fn shutdown(&self) {
2146 self.inner.shutdown()
2147 }
2148
2149 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2150 self.inner.shutdown_with_epitaph(status)
2151 }
2152
2153 fn is_closed(&self) -> bool {
2154 self.inner.channel().is_closed()
2155 }
2156 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2157 self.inner.channel().on_closed()
2158 }
2159
2160 #[cfg(target_os = "fuchsia")]
2161 fn signal_peer(
2162 &self,
2163 clear_mask: zx::Signals,
2164 set_mask: zx::Signals,
2165 ) -> Result<(), zx_status::Status> {
2166 use fidl::Peered;
2167 self.inner.channel().signal_peer(clear_mask, set_mask)
2168 }
2169}
2170
2171impl ControllerControlHandle {}
2172
2173#[must_use = "FIDL methods require a response to be sent"]
2174#[derive(Debug)]
2175pub struct ControllerConfigureResponder {
2176 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2177 tx_id: u32,
2178}
2179
2180impl std::ops::Drop for ControllerConfigureResponder {
2184 fn drop(&mut self) {
2185 self.control_handle.shutdown();
2186 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2188 }
2189}
2190
2191impl fidl::endpoints::Responder for ControllerConfigureResponder {
2192 type ControlHandle = ControllerControlHandle;
2193
2194 fn control_handle(&self) -> &ControllerControlHandle {
2195 &self.control_handle
2196 }
2197
2198 fn drop_without_shutdown(mut self) {
2199 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2201 std::mem::forget(self);
2203 }
2204}
2205
2206impl ControllerConfigureResponder {
2207 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2211 let _result = self.send_raw(result);
2212 if _result.is_err() {
2213 self.control_handle.shutdown();
2214 }
2215 self.drop_without_shutdown();
2216 _result
2217 }
2218
2219 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2221 let _result = self.send_raw(result);
2222 self.drop_without_shutdown();
2223 _result
2224 }
2225
2226 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2227 self.control_handle
2228 .inner
2229 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2230 result,
2231 self.tx_id,
2232 0x35c8cba7fa3d32e4,
2233 fidl::encoding::DynamicFlags::empty(),
2234 )
2235 }
2236}
2237
2238#[must_use = "FIDL methods require a response to be sent"]
2239#[derive(Debug)]
2240pub struct ControllerGetOptionsResponder {
2241 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2242 tx_id: u32,
2243}
2244
2245impl std::ops::Drop for ControllerGetOptionsResponder {
2249 fn drop(&mut self) {
2250 self.control_handle.shutdown();
2251 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2253 }
2254}
2255
2256impl fidl::endpoints::Responder for ControllerGetOptionsResponder {
2257 type ControlHandle = ControllerControlHandle;
2258
2259 fn control_handle(&self) -> &ControllerControlHandle {
2260 &self.control_handle
2261 }
2262
2263 fn drop_without_shutdown(mut self) {
2264 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2266 std::mem::forget(self);
2268 }
2269}
2270
2271impl ControllerGetOptionsResponder {
2272 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
2276 let _result = self.send_raw(options);
2277 if _result.is_err() {
2278 self.control_handle.shutdown();
2279 }
2280 self.drop_without_shutdown();
2281 _result
2282 }
2283
2284 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
2286 let _result = self.send_raw(options);
2287 self.drop_without_shutdown();
2288 _result
2289 }
2290
2291 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
2292 self.control_handle.inner.send::<ControllerGetOptionsResponse>(
2293 (options,),
2294 self.tx_id,
2295 0x683d93332504b9cd,
2296 fidl::encoding::DynamicFlags::empty(),
2297 )
2298 }
2299}
2300
2301#[must_use = "FIDL methods require a response to be sent"]
2302#[derive(Debug)]
2303pub struct ControllerAddToCorpusResponder {
2304 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2305 tx_id: u32,
2306}
2307
2308impl std::ops::Drop for ControllerAddToCorpusResponder {
2312 fn drop(&mut self) {
2313 self.control_handle.shutdown();
2314 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2316 }
2317}
2318
2319impl fidl::endpoints::Responder for ControllerAddToCorpusResponder {
2320 type ControlHandle = ControllerControlHandle;
2321
2322 fn control_handle(&self) -> &ControllerControlHandle {
2323 &self.control_handle
2324 }
2325
2326 fn drop_without_shutdown(mut self) {
2327 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2329 std::mem::forget(self);
2331 }
2332}
2333
2334impl ControllerAddToCorpusResponder {
2335 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2339 let _result = self.send_raw(result);
2340 if _result.is_err() {
2341 self.control_handle.shutdown();
2342 }
2343 self.drop_without_shutdown();
2344 _result
2345 }
2346
2347 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2349 let _result = self.send_raw(result);
2350 self.drop_without_shutdown();
2351 _result
2352 }
2353
2354 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2355 self.control_handle
2356 .inner
2357 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2358 result,
2359 self.tx_id,
2360 0x7bdf8336ab534cee,
2361 fidl::encoding::DynamicFlags::empty(),
2362 )
2363 }
2364}
2365
2366#[must_use = "FIDL methods require a response to be sent"]
2367#[derive(Debug)]
2368pub struct ControllerReadCorpusResponder {
2369 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2370 tx_id: u32,
2371}
2372
2373impl std::ops::Drop for ControllerReadCorpusResponder {
2377 fn drop(&mut self) {
2378 self.control_handle.shutdown();
2379 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2381 }
2382}
2383
2384impl fidl::endpoints::Responder for ControllerReadCorpusResponder {
2385 type ControlHandle = ControllerControlHandle;
2386
2387 fn control_handle(&self) -> &ControllerControlHandle {
2388 &self.control_handle
2389 }
2390
2391 fn drop_without_shutdown(mut self) {
2392 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2394 std::mem::forget(self);
2396 }
2397}
2398
2399impl ControllerReadCorpusResponder {
2400 pub fn send(self) -> Result<(), fidl::Error> {
2404 let _result = self.send_raw();
2405 if _result.is_err() {
2406 self.control_handle.shutdown();
2407 }
2408 self.drop_without_shutdown();
2409 _result
2410 }
2411
2412 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2414 let _result = self.send_raw();
2415 self.drop_without_shutdown();
2416 _result
2417 }
2418
2419 fn send_raw(&self) -> Result<(), fidl::Error> {
2420 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2421 (),
2422 self.tx_id,
2423 0x501279b430b34514,
2424 fidl::encoding::DynamicFlags::empty(),
2425 )
2426 }
2427}
2428
2429#[must_use = "FIDL methods require a response to be sent"]
2430#[derive(Debug)]
2431pub struct ControllerWriteDictionaryResponder {
2432 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2433 tx_id: u32,
2434}
2435
2436impl std::ops::Drop for ControllerWriteDictionaryResponder {
2440 fn drop(&mut self) {
2441 self.control_handle.shutdown();
2442 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2444 }
2445}
2446
2447impl fidl::endpoints::Responder for ControllerWriteDictionaryResponder {
2448 type ControlHandle = ControllerControlHandle;
2449
2450 fn control_handle(&self) -> &ControllerControlHandle {
2451 &self.control_handle
2452 }
2453
2454 fn drop_without_shutdown(mut self) {
2455 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2457 std::mem::forget(self);
2459 }
2460}
2461
2462impl ControllerWriteDictionaryResponder {
2463 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2467 let _result = self.send_raw(result);
2468 if _result.is_err() {
2469 self.control_handle.shutdown();
2470 }
2471 self.drop_without_shutdown();
2472 _result
2473 }
2474
2475 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2477 let _result = self.send_raw(result);
2478 self.drop_without_shutdown();
2479 _result
2480 }
2481
2482 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2483 self.control_handle
2484 .inner
2485 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2486 result,
2487 self.tx_id,
2488 0x4ecfc1274fe4a70b,
2489 fidl::encoding::DynamicFlags::empty(),
2490 )
2491 }
2492}
2493
2494#[must_use = "FIDL methods require a response to be sent"]
2495#[derive(Debug)]
2496pub struct ControllerReadDictionaryResponder {
2497 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2498 tx_id: u32,
2499}
2500
2501impl std::ops::Drop for ControllerReadDictionaryResponder {
2505 fn drop(&mut self) {
2506 self.control_handle.shutdown();
2507 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2509 }
2510}
2511
2512impl fidl::endpoints::Responder for ControllerReadDictionaryResponder {
2513 type ControlHandle = ControllerControlHandle;
2514
2515 fn control_handle(&self) -> &ControllerControlHandle {
2516 &self.control_handle
2517 }
2518
2519 fn drop_without_shutdown(mut self) {
2520 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2522 std::mem::forget(self);
2524 }
2525}
2526
2527impl ControllerReadDictionaryResponder {
2528 pub fn send(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2532 let _result = self.send_raw(dictionary);
2533 if _result.is_err() {
2534 self.control_handle.shutdown();
2535 }
2536 self.drop_without_shutdown();
2537 _result
2538 }
2539
2540 pub fn send_no_shutdown_on_err(self, mut dictionary: Input) -> Result<(), fidl::Error> {
2542 let _result = self.send_raw(dictionary);
2543 self.drop_without_shutdown();
2544 _result
2545 }
2546
2547 fn send_raw(&self, mut dictionary: Input) -> Result<(), fidl::Error> {
2548 self.control_handle.inner.send::<ControllerReadDictionaryResponse>(
2549 (&mut dictionary,),
2550 self.tx_id,
2551 0x1be6724c87b51c37,
2552 fidl::encoding::DynamicFlags::empty(),
2553 )
2554 }
2555}
2556
2557#[must_use = "FIDL methods require a response to be sent"]
2558#[derive(Debug)]
2559pub struct ControllerAddMonitorResponder {
2560 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2561 tx_id: u32,
2562}
2563
2564impl std::ops::Drop for ControllerAddMonitorResponder {
2568 fn drop(&mut self) {
2569 self.control_handle.shutdown();
2570 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2572 }
2573}
2574
2575impl fidl::endpoints::Responder for ControllerAddMonitorResponder {
2576 type ControlHandle = ControllerControlHandle;
2577
2578 fn control_handle(&self) -> &ControllerControlHandle {
2579 &self.control_handle
2580 }
2581
2582 fn drop_without_shutdown(mut self) {
2583 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2585 std::mem::forget(self);
2587 }
2588}
2589
2590impl ControllerAddMonitorResponder {
2591 pub fn send(self) -> Result<(), fidl::Error> {
2595 let _result = self.send_raw();
2596 if _result.is_err() {
2597 self.control_handle.shutdown();
2598 }
2599 self.drop_without_shutdown();
2600 _result
2601 }
2602
2603 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
2605 let _result = self.send_raw();
2606 self.drop_without_shutdown();
2607 _result
2608 }
2609
2610 fn send_raw(&self) -> Result<(), fidl::Error> {
2611 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
2612 (),
2613 self.tx_id,
2614 0x2efbf7d3dc21438e,
2615 fidl::encoding::DynamicFlags::empty(),
2616 )
2617 }
2618}
2619
2620#[must_use = "FIDL methods require a response to be sent"]
2621#[derive(Debug)]
2622pub struct ControllerFuzzResponder {
2623 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2624 tx_id: u32,
2625}
2626
2627impl std::ops::Drop for ControllerFuzzResponder {
2631 fn drop(&mut self) {
2632 self.control_handle.shutdown();
2633 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2635 }
2636}
2637
2638impl fidl::endpoints::Responder for ControllerFuzzResponder {
2639 type ControlHandle = ControllerControlHandle;
2640
2641 fn control_handle(&self) -> &ControllerControlHandle {
2642 &self.control_handle
2643 }
2644
2645 fn drop_without_shutdown(mut self) {
2646 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2648 std::mem::forget(self);
2650 }
2651}
2652
2653impl ControllerFuzzResponder {
2654 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2658 let _result = self.send_raw(result);
2659 if _result.is_err() {
2660 self.control_handle.shutdown();
2661 }
2662 self.drop_without_shutdown();
2663 _result
2664 }
2665
2666 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2668 let _result = self.send_raw(result);
2669 self.drop_without_shutdown();
2670 _result
2671 }
2672
2673 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2674 self.control_handle
2675 .inner
2676 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2677 result,
2678 self.tx_id,
2679 0x62fe3684ea23af62,
2680 fidl::encoding::DynamicFlags::empty(),
2681 )
2682 }
2683}
2684
2685#[must_use = "FIDL methods require a response to be sent"]
2686#[derive(Debug)]
2687pub struct ControllerTryOneResponder {
2688 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2689 tx_id: u32,
2690}
2691
2692impl std::ops::Drop for ControllerTryOneResponder {
2696 fn drop(&mut self) {
2697 self.control_handle.shutdown();
2698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2700 }
2701}
2702
2703impl fidl::endpoints::Responder for ControllerTryOneResponder {
2704 type ControlHandle = ControllerControlHandle;
2705
2706 fn control_handle(&self) -> &ControllerControlHandle {
2707 &self.control_handle
2708 }
2709
2710 fn drop_without_shutdown(mut self) {
2711 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2713 std::mem::forget(self);
2715 }
2716}
2717
2718impl ControllerTryOneResponder {
2719 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2723 let _result = self.send_raw(result);
2724 if _result.is_err() {
2725 self.control_handle.shutdown();
2726 }
2727 self.drop_without_shutdown();
2728 _result
2729 }
2730
2731 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2733 let _result = self.send_raw(result);
2734 self.drop_without_shutdown();
2735 _result
2736 }
2737
2738 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2739 self.control_handle
2740 .inner
2741 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2742 result,
2743 self.tx_id,
2744 0x368dc762d8e16d46,
2745 fidl::encoding::DynamicFlags::empty(),
2746 )
2747 }
2748}
2749
2750#[must_use = "FIDL methods require a response to be sent"]
2751#[derive(Debug)]
2752pub struct ControllerMinimizeResponder {
2753 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2754 tx_id: u32,
2755}
2756
2757impl std::ops::Drop for ControllerMinimizeResponder {
2761 fn drop(&mut self) {
2762 self.control_handle.shutdown();
2763 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2765 }
2766}
2767
2768impl fidl::endpoints::Responder for ControllerMinimizeResponder {
2769 type ControlHandle = ControllerControlHandle;
2770
2771 fn control_handle(&self) -> &ControllerControlHandle {
2772 &self.control_handle
2773 }
2774
2775 fn drop_without_shutdown(mut self) {
2776 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2778 std::mem::forget(self);
2780 }
2781}
2782
2783impl ControllerMinimizeResponder {
2784 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2788 let _result = self.send_raw(result);
2789 if _result.is_err() {
2790 self.control_handle.shutdown();
2791 }
2792 self.drop_without_shutdown();
2793 _result
2794 }
2795
2796 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2798 let _result = self.send_raw(result);
2799 self.drop_without_shutdown();
2800 _result
2801 }
2802
2803 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2804 self.control_handle
2805 .inner
2806 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2807 result,
2808 self.tx_id,
2809 0x105a242ee0552794,
2810 fidl::encoding::DynamicFlags::empty(),
2811 )
2812 }
2813}
2814
2815#[must_use = "FIDL methods require a response to be sent"]
2816#[derive(Debug)]
2817pub struct ControllerCleanseResponder {
2818 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2819 tx_id: u32,
2820}
2821
2822impl std::ops::Drop for ControllerCleanseResponder {
2826 fn drop(&mut self) {
2827 self.control_handle.shutdown();
2828 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2830 }
2831}
2832
2833impl fidl::endpoints::Responder for ControllerCleanseResponder {
2834 type ControlHandle = ControllerControlHandle;
2835
2836 fn control_handle(&self) -> &ControllerControlHandle {
2837 &self.control_handle
2838 }
2839
2840 fn drop_without_shutdown(mut self) {
2841 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2843 std::mem::forget(self);
2845 }
2846}
2847
2848impl ControllerCleanseResponder {
2849 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2853 let _result = self.send_raw(result);
2854 if _result.is_err() {
2855 self.control_handle.shutdown();
2856 }
2857 self.drop_without_shutdown();
2858 _result
2859 }
2860
2861 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2863 let _result = self.send_raw(result);
2864 self.drop_without_shutdown();
2865 _result
2866 }
2867
2868 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2869 self.control_handle
2870 .inner
2871 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2872 result,
2873 self.tx_id,
2874 0x6d7892f62735f3e0,
2875 fidl::encoding::DynamicFlags::empty(),
2876 )
2877 }
2878}
2879
2880#[must_use = "FIDL methods require a response to be sent"]
2881#[derive(Debug)]
2882pub struct ControllerMergeResponder {
2883 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2884 tx_id: u32,
2885}
2886
2887impl std::ops::Drop for ControllerMergeResponder {
2891 fn drop(&mut self) {
2892 self.control_handle.shutdown();
2893 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2895 }
2896}
2897
2898impl fidl::endpoints::Responder for ControllerMergeResponder {
2899 type ControlHandle = ControllerControlHandle;
2900
2901 fn control_handle(&self) -> &ControllerControlHandle {
2902 &self.control_handle
2903 }
2904
2905 fn drop_without_shutdown(mut self) {
2906 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2908 std::mem::forget(self);
2910 }
2911}
2912
2913impl ControllerMergeResponder {
2914 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2918 let _result = self.send_raw(result);
2919 if _result.is_err() {
2920 self.control_handle.shutdown();
2921 }
2922 self.drop_without_shutdown();
2923 _result
2924 }
2925
2926 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2928 let _result = self.send_raw(result);
2929 self.drop_without_shutdown();
2930 _result
2931 }
2932
2933 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2934 self.control_handle
2935 .inner
2936 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2937 result,
2938 self.tx_id,
2939 0x3614e5c39413b5eb,
2940 fidl::encoding::DynamicFlags::empty(),
2941 )
2942 }
2943}
2944
2945#[must_use = "FIDL methods require a response to be sent"]
2946#[derive(Debug)]
2947pub struct ControllerGetStatusResponder {
2948 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
2949 tx_id: u32,
2950}
2951
2952impl std::ops::Drop for ControllerGetStatusResponder {
2956 fn drop(&mut self) {
2957 self.control_handle.shutdown();
2958 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2960 }
2961}
2962
2963impl fidl::endpoints::Responder for ControllerGetStatusResponder {
2964 type ControlHandle = ControllerControlHandle;
2965
2966 fn control_handle(&self) -> &ControllerControlHandle {
2967 &self.control_handle
2968 }
2969
2970 fn drop_without_shutdown(mut self) {
2971 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2973 std::mem::forget(self);
2975 }
2976}
2977
2978impl ControllerGetStatusResponder {
2979 pub fn send(self, mut status: &Status) -> Result<(), fidl::Error> {
2983 let _result = self.send_raw(status);
2984 if _result.is_err() {
2985 self.control_handle.shutdown();
2986 }
2987 self.drop_without_shutdown();
2988 _result
2989 }
2990
2991 pub fn send_no_shutdown_on_err(self, mut status: &Status) -> Result<(), fidl::Error> {
2993 let _result = self.send_raw(status);
2994 self.drop_without_shutdown();
2995 _result
2996 }
2997
2998 fn send_raw(&self, mut status: &Status) -> Result<(), fidl::Error> {
2999 self.control_handle.inner.send::<ControllerGetStatusResponse>(
3000 (status,),
3001 self.tx_id,
3002 0x51db4975d93ce768,
3003 fidl::encoding::DynamicFlags::empty(),
3004 )
3005 }
3006}
3007
3008#[must_use = "FIDL methods require a response to be sent"]
3009#[derive(Debug)]
3010pub struct ControllerWatchArtifactResponder {
3011 control_handle: std::mem::ManuallyDrop<ControllerControlHandle>,
3012 tx_id: u32,
3013}
3014
3015impl std::ops::Drop for ControllerWatchArtifactResponder {
3019 fn drop(&mut self) {
3020 self.control_handle.shutdown();
3021 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3023 }
3024}
3025
3026impl fidl::endpoints::Responder for ControllerWatchArtifactResponder {
3027 type ControlHandle = ControllerControlHandle;
3028
3029 fn control_handle(&self) -> &ControllerControlHandle {
3030 &self.control_handle
3031 }
3032
3033 fn drop_without_shutdown(mut self) {
3034 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3036 std::mem::forget(self);
3038 }
3039}
3040
3041impl ControllerWatchArtifactResponder {
3042 pub fn send(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3046 let _result = self.send_raw(artifact);
3047 if _result.is_err() {
3048 self.control_handle.shutdown();
3049 }
3050 self.drop_without_shutdown();
3051 _result
3052 }
3053
3054 pub fn send_no_shutdown_on_err(self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3056 let _result = self.send_raw(artifact);
3057 self.drop_without_shutdown();
3058 _result
3059 }
3060
3061 fn send_raw(&self, mut artifact: Artifact) -> Result<(), fidl::Error> {
3062 self.control_handle.inner.send::<ControllerWatchArtifactResponse>(
3063 (&mut artifact,),
3064 self.tx_id,
3065 0x6cfca3730944a414,
3066 fidl::encoding::DynamicFlags::empty(),
3067 )
3068 }
3069}
3070
3071#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3072pub struct ControllerProviderMarker;
3073
3074impl fidl::endpoints::ProtocolMarker for ControllerProviderMarker {
3075 type Proxy = ControllerProviderProxy;
3076 type RequestStream = ControllerProviderRequestStream;
3077 #[cfg(target_os = "fuchsia")]
3078 type SynchronousProxy = ControllerProviderSynchronousProxy;
3079
3080 const DEBUG_NAME: &'static str = "(anonymous) ControllerProvider";
3081}
3082
3083pub trait ControllerProviderProxyInterface: Send + Sync {
3084 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
3085 fn r#connect(
3086 &self,
3087 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3088 ) -> Self::ConnectResponseFut;
3089 fn r#stop(&self) -> Result<(), fidl::Error>;
3090}
3091#[derive(Debug)]
3092#[cfg(target_os = "fuchsia")]
3093pub struct ControllerProviderSynchronousProxy {
3094 client: fidl::client::sync::Client,
3095}
3096
3097#[cfg(target_os = "fuchsia")]
3098impl fidl::endpoints::SynchronousProxy for ControllerProviderSynchronousProxy {
3099 type Proxy = ControllerProviderProxy;
3100 type Protocol = ControllerProviderMarker;
3101
3102 fn from_channel(inner: fidl::Channel) -> Self {
3103 Self::new(inner)
3104 }
3105
3106 fn into_channel(self) -> fidl::Channel {
3107 self.client.into_channel()
3108 }
3109
3110 fn as_channel(&self) -> &fidl::Channel {
3111 self.client.as_channel()
3112 }
3113}
3114
3115#[cfg(target_os = "fuchsia")]
3116impl ControllerProviderSynchronousProxy {
3117 pub fn new(channel: fidl::Channel) -> Self {
3118 let protocol_name =
3119 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3120 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3121 }
3122
3123 pub fn into_channel(self) -> fidl::Channel {
3124 self.client.into_channel()
3125 }
3126
3127 pub fn wait_for_event(
3130 &self,
3131 deadline: zx::MonotonicInstant,
3132 ) -> Result<ControllerProviderEvent, fidl::Error> {
3133 ControllerProviderEvent::decode(self.client.wait_for_event(deadline)?)
3134 }
3135
3136 pub fn r#connect(
3149 &self,
3150 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3151 ___deadline: zx::MonotonicInstant,
3152 ) -> Result<(), fidl::Error> {
3153 let _response = self
3154 .client
3155 .send_query::<ControllerProviderConnectRequest, fidl::encoding::EmptyPayload>(
3156 (controller,),
3157 0xc0325f0732defcb,
3158 fidl::encoding::DynamicFlags::empty(),
3159 ___deadline,
3160 )?;
3161 Ok(_response)
3162 }
3163
3164 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3167 self.client.send::<fidl::encoding::EmptyPayload>(
3168 (),
3169 0x6cd6a98fc38bcbf2,
3170 fidl::encoding::DynamicFlags::empty(),
3171 )
3172 }
3173}
3174
3175#[cfg(target_os = "fuchsia")]
3176impl From<ControllerProviderSynchronousProxy> for zx::NullableHandle {
3177 fn from(value: ControllerProviderSynchronousProxy) -> Self {
3178 value.into_channel().into()
3179 }
3180}
3181
3182#[cfg(target_os = "fuchsia")]
3183impl From<fidl::Channel> for ControllerProviderSynchronousProxy {
3184 fn from(value: fidl::Channel) -> Self {
3185 Self::new(value)
3186 }
3187}
3188
3189#[cfg(target_os = "fuchsia")]
3190impl fidl::endpoints::FromClient for ControllerProviderSynchronousProxy {
3191 type Protocol = ControllerProviderMarker;
3192
3193 fn from_client(value: fidl::endpoints::ClientEnd<ControllerProviderMarker>) -> Self {
3194 Self::new(value.into_channel())
3195 }
3196}
3197
3198#[derive(Debug, Clone)]
3199pub struct ControllerProviderProxy {
3200 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3201}
3202
3203impl fidl::endpoints::Proxy for ControllerProviderProxy {
3204 type Protocol = ControllerProviderMarker;
3205
3206 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3207 Self::new(inner)
3208 }
3209
3210 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3211 self.client.into_channel().map_err(|client| Self { client })
3212 }
3213
3214 fn as_channel(&self) -> &::fidl::AsyncChannel {
3215 self.client.as_channel()
3216 }
3217}
3218
3219impl ControllerProviderProxy {
3220 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3222 let protocol_name =
3223 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3224 Self { client: fidl::client::Client::new(channel, protocol_name) }
3225 }
3226
3227 pub fn take_event_stream(&self) -> ControllerProviderEventStream {
3233 ControllerProviderEventStream { event_receiver: self.client.take_event_receiver() }
3234 }
3235
3236 pub fn r#connect(
3249 &self,
3250 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3251 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
3252 ControllerProviderProxyInterface::r#connect(self, controller)
3253 }
3254
3255 pub fn r#stop(&self) -> Result<(), fidl::Error> {
3258 ControllerProviderProxyInterface::r#stop(self)
3259 }
3260}
3261
3262impl ControllerProviderProxyInterface for ControllerProviderProxy {
3263 type ConnectResponseFut =
3264 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
3265 fn r#connect(
3266 &self,
3267 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3268 ) -> Self::ConnectResponseFut {
3269 fn _decode(
3270 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3271 ) -> Result<(), fidl::Error> {
3272 let _response = fidl::client::decode_transaction_body::<
3273 fidl::encoding::EmptyPayload,
3274 fidl::encoding::DefaultFuchsiaResourceDialect,
3275 0xc0325f0732defcb,
3276 >(_buf?)?;
3277 Ok(_response)
3278 }
3279 self.client.send_query_and_decode::<ControllerProviderConnectRequest, ()>(
3280 (controller,),
3281 0xc0325f0732defcb,
3282 fidl::encoding::DynamicFlags::empty(),
3283 _decode,
3284 )
3285 }
3286
3287 fn r#stop(&self) -> Result<(), fidl::Error> {
3288 self.client.send::<fidl::encoding::EmptyPayload>(
3289 (),
3290 0x6cd6a98fc38bcbf2,
3291 fidl::encoding::DynamicFlags::empty(),
3292 )
3293 }
3294}
3295
3296pub struct ControllerProviderEventStream {
3297 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3298}
3299
3300impl std::marker::Unpin for ControllerProviderEventStream {}
3301
3302impl futures::stream::FusedStream for ControllerProviderEventStream {
3303 fn is_terminated(&self) -> bool {
3304 self.event_receiver.is_terminated()
3305 }
3306}
3307
3308impl futures::Stream for ControllerProviderEventStream {
3309 type Item = Result<ControllerProviderEvent, fidl::Error>;
3310
3311 fn poll_next(
3312 mut self: std::pin::Pin<&mut Self>,
3313 cx: &mut std::task::Context<'_>,
3314 ) -> std::task::Poll<Option<Self::Item>> {
3315 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3316 &mut self.event_receiver,
3317 cx
3318 )?) {
3319 Some(buf) => std::task::Poll::Ready(Some(ControllerProviderEvent::decode(buf))),
3320 None => std::task::Poll::Ready(None),
3321 }
3322 }
3323}
3324
3325#[derive(Debug)]
3326pub enum ControllerProviderEvent {}
3327
3328impl ControllerProviderEvent {
3329 fn decode(
3331 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3332 ) -> Result<ControllerProviderEvent, fidl::Error> {
3333 let (bytes, _handles) = buf.split_mut();
3334 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3335 debug_assert_eq!(tx_header.tx_id, 0);
3336 match tx_header.ordinal {
3337 _ => Err(fidl::Error::UnknownOrdinal {
3338 ordinal: tx_header.ordinal,
3339 protocol_name:
3340 <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3341 }),
3342 }
3343 }
3344}
3345
3346pub struct ControllerProviderRequestStream {
3348 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3349 is_terminated: bool,
3350}
3351
3352impl std::marker::Unpin for ControllerProviderRequestStream {}
3353
3354impl futures::stream::FusedStream for ControllerProviderRequestStream {
3355 fn is_terminated(&self) -> bool {
3356 self.is_terminated
3357 }
3358}
3359
3360impl fidl::endpoints::RequestStream for ControllerProviderRequestStream {
3361 type Protocol = ControllerProviderMarker;
3362 type ControlHandle = ControllerProviderControlHandle;
3363
3364 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3365 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3366 }
3367
3368 fn control_handle(&self) -> Self::ControlHandle {
3369 ControllerProviderControlHandle { inner: self.inner.clone() }
3370 }
3371
3372 fn into_inner(
3373 self,
3374 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3375 {
3376 (self.inner, self.is_terminated)
3377 }
3378
3379 fn from_inner(
3380 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3381 is_terminated: bool,
3382 ) -> Self {
3383 Self { inner, is_terminated }
3384 }
3385}
3386
3387impl futures::Stream for ControllerProviderRequestStream {
3388 type Item = Result<ControllerProviderRequest, fidl::Error>;
3389
3390 fn poll_next(
3391 mut self: std::pin::Pin<&mut Self>,
3392 cx: &mut std::task::Context<'_>,
3393 ) -> std::task::Poll<Option<Self::Item>> {
3394 let this = &mut *self;
3395 if this.inner.check_shutdown(cx) {
3396 this.is_terminated = true;
3397 return std::task::Poll::Ready(None);
3398 }
3399 if this.is_terminated {
3400 panic!("polled ControllerProviderRequestStream after completion");
3401 }
3402 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3403 |bytes, handles| {
3404 match this.inner.channel().read_etc(cx, bytes, handles) {
3405 std::task::Poll::Ready(Ok(())) => {}
3406 std::task::Poll::Pending => return std::task::Poll::Pending,
3407 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3408 this.is_terminated = true;
3409 return std::task::Poll::Ready(None);
3410 }
3411 std::task::Poll::Ready(Err(e)) => {
3412 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3413 e.into(),
3414 ))));
3415 }
3416 }
3417
3418 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3420
3421 std::task::Poll::Ready(Some(match header.ordinal {
3422 0xc0325f0732defcb => {
3423 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3424 let mut req = fidl::new_empty!(ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
3425 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ControllerProviderConnectRequest>(&header, _body_bytes, handles, &mut req)?;
3426 let control_handle = ControllerProviderControlHandle {
3427 inner: this.inner.clone(),
3428 };
3429 Ok(ControllerProviderRequest::Connect {controller: req.controller,
3430
3431 responder: ControllerProviderConnectResponder {
3432 control_handle: std::mem::ManuallyDrop::new(control_handle),
3433 tx_id: header.tx_id,
3434 },
3435 })
3436 }
3437 0x6cd6a98fc38bcbf2 => {
3438 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3439 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
3440 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3441 let control_handle = ControllerProviderControlHandle {
3442 inner: this.inner.clone(),
3443 };
3444 Ok(ControllerProviderRequest::Stop {
3445 control_handle,
3446 })
3447 }
3448 _ => Err(fidl::Error::UnknownOrdinal {
3449 ordinal: header.ordinal,
3450 protocol_name: <ControllerProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3451 }),
3452 }))
3453 },
3454 )
3455 }
3456}
3457
3458#[derive(Debug)]
3468pub enum ControllerProviderRequest {
3469 Connect {
3482 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
3483 responder: ControllerProviderConnectResponder,
3484 },
3485 Stop { control_handle: ControllerProviderControlHandle },
3488}
3489
3490impl ControllerProviderRequest {
3491 #[allow(irrefutable_let_patterns)]
3492 pub fn into_connect(
3493 self,
3494 ) -> Option<(fidl::endpoints::ServerEnd<ControllerMarker>, ControllerProviderConnectResponder)>
3495 {
3496 if let ControllerProviderRequest::Connect { controller, responder } = self {
3497 Some((controller, responder))
3498 } else {
3499 None
3500 }
3501 }
3502
3503 #[allow(irrefutable_let_patterns)]
3504 pub fn into_stop(self) -> Option<(ControllerProviderControlHandle)> {
3505 if let ControllerProviderRequest::Stop { control_handle } = self {
3506 Some((control_handle))
3507 } else {
3508 None
3509 }
3510 }
3511
3512 pub fn method_name(&self) -> &'static str {
3514 match *self {
3515 ControllerProviderRequest::Connect { .. } => "connect",
3516 ControllerProviderRequest::Stop { .. } => "stop",
3517 }
3518 }
3519}
3520
3521#[derive(Debug, Clone)]
3522pub struct ControllerProviderControlHandle {
3523 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3524}
3525
3526impl fidl::endpoints::ControlHandle for ControllerProviderControlHandle {
3527 fn shutdown(&self) {
3528 self.inner.shutdown()
3529 }
3530
3531 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3532 self.inner.shutdown_with_epitaph(status)
3533 }
3534
3535 fn is_closed(&self) -> bool {
3536 self.inner.channel().is_closed()
3537 }
3538 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3539 self.inner.channel().on_closed()
3540 }
3541
3542 #[cfg(target_os = "fuchsia")]
3543 fn signal_peer(
3544 &self,
3545 clear_mask: zx::Signals,
3546 set_mask: zx::Signals,
3547 ) -> Result<(), zx_status::Status> {
3548 use fidl::Peered;
3549 self.inner.channel().signal_peer(clear_mask, set_mask)
3550 }
3551}
3552
3553impl ControllerProviderControlHandle {}
3554
3555#[must_use = "FIDL methods require a response to be sent"]
3556#[derive(Debug)]
3557pub struct ControllerProviderConnectResponder {
3558 control_handle: std::mem::ManuallyDrop<ControllerProviderControlHandle>,
3559 tx_id: u32,
3560}
3561
3562impl std::ops::Drop for ControllerProviderConnectResponder {
3566 fn drop(&mut self) {
3567 self.control_handle.shutdown();
3568 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3570 }
3571}
3572
3573impl fidl::endpoints::Responder for ControllerProviderConnectResponder {
3574 type ControlHandle = ControllerProviderControlHandle;
3575
3576 fn control_handle(&self) -> &ControllerProviderControlHandle {
3577 &self.control_handle
3578 }
3579
3580 fn drop_without_shutdown(mut self) {
3581 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3583 std::mem::forget(self);
3585 }
3586}
3587
3588impl ControllerProviderConnectResponder {
3589 pub fn send(self) -> Result<(), fidl::Error> {
3593 let _result = self.send_raw();
3594 if _result.is_err() {
3595 self.control_handle.shutdown();
3596 }
3597 self.drop_without_shutdown();
3598 _result
3599 }
3600
3601 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
3603 let _result = self.send_raw();
3604 self.drop_without_shutdown();
3605 _result
3606 }
3607
3608 fn send_raw(&self) -> Result<(), fidl::Error> {
3609 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
3610 (),
3611 self.tx_id,
3612 0xc0325f0732defcb,
3613 fidl::encoding::DynamicFlags::empty(),
3614 )
3615 }
3616}
3617
3618#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3619pub struct CorpusReaderMarker;
3620
3621impl fidl::endpoints::ProtocolMarker for CorpusReaderMarker {
3622 type Proxy = CorpusReaderProxy;
3623 type RequestStream = CorpusReaderRequestStream;
3624 #[cfg(target_os = "fuchsia")]
3625 type SynchronousProxy = CorpusReaderSynchronousProxy;
3626
3627 const DEBUG_NAME: &'static str = "(anonymous) CorpusReader";
3628}
3629
3630pub trait CorpusReaderProxyInterface: Send + Sync {
3631 type NextResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
3632 fn r#next(&self, test_input: Input) -> Self::NextResponseFut;
3633}
3634#[derive(Debug)]
3635#[cfg(target_os = "fuchsia")]
3636pub struct CorpusReaderSynchronousProxy {
3637 client: fidl::client::sync::Client,
3638}
3639
3640#[cfg(target_os = "fuchsia")]
3641impl fidl::endpoints::SynchronousProxy for CorpusReaderSynchronousProxy {
3642 type Proxy = CorpusReaderProxy;
3643 type Protocol = CorpusReaderMarker;
3644
3645 fn from_channel(inner: fidl::Channel) -> Self {
3646 Self::new(inner)
3647 }
3648
3649 fn into_channel(self) -> fidl::Channel {
3650 self.client.into_channel()
3651 }
3652
3653 fn as_channel(&self) -> &fidl::Channel {
3654 self.client.as_channel()
3655 }
3656}
3657
3658#[cfg(target_os = "fuchsia")]
3659impl CorpusReaderSynchronousProxy {
3660 pub fn new(channel: fidl::Channel) -> Self {
3661 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3662 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3663 }
3664
3665 pub fn into_channel(self) -> fidl::Channel {
3666 self.client.into_channel()
3667 }
3668
3669 pub fn wait_for_event(
3672 &self,
3673 deadline: zx::MonotonicInstant,
3674 ) -> Result<CorpusReaderEvent, fidl::Error> {
3675 CorpusReaderEvent::decode(self.client.wait_for_event(deadline)?)
3676 }
3677
3678 pub fn r#next(
3686 &self,
3687 mut test_input: Input,
3688 ___deadline: zx::MonotonicInstant,
3689 ) -> Result<i32, fidl::Error> {
3690 let _response =
3691 self.client.send_query::<CorpusReaderNextRequest, CorpusReaderNextResponse>(
3692 (&mut test_input,),
3693 0x68d19e55ea635356,
3694 fidl::encoding::DynamicFlags::empty(),
3695 ___deadline,
3696 )?;
3697 Ok(_response.result)
3698 }
3699}
3700
3701#[cfg(target_os = "fuchsia")]
3702impl From<CorpusReaderSynchronousProxy> for zx::NullableHandle {
3703 fn from(value: CorpusReaderSynchronousProxy) -> Self {
3704 value.into_channel().into()
3705 }
3706}
3707
3708#[cfg(target_os = "fuchsia")]
3709impl From<fidl::Channel> for CorpusReaderSynchronousProxy {
3710 fn from(value: fidl::Channel) -> Self {
3711 Self::new(value)
3712 }
3713}
3714
3715#[cfg(target_os = "fuchsia")]
3716impl fidl::endpoints::FromClient for CorpusReaderSynchronousProxy {
3717 type Protocol = CorpusReaderMarker;
3718
3719 fn from_client(value: fidl::endpoints::ClientEnd<CorpusReaderMarker>) -> Self {
3720 Self::new(value.into_channel())
3721 }
3722}
3723
3724#[derive(Debug, Clone)]
3725pub struct CorpusReaderProxy {
3726 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3727}
3728
3729impl fidl::endpoints::Proxy for CorpusReaderProxy {
3730 type Protocol = CorpusReaderMarker;
3731
3732 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3733 Self::new(inner)
3734 }
3735
3736 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3737 self.client.into_channel().map_err(|client| Self { client })
3738 }
3739
3740 fn as_channel(&self) -> &::fidl::AsyncChannel {
3741 self.client.as_channel()
3742 }
3743}
3744
3745impl CorpusReaderProxy {
3746 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3748 let protocol_name = <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3749 Self { client: fidl::client::Client::new(channel, protocol_name) }
3750 }
3751
3752 pub fn take_event_stream(&self) -> CorpusReaderEventStream {
3758 CorpusReaderEventStream { event_receiver: self.client.take_event_receiver() }
3759 }
3760
3761 pub fn r#next(
3769 &self,
3770 mut test_input: Input,
3771 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
3772 CorpusReaderProxyInterface::r#next(self, test_input)
3773 }
3774}
3775
3776impl CorpusReaderProxyInterface for CorpusReaderProxy {
3777 type NextResponseFut =
3778 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
3779 fn r#next(&self, mut test_input: Input) -> Self::NextResponseFut {
3780 fn _decode(
3781 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3782 ) -> Result<i32, fidl::Error> {
3783 let _response = fidl::client::decode_transaction_body::<
3784 CorpusReaderNextResponse,
3785 fidl::encoding::DefaultFuchsiaResourceDialect,
3786 0x68d19e55ea635356,
3787 >(_buf?)?;
3788 Ok(_response.result)
3789 }
3790 self.client.send_query_and_decode::<CorpusReaderNextRequest, i32>(
3791 (&mut test_input,),
3792 0x68d19e55ea635356,
3793 fidl::encoding::DynamicFlags::empty(),
3794 _decode,
3795 )
3796 }
3797}
3798
3799pub struct CorpusReaderEventStream {
3800 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3801}
3802
3803impl std::marker::Unpin for CorpusReaderEventStream {}
3804
3805impl futures::stream::FusedStream for CorpusReaderEventStream {
3806 fn is_terminated(&self) -> bool {
3807 self.event_receiver.is_terminated()
3808 }
3809}
3810
3811impl futures::Stream for CorpusReaderEventStream {
3812 type Item = Result<CorpusReaderEvent, fidl::Error>;
3813
3814 fn poll_next(
3815 mut self: std::pin::Pin<&mut Self>,
3816 cx: &mut std::task::Context<'_>,
3817 ) -> std::task::Poll<Option<Self::Item>> {
3818 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3819 &mut self.event_receiver,
3820 cx
3821 )?) {
3822 Some(buf) => std::task::Poll::Ready(Some(CorpusReaderEvent::decode(buf))),
3823 None => std::task::Poll::Ready(None),
3824 }
3825 }
3826}
3827
3828#[derive(Debug)]
3829pub enum CorpusReaderEvent {}
3830
3831impl CorpusReaderEvent {
3832 fn decode(
3834 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3835 ) -> Result<CorpusReaderEvent, fidl::Error> {
3836 let (bytes, _handles) = buf.split_mut();
3837 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3838 debug_assert_eq!(tx_header.tx_id, 0);
3839 match tx_header.ordinal {
3840 _ => Err(fidl::Error::UnknownOrdinal {
3841 ordinal: tx_header.ordinal,
3842 protocol_name: <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3843 }),
3844 }
3845 }
3846}
3847
3848pub struct CorpusReaderRequestStream {
3850 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3851 is_terminated: bool,
3852}
3853
3854impl std::marker::Unpin for CorpusReaderRequestStream {}
3855
3856impl futures::stream::FusedStream for CorpusReaderRequestStream {
3857 fn is_terminated(&self) -> bool {
3858 self.is_terminated
3859 }
3860}
3861
3862impl fidl::endpoints::RequestStream for CorpusReaderRequestStream {
3863 type Protocol = CorpusReaderMarker;
3864 type ControlHandle = CorpusReaderControlHandle;
3865
3866 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3867 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3868 }
3869
3870 fn control_handle(&self) -> Self::ControlHandle {
3871 CorpusReaderControlHandle { inner: self.inner.clone() }
3872 }
3873
3874 fn into_inner(
3875 self,
3876 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3877 {
3878 (self.inner, self.is_terminated)
3879 }
3880
3881 fn from_inner(
3882 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3883 is_terminated: bool,
3884 ) -> Self {
3885 Self { inner, is_terminated }
3886 }
3887}
3888
3889impl futures::Stream for CorpusReaderRequestStream {
3890 type Item = Result<CorpusReaderRequest, fidl::Error>;
3891
3892 fn poll_next(
3893 mut self: std::pin::Pin<&mut Self>,
3894 cx: &mut std::task::Context<'_>,
3895 ) -> std::task::Poll<Option<Self::Item>> {
3896 let this = &mut *self;
3897 if this.inner.check_shutdown(cx) {
3898 this.is_terminated = true;
3899 return std::task::Poll::Ready(None);
3900 }
3901 if this.is_terminated {
3902 panic!("polled CorpusReaderRequestStream after completion");
3903 }
3904 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3905 |bytes, handles| {
3906 match this.inner.channel().read_etc(cx, bytes, handles) {
3907 std::task::Poll::Ready(Ok(())) => {}
3908 std::task::Poll::Pending => return std::task::Poll::Pending,
3909 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3910 this.is_terminated = true;
3911 return std::task::Poll::Ready(None);
3912 }
3913 std::task::Poll::Ready(Err(e)) => {
3914 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3915 e.into(),
3916 ))));
3917 }
3918 }
3919
3920 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3922
3923 std::task::Poll::Ready(Some(match header.ordinal {
3924 0x68d19e55ea635356 => {
3925 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3926 let mut req = fidl::new_empty!(
3927 CorpusReaderNextRequest,
3928 fidl::encoding::DefaultFuchsiaResourceDialect
3929 );
3930 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CorpusReaderNextRequest>(&header, _body_bytes, handles, &mut req)?;
3931 let control_handle =
3932 CorpusReaderControlHandle { inner: this.inner.clone() };
3933 Ok(CorpusReaderRequest::Next {
3934 test_input: req.test_input,
3935
3936 responder: CorpusReaderNextResponder {
3937 control_handle: std::mem::ManuallyDrop::new(control_handle),
3938 tx_id: header.tx_id,
3939 },
3940 })
3941 }
3942 _ => Err(fidl::Error::UnknownOrdinal {
3943 ordinal: header.ordinal,
3944 protocol_name:
3945 <CorpusReaderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3946 }),
3947 }))
3948 },
3949 )
3950 }
3951}
3952
3953#[derive(Debug)]
3955pub enum CorpusReaderRequest {
3956 Next { test_input: Input, responder: CorpusReaderNextResponder },
3964}
3965
3966impl CorpusReaderRequest {
3967 #[allow(irrefutable_let_patterns)]
3968 pub fn into_next(self) -> Option<(Input, CorpusReaderNextResponder)> {
3969 if let CorpusReaderRequest::Next { test_input, responder } = self {
3970 Some((test_input, responder))
3971 } else {
3972 None
3973 }
3974 }
3975
3976 pub fn method_name(&self) -> &'static str {
3978 match *self {
3979 CorpusReaderRequest::Next { .. } => "next",
3980 }
3981 }
3982}
3983
3984#[derive(Debug, Clone)]
3985pub struct CorpusReaderControlHandle {
3986 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3987}
3988
3989impl fidl::endpoints::ControlHandle for CorpusReaderControlHandle {
3990 fn shutdown(&self) {
3991 self.inner.shutdown()
3992 }
3993
3994 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3995 self.inner.shutdown_with_epitaph(status)
3996 }
3997
3998 fn is_closed(&self) -> bool {
3999 self.inner.channel().is_closed()
4000 }
4001 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4002 self.inner.channel().on_closed()
4003 }
4004
4005 #[cfg(target_os = "fuchsia")]
4006 fn signal_peer(
4007 &self,
4008 clear_mask: zx::Signals,
4009 set_mask: zx::Signals,
4010 ) -> Result<(), zx_status::Status> {
4011 use fidl::Peered;
4012 self.inner.channel().signal_peer(clear_mask, set_mask)
4013 }
4014}
4015
4016impl CorpusReaderControlHandle {}
4017
4018#[must_use = "FIDL methods require a response to be sent"]
4019#[derive(Debug)]
4020pub struct CorpusReaderNextResponder {
4021 control_handle: std::mem::ManuallyDrop<CorpusReaderControlHandle>,
4022 tx_id: u32,
4023}
4024
4025impl std::ops::Drop for CorpusReaderNextResponder {
4029 fn drop(&mut self) {
4030 self.control_handle.shutdown();
4031 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4033 }
4034}
4035
4036impl fidl::endpoints::Responder for CorpusReaderNextResponder {
4037 type ControlHandle = CorpusReaderControlHandle;
4038
4039 fn control_handle(&self) -> &CorpusReaderControlHandle {
4040 &self.control_handle
4041 }
4042
4043 fn drop_without_shutdown(mut self) {
4044 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4046 std::mem::forget(self);
4048 }
4049}
4050
4051impl CorpusReaderNextResponder {
4052 pub fn send(self, mut result: i32) -> Result<(), fidl::Error> {
4056 let _result = self.send_raw(result);
4057 if _result.is_err() {
4058 self.control_handle.shutdown();
4059 }
4060 self.drop_without_shutdown();
4061 _result
4062 }
4063
4064 pub fn send_no_shutdown_on_err(self, mut result: i32) -> Result<(), fidl::Error> {
4066 let _result = self.send_raw(result);
4067 self.drop_without_shutdown();
4068 _result
4069 }
4070
4071 fn send_raw(&self, mut result: i32) -> Result<(), fidl::Error> {
4072 self.control_handle.inner.send::<CorpusReaderNextResponse>(
4073 (result,),
4074 self.tx_id,
4075 0x68d19e55ea635356,
4076 fidl::encoding::DynamicFlags::empty(),
4077 )
4078 }
4079}
4080
4081#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4082pub struct CoverageDataCollectorMarker;
4083
4084impl fidl::endpoints::ProtocolMarker for CoverageDataCollectorMarker {
4085 type Proxy = CoverageDataCollectorProxy;
4086 type RequestStream = CoverageDataCollectorRequestStream;
4087 #[cfg(target_os = "fuchsia")]
4088 type SynchronousProxy = CoverageDataCollectorSynchronousProxy;
4089
4090 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataCollector";
4091}
4092impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataCollectorMarker {}
4093
4094pub trait CoverageDataCollectorProxyInterface: Send + Sync {
4095 type InitializeResponseFut: std::future::Future<Output = Result<Options, fidl::Error>> + Send;
4096 fn r#initialize(
4097 &self,
4098 eventpair: fidl::EventPair,
4099 process: fidl::Process,
4100 ) -> Self::InitializeResponseFut;
4101 type AddInline8bitCountersResponseFut: std::future::Future<Output = Result<(), fidl::Error>>
4102 + Send;
4103 fn r#add_inline8bit_counters(
4104 &self,
4105 inline_8bit_counters: fidl::Vmo,
4106 ) -> Self::AddInline8bitCountersResponseFut;
4107}
4108#[derive(Debug)]
4109#[cfg(target_os = "fuchsia")]
4110pub struct CoverageDataCollectorSynchronousProxy {
4111 client: fidl::client::sync::Client,
4112}
4113
4114#[cfg(target_os = "fuchsia")]
4115impl fidl::endpoints::SynchronousProxy for CoverageDataCollectorSynchronousProxy {
4116 type Proxy = CoverageDataCollectorProxy;
4117 type Protocol = CoverageDataCollectorMarker;
4118
4119 fn from_channel(inner: fidl::Channel) -> Self {
4120 Self::new(inner)
4121 }
4122
4123 fn into_channel(self) -> fidl::Channel {
4124 self.client.into_channel()
4125 }
4126
4127 fn as_channel(&self) -> &fidl::Channel {
4128 self.client.as_channel()
4129 }
4130}
4131
4132#[cfg(target_os = "fuchsia")]
4133impl CoverageDataCollectorSynchronousProxy {
4134 pub fn new(channel: fidl::Channel) -> Self {
4135 let protocol_name =
4136 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4137 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4138 }
4139
4140 pub fn into_channel(self) -> fidl::Channel {
4141 self.client.into_channel()
4142 }
4143
4144 pub fn wait_for_event(
4147 &self,
4148 deadline: zx::MonotonicInstant,
4149 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4150 CoverageDataCollectorEvent::decode(self.client.wait_for_event(deadline)?)
4151 }
4152
4153 pub fn r#initialize(
4170 &self,
4171 mut eventpair: fidl::EventPair,
4172 mut process: fidl::Process,
4173 ___deadline: zx::MonotonicInstant,
4174 ) -> Result<Options, fidl::Error> {
4175 let _response = self.client.send_query::<
4176 CoverageDataCollectorInitializeRequest,
4177 CoverageDataCollectorInitializeResponse,
4178 >(
4179 (eventpair, process,),
4180 0x51d6f91d6f02d9d6,
4181 fidl::encoding::DynamicFlags::empty(),
4182 ___deadline,
4183 )?;
4184 Ok(_response.options)
4185 }
4186
4187 pub fn r#add_inline8bit_counters(
4206 &self,
4207 mut inline_8bit_counters: fidl::Vmo,
4208 ___deadline: zx::MonotonicInstant,
4209 ) -> Result<(), fidl::Error> {
4210 let _response = self.client.send_query::<
4211 CoverageDataCollectorAddInline8bitCountersRequest,
4212 fidl::encoding::EmptyPayload,
4213 >(
4214 (inline_8bit_counters,),
4215 0x75f87cadfc94d1be,
4216 fidl::encoding::DynamicFlags::empty(),
4217 ___deadline,
4218 )?;
4219 Ok(_response)
4220 }
4221}
4222
4223#[cfg(target_os = "fuchsia")]
4224impl From<CoverageDataCollectorSynchronousProxy> for zx::NullableHandle {
4225 fn from(value: CoverageDataCollectorSynchronousProxy) -> Self {
4226 value.into_channel().into()
4227 }
4228}
4229
4230#[cfg(target_os = "fuchsia")]
4231impl From<fidl::Channel> for CoverageDataCollectorSynchronousProxy {
4232 fn from(value: fidl::Channel) -> Self {
4233 Self::new(value)
4234 }
4235}
4236
4237#[cfg(target_os = "fuchsia")]
4238impl fidl::endpoints::FromClient for CoverageDataCollectorSynchronousProxy {
4239 type Protocol = CoverageDataCollectorMarker;
4240
4241 fn from_client(value: fidl::endpoints::ClientEnd<CoverageDataCollectorMarker>) -> Self {
4242 Self::new(value.into_channel())
4243 }
4244}
4245
4246#[derive(Debug, Clone)]
4247pub struct CoverageDataCollectorProxy {
4248 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4249}
4250
4251impl fidl::endpoints::Proxy for CoverageDataCollectorProxy {
4252 type Protocol = CoverageDataCollectorMarker;
4253
4254 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4255 Self::new(inner)
4256 }
4257
4258 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4259 self.client.into_channel().map_err(|client| Self { client })
4260 }
4261
4262 fn as_channel(&self) -> &::fidl::AsyncChannel {
4263 self.client.as_channel()
4264 }
4265}
4266
4267impl CoverageDataCollectorProxy {
4268 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4270 let protocol_name =
4271 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4272 Self { client: fidl::client::Client::new(channel, protocol_name) }
4273 }
4274
4275 pub fn take_event_stream(&self) -> CoverageDataCollectorEventStream {
4281 CoverageDataCollectorEventStream { event_receiver: self.client.take_event_receiver() }
4282 }
4283
4284 pub fn r#initialize(
4301 &self,
4302 mut eventpair: fidl::EventPair,
4303 mut process: fidl::Process,
4304 ) -> fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>
4305 {
4306 CoverageDataCollectorProxyInterface::r#initialize(self, eventpair, process)
4307 }
4308
4309 pub fn r#add_inline8bit_counters(
4328 &self,
4329 mut inline_8bit_counters: fidl::Vmo,
4330 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
4331 CoverageDataCollectorProxyInterface::r#add_inline8bit_counters(self, inline_8bit_counters)
4332 }
4333}
4334
4335impl CoverageDataCollectorProxyInterface for CoverageDataCollectorProxy {
4336 type InitializeResponseFut =
4337 fidl::client::QueryResponseFut<Options, fidl::encoding::DefaultFuchsiaResourceDialect>;
4338 fn r#initialize(
4339 &self,
4340 mut eventpair: fidl::EventPair,
4341 mut process: fidl::Process,
4342 ) -> Self::InitializeResponseFut {
4343 fn _decode(
4344 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4345 ) -> Result<Options, fidl::Error> {
4346 let _response = fidl::client::decode_transaction_body::<
4347 CoverageDataCollectorInitializeResponse,
4348 fidl::encoding::DefaultFuchsiaResourceDialect,
4349 0x51d6f91d6f02d9d6,
4350 >(_buf?)?;
4351 Ok(_response.options)
4352 }
4353 self.client.send_query_and_decode::<CoverageDataCollectorInitializeRequest, Options>(
4354 (eventpair, process),
4355 0x51d6f91d6f02d9d6,
4356 fidl::encoding::DynamicFlags::empty(),
4357 _decode,
4358 )
4359 }
4360
4361 type AddInline8bitCountersResponseFut =
4362 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
4363 fn r#add_inline8bit_counters(
4364 &self,
4365 mut inline_8bit_counters: fidl::Vmo,
4366 ) -> Self::AddInline8bitCountersResponseFut {
4367 fn _decode(
4368 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4369 ) -> Result<(), fidl::Error> {
4370 let _response = fidl::client::decode_transaction_body::<
4371 fidl::encoding::EmptyPayload,
4372 fidl::encoding::DefaultFuchsiaResourceDialect,
4373 0x75f87cadfc94d1be,
4374 >(_buf?)?;
4375 Ok(_response)
4376 }
4377 self.client.send_query_and_decode::<CoverageDataCollectorAddInline8bitCountersRequest, ()>(
4378 (inline_8bit_counters,),
4379 0x75f87cadfc94d1be,
4380 fidl::encoding::DynamicFlags::empty(),
4381 _decode,
4382 )
4383 }
4384}
4385
4386pub struct CoverageDataCollectorEventStream {
4387 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4388}
4389
4390impl std::marker::Unpin for CoverageDataCollectorEventStream {}
4391
4392impl futures::stream::FusedStream for CoverageDataCollectorEventStream {
4393 fn is_terminated(&self) -> bool {
4394 self.event_receiver.is_terminated()
4395 }
4396}
4397
4398impl futures::Stream for CoverageDataCollectorEventStream {
4399 type Item = Result<CoverageDataCollectorEvent, fidl::Error>;
4400
4401 fn poll_next(
4402 mut self: std::pin::Pin<&mut Self>,
4403 cx: &mut std::task::Context<'_>,
4404 ) -> std::task::Poll<Option<Self::Item>> {
4405 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4406 &mut self.event_receiver,
4407 cx
4408 )?) {
4409 Some(buf) => std::task::Poll::Ready(Some(CoverageDataCollectorEvent::decode(buf))),
4410 None => std::task::Poll::Ready(None),
4411 }
4412 }
4413}
4414
4415#[derive(Debug)]
4416pub enum CoverageDataCollectorEvent {}
4417
4418impl CoverageDataCollectorEvent {
4419 fn decode(
4421 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4422 ) -> Result<CoverageDataCollectorEvent, fidl::Error> {
4423 let (bytes, _handles) = buf.split_mut();
4424 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4425 debug_assert_eq!(tx_header.tx_id, 0);
4426 match tx_header.ordinal {
4427 _ => Err(fidl::Error::UnknownOrdinal {
4428 ordinal: tx_header.ordinal,
4429 protocol_name:
4430 <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4431 }),
4432 }
4433 }
4434}
4435
4436pub struct CoverageDataCollectorRequestStream {
4438 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4439 is_terminated: bool,
4440}
4441
4442impl std::marker::Unpin for CoverageDataCollectorRequestStream {}
4443
4444impl futures::stream::FusedStream for CoverageDataCollectorRequestStream {
4445 fn is_terminated(&self) -> bool {
4446 self.is_terminated
4447 }
4448}
4449
4450impl fidl::endpoints::RequestStream for CoverageDataCollectorRequestStream {
4451 type Protocol = CoverageDataCollectorMarker;
4452 type ControlHandle = CoverageDataCollectorControlHandle;
4453
4454 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4455 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4456 }
4457
4458 fn control_handle(&self) -> Self::ControlHandle {
4459 CoverageDataCollectorControlHandle { inner: self.inner.clone() }
4460 }
4461
4462 fn into_inner(
4463 self,
4464 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4465 {
4466 (self.inner, self.is_terminated)
4467 }
4468
4469 fn from_inner(
4470 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4471 is_terminated: bool,
4472 ) -> Self {
4473 Self { inner, is_terminated }
4474 }
4475}
4476
4477impl futures::Stream for CoverageDataCollectorRequestStream {
4478 type Item = Result<CoverageDataCollectorRequest, fidl::Error>;
4479
4480 fn poll_next(
4481 mut self: std::pin::Pin<&mut Self>,
4482 cx: &mut std::task::Context<'_>,
4483 ) -> std::task::Poll<Option<Self::Item>> {
4484 let this = &mut *self;
4485 if this.inner.check_shutdown(cx) {
4486 this.is_terminated = true;
4487 return std::task::Poll::Ready(None);
4488 }
4489 if this.is_terminated {
4490 panic!("polled CoverageDataCollectorRequestStream after completion");
4491 }
4492 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4493 |bytes, handles| {
4494 match this.inner.channel().read_etc(cx, bytes, handles) {
4495 std::task::Poll::Ready(Ok(())) => {}
4496 std::task::Poll::Pending => return std::task::Poll::Pending,
4497 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4498 this.is_terminated = true;
4499 return std::task::Poll::Ready(None);
4500 }
4501 std::task::Poll::Ready(Err(e)) => {
4502 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4503 e.into(),
4504 ))));
4505 }
4506 }
4507
4508 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4510
4511 std::task::Poll::Ready(Some(match header.ordinal {
4512 0x51d6f91d6f02d9d6 => {
4513 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4514 let mut req = fidl::new_empty!(CoverageDataCollectorInitializeRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4515 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorInitializeRequest>(&header, _body_bytes, handles, &mut req)?;
4516 let control_handle = CoverageDataCollectorControlHandle {
4517 inner: this.inner.clone(),
4518 };
4519 Ok(CoverageDataCollectorRequest::Initialize {eventpair: req.eventpair,
4520process: req.process,
4521
4522 responder: CoverageDataCollectorInitializeResponder {
4523 control_handle: std::mem::ManuallyDrop::new(control_handle),
4524 tx_id: header.tx_id,
4525 },
4526 })
4527 }
4528 0x75f87cadfc94d1be => {
4529 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4530 let mut req = fidl::new_empty!(CoverageDataCollectorAddInline8bitCountersRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
4531 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataCollectorAddInline8bitCountersRequest>(&header, _body_bytes, handles, &mut req)?;
4532 let control_handle = CoverageDataCollectorControlHandle {
4533 inner: this.inner.clone(),
4534 };
4535 Ok(CoverageDataCollectorRequest::AddInline8bitCounters {inline_8bit_counters: req.inline_8bit_counters,
4536
4537 responder: CoverageDataCollectorAddInline8bitCountersResponder {
4538 control_handle: std::mem::ManuallyDrop::new(control_handle),
4539 tx_id: header.tx_id,
4540 },
4541 })
4542 }
4543 _ => Err(fidl::Error::UnknownOrdinal {
4544 ordinal: header.ordinal,
4545 protocol_name: <CoverageDataCollectorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4546 }),
4547 }))
4548 },
4549 )
4550 }
4551}
4552
4553#[derive(Debug)]
4560pub enum CoverageDataCollectorRequest {
4561 Initialize {
4578 eventpair: fidl::EventPair,
4579 process: fidl::Process,
4580 responder: CoverageDataCollectorInitializeResponder,
4581 },
4582 AddInline8bitCounters {
4601 inline_8bit_counters: fidl::Vmo,
4602 responder: CoverageDataCollectorAddInline8bitCountersResponder,
4603 },
4604}
4605
4606impl CoverageDataCollectorRequest {
4607 #[allow(irrefutable_let_patterns)]
4608 pub fn into_initialize(
4609 self,
4610 ) -> Option<(fidl::EventPair, fidl::Process, CoverageDataCollectorInitializeResponder)> {
4611 if let CoverageDataCollectorRequest::Initialize { eventpair, process, responder } = self {
4612 Some((eventpair, process, responder))
4613 } else {
4614 None
4615 }
4616 }
4617
4618 #[allow(irrefutable_let_patterns)]
4619 pub fn into_add_inline8bit_counters(
4620 self,
4621 ) -> Option<(fidl::Vmo, CoverageDataCollectorAddInline8bitCountersResponder)> {
4622 if let CoverageDataCollectorRequest::AddInline8bitCounters {
4623 inline_8bit_counters,
4624 responder,
4625 } = self
4626 {
4627 Some((inline_8bit_counters, responder))
4628 } else {
4629 None
4630 }
4631 }
4632
4633 pub fn method_name(&self) -> &'static str {
4635 match *self {
4636 CoverageDataCollectorRequest::Initialize { .. } => "initialize",
4637 CoverageDataCollectorRequest::AddInline8bitCounters { .. } => "add_inline8bit_counters",
4638 }
4639 }
4640}
4641
4642#[derive(Debug, Clone)]
4643pub struct CoverageDataCollectorControlHandle {
4644 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4645}
4646
4647impl fidl::endpoints::ControlHandle for CoverageDataCollectorControlHandle {
4648 fn shutdown(&self) {
4649 self.inner.shutdown()
4650 }
4651
4652 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4653 self.inner.shutdown_with_epitaph(status)
4654 }
4655
4656 fn is_closed(&self) -> bool {
4657 self.inner.channel().is_closed()
4658 }
4659 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4660 self.inner.channel().on_closed()
4661 }
4662
4663 #[cfg(target_os = "fuchsia")]
4664 fn signal_peer(
4665 &self,
4666 clear_mask: zx::Signals,
4667 set_mask: zx::Signals,
4668 ) -> Result<(), zx_status::Status> {
4669 use fidl::Peered;
4670 self.inner.channel().signal_peer(clear_mask, set_mask)
4671 }
4672}
4673
4674impl CoverageDataCollectorControlHandle {}
4675
4676#[must_use = "FIDL methods require a response to be sent"]
4677#[derive(Debug)]
4678pub struct CoverageDataCollectorInitializeResponder {
4679 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4680 tx_id: u32,
4681}
4682
4683impl std::ops::Drop for CoverageDataCollectorInitializeResponder {
4687 fn drop(&mut self) {
4688 self.control_handle.shutdown();
4689 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4691 }
4692}
4693
4694impl fidl::endpoints::Responder for CoverageDataCollectorInitializeResponder {
4695 type ControlHandle = CoverageDataCollectorControlHandle;
4696
4697 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4698 &self.control_handle
4699 }
4700
4701 fn drop_without_shutdown(mut self) {
4702 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4704 std::mem::forget(self);
4706 }
4707}
4708
4709impl CoverageDataCollectorInitializeResponder {
4710 pub fn send(self, mut options: &Options) -> Result<(), fidl::Error> {
4714 let _result = self.send_raw(options);
4715 if _result.is_err() {
4716 self.control_handle.shutdown();
4717 }
4718 self.drop_without_shutdown();
4719 _result
4720 }
4721
4722 pub fn send_no_shutdown_on_err(self, mut options: &Options) -> Result<(), fidl::Error> {
4724 let _result = self.send_raw(options);
4725 self.drop_without_shutdown();
4726 _result
4727 }
4728
4729 fn send_raw(&self, mut options: &Options) -> Result<(), fidl::Error> {
4730 self.control_handle.inner.send::<CoverageDataCollectorInitializeResponse>(
4731 (options,),
4732 self.tx_id,
4733 0x51d6f91d6f02d9d6,
4734 fidl::encoding::DynamicFlags::empty(),
4735 )
4736 }
4737}
4738
4739#[must_use = "FIDL methods require a response to be sent"]
4740#[derive(Debug)]
4741pub struct CoverageDataCollectorAddInline8bitCountersResponder {
4742 control_handle: std::mem::ManuallyDrop<CoverageDataCollectorControlHandle>,
4743 tx_id: u32,
4744}
4745
4746impl std::ops::Drop for CoverageDataCollectorAddInline8bitCountersResponder {
4750 fn drop(&mut self) {
4751 self.control_handle.shutdown();
4752 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4754 }
4755}
4756
4757impl fidl::endpoints::Responder for CoverageDataCollectorAddInline8bitCountersResponder {
4758 type ControlHandle = CoverageDataCollectorControlHandle;
4759
4760 fn control_handle(&self) -> &CoverageDataCollectorControlHandle {
4761 &self.control_handle
4762 }
4763
4764 fn drop_without_shutdown(mut self) {
4765 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4767 std::mem::forget(self);
4769 }
4770}
4771
4772impl CoverageDataCollectorAddInline8bitCountersResponder {
4773 pub fn send(self) -> Result<(), fidl::Error> {
4777 let _result = self.send_raw();
4778 if _result.is_err() {
4779 self.control_handle.shutdown();
4780 }
4781 self.drop_without_shutdown();
4782 _result
4783 }
4784
4785 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
4787 let _result = self.send_raw();
4788 self.drop_without_shutdown();
4789 _result
4790 }
4791
4792 fn send_raw(&self) -> Result<(), fidl::Error> {
4793 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
4794 (),
4795 self.tx_id,
4796 0x75f87cadfc94d1be,
4797 fidl::encoding::DynamicFlags::empty(),
4798 )
4799 }
4800}
4801
4802#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4803pub struct CoverageDataProviderMarker;
4804
4805impl fidl::endpoints::ProtocolMarker for CoverageDataProviderMarker {
4806 type Proxy = CoverageDataProviderProxy;
4807 type RequestStream = CoverageDataProviderRequestStream;
4808 #[cfg(target_os = "fuchsia")]
4809 type SynchronousProxy = CoverageDataProviderSynchronousProxy;
4810
4811 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.CoverageDataProvider";
4812}
4813impl fidl::endpoints::DiscoverableProtocolMarker for CoverageDataProviderMarker {}
4814
4815pub trait CoverageDataProviderProxyInterface: Send + Sync {
4816 fn r#set_options(&self, options: &Options) -> Result<(), fidl::Error>;
4817 type WatchCoverageDataResponseFut: std::future::Future<Output = Result<Vec<CoverageData>, fidl::Error>>
4818 + Send;
4819 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut;
4820}
4821#[derive(Debug)]
4822#[cfg(target_os = "fuchsia")]
4823pub struct CoverageDataProviderSynchronousProxy {
4824 client: fidl::client::sync::Client,
4825}
4826
4827#[cfg(target_os = "fuchsia")]
4828impl fidl::endpoints::SynchronousProxy for CoverageDataProviderSynchronousProxy {
4829 type Proxy = CoverageDataProviderProxy;
4830 type Protocol = CoverageDataProviderMarker;
4831
4832 fn from_channel(inner: fidl::Channel) -> Self {
4833 Self::new(inner)
4834 }
4835
4836 fn into_channel(self) -> fidl::Channel {
4837 self.client.into_channel()
4838 }
4839
4840 fn as_channel(&self) -> &fidl::Channel {
4841 self.client.as_channel()
4842 }
4843}
4844
4845#[cfg(target_os = "fuchsia")]
4846impl CoverageDataProviderSynchronousProxy {
4847 pub fn new(channel: fidl::Channel) -> Self {
4848 let protocol_name =
4849 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4850 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4851 }
4852
4853 pub fn into_channel(self) -> fidl::Channel {
4854 self.client.into_channel()
4855 }
4856
4857 pub fn wait_for_event(
4860 &self,
4861 deadline: zx::MonotonicInstant,
4862 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
4863 CoverageDataProviderEvent::decode(self.client.wait_for_event(deadline)?)
4864 }
4865
4866 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4868 self.client.send::<CoverageDataProviderSetOptionsRequest>(
4869 (options,),
4870 0x4873c4a5c7683384,
4871 fidl::encoding::DynamicFlags::empty(),
4872 )
4873 }
4874
4875 pub fn r#watch_coverage_data(
4887 &self,
4888 ___deadline: zx::MonotonicInstant,
4889 ) -> Result<Vec<CoverageData>, fidl::Error> {
4890 let _response = self.client.send_query::<
4891 fidl::encoding::EmptyPayload,
4892 CoverageDataProviderWatchCoverageDataResponse,
4893 >(
4894 (),
4895 0x34a92fc9c73bea5a,
4896 fidl::encoding::DynamicFlags::empty(),
4897 ___deadline,
4898 )?;
4899 Ok(_response.coverage_data)
4900 }
4901}
4902
4903#[cfg(target_os = "fuchsia")]
4904impl From<CoverageDataProviderSynchronousProxy> for zx::NullableHandle {
4905 fn from(value: CoverageDataProviderSynchronousProxy) -> Self {
4906 value.into_channel().into()
4907 }
4908}
4909
4910#[cfg(target_os = "fuchsia")]
4911impl From<fidl::Channel> for CoverageDataProviderSynchronousProxy {
4912 fn from(value: fidl::Channel) -> Self {
4913 Self::new(value)
4914 }
4915}
4916
4917#[cfg(target_os = "fuchsia")]
4918impl fidl::endpoints::FromClient for CoverageDataProviderSynchronousProxy {
4919 type Protocol = CoverageDataProviderMarker;
4920
4921 fn from_client(value: fidl::endpoints::ClientEnd<CoverageDataProviderMarker>) -> Self {
4922 Self::new(value.into_channel())
4923 }
4924}
4925
4926#[derive(Debug, Clone)]
4927pub struct CoverageDataProviderProxy {
4928 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4929}
4930
4931impl fidl::endpoints::Proxy for CoverageDataProviderProxy {
4932 type Protocol = CoverageDataProviderMarker;
4933
4934 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4935 Self::new(inner)
4936 }
4937
4938 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4939 self.client.into_channel().map_err(|client| Self { client })
4940 }
4941
4942 fn as_channel(&self) -> &::fidl::AsyncChannel {
4943 self.client.as_channel()
4944 }
4945}
4946
4947impl CoverageDataProviderProxy {
4948 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4950 let protocol_name =
4951 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4952 Self { client: fidl::client::Client::new(channel, protocol_name) }
4953 }
4954
4955 pub fn take_event_stream(&self) -> CoverageDataProviderEventStream {
4961 CoverageDataProviderEventStream { event_receiver: self.client.take_event_receiver() }
4962 }
4963
4964 pub fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4966 CoverageDataProviderProxyInterface::r#set_options(self, options)
4967 }
4968
4969 pub fn r#watch_coverage_data(
4981 &self,
4982 ) -> fidl::client::QueryResponseFut<
4983 Vec<CoverageData>,
4984 fidl::encoding::DefaultFuchsiaResourceDialect,
4985 > {
4986 CoverageDataProviderProxyInterface::r#watch_coverage_data(self)
4987 }
4988}
4989
4990impl CoverageDataProviderProxyInterface for CoverageDataProviderProxy {
4991 fn r#set_options(&self, mut options: &Options) -> Result<(), fidl::Error> {
4992 self.client.send::<CoverageDataProviderSetOptionsRequest>(
4993 (options,),
4994 0x4873c4a5c7683384,
4995 fidl::encoding::DynamicFlags::empty(),
4996 )
4997 }
4998
4999 type WatchCoverageDataResponseFut = fidl::client::QueryResponseFut<
5000 Vec<CoverageData>,
5001 fidl::encoding::DefaultFuchsiaResourceDialect,
5002 >;
5003 fn r#watch_coverage_data(&self) -> Self::WatchCoverageDataResponseFut {
5004 fn _decode(
5005 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5006 ) -> Result<Vec<CoverageData>, fidl::Error> {
5007 let _response = fidl::client::decode_transaction_body::<
5008 CoverageDataProviderWatchCoverageDataResponse,
5009 fidl::encoding::DefaultFuchsiaResourceDialect,
5010 0x34a92fc9c73bea5a,
5011 >(_buf?)?;
5012 Ok(_response.coverage_data)
5013 }
5014 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<CoverageData>>(
5015 (),
5016 0x34a92fc9c73bea5a,
5017 fidl::encoding::DynamicFlags::empty(),
5018 _decode,
5019 )
5020 }
5021}
5022
5023pub struct CoverageDataProviderEventStream {
5024 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5025}
5026
5027impl std::marker::Unpin for CoverageDataProviderEventStream {}
5028
5029impl futures::stream::FusedStream for CoverageDataProviderEventStream {
5030 fn is_terminated(&self) -> bool {
5031 self.event_receiver.is_terminated()
5032 }
5033}
5034
5035impl futures::Stream for CoverageDataProviderEventStream {
5036 type Item = Result<CoverageDataProviderEvent, fidl::Error>;
5037
5038 fn poll_next(
5039 mut self: std::pin::Pin<&mut Self>,
5040 cx: &mut std::task::Context<'_>,
5041 ) -> std::task::Poll<Option<Self::Item>> {
5042 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5043 &mut self.event_receiver,
5044 cx
5045 )?) {
5046 Some(buf) => std::task::Poll::Ready(Some(CoverageDataProviderEvent::decode(buf))),
5047 None => std::task::Poll::Ready(None),
5048 }
5049 }
5050}
5051
5052#[derive(Debug)]
5053pub enum CoverageDataProviderEvent {}
5054
5055impl CoverageDataProviderEvent {
5056 fn decode(
5058 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5059 ) -> Result<CoverageDataProviderEvent, fidl::Error> {
5060 let (bytes, _handles) = buf.split_mut();
5061 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5062 debug_assert_eq!(tx_header.tx_id, 0);
5063 match tx_header.ordinal {
5064 _ => Err(fidl::Error::UnknownOrdinal {
5065 ordinal: tx_header.ordinal,
5066 protocol_name:
5067 <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5068 }),
5069 }
5070 }
5071}
5072
5073pub struct CoverageDataProviderRequestStream {
5075 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5076 is_terminated: bool,
5077}
5078
5079impl std::marker::Unpin for CoverageDataProviderRequestStream {}
5080
5081impl futures::stream::FusedStream for CoverageDataProviderRequestStream {
5082 fn is_terminated(&self) -> bool {
5083 self.is_terminated
5084 }
5085}
5086
5087impl fidl::endpoints::RequestStream for CoverageDataProviderRequestStream {
5088 type Protocol = CoverageDataProviderMarker;
5089 type ControlHandle = CoverageDataProviderControlHandle;
5090
5091 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5092 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5093 }
5094
5095 fn control_handle(&self) -> Self::ControlHandle {
5096 CoverageDataProviderControlHandle { inner: self.inner.clone() }
5097 }
5098
5099 fn into_inner(
5100 self,
5101 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5102 {
5103 (self.inner, self.is_terminated)
5104 }
5105
5106 fn from_inner(
5107 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5108 is_terminated: bool,
5109 ) -> Self {
5110 Self { inner, is_terminated }
5111 }
5112}
5113
5114impl futures::Stream for CoverageDataProviderRequestStream {
5115 type Item = Result<CoverageDataProviderRequest, fidl::Error>;
5116
5117 fn poll_next(
5118 mut self: std::pin::Pin<&mut Self>,
5119 cx: &mut std::task::Context<'_>,
5120 ) -> std::task::Poll<Option<Self::Item>> {
5121 let this = &mut *self;
5122 if this.inner.check_shutdown(cx) {
5123 this.is_terminated = true;
5124 return std::task::Poll::Ready(None);
5125 }
5126 if this.is_terminated {
5127 panic!("polled CoverageDataProviderRequestStream after completion");
5128 }
5129 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5130 |bytes, handles| {
5131 match this.inner.channel().read_etc(cx, bytes, handles) {
5132 std::task::Poll::Ready(Ok(())) => {}
5133 std::task::Poll::Pending => return std::task::Poll::Pending,
5134 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5135 this.is_terminated = true;
5136 return std::task::Poll::Ready(None);
5137 }
5138 std::task::Poll::Ready(Err(e)) => {
5139 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5140 e.into(),
5141 ))));
5142 }
5143 }
5144
5145 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5147
5148 std::task::Poll::Ready(Some(match header.ordinal {
5149 0x4873c4a5c7683384 => {
5150 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
5151 let mut req = fidl::new_empty!(CoverageDataProviderSetOptionsRequest, fidl::encoding::DefaultFuchsiaResourceDialect);
5152 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<CoverageDataProviderSetOptionsRequest>(&header, _body_bytes, handles, &mut req)?;
5153 let control_handle = CoverageDataProviderControlHandle {
5154 inner: this.inner.clone(),
5155 };
5156 Ok(CoverageDataProviderRequest::SetOptions {options: req.options,
5157
5158 control_handle,
5159 })
5160 }
5161 0x34a92fc9c73bea5a => {
5162 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5163 let mut req = fidl::new_empty!(fidl::encoding::EmptyPayload, fidl::encoding::DefaultFuchsiaResourceDialect);
5164 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5165 let control_handle = CoverageDataProviderControlHandle {
5166 inner: this.inner.clone(),
5167 };
5168 Ok(CoverageDataProviderRequest::WatchCoverageData {
5169 responder: CoverageDataProviderWatchCoverageDataResponder {
5170 control_handle: std::mem::ManuallyDrop::new(control_handle),
5171 tx_id: header.tx_id,
5172 },
5173 })
5174 }
5175 _ => Err(fidl::Error::UnknownOrdinal {
5176 ordinal: header.ordinal,
5177 protocol_name: <CoverageDataProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5178 }),
5179 }))
5180 },
5181 )
5182 }
5183}
5184
5185#[derive(Debug)]
5194pub enum CoverageDataProviderRequest {
5195 SetOptions { options: Options, control_handle: CoverageDataProviderControlHandle },
5197 WatchCoverageData { responder: CoverageDataProviderWatchCoverageDataResponder },
5209}
5210
5211impl CoverageDataProviderRequest {
5212 #[allow(irrefutable_let_patterns)]
5213 pub fn into_set_options(self) -> Option<(Options, CoverageDataProviderControlHandle)> {
5214 if let CoverageDataProviderRequest::SetOptions { options, control_handle } = self {
5215 Some((options, control_handle))
5216 } else {
5217 None
5218 }
5219 }
5220
5221 #[allow(irrefutable_let_patterns)]
5222 pub fn into_watch_coverage_data(
5223 self,
5224 ) -> Option<(CoverageDataProviderWatchCoverageDataResponder)> {
5225 if let CoverageDataProviderRequest::WatchCoverageData { responder } = self {
5226 Some((responder))
5227 } else {
5228 None
5229 }
5230 }
5231
5232 pub fn method_name(&self) -> &'static str {
5234 match *self {
5235 CoverageDataProviderRequest::SetOptions { .. } => "set_options",
5236 CoverageDataProviderRequest::WatchCoverageData { .. } => "watch_coverage_data",
5237 }
5238 }
5239}
5240
5241#[derive(Debug, Clone)]
5242pub struct CoverageDataProviderControlHandle {
5243 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5244}
5245
5246impl fidl::endpoints::ControlHandle for CoverageDataProviderControlHandle {
5247 fn shutdown(&self) {
5248 self.inner.shutdown()
5249 }
5250
5251 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5252 self.inner.shutdown_with_epitaph(status)
5253 }
5254
5255 fn is_closed(&self) -> bool {
5256 self.inner.channel().is_closed()
5257 }
5258 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5259 self.inner.channel().on_closed()
5260 }
5261
5262 #[cfg(target_os = "fuchsia")]
5263 fn signal_peer(
5264 &self,
5265 clear_mask: zx::Signals,
5266 set_mask: zx::Signals,
5267 ) -> Result<(), zx_status::Status> {
5268 use fidl::Peered;
5269 self.inner.channel().signal_peer(clear_mask, set_mask)
5270 }
5271}
5272
5273impl CoverageDataProviderControlHandle {}
5274
5275#[must_use = "FIDL methods require a response to be sent"]
5276#[derive(Debug)]
5277pub struct CoverageDataProviderWatchCoverageDataResponder {
5278 control_handle: std::mem::ManuallyDrop<CoverageDataProviderControlHandle>,
5279 tx_id: u32,
5280}
5281
5282impl std::ops::Drop for CoverageDataProviderWatchCoverageDataResponder {
5286 fn drop(&mut self) {
5287 self.control_handle.shutdown();
5288 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5290 }
5291}
5292
5293impl fidl::endpoints::Responder for CoverageDataProviderWatchCoverageDataResponder {
5294 type ControlHandle = CoverageDataProviderControlHandle;
5295
5296 fn control_handle(&self) -> &CoverageDataProviderControlHandle {
5297 &self.control_handle
5298 }
5299
5300 fn drop_without_shutdown(mut self) {
5301 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5303 std::mem::forget(self);
5305 }
5306}
5307
5308impl CoverageDataProviderWatchCoverageDataResponder {
5309 pub fn send(self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5313 let _result = self.send_raw(coverage_data);
5314 if _result.is_err() {
5315 self.control_handle.shutdown();
5316 }
5317 self.drop_without_shutdown();
5318 _result
5319 }
5320
5321 pub fn send_no_shutdown_on_err(
5323 self,
5324 mut coverage_data: Vec<CoverageData>,
5325 ) -> Result<(), fidl::Error> {
5326 let _result = self.send_raw(coverage_data);
5327 self.drop_without_shutdown();
5328 _result
5329 }
5330
5331 fn send_raw(&self, mut coverage_data: Vec<CoverageData>) -> Result<(), fidl::Error> {
5332 self.control_handle.inner.send::<CoverageDataProviderWatchCoverageDataResponse>(
5333 (coverage_data.as_mut(),),
5334 self.tx_id,
5335 0x34a92fc9c73bea5a,
5336 fidl::encoding::DynamicFlags::empty(),
5337 )
5338 }
5339}
5340
5341#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5342pub struct ManagerMarker;
5343
5344impl fidl::endpoints::ProtocolMarker for ManagerMarker {
5345 type Proxy = ManagerProxy;
5346 type RequestStream = ManagerRequestStream;
5347 #[cfg(target_os = "fuchsia")]
5348 type SynchronousProxy = ManagerSynchronousProxy;
5349
5350 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Manager";
5351}
5352impl fidl::endpoints::DiscoverableProtocolMarker for ManagerMarker {}
5353pub type ManagerConnectResult = Result<(), i32>;
5354pub type ManagerGetOutputResult = Result<(), i32>;
5355pub type ManagerStopResult = Result<(), i32>;
5356
5357pub trait ManagerProxyInterface: Send + Sync {
5358 type ConnectResponseFut: std::future::Future<Output = Result<ManagerConnectResult, fidl::Error>>
5359 + Send;
5360 fn r#connect(
5361 &self,
5362 fuzzer_url: &str,
5363 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5364 ) -> Self::ConnectResponseFut;
5365 type GetOutputResponseFut: std::future::Future<Output = Result<ManagerGetOutputResult, fidl::Error>>
5366 + Send;
5367 fn r#get_output(
5368 &self,
5369 fuzzer_url: &str,
5370 output: TestOutput,
5371 socket: fidl::Socket,
5372 ) -> Self::GetOutputResponseFut;
5373 type StopResponseFut: std::future::Future<Output = Result<ManagerStopResult, fidl::Error>>
5374 + Send;
5375 fn r#stop(&self, fuzzer_url: &str) -> Self::StopResponseFut;
5376}
5377#[derive(Debug)]
5378#[cfg(target_os = "fuchsia")]
5379pub struct ManagerSynchronousProxy {
5380 client: fidl::client::sync::Client,
5381}
5382
5383#[cfg(target_os = "fuchsia")]
5384impl fidl::endpoints::SynchronousProxy for ManagerSynchronousProxy {
5385 type Proxy = ManagerProxy;
5386 type Protocol = ManagerMarker;
5387
5388 fn from_channel(inner: fidl::Channel) -> Self {
5389 Self::new(inner)
5390 }
5391
5392 fn into_channel(self) -> fidl::Channel {
5393 self.client.into_channel()
5394 }
5395
5396 fn as_channel(&self) -> &fidl::Channel {
5397 self.client.as_channel()
5398 }
5399}
5400
5401#[cfg(target_os = "fuchsia")]
5402impl ManagerSynchronousProxy {
5403 pub fn new(channel: fidl::Channel) -> Self {
5404 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5405 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
5406 }
5407
5408 pub fn into_channel(self) -> fidl::Channel {
5409 self.client.into_channel()
5410 }
5411
5412 pub fn wait_for_event(
5415 &self,
5416 deadline: zx::MonotonicInstant,
5417 ) -> Result<ManagerEvent, fidl::Error> {
5418 ManagerEvent::decode(self.client.wait_for_event(deadline)?)
5419 }
5420
5421 pub fn r#connect(
5448 &self,
5449 mut fuzzer_url: &str,
5450 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5451 ___deadline: zx::MonotonicInstant,
5452 ) -> Result<ManagerConnectResult, fidl::Error> {
5453 let _response = self.client.send_query::<
5454 ManagerConnectRequest,
5455 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5456 >(
5457 (fuzzer_url, controller,),
5458 0x1620cd742a89f064,
5459 fidl::encoding::DynamicFlags::empty(),
5460 ___deadline,
5461 )?;
5462 Ok(_response.map(|x| x))
5463 }
5464
5465 pub fn r#get_output(
5480 &self,
5481 mut fuzzer_url: &str,
5482 mut output: TestOutput,
5483 mut socket: fidl::Socket,
5484 ___deadline: zx::MonotonicInstant,
5485 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5486 let _response = self.client.send_query::<
5487 ManagerGetOutputRequest,
5488 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5489 >(
5490 (fuzzer_url, output, socket,),
5491 0x755c28eecf20a88d,
5492 fidl::encoding::DynamicFlags::empty(),
5493 ___deadline,
5494 )?;
5495 Ok(_response.map(|x| x))
5496 }
5497
5498 pub fn r#stop(
5504 &self,
5505 mut fuzzer_url: &str,
5506 ___deadline: zx::MonotonicInstant,
5507 ) -> Result<ManagerStopResult, fidl::Error> {
5508 let _response = self.client.send_query::<
5509 ManagerStopRequest,
5510 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5511 >(
5512 (fuzzer_url,),
5513 0x27e53d86badd21f3,
5514 fidl::encoding::DynamicFlags::empty(),
5515 ___deadline,
5516 )?;
5517 Ok(_response.map(|x| x))
5518 }
5519}
5520
5521#[cfg(target_os = "fuchsia")]
5522impl From<ManagerSynchronousProxy> for zx::NullableHandle {
5523 fn from(value: ManagerSynchronousProxy) -> Self {
5524 value.into_channel().into()
5525 }
5526}
5527
5528#[cfg(target_os = "fuchsia")]
5529impl From<fidl::Channel> for ManagerSynchronousProxy {
5530 fn from(value: fidl::Channel) -> Self {
5531 Self::new(value)
5532 }
5533}
5534
5535#[cfg(target_os = "fuchsia")]
5536impl fidl::endpoints::FromClient for ManagerSynchronousProxy {
5537 type Protocol = ManagerMarker;
5538
5539 fn from_client(value: fidl::endpoints::ClientEnd<ManagerMarker>) -> Self {
5540 Self::new(value.into_channel())
5541 }
5542}
5543
5544#[derive(Debug, Clone)]
5545pub struct ManagerProxy {
5546 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
5547}
5548
5549impl fidl::endpoints::Proxy for ManagerProxy {
5550 type Protocol = ManagerMarker;
5551
5552 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
5553 Self::new(inner)
5554 }
5555
5556 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
5557 self.client.into_channel().map_err(|client| Self { client })
5558 }
5559
5560 fn as_channel(&self) -> &::fidl::AsyncChannel {
5561 self.client.as_channel()
5562 }
5563}
5564
5565impl ManagerProxy {
5566 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
5568 let protocol_name = <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
5569 Self { client: fidl::client::Client::new(channel, protocol_name) }
5570 }
5571
5572 pub fn take_event_stream(&self) -> ManagerEventStream {
5578 ManagerEventStream { event_receiver: self.client.take_event_receiver() }
5579 }
5580
5581 pub fn r#connect(
5608 &self,
5609 mut fuzzer_url: &str,
5610 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5611 ) -> fidl::client::QueryResponseFut<
5612 ManagerConnectResult,
5613 fidl::encoding::DefaultFuchsiaResourceDialect,
5614 > {
5615 ManagerProxyInterface::r#connect(self, fuzzer_url, controller)
5616 }
5617
5618 pub fn r#get_output(
5633 &self,
5634 mut fuzzer_url: &str,
5635 mut output: TestOutput,
5636 mut socket: fidl::Socket,
5637 ) -> fidl::client::QueryResponseFut<
5638 ManagerGetOutputResult,
5639 fidl::encoding::DefaultFuchsiaResourceDialect,
5640 > {
5641 ManagerProxyInterface::r#get_output(self, fuzzer_url, output, socket)
5642 }
5643
5644 pub fn r#stop(
5650 &self,
5651 mut fuzzer_url: &str,
5652 ) -> fidl::client::QueryResponseFut<
5653 ManagerStopResult,
5654 fidl::encoding::DefaultFuchsiaResourceDialect,
5655 > {
5656 ManagerProxyInterface::r#stop(self, fuzzer_url)
5657 }
5658}
5659
5660impl ManagerProxyInterface for ManagerProxy {
5661 type ConnectResponseFut = fidl::client::QueryResponseFut<
5662 ManagerConnectResult,
5663 fidl::encoding::DefaultFuchsiaResourceDialect,
5664 >;
5665 fn r#connect(
5666 &self,
5667 mut fuzzer_url: &str,
5668 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5669 ) -> Self::ConnectResponseFut {
5670 fn _decode(
5671 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5672 ) -> Result<ManagerConnectResult, fidl::Error> {
5673 let _response = fidl::client::decode_transaction_body::<
5674 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5675 fidl::encoding::DefaultFuchsiaResourceDialect,
5676 0x1620cd742a89f064,
5677 >(_buf?)?;
5678 Ok(_response.map(|x| x))
5679 }
5680 self.client.send_query_and_decode::<ManagerConnectRequest, ManagerConnectResult>(
5681 (fuzzer_url, controller),
5682 0x1620cd742a89f064,
5683 fidl::encoding::DynamicFlags::empty(),
5684 _decode,
5685 )
5686 }
5687
5688 type GetOutputResponseFut = fidl::client::QueryResponseFut<
5689 ManagerGetOutputResult,
5690 fidl::encoding::DefaultFuchsiaResourceDialect,
5691 >;
5692 fn r#get_output(
5693 &self,
5694 mut fuzzer_url: &str,
5695 mut output: TestOutput,
5696 mut socket: fidl::Socket,
5697 ) -> Self::GetOutputResponseFut {
5698 fn _decode(
5699 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5700 ) -> Result<ManagerGetOutputResult, fidl::Error> {
5701 let _response = fidl::client::decode_transaction_body::<
5702 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5703 fidl::encoding::DefaultFuchsiaResourceDialect,
5704 0x755c28eecf20a88d,
5705 >(_buf?)?;
5706 Ok(_response.map(|x| x))
5707 }
5708 self.client.send_query_and_decode::<ManagerGetOutputRequest, ManagerGetOutputResult>(
5709 (fuzzer_url, output, socket),
5710 0x755c28eecf20a88d,
5711 fidl::encoding::DynamicFlags::empty(),
5712 _decode,
5713 )
5714 }
5715
5716 type StopResponseFut = fidl::client::QueryResponseFut<
5717 ManagerStopResult,
5718 fidl::encoding::DefaultFuchsiaResourceDialect,
5719 >;
5720 fn r#stop(&self, mut fuzzer_url: &str) -> Self::StopResponseFut {
5721 fn _decode(
5722 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
5723 ) -> Result<ManagerStopResult, fidl::Error> {
5724 let _response = fidl::client::decode_transaction_body::<
5725 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
5726 fidl::encoding::DefaultFuchsiaResourceDialect,
5727 0x27e53d86badd21f3,
5728 >(_buf?)?;
5729 Ok(_response.map(|x| x))
5730 }
5731 self.client.send_query_and_decode::<ManagerStopRequest, ManagerStopResult>(
5732 (fuzzer_url,),
5733 0x27e53d86badd21f3,
5734 fidl::encoding::DynamicFlags::empty(),
5735 _decode,
5736 )
5737 }
5738}
5739
5740pub struct ManagerEventStream {
5741 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
5742}
5743
5744impl std::marker::Unpin for ManagerEventStream {}
5745
5746impl futures::stream::FusedStream for ManagerEventStream {
5747 fn is_terminated(&self) -> bool {
5748 self.event_receiver.is_terminated()
5749 }
5750}
5751
5752impl futures::Stream for ManagerEventStream {
5753 type Item = Result<ManagerEvent, fidl::Error>;
5754
5755 fn poll_next(
5756 mut self: std::pin::Pin<&mut Self>,
5757 cx: &mut std::task::Context<'_>,
5758 ) -> std::task::Poll<Option<Self::Item>> {
5759 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
5760 &mut self.event_receiver,
5761 cx
5762 )?) {
5763 Some(buf) => std::task::Poll::Ready(Some(ManagerEvent::decode(buf))),
5764 None => std::task::Poll::Ready(None),
5765 }
5766 }
5767}
5768
5769#[derive(Debug)]
5770pub enum ManagerEvent {}
5771
5772impl ManagerEvent {
5773 fn decode(
5775 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
5776 ) -> Result<ManagerEvent, fidl::Error> {
5777 let (bytes, _handles) = buf.split_mut();
5778 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5779 debug_assert_eq!(tx_header.tx_id, 0);
5780 match tx_header.ordinal {
5781 _ => Err(fidl::Error::UnknownOrdinal {
5782 ordinal: tx_header.ordinal,
5783 protocol_name: <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5784 }),
5785 }
5786 }
5787}
5788
5789pub struct ManagerRequestStream {
5791 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5792 is_terminated: bool,
5793}
5794
5795impl std::marker::Unpin for ManagerRequestStream {}
5796
5797impl futures::stream::FusedStream for ManagerRequestStream {
5798 fn is_terminated(&self) -> bool {
5799 self.is_terminated
5800 }
5801}
5802
5803impl fidl::endpoints::RequestStream for ManagerRequestStream {
5804 type Protocol = ManagerMarker;
5805 type ControlHandle = ManagerControlHandle;
5806
5807 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
5808 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
5809 }
5810
5811 fn control_handle(&self) -> Self::ControlHandle {
5812 ManagerControlHandle { inner: self.inner.clone() }
5813 }
5814
5815 fn into_inner(
5816 self,
5817 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
5818 {
5819 (self.inner, self.is_terminated)
5820 }
5821
5822 fn from_inner(
5823 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5824 is_terminated: bool,
5825 ) -> Self {
5826 Self { inner, is_terminated }
5827 }
5828}
5829
5830impl futures::Stream for ManagerRequestStream {
5831 type Item = Result<ManagerRequest, fidl::Error>;
5832
5833 fn poll_next(
5834 mut self: std::pin::Pin<&mut Self>,
5835 cx: &mut std::task::Context<'_>,
5836 ) -> std::task::Poll<Option<Self::Item>> {
5837 let this = &mut *self;
5838 if this.inner.check_shutdown(cx) {
5839 this.is_terminated = true;
5840 return std::task::Poll::Ready(None);
5841 }
5842 if this.is_terminated {
5843 panic!("polled ManagerRequestStream after completion");
5844 }
5845 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
5846 |bytes, handles| {
5847 match this.inner.channel().read_etc(cx, bytes, handles) {
5848 std::task::Poll::Ready(Ok(())) => {}
5849 std::task::Poll::Pending => return std::task::Poll::Pending,
5850 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
5851 this.is_terminated = true;
5852 return std::task::Poll::Ready(None);
5853 }
5854 std::task::Poll::Ready(Err(e)) => {
5855 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
5856 e.into(),
5857 ))));
5858 }
5859 }
5860
5861 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
5863
5864 std::task::Poll::Ready(Some(match header.ordinal {
5865 0x1620cd742a89f064 => {
5866 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5867 let mut req = fidl::new_empty!(
5868 ManagerConnectRequest,
5869 fidl::encoding::DefaultFuchsiaResourceDialect
5870 );
5871 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerConnectRequest>(&header, _body_bytes, handles, &mut req)?;
5872 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5873 Ok(ManagerRequest::Connect {
5874 fuzzer_url: req.fuzzer_url,
5875 controller: req.controller,
5876
5877 responder: ManagerConnectResponder {
5878 control_handle: std::mem::ManuallyDrop::new(control_handle),
5879 tx_id: header.tx_id,
5880 },
5881 })
5882 }
5883 0x755c28eecf20a88d => {
5884 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5885 let mut req = fidl::new_empty!(
5886 ManagerGetOutputRequest,
5887 fidl::encoding::DefaultFuchsiaResourceDialect
5888 );
5889 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerGetOutputRequest>(&header, _body_bytes, handles, &mut req)?;
5890 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5891 Ok(ManagerRequest::GetOutput {
5892 fuzzer_url: req.fuzzer_url,
5893 output: req.output,
5894 socket: req.socket,
5895
5896 responder: ManagerGetOutputResponder {
5897 control_handle: std::mem::ManuallyDrop::new(control_handle),
5898 tx_id: header.tx_id,
5899 },
5900 })
5901 }
5902 0x27e53d86badd21f3 => {
5903 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5904 let mut req = fidl::new_empty!(
5905 ManagerStopRequest,
5906 fidl::encoding::DefaultFuchsiaResourceDialect
5907 );
5908 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ManagerStopRequest>(&header, _body_bytes, handles, &mut req)?;
5909 let control_handle = ManagerControlHandle { inner: this.inner.clone() };
5910 Ok(ManagerRequest::Stop {
5911 fuzzer_url: req.fuzzer_url,
5912
5913 responder: ManagerStopResponder {
5914 control_handle: std::mem::ManuallyDrop::new(control_handle),
5915 tx_id: header.tx_id,
5916 },
5917 })
5918 }
5919 _ => Err(fidl::Error::UnknownOrdinal {
5920 ordinal: header.ordinal,
5921 protocol_name:
5922 <ManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5923 }),
5924 }))
5925 },
5926 )
5927 }
5928}
5929
5930#[derive(Debug)]
5936pub enum ManagerRequest {
5937 Connect {
5964 fuzzer_url: String,
5965 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
5966 responder: ManagerConnectResponder,
5967 },
5968 GetOutput {
5983 fuzzer_url: String,
5984 output: TestOutput,
5985 socket: fidl::Socket,
5986 responder: ManagerGetOutputResponder,
5987 },
5988 Stop { fuzzer_url: String, responder: ManagerStopResponder },
5994}
5995
5996impl ManagerRequest {
5997 #[allow(irrefutable_let_patterns)]
5998 pub fn into_connect(
5999 self,
6000 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, ManagerConnectResponder)>
6001 {
6002 if let ManagerRequest::Connect { fuzzer_url, controller, responder } = self {
6003 Some((fuzzer_url, controller, responder))
6004 } else {
6005 None
6006 }
6007 }
6008
6009 #[allow(irrefutable_let_patterns)]
6010 pub fn into_get_output(
6011 self,
6012 ) -> Option<(String, TestOutput, fidl::Socket, ManagerGetOutputResponder)> {
6013 if let ManagerRequest::GetOutput { fuzzer_url, output, socket, responder } = self {
6014 Some((fuzzer_url, output, socket, responder))
6015 } else {
6016 None
6017 }
6018 }
6019
6020 #[allow(irrefutable_let_patterns)]
6021 pub fn into_stop(self) -> Option<(String, ManagerStopResponder)> {
6022 if let ManagerRequest::Stop { fuzzer_url, responder } = self {
6023 Some((fuzzer_url, responder))
6024 } else {
6025 None
6026 }
6027 }
6028
6029 pub fn method_name(&self) -> &'static str {
6031 match *self {
6032 ManagerRequest::Connect { .. } => "connect",
6033 ManagerRequest::GetOutput { .. } => "get_output",
6034 ManagerRequest::Stop { .. } => "stop",
6035 }
6036 }
6037}
6038
6039#[derive(Debug, Clone)]
6040pub struct ManagerControlHandle {
6041 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6042}
6043
6044impl fidl::endpoints::ControlHandle for ManagerControlHandle {
6045 fn shutdown(&self) {
6046 self.inner.shutdown()
6047 }
6048
6049 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6050 self.inner.shutdown_with_epitaph(status)
6051 }
6052
6053 fn is_closed(&self) -> bool {
6054 self.inner.channel().is_closed()
6055 }
6056 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6057 self.inner.channel().on_closed()
6058 }
6059
6060 #[cfg(target_os = "fuchsia")]
6061 fn signal_peer(
6062 &self,
6063 clear_mask: zx::Signals,
6064 set_mask: zx::Signals,
6065 ) -> Result<(), zx_status::Status> {
6066 use fidl::Peered;
6067 self.inner.channel().signal_peer(clear_mask, set_mask)
6068 }
6069}
6070
6071impl ManagerControlHandle {}
6072
6073#[must_use = "FIDL methods require a response to be sent"]
6074#[derive(Debug)]
6075pub struct ManagerConnectResponder {
6076 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6077 tx_id: u32,
6078}
6079
6080impl std::ops::Drop for ManagerConnectResponder {
6084 fn drop(&mut self) {
6085 self.control_handle.shutdown();
6086 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6088 }
6089}
6090
6091impl fidl::endpoints::Responder for ManagerConnectResponder {
6092 type ControlHandle = ManagerControlHandle;
6093
6094 fn control_handle(&self) -> &ManagerControlHandle {
6095 &self.control_handle
6096 }
6097
6098 fn drop_without_shutdown(mut self) {
6099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6101 std::mem::forget(self);
6103 }
6104}
6105
6106impl ManagerConnectResponder {
6107 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6111 let _result = self.send_raw(result);
6112 if _result.is_err() {
6113 self.control_handle.shutdown();
6114 }
6115 self.drop_without_shutdown();
6116 _result
6117 }
6118
6119 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6121 let _result = self.send_raw(result);
6122 self.drop_without_shutdown();
6123 _result
6124 }
6125
6126 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6127 self.control_handle
6128 .inner
6129 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6130 result,
6131 self.tx_id,
6132 0x1620cd742a89f064,
6133 fidl::encoding::DynamicFlags::empty(),
6134 )
6135 }
6136}
6137
6138#[must_use = "FIDL methods require a response to be sent"]
6139#[derive(Debug)]
6140pub struct ManagerGetOutputResponder {
6141 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6142 tx_id: u32,
6143}
6144
6145impl std::ops::Drop for ManagerGetOutputResponder {
6149 fn drop(&mut self) {
6150 self.control_handle.shutdown();
6151 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6153 }
6154}
6155
6156impl fidl::endpoints::Responder for ManagerGetOutputResponder {
6157 type ControlHandle = ManagerControlHandle;
6158
6159 fn control_handle(&self) -> &ManagerControlHandle {
6160 &self.control_handle
6161 }
6162
6163 fn drop_without_shutdown(mut self) {
6164 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6166 std::mem::forget(self);
6168 }
6169}
6170
6171impl ManagerGetOutputResponder {
6172 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6176 let _result = self.send_raw(result);
6177 if _result.is_err() {
6178 self.control_handle.shutdown();
6179 }
6180 self.drop_without_shutdown();
6181 _result
6182 }
6183
6184 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6186 let _result = self.send_raw(result);
6187 self.drop_without_shutdown();
6188 _result
6189 }
6190
6191 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6192 self.control_handle
6193 .inner
6194 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6195 result,
6196 self.tx_id,
6197 0x755c28eecf20a88d,
6198 fidl::encoding::DynamicFlags::empty(),
6199 )
6200 }
6201}
6202
6203#[must_use = "FIDL methods require a response to be sent"]
6204#[derive(Debug)]
6205pub struct ManagerStopResponder {
6206 control_handle: std::mem::ManuallyDrop<ManagerControlHandle>,
6207 tx_id: u32,
6208}
6209
6210impl std::ops::Drop for ManagerStopResponder {
6214 fn drop(&mut self) {
6215 self.control_handle.shutdown();
6216 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6218 }
6219}
6220
6221impl fidl::endpoints::Responder for ManagerStopResponder {
6222 type ControlHandle = ManagerControlHandle;
6223
6224 fn control_handle(&self) -> &ManagerControlHandle {
6225 &self.control_handle
6226 }
6227
6228 fn drop_without_shutdown(mut self) {
6229 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6231 std::mem::forget(self);
6233 }
6234}
6235
6236impl ManagerStopResponder {
6237 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6241 let _result = self.send_raw(result);
6242 if _result.is_err() {
6243 self.control_handle.shutdown();
6244 }
6245 self.drop_without_shutdown();
6246 _result
6247 }
6248
6249 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6251 let _result = self.send_raw(result);
6252 self.drop_without_shutdown();
6253 _result
6254 }
6255
6256 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
6257 self.control_handle
6258 .inner
6259 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
6260 result,
6261 self.tx_id,
6262 0x27e53d86badd21f3,
6263 fidl::encoding::DynamicFlags::empty(),
6264 )
6265 }
6266}
6267
6268#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6269pub struct MonitorMarker;
6270
6271impl fidl::endpoints::ProtocolMarker for MonitorMarker {
6272 type Proxy = MonitorProxy;
6273 type RequestStream = MonitorRequestStream;
6274 #[cfg(target_os = "fuchsia")]
6275 type SynchronousProxy = MonitorSynchronousProxy;
6276
6277 const DEBUG_NAME: &'static str = "(anonymous) Monitor";
6278}
6279
6280pub trait MonitorProxyInterface: Send + Sync {
6281 type UpdateResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6282 fn r#update(&self, reason: UpdateReason, status: &Status) -> Self::UpdateResponseFut;
6283}
6284#[derive(Debug)]
6285#[cfg(target_os = "fuchsia")]
6286pub struct MonitorSynchronousProxy {
6287 client: fidl::client::sync::Client,
6288}
6289
6290#[cfg(target_os = "fuchsia")]
6291impl fidl::endpoints::SynchronousProxy for MonitorSynchronousProxy {
6292 type Proxy = MonitorProxy;
6293 type Protocol = MonitorMarker;
6294
6295 fn from_channel(inner: fidl::Channel) -> Self {
6296 Self::new(inner)
6297 }
6298
6299 fn into_channel(self) -> fidl::Channel {
6300 self.client.into_channel()
6301 }
6302
6303 fn as_channel(&self) -> &fidl::Channel {
6304 self.client.as_channel()
6305 }
6306}
6307
6308#[cfg(target_os = "fuchsia")]
6309impl MonitorSynchronousProxy {
6310 pub fn new(channel: fidl::Channel) -> Self {
6311 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6312 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6313 }
6314
6315 pub fn into_channel(self) -> fidl::Channel {
6316 self.client.into_channel()
6317 }
6318
6319 pub fn wait_for_event(
6322 &self,
6323 deadline: zx::MonotonicInstant,
6324 ) -> Result<MonitorEvent, fidl::Error> {
6325 MonitorEvent::decode(self.client.wait_for_event(deadline)?)
6326 }
6327
6328 pub fn r#update(
6333 &self,
6334 mut reason: UpdateReason,
6335 mut status: &Status,
6336 ___deadline: zx::MonotonicInstant,
6337 ) -> Result<(), fidl::Error> {
6338 let _response =
6339 self.client.send_query::<MonitorUpdateRequest, fidl::encoding::EmptyPayload>(
6340 (reason, status),
6341 0x7c773b93c1e6080f,
6342 fidl::encoding::DynamicFlags::empty(),
6343 ___deadline,
6344 )?;
6345 Ok(_response)
6346 }
6347}
6348
6349#[cfg(target_os = "fuchsia")]
6350impl From<MonitorSynchronousProxy> for zx::NullableHandle {
6351 fn from(value: MonitorSynchronousProxy) -> Self {
6352 value.into_channel().into()
6353 }
6354}
6355
6356#[cfg(target_os = "fuchsia")]
6357impl From<fidl::Channel> for MonitorSynchronousProxy {
6358 fn from(value: fidl::Channel) -> Self {
6359 Self::new(value)
6360 }
6361}
6362
6363#[cfg(target_os = "fuchsia")]
6364impl fidl::endpoints::FromClient for MonitorSynchronousProxy {
6365 type Protocol = MonitorMarker;
6366
6367 fn from_client(value: fidl::endpoints::ClientEnd<MonitorMarker>) -> Self {
6368 Self::new(value.into_channel())
6369 }
6370}
6371
6372#[derive(Debug, Clone)]
6373pub struct MonitorProxy {
6374 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6375}
6376
6377impl fidl::endpoints::Proxy for MonitorProxy {
6378 type Protocol = MonitorMarker;
6379
6380 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6381 Self::new(inner)
6382 }
6383
6384 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6385 self.client.into_channel().map_err(|client| Self { client })
6386 }
6387
6388 fn as_channel(&self) -> &::fidl::AsyncChannel {
6389 self.client.as_channel()
6390 }
6391}
6392
6393impl MonitorProxy {
6394 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6396 let protocol_name = <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6397 Self { client: fidl::client::Client::new(channel, protocol_name) }
6398 }
6399
6400 pub fn take_event_stream(&self) -> MonitorEventStream {
6406 MonitorEventStream { event_receiver: self.client.take_event_receiver() }
6407 }
6408
6409 pub fn r#update(
6414 &self,
6415 mut reason: UpdateReason,
6416 mut status: &Status,
6417 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6418 MonitorProxyInterface::r#update(self, reason, status)
6419 }
6420}
6421
6422impl MonitorProxyInterface for MonitorProxy {
6423 type UpdateResponseFut =
6424 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6425 fn r#update(&self, mut reason: UpdateReason, mut status: &Status) -> Self::UpdateResponseFut {
6426 fn _decode(
6427 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6428 ) -> Result<(), fidl::Error> {
6429 let _response = fidl::client::decode_transaction_body::<
6430 fidl::encoding::EmptyPayload,
6431 fidl::encoding::DefaultFuchsiaResourceDialect,
6432 0x7c773b93c1e6080f,
6433 >(_buf?)?;
6434 Ok(_response)
6435 }
6436 self.client.send_query_and_decode::<MonitorUpdateRequest, ()>(
6437 (reason, status),
6438 0x7c773b93c1e6080f,
6439 fidl::encoding::DynamicFlags::empty(),
6440 _decode,
6441 )
6442 }
6443}
6444
6445pub struct MonitorEventStream {
6446 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6447}
6448
6449impl std::marker::Unpin for MonitorEventStream {}
6450
6451impl futures::stream::FusedStream for MonitorEventStream {
6452 fn is_terminated(&self) -> bool {
6453 self.event_receiver.is_terminated()
6454 }
6455}
6456
6457impl futures::Stream for MonitorEventStream {
6458 type Item = Result<MonitorEvent, fidl::Error>;
6459
6460 fn poll_next(
6461 mut self: std::pin::Pin<&mut Self>,
6462 cx: &mut std::task::Context<'_>,
6463 ) -> std::task::Poll<Option<Self::Item>> {
6464 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6465 &mut self.event_receiver,
6466 cx
6467 )?) {
6468 Some(buf) => std::task::Poll::Ready(Some(MonitorEvent::decode(buf))),
6469 None => std::task::Poll::Ready(None),
6470 }
6471 }
6472}
6473
6474#[derive(Debug)]
6475pub enum MonitorEvent {}
6476
6477impl MonitorEvent {
6478 fn decode(
6480 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6481 ) -> Result<MonitorEvent, fidl::Error> {
6482 let (bytes, _handles) = buf.split_mut();
6483 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6484 debug_assert_eq!(tx_header.tx_id, 0);
6485 match tx_header.ordinal {
6486 _ => Err(fidl::Error::UnknownOrdinal {
6487 ordinal: tx_header.ordinal,
6488 protocol_name: <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6489 }),
6490 }
6491 }
6492}
6493
6494pub struct MonitorRequestStream {
6496 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6497 is_terminated: bool,
6498}
6499
6500impl std::marker::Unpin for MonitorRequestStream {}
6501
6502impl futures::stream::FusedStream for MonitorRequestStream {
6503 fn is_terminated(&self) -> bool {
6504 self.is_terminated
6505 }
6506}
6507
6508impl fidl::endpoints::RequestStream for MonitorRequestStream {
6509 type Protocol = MonitorMarker;
6510 type ControlHandle = MonitorControlHandle;
6511
6512 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6513 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6514 }
6515
6516 fn control_handle(&self) -> Self::ControlHandle {
6517 MonitorControlHandle { inner: self.inner.clone() }
6518 }
6519
6520 fn into_inner(
6521 self,
6522 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6523 {
6524 (self.inner, self.is_terminated)
6525 }
6526
6527 fn from_inner(
6528 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6529 is_terminated: bool,
6530 ) -> Self {
6531 Self { inner, is_terminated }
6532 }
6533}
6534
6535impl futures::Stream for MonitorRequestStream {
6536 type Item = Result<MonitorRequest, fidl::Error>;
6537
6538 fn poll_next(
6539 mut self: std::pin::Pin<&mut Self>,
6540 cx: &mut std::task::Context<'_>,
6541 ) -> std::task::Poll<Option<Self::Item>> {
6542 let this = &mut *self;
6543 if this.inner.check_shutdown(cx) {
6544 this.is_terminated = true;
6545 return std::task::Poll::Ready(None);
6546 }
6547 if this.is_terminated {
6548 panic!("polled MonitorRequestStream after completion");
6549 }
6550 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6551 |bytes, handles| {
6552 match this.inner.channel().read_etc(cx, bytes, handles) {
6553 std::task::Poll::Ready(Ok(())) => {}
6554 std::task::Poll::Pending => return std::task::Poll::Pending,
6555 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6556 this.is_terminated = true;
6557 return std::task::Poll::Ready(None);
6558 }
6559 std::task::Poll::Ready(Err(e)) => {
6560 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6561 e.into(),
6562 ))));
6563 }
6564 }
6565
6566 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6568
6569 std::task::Poll::Ready(Some(match header.ordinal {
6570 0x7c773b93c1e6080f => {
6571 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6572 let mut req = fidl::new_empty!(
6573 MonitorUpdateRequest,
6574 fidl::encoding::DefaultFuchsiaResourceDialect
6575 );
6576 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<MonitorUpdateRequest>(&header, _body_bytes, handles, &mut req)?;
6577 let control_handle = MonitorControlHandle { inner: this.inner.clone() };
6578 Ok(MonitorRequest::Update {
6579 reason: req.reason,
6580 status: req.status,
6581
6582 responder: MonitorUpdateResponder {
6583 control_handle: std::mem::ManuallyDrop::new(control_handle),
6584 tx_id: header.tx_id,
6585 },
6586 })
6587 }
6588 _ => Err(fidl::Error::UnknownOrdinal {
6589 ordinal: header.ordinal,
6590 protocol_name:
6591 <MonitorMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6592 }),
6593 }))
6594 },
6595 )
6596 }
6597}
6598
6599#[derive(Debug)]
6602pub enum MonitorRequest {
6603 Update { reason: UpdateReason, status: Status, responder: MonitorUpdateResponder },
6608}
6609
6610impl MonitorRequest {
6611 #[allow(irrefutable_let_patterns)]
6612 pub fn into_update(self) -> Option<(UpdateReason, Status, MonitorUpdateResponder)> {
6613 if let MonitorRequest::Update { reason, status, responder } = self {
6614 Some((reason, status, responder))
6615 } else {
6616 None
6617 }
6618 }
6619
6620 pub fn method_name(&self) -> &'static str {
6622 match *self {
6623 MonitorRequest::Update { .. } => "update",
6624 }
6625 }
6626}
6627
6628#[derive(Debug, Clone)]
6629pub struct MonitorControlHandle {
6630 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6631}
6632
6633impl fidl::endpoints::ControlHandle for MonitorControlHandle {
6634 fn shutdown(&self) {
6635 self.inner.shutdown()
6636 }
6637
6638 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6639 self.inner.shutdown_with_epitaph(status)
6640 }
6641
6642 fn is_closed(&self) -> bool {
6643 self.inner.channel().is_closed()
6644 }
6645 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6646 self.inner.channel().on_closed()
6647 }
6648
6649 #[cfg(target_os = "fuchsia")]
6650 fn signal_peer(
6651 &self,
6652 clear_mask: zx::Signals,
6653 set_mask: zx::Signals,
6654 ) -> Result<(), zx_status::Status> {
6655 use fidl::Peered;
6656 self.inner.channel().signal_peer(clear_mask, set_mask)
6657 }
6658}
6659
6660impl MonitorControlHandle {}
6661
6662#[must_use = "FIDL methods require a response to be sent"]
6663#[derive(Debug)]
6664pub struct MonitorUpdateResponder {
6665 control_handle: std::mem::ManuallyDrop<MonitorControlHandle>,
6666 tx_id: u32,
6667}
6668
6669impl std::ops::Drop for MonitorUpdateResponder {
6673 fn drop(&mut self) {
6674 self.control_handle.shutdown();
6675 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6677 }
6678}
6679
6680impl fidl::endpoints::Responder for MonitorUpdateResponder {
6681 type ControlHandle = MonitorControlHandle;
6682
6683 fn control_handle(&self) -> &MonitorControlHandle {
6684 &self.control_handle
6685 }
6686
6687 fn drop_without_shutdown(mut self) {
6688 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6690 std::mem::forget(self);
6692 }
6693}
6694
6695impl MonitorUpdateResponder {
6696 pub fn send(self) -> Result<(), fidl::Error> {
6700 let _result = self.send_raw();
6701 if _result.is_err() {
6702 self.control_handle.shutdown();
6703 }
6704 self.drop_without_shutdown();
6705 _result
6706 }
6707
6708 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
6710 let _result = self.send_raw();
6711 self.drop_without_shutdown();
6712 _result
6713 }
6714
6715 fn send_raw(&self) -> Result<(), fidl::Error> {
6716 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
6717 (),
6718 self.tx_id,
6719 0x7c773b93c1e6080f,
6720 fidl::encoding::DynamicFlags::empty(),
6721 )
6722 }
6723}
6724
6725#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6726pub struct RegistrarMarker;
6727
6728impl fidl::endpoints::ProtocolMarker for RegistrarMarker {
6729 type Proxy = RegistrarProxy;
6730 type RequestStream = RegistrarRequestStream;
6731 #[cfg(target_os = "fuchsia")]
6732 type SynchronousProxy = RegistrarSynchronousProxy;
6733
6734 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registrar";
6735}
6736impl fidl::endpoints::DiscoverableProtocolMarker for RegistrarMarker {}
6737
6738pub trait RegistrarProxyInterface: Send + Sync {
6739 type RegisterResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
6740 fn r#register(
6741 &self,
6742 fuzzer_url: &str,
6743 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6744 ) -> Self::RegisterResponseFut;
6745}
6746#[derive(Debug)]
6747#[cfg(target_os = "fuchsia")]
6748pub struct RegistrarSynchronousProxy {
6749 client: fidl::client::sync::Client,
6750}
6751
6752#[cfg(target_os = "fuchsia")]
6753impl fidl::endpoints::SynchronousProxy for RegistrarSynchronousProxy {
6754 type Proxy = RegistrarProxy;
6755 type Protocol = RegistrarMarker;
6756
6757 fn from_channel(inner: fidl::Channel) -> Self {
6758 Self::new(inner)
6759 }
6760
6761 fn into_channel(self) -> fidl::Channel {
6762 self.client.into_channel()
6763 }
6764
6765 fn as_channel(&self) -> &fidl::Channel {
6766 self.client.as_channel()
6767 }
6768}
6769
6770#[cfg(target_os = "fuchsia")]
6771impl RegistrarSynchronousProxy {
6772 pub fn new(channel: fidl::Channel) -> Self {
6773 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6774 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6775 }
6776
6777 pub fn into_channel(self) -> fidl::Channel {
6778 self.client.into_channel()
6779 }
6780
6781 pub fn wait_for_event(
6784 &self,
6785 deadline: zx::MonotonicInstant,
6786 ) -> Result<RegistrarEvent, fidl::Error> {
6787 RegistrarEvent::decode(self.client.wait_for_event(deadline)?)
6788 }
6789
6790 pub fn r#register(
6801 &self,
6802 mut fuzzer_url: &str,
6803 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6804 ___deadline: zx::MonotonicInstant,
6805 ) -> Result<(), fidl::Error> {
6806 let _response =
6807 self.client.send_query::<RegistrarRegisterRequest, fidl::encoding::EmptyPayload>(
6808 (fuzzer_url, provider),
6809 0x1716ac38e74b2840,
6810 fidl::encoding::DynamicFlags::empty(),
6811 ___deadline,
6812 )?;
6813 Ok(_response)
6814 }
6815}
6816
6817#[cfg(target_os = "fuchsia")]
6818impl From<RegistrarSynchronousProxy> for zx::NullableHandle {
6819 fn from(value: RegistrarSynchronousProxy) -> Self {
6820 value.into_channel().into()
6821 }
6822}
6823
6824#[cfg(target_os = "fuchsia")]
6825impl From<fidl::Channel> for RegistrarSynchronousProxy {
6826 fn from(value: fidl::Channel) -> Self {
6827 Self::new(value)
6828 }
6829}
6830
6831#[cfg(target_os = "fuchsia")]
6832impl fidl::endpoints::FromClient for RegistrarSynchronousProxy {
6833 type Protocol = RegistrarMarker;
6834
6835 fn from_client(value: fidl::endpoints::ClientEnd<RegistrarMarker>) -> Self {
6836 Self::new(value.into_channel())
6837 }
6838}
6839
6840#[derive(Debug, Clone)]
6841pub struct RegistrarProxy {
6842 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6843}
6844
6845impl fidl::endpoints::Proxy for RegistrarProxy {
6846 type Protocol = RegistrarMarker;
6847
6848 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6849 Self::new(inner)
6850 }
6851
6852 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6853 self.client.into_channel().map_err(|client| Self { client })
6854 }
6855
6856 fn as_channel(&self) -> &::fidl::AsyncChannel {
6857 self.client.as_channel()
6858 }
6859}
6860
6861impl RegistrarProxy {
6862 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6864 let protocol_name = <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6865 Self { client: fidl::client::Client::new(channel, protocol_name) }
6866 }
6867
6868 pub fn take_event_stream(&self) -> RegistrarEventStream {
6874 RegistrarEventStream { event_receiver: self.client.take_event_receiver() }
6875 }
6876
6877 pub fn r#register(
6888 &self,
6889 mut fuzzer_url: &str,
6890 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6891 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
6892 RegistrarProxyInterface::r#register(self, fuzzer_url, provider)
6893 }
6894}
6895
6896impl RegistrarProxyInterface for RegistrarProxy {
6897 type RegisterResponseFut =
6898 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
6899 fn r#register(
6900 &self,
6901 mut fuzzer_url: &str,
6902 mut provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
6903 ) -> Self::RegisterResponseFut {
6904 fn _decode(
6905 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6906 ) -> Result<(), fidl::Error> {
6907 let _response = fidl::client::decode_transaction_body::<
6908 fidl::encoding::EmptyPayload,
6909 fidl::encoding::DefaultFuchsiaResourceDialect,
6910 0x1716ac38e74b2840,
6911 >(_buf?)?;
6912 Ok(_response)
6913 }
6914 self.client.send_query_and_decode::<RegistrarRegisterRequest, ()>(
6915 (fuzzer_url, provider),
6916 0x1716ac38e74b2840,
6917 fidl::encoding::DynamicFlags::empty(),
6918 _decode,
6919 )
6920 }
6921}
6922
6923pub struct RegistrarEventStream {
6924 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6925}
6926
6927impl std::marker::Unpin for RegistrarEventStream {}
6928
6929impl futures::stream::FusedStream for RegistrarEventStream {
6930 fn is_terminated(&self) -> bool {
6931 self.event_receiver.is_terminated()
6932 }
6933}
6934
6935impl futures::Stream for RegistrarEventStream {
6936 type Item = Result<RegistrarEvent, fidl::Error>;
6937
6938 fn poll_next(
6939 mut self: std::pin::Pin<&mut Self>,
6940 cx: &mut std::task::Context<'_>,
6941 ) -> std::task::Poll<Option<Self::Item>> {
6942 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6943 &mut self.event_receiver,
6944 cx
6945 )?) {
6946 Some(buf) => std::task::Poll::Ready(Some(RegistrarEvent::decode(buf))),
6947 None => std::task::Poll::Ready(None),
6948 }
6949 }
6950}
6951
6952#[derive(Debug)]
6953pub enum RegistrarEvent {}
6954
6955impl RegistrarEvent {
6956 fn decode(
6958 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6959 ) -> Result<RegistrarEvent, fidl::Error> {
6960 let (bytes, _handles) = buf.split_mut();
6961 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6962 debug_assert_eq!(tx_header.tx_id, 0);
6963 match tx_header.ordinal {
6964 _ => Err(fidl::Error::UnknownOrdinal {
6965 ordinal: tx_header.ordinal,
6966 protocol_name: <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6967 }),
6968 }
6969 }
6970}
6971
6972pub struct RegistrarRequestStream {
6974 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6975 is_terminated: bool,
6976}
6977
6978impl std::marker::Unpin for RegistrarRequestStream {}
6979
6980impl futures::stream::FusedStream for RegistrarRequestStream {
6981 fn is_terminated(&self) -> bool {
6982 self.is_terminated
6983 }
6984}
6985
6986impl fidl::endpoints::RequestStream for RegistrarRequestStream {
6987 type Protocol = RegistrarMarker;
6988 type ControlHandle = RegistrarControlHandle;
6989
6990 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6991 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6992 }
6993
6994 fn control_handle(&self) -> Self::ControlHandle {
6995 RegistrarControlHandle { inner: self.inner.clone() }
6996 }
6997
6998 fn into_inner(
6999 self,
7000 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7001 {
7002 (self.inner, self.is_terminated)
7003 }
7004
7005 fn from_inner(
7006 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7007 is_terminated: bool,
7008 ) -> Self {
7009 Self { inner, is_terminated }
7010 }
7011}
7012
7013impl futures::Stream for RegistrarRequestStream {
7014 type Item = Result<RegistrarRequest, fidl::Error>;
7015
7016 fn poll_next(
7017 mut self: std::pin::Pin<&mut Self>,
7018 cx: &mut std::task::Context<'_>,
7019 ) -> std::task::Poll<Option<Self::Item>> {
7020 let this = &mut *self;
7021 if this.inner.check_shutdown(cx) {
7022 this.is_terminated = true;
7023 return std::task::Poll::Ready(None);
7024 }
7025 if this.is_terminated {
7026 panic!("polled RegistrarRequestStream after completion");
7027 }
7028 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7029 |bytes, handles| {
7030 match this.inner.channel().read_etc(cx, bytes, handles) {
7031 std::task::Poll::Ready(Ok(())) => {}
7032 std::task::Poll::Pending => return std::task::Poll::Pending,
7033 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7034 this.is_terminated = true;
7035 return std::task::Poll::Ready(None);
7036 }
7037 std::task::Poll::Ready(Err(e)) => {
7038 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7039 e.into(),
7040 ))));
7041 }
7042 }
7043
7044 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7046
7047 std::task::Poll::Ready(Some(match header.ordinal {
7048 0x1716ac38e74b2840 => {
7049 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7050 let mut req = fidl::new_empty!(
7051 RegistrarRegisterRequest,
7052 fidl::encoding::DefaultFuchsiaResourceDialect
7053 );
7054 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistrarRegisterRequest>(&header, _body_bytes, handles, &mut req)?;
7055 let control_handle = RegistrarControlHandle { inner: this.inner.clone() };
7056 Ok(RegistrarRequest::Register {
7057 fuzzer_url: req.fuzzer_url,
7058 provider: req.provider,
7059
7060 responder: RegistrarRegisterResponder {
7061 control_handle: std::mem::ManuallyDrop::new(control_handle),
7062 tx_id: header.tx_id,
7063 },
7064 })
7065 }
7066 _ => Err(fidl::Error::UnknownOrdinal {
7067 ordinal: header.ordinal,
7068 protocol_name:
7069 <RegistrarMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7070 }),
7071 }))
7072 },
7073 )
7074 }
7075}
7076
7077#[derive(Debug)]
7082pub enum RegistrarRequest {
7083 Register {
7094 fuzzer_url: String,
7095 provider: fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7096 responder: RegistrarRegisterResponder,
7097 },
7098}
7099
7100impl RegistrarRequest {
7101 #[allow(irrefutable_let_patterns)]
7102 pub fn into_register(
7103 self,
7104 ) -> Option<(
7105 String,
7106 fidl::endpoints::ClientEnd<ControllerProviderMarker>,
7107 RegistrarRegisterResponder,
7108 )> {
7109 if let RegistrarRequest::Register { fuzzer_url, provider, responder } = self {
7110 Some((fuzzer_url, provider, responder))
7111 } else {
7112 None
7113 }
7114 }
7115
7116 pub fn method_name(&self) -> &'static str {
7118 match *self {
7119 RegistrarRequest::Register { .. } => "register",
7120 }
7121 }
7122}
7123
7124#[derive(Debug, Clone)]
7125pub struct RegistrarControlHandle {
7126 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7127}
7128
7129impl fidl::endpoints::ControlHandle for RegistrarControlHandle {
7130 fn shutdown(&self) {
7131 self.inner.shutdown()
7132 }
7133
7134 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7135 self.inner.shutdown_with_epitaph(status)
7136 }
7137
7138 fn is_closed(&self) -> bool {
7139 self.inner.channel().is_closed()
7140 }
7141 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7142 self.inner.channel().on_closed()
7143 }
7144
7145 #[cfg(target_os = "fuchsia")]
7146 fn signal_peer(
7147 &self,
7148 clear_mask: zx::Signals,
7149 set_mask: zx::Signals,
7150 ) -> Result<(), zx_status::Status> {
7151 use fidl::Peered;
7152 self.inner.channel().signal_peer(clear_mask, set_mask)
7153 }
7154}
7155
7156impl RegistrarControlHandle {}
7157
7158#[must_use = "FIDL methods require a response to be sent"]
7159#[derive(Debug)]
7160pub struct RegistrarRegisterResponder {
7161 control_handle: std::mem::ManuallyDrop<RegistrarControlHandle>,
7162 tx_id: u32,
7163}
7164
7165impl std::ops::Drop for RegistrarRegisterResponder {
7169 fn drop(&mut self) {
7170 self.control_handle.shutdown();
7171 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7173 }
7174}
7175
7176impl fidl::endpoints::Responder for RegistrarRegisterResponder {
7177 type ControlHandle = RegistrarControlHandle;
7178
7179 fn control_handle(&self) -> &RegistrarControlHandle {
7180 &self.control_handle
7181 }
7182
7183 fn drop_without_shutdown(mut self) {
7184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7186 std::mem::forget(self);
7188 }
7189}
7190
7191impl RegistrarRegisterResponder {
7192 pub fn send(self) -> Result<(), fidl::Error> {
7196 let _result = self.send_raw();
7197 if _result.is_err() {
7198 self.control_handle.shutdown();
7199 }
7200 self.drop_without_shutdown();
7201 _result
7202 }
7203
7204 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
7206 let _result = self.send_raw();
7207 self.drop_without_shutdown();
7208 _result
7209 }
7210
7211 fn send_raw(&self) -> Result<(), fidl::Error> {
7212 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
7213 (),
7214 self.tx_id,
7215 0x1716ac38e74b2840,
7216 fidl::encoding::DynamicFlags::empty(),
7217 )
7218 }
7219}
7220
7221#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7222pub struct RegistryMarker;
7223
7224impl fidl::endpoints::ProtocolMarker for RegistryMarker {
7225 type Proxy = RegistryProxy;
7226 type RequestStream = RegistryRequestStream;
7227 #[cfg(target_os = "fuchsia")]
7228 type SynchronousProxy = RegistrySynchronousProxy;
7229
7230 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.Registry";
7231}
7232impl fidl::endpoints::DiscoverableProtocolMarker for RegistryMarker {}
7233pub type RegistryConnectResult = Result<(), i32>;
7234pub type RegistryDisconnectResult = Result<(), i32>;
7235
7236pub trait RegistryProxyInterface: Send + Sync {
7237 type ConnectResponseFut: std::future::Future<Output = Result<RegistryConnectResult, fidl::Error>>
7238 + Send;
7239 fn r#connect(
7240 &self,
7241 fuzzer_url: &str,
7242 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7243 timeout: i64,
7244 ) -> Self::ConnectResponseFut;
7245 type DisconnectResponseFut: std::future::Future<Output = Result<RegistryDisconnectResult, fidl::Error>>
7246 + Send;
7247 fn r#disconnect(&self, fuzzer_url: &str) -> Self::DisconnectResponseFut;
7248}
7249#[derive(Debug)]
7250#[cfg(target_os = "fuchsia")]
7251pub struct RegistrySynchronousProxy {
7252 client: fidl::client::sync::Client,
7253}
7254
7255#[cfg(target_os = "fuchsia")]
7256impl fidl::endpoints::SynchronousProxy for RegistrySynchronousProxy {
7257 type Proxy = RegistryProxy;
7258 type Protocol = RegistryMarker;
7259
7260 fn from_channel(inner: fidl::Channel) -> Self {
7261 Self::new(inner)
7262 }
7263
7264 fn into_channel(self) -> fidl::Channel {
7265 self.client.into_channel()
7266 }
7267
7268 fn as_channel(&self) -> &fidl::Channel {
7269 self.client.as_channel()
7270 }
7271}
7272
7273#[cfg(target_os = "fuchsia")]
7274impl RegistrySynchronousProxy {
7275 pub fn new(channel: fidl::Channel) -> Self {
7276 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7277 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7278 }
7279
7280 pub fn into_channel(self) -> fidl::Channel {
7281 self.client.into_channel()
7282 }
7283
7284 pub fn wait_for_event(
7287 &self,
7288 deadline: zx::MonotonicInstant,
7289 ) -> Result<RegistryEvent, fidl::Error> {
7290 RegistryEvent::decode(self.client.wait_for_event(deadline)?)
7291 }
7292
7293 pub fn r#connect(
7309 &self,
7310 mut fuzzer_url: &str,
7311 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7312 mut timeout: i64,
7313 ___deadline: zx::MonotonicInstant,
7314 ) -> Result<RegistryConnectResult, fidl::Error> {
7315 let _response = self.client.send_query::<
7316 RegistryConnectRequest,
7317 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7318 >(
7319 (fuzzer_url, controller, timeout,),
7320 0x5128cb31967a446f,
7321 fidl::encoding::DynamicFlags::empty(),
7322 ___deadline,
7323 )?;
7324 Ok(_response.map(|x| x))
7325 }
7326
7327 pub fn r#disconnect(
7334 &self,
7335 mut fuzzer_url: &str,
7336 ___deadline: zx::MonotonicInstant,
7337 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7338 let _response = self.client.send_query::<
7339 RegistryDisconnectRequest,
7340 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7341 >(
7342 (fuzzer_url,),
7343 0x7bb4b7591146d4cb,
7344 fidl::encoding::DynamicFlags::empty(),
7345 ___deadline,
7346 )?;
7347 Ok(_response.map(|x| x))
7348 }
7349}
7350
7351#[cfg(target_os = "fuchsia")]
7352impl From<RegistrySynchronousProxy> for zx::NullableHandle {
7353 fn from(value: RegistrySynchronousProxy) -> Self {
7354 value.into_channel().into()
7355 }
7356}
7357
7358#[cfg(target_os = "fuchsia")]
7359impl From<fidl::Channel> for RegistrySynchronousProxy {
7360 fn from(value: fidl::Channel) -> Self {
7361 Self::new(value)
7362 }
7363}
7364
7365#[cfg(target_os = "fuchsia")]
7366impl fidl::endpoints::FromClient for RegistrySynchronousProxy {
7367 type Protocol = RegistryMarker;
7368
7369 fn from_client(value: fidl::endpoints::ClientEnd<RegistryMarker>) -> Self {
7370 Self::new(value.into_channel())
7371 }
7372}
7373
7374#[derive(Debug, Clone)]
7375pub struct RegistryProxy {
7376 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7377}
7378
7379impl fidl::endpoints::Proxy for RegistryProxy {
7380 type Protocol = RegistryMarker;
7381
7382 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7383 Self::new(inner)
7384 }
7385
7386 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7387 self.client.into_channel().map_err(|client| Self { client })
7388 }
7389
7390 fn as_channel(&self) -> &::fidl::AsyncChannel {
7391 self.client.as_channel()
7392 }
7393}
7394
7395impl RegistryProxy {
7396 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7398 let protocol_name = <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7399 Self { client: fidl::client::Client::new(channel, protocol_name) }
7400 }
7401
7402 pub fn take_event_stream(&self) -> RegistryEventStream {
7408 RegistryEventStream { event_receiver: self.client.take_event_receiver() }
7409 }
7410
7411 pub fn r#connect(
7427 &self,
7428 mut fuzzer_url: &str,
7429 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7430 mut timeout: i64,
7431 ) -> fidl::client::QueryResponseFut<
7432 RegistryConnectResult,
7433 fidl::encoding::DefaultFuchsiaResourceDialect,
7434 > {
7435 RegistryProxyInterface::r#connect(self, fuzzer_url, controller, timeout)
7436 }
7437
7438 pub fn r#disconnect(
7445 &self,
7446 mut fuzzer_url: &str,
7447 ) -> fidl::client::QueryResponseFut<
7448 RegistryDisconnectResult,
7449 fidl::encoding::DefaultFuchsiaResourceDialect,
7450 > {
7451 RegistryProxyInterface::r#disconnect(self, fuzzer_url)
7452 }
7453}
7454
7455impl RegistryProxyInterface for RegistryProxy {
7456 type ConnectResponseFut = fidl::client::QueryResponseFut<
7457 RegistryConnectResult,
7458 fidl::encoding::DefaultFuchsiaResourceDialect,
7459 >;
7460 fn r#connect(
7461 &self,
7462 mut fuzzer_url: &str,
7463 mut controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7464 mut timeout: i64,
7465 ) -> Self::ConnectResponseFut {
7466 fn _decode(
7467 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7468 ) -> Result<RegistryConnectResult, fidl::Error> {
7469 let _response = fidl::client::decode_transaction_body::<
7470 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7471 fidl::encoding::DefaultFuchsiaResourceDialect,
7472 0x5128cb31967a446f,
7473 >(_buf?)?;
7474 Ok(_response.map(|x| x))
7475 }
7476 self.client.send_query_and_decode::<RegistryConnectRequest, RegistryConnectResult>(
7477 (fuzzer_url, controller, timeout),
7478 0x5128cb31967a446f,
7479 fidl::encoding::DynamicFlags::empty(),
7480 _decode,
7481 )
7482 }
7483
7484 type DisconnectResponseFut = fidl::client::QueryResponseFut<
7485 RegistryDisconnectResult,
7486 fidl::encoding::DefaultFuchsiaResourceDialect,
7487 >;
7488 fn r#disconnect(&self, mut fuzzer_url: &str) -> Self::DisconnectResponseFut {
7489 fn _decode(
7490 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7491 ) -> Result<RegistryDisconnectResult, fidl::Error> {
7492 let _response = fidl::client::decode_transaction_body::<
7493 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
7494 fidl::encoding::DefaultFuchsiaResourceDialect,
7495 0x7bb4b7591146d4cb,
7496 >(_buf?)?;
7497 Ok(_response.map(|x| x))
7498 }
7499 self.client.send_query_and_decode::<RegistryDisconnectRequest, RegistryDisconnectResult>(
7500 (fuzzer_url,),
7501 0x7bb4b7591146d4cb,
7502 fidl::encoding::DynamicFlags::empty(),
7503 _decode,
7504 )
7505 }
7506}
7507
7508pub struct RegistryEventStream {
7509 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7510}
7511
7512impl std::marker::Unpin for RegistryEventStream {}
7513
7514impl futures::stream::FusedStream for RegistryEventStream {
7515 fn is_terminated(&self) -> bool {
7516 self.event_receiver.is_terminated()
7517 }
7518}
7519
7520impl futures::Stream for RegistryEventStream {
7521 type Item = Result<RegistryEvent, fidl::Error>;
7522
7523 fn poll_next(
7524 mut self: std::pin::Pin<&mut Self>,
7525 cx: &mut std::task::Context<'_>,
7526 ) -> std::task::Poll<Option<Self::Item>> {
7527 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7528 &mut self.event_receiver,
7529 cx
7530 )?) {
7531 Some(buf) => std::task::Poll::Ready(Some(RegistryEvent::decode(buf))),
7532 None => std::task::Poll::Ready(None),
7533 }
7534 }
7535}
7536
7537#[derive(Debug)]
7538pub enum RegistryEvent {}
7539
7540impl RegistryEvent {
7541 fn decode(
7543 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7544 ) -> Result<RegistryEvent, fidl::Error> {
7545 let (bytes, _handles) = buf.split_mut();
7546 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7547 debug_assert_eq!(tx_header.tx_id, 0);
7548 match tx_header.ordinal {
7549 _ => Err(fidl::Error::UnknownOrdinal {
7550 ordinal: tx_header.ordinal,
7551 protocol_name: <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7552 }),
7553 }
7554 }
7555}
7556
7557pub struct RegistryRequestStream {
7559 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7560 is_terminated: bool,
7561}
7562
7563impl std::marker::Unpin for RegistryRequestStream {}
7564
7565impl futures::stream::FusedStream for RegistryRequestStream {
7566 fn is_terminated(&self) -> bool {
7567 self.is_terminated
7568 }
7569}
7570
7571impl fidl::endpoints::RequestStream for RegistryRequestStream {
7572 type Protocol = RegistryMarker;
7573 type ControlHandle = RegistryControlHandle;
7574
7575 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7576 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7577 }
7578
7579 fn control_handle(&self) -> Self::ControlHandle {
7580 RegistryControlHandle { inner: self.inner.clone() }
7581 }
7582
7583 fn into_inner(
7584 self,
7585 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7586 {
7587 (self.inner, self.is_terminated)
7588 }
7589
7590 fn from_inner(
7591 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7592 is_terminated: bool,
7593 ) -> Self {
7594 Self { inner, is_terminated }
7595 }
7596}
7597
7598impl futures::Stream for RegistryRequestStream {
7599 type Item = Result<RegistryRequest, fidl::Error>;
7600
7601 fn poll_next(
7602 mut self: std::pin::Pin<&mut Self>,
7603 cx: &mut std::task::Context<'_>,
7604 ) -> std::task::Poll<Option<Self::Item>> {
7605 let this = &mut *self;
7606 if this.inner.check_shutdown(cx) {
7607 this.is_terminated = true;
7608 return std::task::Poll::Ready(None);
7609 }
7610 if this.is_terminated {
7611 panic!("polled RegistryRequestStream after completion");
7612 }
7613 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7614 |bytes, handles| {
7615 match this.inner.channel().read_etc(cx, bytes, handles) {
7616 std::task::Poll::Ready(Ok(())) => {}
7617 std::task::Poll::Pending => return std::task::Poll::Pending,
7618 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7619 this.is_terminated = true;
7620 return std::task::Poll::Ready(None);
7621 }
7622 std::task::Poll::Ready(Err(e)) => {
7623 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7624 e.into(),
7625 ))));
7626 }
7627 }
7628
7629 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7631
7632 std::task::Poll::Ready(Some(match header.ordinal {
7633 0x5128cb31967a446f => {
7634 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7635 let mut req = fidl::new_empty!(
7636 RegistryConnectRequest,
7637 fidl::encoding::DefaultFuchsiaResourceDialect
7638 );
7639 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryConnectRequest>(&header, _body_bytes, handles, &mut req)?;
7640 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7641 Ok(RegistryRequest::Connect {
7642 fuzzer_url: req.fuzzer_url,
7643 controller: req.controller,
7644 timeout: req.timeout,
7645
7646 responder: RegistryConnectResponder {
7647 control_handle: std::mem::ManuallyDrop::new(control_handle),
7648 tx_id: header.tx_id,
7649 },
7650 })
7651 }
7652 0x7bb4b7591146d4cb => {
7653 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7654 let mut req = fidl::new_empty!(
7655 RegistryDisconnectRequest,
7656 fidl::encoding::DefaultFuchsiaResourceDialect
7657 );
7658 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<RegistryDisconnectRequest>(&header, _body_bytes, handles, &mut req)?;
7659 let control_handle = RegistryControlHandle { inner: this.inner.clone() };
7660 Ok(RegistryRequest::Disconnect {
7661 fuzzer_url: req.fuzzer_url,
7662
7663 responder: RegistryDisconnectResponder {
7664 control_handle: std::mem::ManuallyDrop::new(control_handle),
7665 tx_id: header.tx_id,
7666 },
7667 })
7668 }
7669 _ => Err(fidl::Error::UnknownOrdinal {
7670 ordinal: header.ordinal,
7671 protocol_name:
7672 <RegistryMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7673 }),
7674 }))
7675 },
7676 )
7677 }
7678}
7679
7680#[derive(Debug)]
7684pub enum RegistryRequest {
7685 Connect {
7701 fuzzer_url: String,
7702 controller: fidl::endpoints::ServerEnd<ControllerMarker>,
7703 timeout: i64,
7704 responder: RegistryConnectResponder,
7705 },
7706 Disconnect { fuzzer_url: String, responder: RegistryDisconnectResponder },
7713}
7714
7715impl RegistryRequest {
7716 #[allow(irrefutable_let_patterns)]
7717 pub fn into_connect(
7718 self,
7719 ) -> Option<(String, fidl::endpoints::ServerEnd<ControllerMarker>, i64, RegistryConnectResponder)>
7720 {
7721 if let RegistryRequest::Connect { fuzzer_url, controller, timeout, responder } = self {
7722 Some((fuzzer_url, controller, timeout, responder))
7723 } else {
7724 None
7725 }
7726 }
7727
7728 #[allow(irrefutable_let_patterns)]
7729 pub fn into_disconnect(self) -> Option<(String, RegistryDisconnectResponder)> {
7730 if let RegistryRequest::Disconnect { fuzzer_url, responder } = self {
7731 Some((fuzzer_url, responder))
7732 } else {
7733 None
7734 }
7735 }
7736
7737 pub fn method_name(&self) -> &'static str {
7739 match *self {
7740 RegistryRequest::Connect { .. } => "connect",
7741 RegistryRequest::Disconnect { .. } => "disconnect",
7742 }
7743 }
7744}
7745
7746#[derive(Debug, Clone)]
7747pub struct RegistryControlHandle {
7748 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7749}
7750
7751impl fidl::endpoints::ControlHandle for RegistryControlHandle {
7752 fn shutdown(&self) {
7753 self.inner.shutdown()
7754 }
7755
7756 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7757 self.inner.shutdown_with_epitaph(status)
7758 }
7759
7760 fn is_closed(&self) -> bool {
7761 self.inner.channel().is_closed()
7762 }
7763 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7764 self.inner.channel().on_closed()
7765 }
7766
7767 #[cfg(target_os = "fuchsia")]
7768 fn signal_peer(
7769 &self,
7770 clear_mask: zx::Signals,
7771 set_mask: zx::Signals,
7772 ) -> Result<(), zx_status::Status> {
7773 use fidl::Peered;
7774 self.inner.channel().signal_peer(clear_mask, set_mask)
7775 }
7776}
7777
7778impl RegistryControlHandle {}
7779
7780#[must_use = "FIDL methods require a response to be sent"]
7781#[derive(Debug)]
7782pub struct RegistryConnectResponder {
7783 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7784 tx_id: u32,
7785}
7786
7787impl std::ops::Drop for RegistryConnectResponder {
7791 fn drop(&mut self) {
7792 self.control_handle.shutdown();
7793 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7795 }
7796}
7797
7798impl fidl::endpoints::Responder for RegistryConnectResponder {
7799 type ControlHandle = RegistryControlHandle;
7800
7801 fn control_handle(&self) -> &RegistryControlHandle {
7802 &self.control_handle
7803 }
7804
7805 fn drop_without_shutdown(mut self) {
7806 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7808 std::mem::forget(self);
7810 }
7811}
7812
7813impl RegistryConnectResponder {
7814 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7818 let _result = self.send_raw(result);
7819 if _result.is_err() {
7820 self.control_handle.shutdown();
7821 }
7822 self.drop_without_shutdown();
7823 _result
7824 }
7825
7826 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7828 let _result = self.send_raw(result);
7829 self.drop_without_shutdown();
7830 _result
7831 }
7832
7833 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7834 self.control_handle
7835 .inner
7836 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7837 result,
7838 self.tx_id,
7839 0x5128cb31967a446f,
7840 fidl::encoding::DynamicFlags::empty(),
7841 )
7842 }
7843}
7844
7845#[must_use = "FIDL methods require a response to be sent"]
7846#[derive(Debug)]
7847pub struct RegistryDisconnectResponder {
7848 control_handle: std::mem::ManuallyDrop<RegistryControlHandle>,
7849 tx_id: u32,
7850}
7851
7852impl std::ops::Drop for RegistryDisconnectResponder {
7856 fn drop(&mut self) {
7857 self.control_handle.shutdown();
7858 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7860 }
7861}
7862
7863impl fidl::endpoints::Responder for RegistryDisconnectResponder {
7864 type ControlHandle = RegistryControlHandle;
7865
7866 fn control_handle(&self) -> &RegistryControlHandle {
7867 &self.control_handle
7868 }
7869
7870 fn drop_without_shutdown(mut self) {
7871 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7873 std::mem::forget(self);
7875 }
7876}
7877
7878impl RegistryDisconnectResponder {
7879 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7883 let _result = self.send_raw(result);
7884 if _result.is_err() {
7885 self.control_handle.shutdown();
7886 }
7887 self.drop_without_shutdown();
7888 _result
7889 }
7890
7891 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7893 let _result = self.send_raw(result);
7894 self.drop_without_shutdown();
7895 _result
7896 }
7897
7898 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
7899 self.control_handle
7900 .inner
7901 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
7902 result,
7903 self.tx_id,
7904 0x7bb4b7591146d4cb,
7905 fidl::encoding::DynamicFlags::empty(),
7906 )
7907 }
7908}
7909
7910#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7911pub struct TargetAdapterMarker;
7912
7913impl fidl::endpoints::ProtocolMarker for TargetAdapterMarker {
7914 type Proxy = TargetAdapterProxy;
7915 type RequestStream = TargetAdapterRequestStream;
7916 #[cfg(target_os = "fuchsia")]
7917 type SynchronousProxy = TargetAdapterSynchronousProxy;
7918
7919 const DEBUG_NAME: &'static str = "fuchsia.fuzzer.TargetAdapter";
7920}
7921impl fidl::endpoints::DiscoverableProtocolMarker for TargetAdapterMarker {}
7922
7923pub trait TargetAdapterProxyInterface: Send + Sync {
7924 type GetParametersResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>>
7925 + Send;
7926 fn r#get_parameters(&self) -> Self::GetParametersResponseFut;
7927 type ConnectResponseFut: std::future::Future<Output = Result<(), fidl::Error>> + Send;
7928 fn r#connect(
7929 &self,
7930 eventpair: fidl::EventPair,
7931 test_input: fidl::Vmo,
7932 ) -> Self::ConnectResponseFut;
7933}
7934#[derive(Debug)]
7935#[cfg(target_os = "fuchsia")]
7936pub struct TargetAdapterSynchronousProxy {
7937 client: fidl::client::sync::Client,
7938}
7939
7940#[cfg(target_os = "fuchsia")]
7941impl fidl::endpoints::SynchronousProxy for TargetAdapterSynchronousProxy {
7942 type Proxy = TargetAdapterProxy;
7943 type Protocol = TargetAdapterMarker;
7944
7945 fn from_channel(inner: fidl::Channel) -> Self {
7946 Self::new(inner)
7947 }
7948
7949 fn into_channel(self) -> fidl::Channel {
7950 self.client.into_channel()
7951 }
7952
7953 fn as_channel(&self) -> &fidl::Channel {
7954 self.client.as_channel()
7955 }
7956}
7957
7958#[cfg(target_os = "fuchsia")]
7959impl TargetAdapterSynchronousProxy {
7960 pub fn new(channel: fidl::Channel) -> Self {
7961 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7962 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7963 }
7964
7965 pub fn into_channel(self) -> fidl::Channel {
7966 self.client.into_channel()
7967 }
7968
7969 pub fn wait_for_event(
7972 &self,
7973 deadline: zx::MonotonicInstant,
7974 ) -> Result<TargetAdapterEvent, fidl::Error> {
7975 TargetAdapterEvent::decode(self.client.wait_for_event(deadline)?)
7976 }
7977
7978 pub fn r#get_parameters(
7989 &self,
7990 ___deadline: zx::MonotonicInstant,
7991 ) -> Result<Vec<String>, fidl::Error> {
7992 let _response = self
7993 .client
7994 .send_query::<fidl::encoding::EmptyPayload, TargetAdapterGetParametersResponse>(
7995 (),
7996 0x5c7e40a47f753e3e,
7997 fidl::encoding::DynamicFlags::empty(),
7998 ___deadline,
7999 )?;
8000 Ok(_response.parameters)
8001 }
8002
8003 pub fn r#connect(
8012 &self,
8013 mut eventpair: fidl::EventPair,
8014 mut test_input: fidl::Vmo,
8015 ___deadline: zx::MonotonicInstant,
8016 ) -> Result<(), fidl::Error> {
8017 let _response =
8018 self.client.send_query::<TargetAdapterConnectRequest, fidl::encoding::EmptyPayload>(
8019 (eventpair, test_input),
8020 0x7ea603a119866618,
8021 fidl::encoding::DynamicFlags::empty(),
8022 ___deadline,
8023 )?;
8024 Ok(_response)
8025 }
8026}
8027
8028#[cfg(target_os = "fuchsia")]
8029impl From<TargetAdapterSynchronousProxy> for zx::NullableHandle {
8030 fn from(value: TargetAdapterSynchronousProxy) -> Self {
8031 value.into_channel().into()
8032 }
8033}
8034
8035#[cfg(target_os = "fuchsia")]
8036impl From<fidl::Channel> for TargetAdapterSynchronousProxy {
8037 fn from(value: fidl::Channel) -> Self {
8038 Self::new(value)
8039 }
8040}
8041
8042#[cfg(target_os = "fuchsia")]
8043impl fidl::endpoints::FromClient for TargetAdapterSynchronousProxy {
8044 type Protocol = TargetAdapterMarker;
8045
8046 fn from_client(value: fidl::endpoints::ClientEnd<TargetAdapterMarker>) -> Self {
8047 Self::new(value.into_channel())
8048 }
8049}
8050
8051#[derive(Debug, Clone)]
8052pub struct TargetAdapterProxy {
8053 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
8054}
8055
8056impl fidl::endpoints::Proxy for TargetAdapterProxy {
8057 type Protocol = TargetAdapterMarker;
8058
8059 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
8060 Self::new(inner)
8061 }
8062
8063 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
8064 self.client.into_channel().map_err(|client| Self { client })
8065 }
8066
8067 fn as_channel(&self) -> &::fidl::AsyncChannel {
8068 self.client.as_channel()
8069 }
8070}
8071
8072impl TargetAdapterProxy {
8073 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
8075 let protocol_name = <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
8076 Self { client: fidl::client::Client::new(channel, protocol_name) }
8077 }
8078
8079 pub fn take_event_stream(&self) -> TargetAdapterEventStream {
8085 TargetAdapterEventStream { event_receiver: self.client.take_event_receiver() }
8086 }
8087
8088 pub fn r#get_parameters(
8099 &self,
8100 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
8101 {
8102 TargetAdapterProxyInterface::r#get_parameters(self)
8103 }
8104
8105 pub fn r#connect(
8114 &self,
8115 mut eventpair: fidl::EventPair,
8116 mut test_input: fidl::Vmo,
8117 ) -> fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect> {
8118 TargetAdapterProxyInterface::r#connect(self, eventpair, test_input)
8119 }
8120}
8121
8122impl TargetAdapterProxyInterface for TargetAdapterProxy {
8123 type GetParametersResponseFut =
8124 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
8125 fn r#get_parameters(&self) -> Self::GetParametersResponseFut {
8126 fn _decode(
8127 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8128 ) -> Result<Vec<String>, fidl::Error> {
8129 let _response = fidl::client::decode_transaction_body::<
8130 TargetAdapterGetParametersResponse,
8131 fidl::encoding::DefaultFuchsiaResourceDialect,
8132 0x5c7e40a47f753e3e,
8133 >(_buf?)?;
8134 Ok(_response.parameters)
8135 }
8136 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, Vec<String>>(
8137 (),
8138 0x5c7e40a47f753e3e,
8139 fidl::encoding::DynamicFlags::empty(),
8140 _decode,
8141 )
8142 }
8143
8144 type ConnectResponseFut =
8145 fidl::client::QueryResponseFut<(), fidl::encoding::DefaultFuchsiaResourceDialect>;
8146 fn r#connect(
8147 &self,
8148 mut eventpair: fidl::EventPair,
8149 mut test_input: fidl::Vmo,
8150 ) -> Self::ConnectResponseFut {
8151 fn _decode(
8152 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
8153 ) -> Result<(), fidl::Error> {
8154 let _response = fidl::client::decode_transaction_body::<
8155 fidl::encoding::EmptyPayload,
8156 fidl::encoding::DefaultFuchsiaResourceDialect,
8157 0x7ea603a119866618,
8158 >(_buf?)?;
8159 Ok(_response)
8160 }
8161 self.client.send_query_and_decode::<TargetAdapterConnectRequest, ()>(
8162 (eventpair, test_input),
8163 0x7ea603a119866618,
8164 fidl::encoding::DynamicFlags::empty(),
8165 _decode,
8166 )
8167 }
8168}
8169
8170pub struct TargetAdapterEventStream {
8171 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
8172}
8173
8174impl std::marker::Unpin for TargetAdapterEventStream {}
8175
8176impl futures::stream::FusedStream for TargetAdapterEventStream {
8177 fn is_terminated(&self) -> bool {
8178 self.event_receiver.is_terminated()
8179 }
8180}
8181
8182impl futures::Stream for TargetAdapterEventStream {
8183 type Item = Result<TargetAdapterEvent, fidl::Error>;
8184
8185 fn poll_next(
8186 mut self: std::pin::Pin<&mut Self>,
8187 cx: &mut std::task::Context<'_>,
8188 ) -> std::task::Poll<Option<Self::Item>> {
8189 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
8190 &mut self.event_receiver,
8191 cx
8192 )?) {
8193 Some(buf) => std::task::Poll::Ready(Some(TargetAdapterEvent::decode(buf))),
8194 None => std::task::Poll::Ready(None),
8195 }
8196 }
8197}
8198
8199#[derive(Debug)]
8200pub enum TargetAdapterEvent {}
8201
8202impl TargetAdapterEvent {
8203 fn decode(
8205 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
8206 ) -> Result<TargetAdapterEvent, fidl::Error> {
8207 let (bytes, _handles) = buf.split_mut();
8208 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8209 debug_assert_eq!(tx_header.tx_id, 0);
8210 match tx_header.ordinal {
8211 _ => Err(fidl::Error::UnknownOrdinal {
8212 ordinal: tx_header.ordinal,
8213 protocol_name: <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8214 }),
8215 }
8216 }
8217}
8218
8219pub struct TargetAdapterRequestStream {
8221 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8222 is_terminated: bool,
8223}
8224
8225impl std::marker::Unpin for TargetAdapterRequestStream {}
8226
8227impl futures::stream::FusedStream for TargetAdapterRequestStream {
8228 fn is_terminated(&self) -> bool {
8229 self.is_terminated
8230 }
8231}
8232
8233impl fidl::endpoints::RequestStream for TargetAdapterRequestStream {
8234 type Protocol = TargetAdapterMarker;
8235 type ControlHandle = TargetAdapterControlHandle;
8236
8237 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
8238 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
8239 }
8240
8241 fn control_handle(&self) -> Self::ControlHandle {
8242 TargetAdapterControlHandle { inner: self.inner.clone() }
8243 }
8244
8245 fn into_inner(
8246 self,
8247 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
8248 {
8249 (self.inner, self.is_terminated)
8250 }
8251
8252 fn from_inner(
8253 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8254 is_terminated: bool,
8255 ) -> Self {
8256 Self { inner, is_terminated }
8257 }
8258}
8259
8260impl futures::Stream for TargetAdapterRequestStream {
8261 type Item = Result<TargetAdapterRequest, fidl::Error>;
8262
8263 fn poll_next(
8264 mut self: std::pin::Pin<&mut Self>,
8265 cx: &mut std::task::Context<'_>,
8266 ) -> std::task::Poll<Option<Self::Item>> {
8267 let this = &mut *self;
8268 if this.inner.check_shutdown(cx) {
8269 this.is_terminated = true;
8270 return std::task::Poll::Ready(None);
8271 }
8272 if this.is_terminated {
8273 panic!("polled TargetAdapterRequestStream after completion");
8274 }
8275 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
8276 |bytes, handles| {
8277 match this.inner.channel().read_etc(cx, bytes, handles) {
8278 std::task::Poll::Ready(Ok(())) => {}
8279 std::task::Poll::Pending => return std::task::Poll::Pending,
8280 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
8281 this.is_terminated = true;
8282 return std::task::Poll::Ready(None);
8283 }
8284 std::task::Poll::Ready(Err(e)) => {
8285 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
8286 e.into(),
8287 ))));
8288 }
8289 }
8290
8291 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
8293
8294 std::task::Poll::Ready(Some(match header.ordinal {
8295 0x5c7e40a47f753e3e => {
8296 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8297 let mut req = fidl::new_empty!(
8298 fidl::encoding::EmptyPayload,
8299 fidl::encoding::DefaultFuchsiaResourceDialect
8300 );
8301 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
8302 let control_handle =
8303 TargetAdapterControlHandle { inner: this.inner.clone() };
8304 Ok(TargetAdapterRequest::GetParameters {
8305 responder: TargetAdapterGetParametersResponder {
8306 control_handle: std::mem::ManuallyDrop::new(control_handle),
8307 tx_id: header.tx_id,
8308 },
8309 })
8310 }
8311 0x7ea603a119866618 => {
8312 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
8313 let mut req = fidl::new_empty!(
8314 TargetAdapterConnectRequest,
8315 fidl::encoding::DefaultFuchsiaResourceDialect
8316 );
8317 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<TargetAdapterConnectRequest>(&header, _body_bytes, handles, &mut req)?;
8318 let control_handle =
8319 TargetAdapterControlHandle { inner: this.inner.clone() };
8320 Ok(TargetAdapterRequest::Connect {
8321 eventpair: req.eventpair,
8322 test_input: req.test_input,
8323
8324 responder: TargetAdapterConnectResponder {
8325 control_handle: std::mem::ManuallyDrop::new(control_handle),
8326 tx_id: header.tx_id,
8327 },
8328 })
8329 }
8330 _ => Err(fidl::Error::UnknownOrdinal {
8331 ordinal: header.ordinal,
8332 protocol_name:
8333 <TargetAdapterMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
8334 }),
8335 }))
8336 },
8337 )
8338 }
8339}
8340
8341#[derive(Debug)]
8349pub enum TargetAdapterRequest {
8350 GetParameters { responder: TargetAdapterGetParametersResponder },
8361 Connect {
8370 eventpair: fidl::EventPair,
8371 test_input: fidl::Vmo,
8372 responder: TargetAdapterConnectResponder,
8373 },
8374}
8375
8376impl TargetAdapterRequest {
8377 #[allow(irrefutable_let_patterns)]
8378 pub fn into_get_parameters(self) -> Option<(TargetAdapterGetParametersResponder)> {
8379 if let TargetAdapterRequest::GetParameters { responder } = self {
8380 Some((responder))
8381 } else {
8382 None
8383 }
8384 }
8385
8386 #[allow(irrefutable_let_patterns)]
8387 pub fn into_connect(
8388 self,
8389 ) -> Option<(fidl::EventPair, fidl::Vmo, TargetAdapterConnectResponder)> {
8390 if let TargetAdapterRequest::Connect { eventpair, test_input, responder } = self {
8391 Some((eventpair, test_input, responder))
8392 } else {
8393 None
8394 }
8395 }
8396
8397 pub fn method_name(&self) -> &'static str {
8399 match *self {
8400 TargetAdapterRequest::GetParameters { .. } => "get_parameters",
8401 TargetAdapterRequest::Connect { .. } => "connect",
8402 }
8403 }
8404}
8405
8406#[derive(Debug, Clone)]
8407pub struct TargetAdapterControlHandle {
8408 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
8409}
8410
8411impl fidl::endpoints::ControlHandle for TargetAdapterControlHandle {
8412 fn shutdown(&self) {
8413 self.inner.shutdown()
8414 }
8415
8416 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
8417 self.inner.shutdown_with_epitaph(status)
8418 }
8419
8420 fn is_closed(&self) -> bool {
8421 self.inner.channel().is_closed()
8422 }
8423 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
8424 self.inner.channel().on_closed()
8425 }
8426
8427 #[cfg(target_os = "fuchsia")]
8428 fn signal_peer(
8429 &self,
8430 clear_mask: zx::Signals,
8431 set_mask: zx::Signals,
8432 ) -> Result<(), zx_status::Status> {
8433 use fidl::Peered;
8434 self.inner.channel().signal_peer(clear_mask, set_mask)
8435 }
8436}
8437
8438impl TargetAdapterControlHandle {}
8439
8440#[must_use = "FIDL methods require a response to be sent"]
8441#[derive(Debug)]
8442pub struct TargetAdapterGetParametersResponder {
8443 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8444 tx_id: u32,
8445}
8446
8447impl std::ops::Drop for TargetAdapterGetParametersResponder {
8451 fn drop(&mut self) {
8452 self.control_handle.shutdown();
8453 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8455 }
8456}
8457
8458impl fidl::endpoints::Responder for TargetAdapterGetParametersResponder {
8459 type ControlHandle = TargetAdapterControlHandle;
8460
8461 fn control_handle(&self) -> &TargetAdapterControlHandle {
8462 &self.control_handle
8463 }
8464
8465 fn drop_without_shutdown(mut self) {
8466 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8468 std::mem::forget(self);
8470 }
8471}
8472
8473impl TargetAdapterGetParametersResponder {
8474 pub fn send(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8478 let _result = self.send_raw(parameters);
8479 if _result.is_err() {
8480 self.control_handle.shutdown();
8481 }
8482 self.drop_without_shutdown();
8483 _result
8484 }
8485
8486 pub fn send_no_shutdown_on_err(self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8488 let _result = self.send_raw(parameters);
8489 self.drop_without_shutdown();
8490 _result
8491 }
8492
8493 fn send_raw(&self, mut parameters: &[String]) -> Result<(), fidl::Error> {
8494 self.control_handle.inner.send::<TargetAdapterGetParametersResponse>(
8495 (parameters,),
8496 self.tx_id,
8497 0x5c7e40a47f753e3e,
8498 fidl::encoding::DynamicFlags::empty(),
8499 )
8500 }
8501}
8502
8503#[must_use = "FIDL methods require a response to be sent"]
8504#[derive(Debug)]
8505pub struct TargetAdapterConnectResponder {
8506 control_handle: std::mem::ManuallyDrop<TargetAdapterControlHandle>,
8507 tx_id: u32,
8508}
8509
8510impl std::ops::Drop for TargetAdapterConnectResponder {
8514 fn drop(&mut self) {
8515 self.control_handle.shutdown();
8516 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8518 }
8519}
8520
8521impl fidl::endpoints::Responder for TargetAdapterConnectResponder {
8522 type ControlHandle = TargetAdapterControlHandle;
8523
8524 fn control_handle(&self) -> &TargetAdapterControlHandle {
8525 &self.control_handle
8526 }
8527
8528 fn drop_without_shutdown(mut self) {
8529 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8531 std::mem::forget(self);
8533 }
8534}
8535
8536impl TargetAdapterConnectResponder {
8537 pub fn send(self) -> Result<(), fidl::Error> {
8541 let _result = self.send_raw();
8542 if _result.is_err() {
8543 self.control_handle.shutdown();
8544 }
8545 self.drop_without_shutdown();
8546 _result
8547 }
8548
8549 pub fn send_no_shutdown_on_err(self) -> Result<(), fidl::Error> {
8551 let _result = self.send_raw();
8552 self.drop_without_shutdown();
8553 _result
8554 }
8555
8556 fn send_raw(&self) -> Result<(), fidl::Error> {
8557 self.control_handle.inner.send::<fidl::encoding::EmptyPayload>(
8558 (),
8559 self.tx_id,
8560 0x7ea603a119866618,
8561 fidl::encoding::DynamicFlags::empty(),
8562 )
8563 }
8564}
8565
8566mod internal {
8567 use super::*;
8568
8569 impl fidl::encoding::ResourceTypeMarker for ControllerAddMonitorRequest {
8570 type Borrowed<'a> = &'a mut Self;
8571 fn take_or_borrow<'a>(
8572 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8573 ) -> Self::Borrowed<'a> {
8574 value
8575 }
8576 }
8577
8578 unsafe impl fidl::encoding::TypeMarker for ControllerAddMonitorRequest {
8579 type Owned = Self;
8580
8581 #[inline(always)]
8582 fn inline_align(_context: fidl::encoding::Context) -> usize {
8583 4
8584 }
8585
8586 #[inline(always)]
8587 fn inline_size(_context: fidl::encoding::Context) -> usize {
8588 4
8589 }
8590 }
8591
8592 unsafe impl
8593 fidl::encoding::Encode<
8594 ControllerAddMonitorRequest,
8595 fidl::encoding::DefaultFuchsiaResourceDialect,
8596 > for &mut ControllerAddMonitorRequest
8597 {
8598 #[inline]
8599 unsafe fn encode(
8600 self,
8601 encoder: &mut fidl::encoding::Encoder<
8602 '_,
8603 fidl::encoding::DefaultFuchsiaResourceDialect,
8604 >,
8605 offset: usize,
8606 _depth: fidl::encoding::Depth,
8607 ) -> fidl::Result<()> {
8608 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8609 fidl::encoding::Encode::<ControllerAddMonitorRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8611 (
8612 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.monitor),
8613 ),
8614 encoder, offset, _depth
8615 )
8616 }
8617 }
8618 unsafe impl<
8619 T0: fidl::encoding::Encode<
8620 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8621 fidl::encoding::DefaultFuchsiaResourceDialect,
8622 >,
8623 >
8624 fidl::encoding::Encode<
8625 ControllerAddMonitorRequest,
8626 fidl::encoding::DefaultFuchsiaResourceDialect,
8627 > for (T0,)
8628 {
8629 #[inline]
8630 unsafe fn encode(
8631 self,
8632 encoder: &mut fidl::encoding::Encoder<
8633 '_,
8634 fidl::encoding::DefaultFuchsiaResourceDialect,
8635 >,
8636 offset: usize,
8637 depth: fidl::encoding::Depth,
8638 ) -> fidl::Result<()> {
8639 encoder.debug_check_bounds::<ControllerAddMonitorRequest>(offset);
8640 self.0.encode(encoder, offset + 0, depth)?;
8644 Ok(())
8645 }
8646 }
8647
8648 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8649 for ControllerAddMonitorRequest
8650 {
8651 #[inline(always)]
8652 fn new_empty() -> Self {
8653 Self {
8654 monitor: fidl::new_empty!(
8655 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8656 fidl::encoding::DefaultFuchsiaResourceDialect
8657 ),
8658 }
8659 }
8660
8661 #[inline]
8662 unsafe fn decode(
8663 &mut self,
8664 decoder: &mut fidl::encoding::Decoder<
8665 '_,
8666 fidl::encoding::DefaultFuchsiaResourceDialect,
8667 >,
8668 offset: usize,
8669 _depth: fidl::encoding::Depth,
8670 ) -> fidl::Result<()> {
8671 decoder.debug_check_bounds::<Self>(offset);
8672 fidl::decode!(
8674 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<MonitorMarker>>,
8675 fidl::encoding::DefaultFuchsiaResourceDialect,
8676 &mut self.monitor,
8677 decoder,
8678 offset + 0,
8679 _depth
8680 )?;
8681 Ok(())
8682 }
8683 }
8684
8685 impl fidl::encoding::ResourceTypeMarker for ControllerAddToCorpusRequest {
8686 type Borrowed<'a> = &'a mut Self;
8687 fn take_or_borrow<'a>(
8688 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8689 ) -> Self::Borrowed<'a> {
8690 value
8691 }
8692 }
8693
8694 unsafe impl fidl::encoding::TypeMarker for ControllerAddToCorpusRequest {
8695 type Owned = Self;
8696
8697 #[inline(always)]
8698 fn inline_align(_context: fidl::encoding::Context) -> usize {
8699 8
8700 }
8701
8702 #[inline(always)]
8703 fn inline_size(_context: fidl::encoding::Context) -> usize {
8704 24
8705 }
8706 }
8707
8708 unsafe impl
8709 fidl::encoding::Encode<
8710 ControllerAddToCorpusRequest,
8711 fidl::encoding::DefaultFuchsiaResourceDialect,
8712 > for &mut ControllerAddToCorpusRequest
8713 {
8714 #[inline]
8715 unsafe fn encode(
8716 self,
8717 encoder: &mut fidl::encoding::Encoder<
8718 '_,
8719 fidl::encoding::DefaultFuchsiaResourceDialect,
8720 >,
8721 offset: usize,
8722 _depth: fidl::encoding::Depth,
8723 ) -> fidl::Result<()> {
8724 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8725 fidl::encoding::Encode::<
8727 ControllerAddToCorpusRequest,
8728 fidl::encoding::DefaultFuchsiaResourceDialect,
8729 >::encode(
8730 (
8731 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
8732 <Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.input),
8733 ),
8734 encoder,
8735 offset,
8736 _depth,
8737 )
8738 }
8739 }
8740 unsafe impl<
8741 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
8742 T1: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>,
8743 >
8744 fidl::encoding::Encode<
8745 ControllerAddToCorpusRequest,
8746 fidl::encoding::DefaultFuchsiaResourceDialect,
8747 > for (T0, T1)
8748 {
8749 #[inline]
8750 unsafe fn encode(
8751 self,
8752 encoder: &mut fidl::encoding::Encoder<
8753 '_,
8754 fidl::encoding::DefaultFuchsiaResourceDialect,
8755 >,
8756 offset: usize,
8757 depth: fidl::encoding::Depth,
8758 ) -> fidl::Result<()> {
8759 encoder.debug_check_bounds::<ControllerAddToCorpusRequest>(offset);
8760 unsafe {
8763 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8764 (ptr as *mut u64).write_unaligned(0);
8765 }
8766 self.0.encode(encoder, offset + 0, depth)?;
8768 self.1.encode(encoder, offset + 8, depth)?;
8769 Ok(())
8770 }
8771 }
8772
8773 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8774 for ControllerAddToCorpusRequest
8775 {
8776 #[inline(always)]
8777 fn new_empty() -> Self {
8778 Self {
8779 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
8780 input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8781 }
8782 }
8783
8784 #[inline]
8785 unsafe fn decode(
8786 &mut self,
8787 decoder: &mut fidl::encoding::Decoder<
8788 '_,
8789 fidl::encoding::DefaultFuchsiaResourceDialect,
8790 >,
8791 offset: usize,
8792 _depth: fidl::encoding::Depth,
8793 ) -> fidl::Result<()> {
8794 decoder.debug_check_bounds::<Self>(offset);
8795 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8797 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8798 let mask = 0xffffffffffffff00u64;
8799 let maskedval = padval & mask;
8800 if maskedval != 0 {
8801 return Err(fidl::Error::NonZeroPadding {
8802 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8803 });
8804 }
8805 fidl::decode!(
8806 Corpus,
8807 fidl::encoding::DefaultFuchsiaResourceDialect,
8808 &mut self.corpus,
8809 decoder,
8810 offset + 0,
8811 _depth
8812 )?;
8813 fidl::decode!(
8814 Input,
8815 fidl::encoding::DefaultFuchsiaResourceDialect,
8816 &mut self.input,
8817 decoder,
8818 offset + 8,
8819 _depth
8820 )?;
8821 Ok(())
8822 }
8823 }
8824
8825 impl fidl::encoding::ResourceTypeMarker for ControllerCleanseRequest {
8826 type Borrowed<'a> = &'a mut Self;
8827 fn take_or_borrow<'a>(
8828 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8829 ) -> Self::Borrowed<'a> {
8830 value
8831 }
8832 }
8833
8834 unsafe impl fidl::encoding::TypeMarker for ControllerCleanseRequest {
8835 type Owned = Self;
8836
8837 #[inline(always)]
8838 fn inline_align(_context: fidl::encoding::Context) -> usize {
8839 8
8840 }
8841
8842 #[inline(always)]
8843 fn inline_size(_context: fidl::encoding::Context) -> usize {
8844 16
8845 }
8846 }
8847
8848 unsafe impl
8849 fidl::encoding::Encode<
8850 ControllerCleanseRequest,
8851 fidl::encoding::DefaultFuchsiaResourceDialect,
8852 > for &mut ControllerCleanseRequest
8853 {
8854 #[inline]
8855 unsafe fn encode(
8856 self,
8857 encoder: &mut fidl::encoding::Encoder<
8858 '_,
8859 fidl::encoding::DefaultFuchsiaResourceDialect,
8860 >,
8861 offset: usize,
8862 _depth: fidl::encoding::Depth,
8863 ) -> fidl::Result<()> {
8864 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8865 fidl::encoding::Encode::<
8867 ControllerCleanseRequest,
8868 fidl::encoding::DefaultFuchsiaResourceDialect,
8869 >::encode(
8870 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8871 &mut self.test_input,
8872 ),),
8873 encoder,
8874 offset,
8875 _depth,
8876 )
8877 }
8878 }
8879 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8880 fidl::encoding::Encode<
8881 ControllerCleanseRequest,
8882 fidl::encoding::DefaultFuchsiaResourceDialect,
8883 > for (T0,)
8884 {
8885 #[inline]
8886 unsafe fn encode(
8887 self,
8888 encoder: &mut fidl::encoding::Encoder<
8889 '_,
8890 fidl::encoding::DefaultFuchsiaResourceDialect,
8891 >,
8892 offset: usize,
8893 depth: fidl::encoding::Depth,
8894 ) -> fidl::Result<()> {
8895 encoder.debug_check_bounds::<ControllerCleanseRequest>(offset);
8896 self.0.encode(encoder, offset + 0, depth)?;
8900 Ok(())
8901 }
8902 }
8903
8904 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8905 for ControllerCleanseRequest
8906 {
8907 #[inline(always)]
8908 fn new_empty() -> Self {
8909 Self {
8910 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
8911 }
8912 }
8913
8914 #[inline]
8915 unsafe fn decode(
8916 &mut self,
8917 decoder: &mut fidl::encoding::Decoder<
8918 '_,
8919 fidl::encoding::DefaultFuchsiaResourceDialect,
8920 >,
8921 offset: usize,
8922 _depth: fidl::encoding::Depth,
8923 ) -> fidl::Result<()> {
8924 decoder.debug_check_bounds::<Self>(offset);
8925 fidl::decode!(
8927 Input,
8928 fidl::encoding::DefaultFuchsiaResourceDialect,
8929 &mut self.test_input,
8930 decoder,
8931 offset + 0,
8932 _depth
8933 )?;
8934 Ok(())
8935 }
8936 }
8937
8938 impl fidl::encoding::ResourceTypeMarker for ControllerMinimizeRequest {
8939 type Borrowed<'a> = &'a mut Self;
8940 fn take_or_borrow<'a>(
8941 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8942 ) -> Self::Borrowed<'a> {
8943 value
8944 }
8945 }
8946
8947 unsafe impl fidl::encoding::TypeMarker for ControllerMinimizeRequest {
8948 type Owned = Self;
8949
8950 #[inline(always)]
8951 fn inline_align(_context: fidl::encoding::Context) -> usize {
8952 8
8953 }
8954
8955 #[inline(always)]
8956 fn inline_size(_context: fidl::encoding::Context) -> usize {
8957 16
8958 }
8959 }
8960
8961 unsafe impl
8962 fidl::encoding::Encode<
8963 ControllerMinimizeRequest,
8964 fidl::encoding::DefaultFuchsiaResourceDialect,
8965 > for &mut ControllerMinimizeRequest
8966 {
8967 #[inline]
8968 unsafe fn encode(
8969 self,
8970 encoder: &mut fidl::encoding::Encoder<
8971 '_,
8972 fidl::encoding::DefaultFuchsiaResourceDialect,
8973 >,
8974 offset: usize,
8975 _depth: fidl::encoding::Depth,
8976 ) -> fidl::Result<()> {
8977 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
8978 fidl::encoding::Encode::<
8980 ControllerMinimizeRequest,
8981 fidl::encoding::DefaultFuchsiaResourceDialect,
8982 >::encode(
8983 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8984 &mut self.test_input,
8985 ),),
8986 encoder,
8987 offset,
8988 _depth,
8989 )
8990 }
8991 }
8992 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
8993 fidl::encoding::Encode<
8994 ControllerMinimizeRequest,
8995 fidl::encoding::DefaultFuchsiaResourceDialect,
8996 > for (T0,)
8997 {
8998 #[inline]
8999 unsafe fn encode(
9000 self,
9001 encoder: &mut fidl::encoding::Encoder<
9002 '_,
9003 fidl::encoding::DefaultFuchsiaResourceDialect,
9004 >,
9005 offset: usize,
9006 depth: fidl::encoding::Depth,
9007 ) -> fidl::Result<()> {
9008 encoder.debug_check_bounds::<ControllerMinimizeRequest>(offset);
9009 self.0.encode(encoder, offset + 0, depth)?;
9013 Ok(())
9014 }
9015 }
9016
9017 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9018 for ControllerMinimizeRequest
9019 {
9020 #[inline(always)]
9021 fn new_empty() -> Self {
9022 Self {
9023 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9024 }
9025 }
9026
9027 #[inline]
9028 unsafe fn decode(
9029 &mut self,
9030 decoder: &mut fidl::encoding::Decoder<
9031 '_,
9032 fidl::encoding::DefaultFuchsiaResourceDialect,
9033 >,
9034 offset: usize,
9035 _depth: fidl::encoding::Depth,
9036 ) -> fidl::Result<()> {
9037 decoder.debug_check_bounds::<Self>(offset);
9038 fidl::decode!(
9040 Input,
9041 fidl::encoding::DefaultFuchsiaResourceDialect,
9042 &mut self.test_input,
9043 decoder,
9044 offset + 0,
9045 _depth
9046 )?;
9047 Ok(())
9048 }
9049 }
9050
9051 impl fidl::encoding::ResourceTypeMarker for ControllerProviderConnectRequest {
9052 type Borrowed<'a> = &'a mut Self;
9053 fn take_or_borrow<'a>(
9054 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9055 ) -> Self::Borrowed<'a> {
9056 value
9057 }
9058 }
9059
9060 unsafe impl fidl::encoding::TypeMarker for ControllerProviderConnectRequest {
9061 type Owned = Self;
9062
9063 #[inline(always)]
9064 fn inline_align(_context: fidl::encoding::Context) -> usize {
9065 4
9066 }
9067
9068 #[inline(always)]
9069 fn inline_size(_context: fidl::encoding::Context) -> usize {
9070 4
9071 }
9072 }
9073
9074 unsafe impl
9075 fidl::encoding::Encode<
9076 ControllerProviderConnectRequest,
9077 fidl::encoding::DefaultFuchsiaResourceDialect,
9078 > for &mut ControllerProviderConnectRequest
9079 {
9080 #[inline]
9081 unsafe fn encode(
9082 self,
9083 encoder: &mut fidl::encoding::Encoder<
9084 '_,
9085 fidl::encoding::DefaultFuchsiaResourceDialect,
9086 >,
9087 offset: usize,
9088 _depth: fidl::encoding::Depth,
9089 ) -> fidl::Result<()> {
9090 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9091 fidl::encoding::Encode::<ControllerProviderConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9093 (
9094 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
9095 ),
9096 encoder, offset, _depth
9097 )
9098 }
9099 }
9100 unsafe impl<
9101 T0: fidl::encoding::Encode<
9102 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9103 fidl::encoding::DefaultFuchsiaResourceDialect,
9104 >,
9105 >
9106 fidl::encoding::Encode<
9107 ControllerProviderConnectRequest,
9108 fidl::encoding::DefaultFuchsiaResourceDialect,
9109 > for (T0,)
9110 {
9111 #[inline]
9112 unsafe fn encode(
9113 self,
9114 encoder: &mut fidl::encoding::Encoder<
9115 '_,
9116 fidl::encoding::DefaultFuchsiaResourceDialect,
9117 >,
9118 offset: usize,
9119 depth: fidl::encoding::Depth,
9120 ) -> fidl::Result<()> {
9121 encoder.debug_check_bounds::<ControllerProviderConnectRequest>(offset);
9122 self.0.encode(encoder, offset + 0, depth)?;
9126 Ok(())
9127 }
9128 }
9129
9130 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9131 for ControllerProviderConnectRequest
9132 {
9133 #[inline(always)]
9134 fn new_empty() -> Self {
9135 Self {
9136 controller: fidl::new_empty!(
9137 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9138 fidl::encoding::DefaultFuchsiaResourceDialect
9139 ),
9140 }
9141 }
9142
9143 #[inline]
9144 unsafe fn decode(
9145 &mut self,
9146 decoder: &mut fidl::encoding::Decoder<
9147 '_,
9148 fidl::encoding::DefaultFuchsiaResourceDialect,
9149 >,
9150 offset: usize,
9151 _depth: fidl::encoding::Depth,
9152 ) -> fidl::Result<()> {
9153 decoder.debug_check_bounds::<Self>(offset);
9154 fidl::decode!(
9156 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
9157 fidl::encoding::DefaultFuchsiaResourceDialect,
9158 &mut self.controller,
9159 decoder,
9160 offset + 0,
9161 _depth
9162 )?;
9163 Ok(())
9164 }
9165 }
9166
9167 impl fidl::encoding::ResourceTypeMarker for ControllerReadCorpusRequest {
9168 type Borrowed<'a> = &'a mut Self;
9169 fn take_or_borrow<'a>(
9170 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9171 ) -> Self::Borrowed<'a> {
9172 value
9173 }
9174 }
9175
9176 unsafe impl fidl::encoding::TypeMarker for ControllerReadCorpusRequest {
9177 type Owned = Self;
9178
9179 #[inline(always)]
9180 fn inline_align(_context: fidl::encoding::Context) -> usize {
9181 4
9182 }
9183
9184 #[inline(always)]
9185 fn inline_size(_context: fidl::encoding::Context) -> usize {
9186 8
9187 }
9188 }
9189
9190 unsafe impl
9191 fidl::encoding::Encode<
9192 ControllerReadCorpusRequest,
9193 fidl::encoding::DefaultFuchsiaResourceDialect,
9194 > for &mut ControllerReadCorpusRequest
9195 {
9196 #[inline]
9197 unsafe fn encode(
9198 self,
9199 encoder: &mut fidl::encoding::Encoder<
9200 '_,
9201 fidl::encoding::DefaultFuchsiaResourceDialect,
9202 >,
9203 offset: usize,
9204 _depth: fidl::encoding::Depth,
9205 ) -> fidl::Result<()> {
9206 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9207 fidl::encoding::Encode::<ControllerReadCorpusRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9209 (
9210 <Corpus as fidl::encoding::ValueTypeMarker>::borrow(&self.corpus),
9211 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.corpus_reader),
9212 ),
9213 encoder, offset, _depth
9214 )
9215 }
9216 }
9217 unsafe impl<
9218 T0: fidl::encoding::Encode<Corpus, fidl::encoding::DefaultFuchsiaResourceDialect>,
9219 T1: fidl::encoding::Encode<
9220 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9221 fidl::encoding::DefaultFuchsiaResourceDialect,
9222 >,
9223 >
9224 fidl::encoding::Encode<
9225 ControllerReadCorpusRequest,
9226 fidl::encoding::DefaultFuchsiaResourceDialect,
9227 > for (T0, T1)
9228 {
9229 #[inline]
9230 unsafe fn encode(
9231 self,
9232 encoder: &mut fidl::encoding::Encoder<
9233 '_,
9234 fidl::encoding::DefaultFuchsiaResourceDialect,
9235 >,
9236 offset: usize,
9237 depth: fidl::encoding::Depth,
9238 ) -> fidl::Result<()> {
9239 encoder.debug_check_bounds::<ControllerReadCorpusRequest>(offset);
9240 unsafe {
9243 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
9244 (ptr as *mut u32).write_unaligned(0);
9245 }
9246 self.0.encode(encoder, offset + 0, depth)?;
9248 self.1.encode(encoder, offset + 4, depth)?;
9249 Ok(())
9250 }
9251 }
9252
9253 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9254 for ControllerReadCorpusRequest
9255 {
9256 #[inline(always)]
9257 fn new_empty() -> Self {
9258 Self {
9259 corpus: fidl::new_empty!(Corpus, fidl::encoding::DefaultFuchsiaResourceDialect),
9260 corpus_reader: fidl::new_empty!(
9261 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9262 fidl::encoding::DefaultFuchsiaResourceDialect
9263 ),
9264 }
9265 }
9266
9267 #[inline]
9268 unsafe fn decode(
9269 &mut self,
9270 decoder: &mut fidl::encoding::Decoder<
9271 '_,
9272 fidl::encoding::DefaultFuchsiaResourceDialect,
9273 >,
9274 offset: usize,
9275 _depth: fidl::encoding::Depth,
9276 ) -> fidl::Result<()> {
9277 decoder.debug_check_bounds::<Self>(offset);
9278 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
9280 let padval = unsafe { (ptr as *const u32).read_unaligned() };
9281 let mask = 0xffffff00u32;
9282 let maskedval = padval & mask;
9283 if maskedval != 0 {
9284 return Err(fidl::Error::NonZeroPadding {
9285 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
9286 });
9287 }
9288 fidl::decode!(
9289 Corpus,
9290 fidl::encoding::DefaultFuchsiaResourceDialect,
9291 &mut self.corpus,
9292 decoder,
9293 offset + 0,
9294 _depth
9295 )?;
9296 fidl::decode!(
9297 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<CorpusReaderMarker>>,
9298 fidl::encoding::DefaultFuchsiaResourceDialect,
9299 &mut self.corpus_reader,
9300 decoder,
9301 offset + 4,
9302 _depth
9303 )?;
9304 Ok(())
9305 }
9306 }
9307
9308 impl fidl::encoding::ResourceTypeMarker for ControllerReadDictionaryResponse {
9309 type Borrowed<'a> = &'a mut Self;
9310 fn take_or_borrow<'a>(
9311 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9312 ) -> Self::Borrowed<'a> {
9313 value
9314 }
9315 }
9316
9317 unsafe impl fidl::encoding::TypeMarker for ControllerReadDictionaryResponse {
9318 type Owned = Self;
9319
9320 #[inline(always)]
9321 fn inline_align(_context: fidl::encoding::Context) -> usize {
9322 8
9323 }
9324
9325 #[inline(always)]
9326 fn inline_size(_context: fidl::encoding::Context) -> usize {
9327 16
9328 }
9329 }
9330
9331 unsafe impl
9332 fidl::encoding::Encode<
9333 ControllerReadDictionaryResponse,
9334 fidl::encoding::DefaultFuchsiaResourceDialect,
9335 > for &mut ControllerReadDictionaryResponse
9336 {
9337 #[inline]
9338 unsafe fn encode(
9339 self,
9340 encoder: &mut fidl::encoding::Encoder<
9341 '_,
9342 fidl::encoding::DefaultFuchsiaResourceDialect,
9343 >,
9344 offset: usize,
9345 _depth: fidl::encoding::Depth,
9346 ) -> fidl::Result<()> {
9347 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9348 fidl::encoding::Encode::<
9350 ControllerReadDictionaryResponse,
9351 fidl::encoding::DefaultFuchsiaResourceDialect,
9352 >::encode(
9353 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9354 &mut self.dictionary,
9355 ),),
9356 encoder,
9357 offset,
9358 _depth,
9359 )
9360 }
9361 }
9362 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9363 fidl::encoding::Encode<
9364 ControllerReadDictionaryResponse,
9365 fidl::encoding::DefaultFuchsiaResourceDialect,
9366 > for (T0,)
9367 {
9368 #[inline]
9369 unsafe fn encode(
9370 self,
9371 encoder: &mut fidl::encoding::Encoder<
9372 '_,
9373 fidl::encoding::DefaultFuchsiaResourceDialect,
9374 >,
9375 offset: usize,
9376 depth: fidl::encoding::Depth,
9377 ) -> fidl::Result<()> {
9378 encoder.debug_check_bounds::<ControllerReadDictionaryResponse>(offset);
9379 self.0.encode(encoder, offset + 0, depth)?;
9383 Ok(())
9384 }
9385 }
9386
9387 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9388 for ControllerReadDictionaryResponse
9389 {
9390 #[inline(always)]
9391 fn new_empty() -> Self {
9392 Self {
9393 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9394 }
9395 }
9396
9397 #[inline]
9398 unsafe fn decode(
9399 &mut self,
9400 decoder: &mut fidl::encoding::Decoder<
9401 '_,
9402 fidl::encoding::DefaultFuchsiaResourceDialect,
9403 >,
9404 offset: usize,
9405 _depth: fidl::encoding::Depth,
9406 ) -> fidl::Result<()> {
9407 decoder.debug_check_bounds::<Self>(offset);
9408 fidl::decode!(
9410 Input,
9411 fidl::encoding::DefaultFuchsiaResourceDialect,
9412 &mut self.dictionary,
9413 decoder,
9414 offset + 0,
9415 _depth
9416 )?;
9417 Ok(())
9418 }
9419 }
9420
9421 impl fidl::encoding::ResourceTypeMarker for ControllerTryOneRequest {
9422 type Borrowed<'a> = &'a mut Self;
9423 fn take_or_borrow<'a>(
9424 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9425 ) -> Self::Borrowed<'a> {
9426 value
9427 }
9428 }
9429
9430 unsafe impl fidl::encoding::TypeMarker for ControllerTryOneRequest {
9431 type Owned = Self;
9432
9433 #[inline(always)]
9434 fn inline_align(_context: fidl::encoding::Context) -> usize {
9435 8
9436 }
9437
9438 #[inline(always)]
9439 fn inline_size(_context: fidl::encoding::Context) -> usize {
9440 16
9441 }
9442 }
9443
9444 unsafe impl
9445 fidl::encoding::Encode<
9446 ControllerTryOneRequest,
9447 fidl::encoding::DefaultFuchsiaResourceDialect,
9448 > for &mut ControllerTryOneRequest
9449 {
9450 #[inline]
9451 unsafe fn encode(
9452 self,
9453 encoder: &mut fidl::encoding::Encoder<
9454 '_,
9455 fidl::encoding::DefaultFuchsiaResourceDialect,
9456 >,
9457 offset: usize,
9458 _depth: fidl::encoding::Depth,
9459 ) -> fidl::Result<()> {
9460 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9461 fidl::encoding::Encode::<
9463 ControllerTryOneRequest,
9464 fidl::encoding::DefaultFuchsiaResourceDialect,
9465 >::encode(
9466 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9467 &mut self.test_input,
9468 ),),
9469 encoder,
9470 offset,
9471 _depth,
9472 )
9473 }
9474 }
9475 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9476 fidl::encoding::Encode<
9477 ControllerTryOneRequest,
9478 fidl::encoding::DefaultFuchsiaResourceDialect,
9479 > for (T0,)
9480 {
9481 #[inline]
9482 unsafe fn encode(
9483 self,
9484 encoder: &mut fidl::encoding::Encoder<
9485 '_,
9486 fidl::encoding::DefaultFuchsiaResourceDialect,
9487 >,
9488 offset: usize,
9489 depth: fidl::encoding::Depth,
9490 ) -> fidl::Result<()> {
9491 encoder.debug_check_bounds::<ControllerTryOneRequest>(offset);
9492 self.0.encode(encoder, offset + 0, depth)?;
9496 Ok(())
9497 }
9498 }
9499
9500 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9501 for ControllerTryOneRequest
9502 {
9503 #[inline(always)]
9504 fn new_empty() -> Self {
9505 Self {
9506 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9507 }
9508 }
9509
9510 #[inline]
9511 unsafe fn decode(
9512 &mut self,
9513 decoder: &mut fidl::encoding::Decoder<
9514 '_,
9515 fidl::encoding::DefaultFuchsiaResourceDialect,
9516 >,
9517 offset: usize,
9518 _depth: fidl::encoding::Depth,
9519 ) -> fidl::Result<()> {
9520 decoder.debug_check_bounds::<Self>(offset);
9521 fidl::decode!(
9523 Input,
9524 fidl::encoding::DefaultFuchsiaResourceDialect,
9525 &mut self.test_input,
9526 decoder,
9527 offset + 0,
9528 _depth
9529 )?;
9530 Ok(())
9531 }
9532 }
9533
9534 impl fidl::encoding::ResourceTypeMarker for ControllerWatchArtifactResponse {
9535 type Borrowed<'a> = &'a mut Self;
9536 fn take_or_borrow<'a>(
9537 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9538 ) -> Self::Borrowed<'a> {
9539 value
9540 }
9541 }
9542
9543 unsafe impl fidl::encoding::TypeMarker for ControllerWatchArtifactResponse {
9544 type Owned = Self;
9545
9546 #[inline(always)]
9547 fn inline_align(_context: fidl::encoding::Context) -> usize {
9548 8
9549 }
9550
9551 #[inline(always)]
9552 fn inline_size(_context: fidl::encoding::Context) -> usize {
9553 16
9554 }
9555 }
9556
9557 unsafe impl
9558 fidl::encoding::Encode<
9559 ControllerWatchArtifactResponse,
9560 fidl::encoding::DefaultFuchsiaResourceDialect,
9561 > for &mut ControllerWatchArtifactResponse
9562 {
9563 #[inline]
9564 unsafe fn encode(
9565 self,
9566 encoder: &mut fidl::encoding::Encoder<
9567 '_,
9568 fidl::encoding::DefaultFuchsiaResourceDialect,
9569 >,
9570 offset: usize,
9571 _depth: fidl::encoding::Depth,
9572 ) -> fidl::Result<()> {
9573 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9574 fidl::encoding::Encode::<
9576 ControllerWatchArtifactResponse,
9577 fidl::encoding::DefaultFuchsiaResourceDialect,
9578 >::encode(
9579 (<Artifact as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9580 &mut self.artifact,
9581 ),),
9582 encoder,
9583 offset,
9584 _depth,
9585 )
9586 }
9587 }
9588 unsafe impl<T0: fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>>
9589 fidl::encoding::Encode<
9590 ControllerWatchArtifactResponse,
9591 fidl::encoding::DefaultFuchsiaResourceDialect,
9592 > for (T0,)
9593 {
9594 #[inline]
9595 unsafe fn encode(
9596 self,
9597 encoder: &mut fidl::encoding::Encoder<
9598 '_,
9599 fidl::encoding::DefaultFuchsiaResourceDialect,
9600 >,
9601 offset: usize,
9602 depth: fidl::encoding::Depth,
9603 ) -> fidl::Result<()> {
9604 encoder.debug_check_bounds::<ControllerWatchArtifactResponse>(offset);
9605 self.0.encode(encoder, offset + 0, depth)?;
9609 Ok(())
9610 }
9611 }
9612
9613 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9614 for ControllerWatchArtifactResponse
9615 {
9616 #[inline(always)]
9617 fn new_empty() -> Self {
9618 Self {
9619 artifact: fidl::new_empty!(Artifact, fidl::encoding::DefaultFuchsiaResourceDialect),
9620 }
9621 }
9622
9623 #[inline]
9624 unsafe fn decode(
9625 &mut self,
9626 decoder: &mut fidl::encoding::Decoder<
9627 '_,
9628 fidl::encoding::DefaultFuchsiaResourceDialect,
9629 >,
9630 offset: usize,
9631 _depth: fidl::encoding::Depth,
9632 ) -> fidl::Result<()> {
9633 decoder.debug_check_bounds::<Self>(offset);
9634 fidl::decode!(
9636 Artifact,
9637 fidl::encoding::DefaultFuchsiaResourceDialect,
9638 &mut self.artifact,
9639 decoder,
9640 offset + 0,
9641 _depth
9642 )?;
9643 Ok(())
9644 }
9645 }
9646
9647 impl fidl::encoding::ResourceTypeMarker for ControllerWriteDictionaryRequest {
9648 type Borrowed<'a> = &'a mut Self;
9649 fn take_or_borrow<'a>(
9650 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9651 ) -> Self::Borrowed<'a> {
9652 value
9653 }
9654 }
9655
9656 unsafe impl fidl::encoding::TypeMarker for ControllerWriteDictionaryRequest {
9657 type Owned = Self;
9658
9659 #[inline(always)]
9660 fn inline_align(_context: fidl::encoding::Context) -> usize {
9661 8
9662 }
9663
9664 #[inline(always)]
9665 fn inline_size(_context: fidl::encoding::Context) -> usize {
9666 16
9667 }
9668 }
9669
9670 unsafe impl
9671 fidl::encoding::Encode<
9672 ControllerWriteDictionaryRequest,
9673 fidl::encoding::DefaultFuchsiaResourceDialect,
9674 > for &mut ControllerWriteDictionaryRequest
9675 {
9676 #[inline]
9677 unsafe fn encode(
9678 self,
9679 encoder: &mut fidl::encoding::Encoder<
9680 '_,
9681 fidl::encoding::DefaultFuchsiaResourceDialect,
9682 >,
9683 offset: usize,
9684 _depth: fidl::encoding::Depth,
9685 ) -> fidl::Result<()> {
9686 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9687 fidl::encoding::Encode::<
9689 ControllerWriteDictionaryRequest,
9690 fidl::encoding::DefaultFuchsiaResourceDialect,
9691 >::encode(
9692 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9693 &mut self.dictionary,
9694 ),),
9695 encoder,
9696 offset,
9697 _depth,
9698 )
9699 }
9700 }
9701 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9702 fidl::encoding::Encode<
9703 ControllerWriteDictionaryRequest,
9704 fidl::encoding::DefaultFuchsiaResourceDialect,
9705 > for (T0,)
9706 {
9707 #[inline]
9708 unsafe fn encode(
9709 self,
9710 encoder: &mut fidl::encoding::Encoder<
9711 '_,
9712 fidl::encoding::DefaultFuchsiaResourceDialect,
9713 >,
9714 offset: usize,
9715 depth: fidl::encoding::Depth,
9716 ) -> fidl::Result<()> {
9717 encoder.debug_check_bounds::<ControllerWriteDictionaryRequest>(offset);
9718 self.0.encode(encoder, offset + 0, depth)?;
9722 Ok(())
9723 }
9724 }
9725
9726 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9727 for ControllerWriteDictionaryRequest
9728 {
9729 #[inline(always)]
9730 fn new_empty() -> Self {
9731 Self {
9732 dictionary: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9733 }
9734 }
9735
9736 #[inline]
9737 unsafe fn decode(
9738 &mut self,
9739 decoder: &mut fidl::encoding::Decoder<
9740 '_,
9741 fidl::encoding::DefaultFuchsiaResourceDialect,
9742 >,
9743 offset: usize,
9744 _depth: fidl::encoding::Depth,
9745 ) -> fidl::Result<()> {
9746 decoder.debug_check_bounds::<Self>(offset);
9747 fidl::decode!(
9749 Input,
9750 fidl::encoding::DefaultFuchsiaResourceDialect,
9751 &mut self.dictionary,
9752 decoder,
9753 offset + 0,
9754 _depth
9755 )?;
9756 Ok(())
9757 }
9758 }
9759
9760 impl fidl::encoding::ResourceTypeMarker for CorpusReaderNextRequest {
9761 type Borrowed<'a> = &'a mut Self;
9762 fn take_or_borrow<'a>(
9763 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9764 ) -> Self::Borrowed<'a> {
9765 value
9766 }
9767 }
9768
9769 unsafe impl fidl::encoding::TypeMarker for CorpusReaderNextRequest {
9770 type Owned = Self;
9771
9772 #[inline(always)]
9773 fn inline_align(_context: fidl::encoding::Context) -> usize {
9774 8
9775 }
9776
9777 #[inline(always)]
9778 fn inline_size(_context: fidl::encoding::Context) -> usize {
9779 16
9780 }
9781 }
9782
9783 unsafe impl
9784 fidl::encoding::Encode<
9785 CorpusReaderNextRequest,
9786 fidl::encoding::DefaultFuchsiaResourceDialect,
9787 > for &mut CorpusReaderNextRequest
9788 {
9789 #[inline]
9790 unsafe fn encode(
9791 self,
9792 encoder: &mut fidl::encoding::Encoder<
9793 '_,
9794 fidl::encoding::DefaultFuchsiaResourceDialect,
9795 >,
9796 offset: usize,
9797 _depth: fidl::encoding::Depth,
9798 ) -> fidl::Result<()> {
9799 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9800 fidl::encoding::Encode::<
9802 CorpusReaderNextRequest,
9803 fidl::encoding::DefaultFuchsiaResourceDialect,
9804 >::encode(
9805 (<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9806 &mut self.test_input,
9807 ),),
9808 encoder,
9809 offset,
9810 _depth,
9811 )
9812 }
9813 }
9814 unsafe impl<T0: fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>>
9815 fidl::encoding::Encode<
9816 CorpusReaderNextRequest,
9817 fidl::encoding::DefaultFuchsiaResourceDialect,
9818 > for (T0,)
9819 {
9820 #[inline]
9821 unsafe fn encode(
9822 self,
9823 encoder: &mut fidl::encoding::Encoder<
9824 '_,
9825 fidl::encoding::DefaultFuchsiaResourceDialect,
9826 >,
9827 offset: usize,
9828 depth: fidl::encoding::Depth,
9829 ) -> fidl::Result<()> {
9830 encoder.debug_check_bounds::<CorpusReaderNextRequest>(offset);
9831 self.0.encode(encoder, offset + 0, depth)?;
9835 Ok(())
9836 }
9837 }
9838
9839 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9840 for CorpusReaderNextRequest
9841 {
9842 #[inline(always)]
9843 fn new_empty() -> Self {
9844 Self {
9845 test_input: fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect),
9846 }
9847 }
9848
9849 #[inline]
9850 unsafe fn decode(
9851 &mut self,
9852 decoder: &mut fidl::encoding::Decoder<
9853 '_,
9854 fidl::encoding::DefaultFuchsiaResourceDialect,
9855 >,
9856 offset: usize,
9857 _depth: fidl::encoding::Depth,
9858 ) -> fidl::Result<()> {
9859 decoder.debug_check_bounds::<Self>(offset);
9860 fidl::decode!(
9862 Input,
9863 fidl::encoding::DefaultFuchsiaResourceDialect,
9864 &mut self.test_input,
9865 decoder,
9866 offset + 0,
9867 _depth
9868 )?;
9869 Ok(())
9870 }
9871 }
9872
9873 impl fidl::encoding::ResourceTypeMarker for CoverageData {
9874 type Borrowed<'a> = &'a mut Self;
9875 fn take_or_borrow<'a>(
9876 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9877 ) -> Self::Borrowed<'a> {
9878 value
9879 }
9880 }
9881
9882 unsafe impl fidl::encoding::TypeMarker for CoverageData {
9883 type Owned = Self;
9884
9885 #[inline(always)]
9886 fn inline_align(_context: fidl::encoding::Context) -> usize {
9887 8
9888 }
9889
9890 #[inline(always)]
9891 fn inline_size(_context: fidl::encoding::Context) -> usize {
9892 24
9893 }
9894 }
9895
9896 unsafe impl fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9897 for &mut CoverageData
9898 {
9899 #[inline]
9900 unsafe fn encode(
9901 self,
9902 encoder: &mut fidl::encoding::Encoder<
9903 '_,
9904 fidl::encoding::DefaultFuchsiaResourceDialect,
9905 >,
9906 offset: usize,
9907 _depth: fidl::encoding::Depth,
9908 ) -> fidl::Result<()> {
9909 encoder.debug_check_bounds::<CoverageData>(offset);
9910 fidl::encoding::Encode::<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9912 (
9913 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.target_id),
9914 <Data as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data),
9915 ),
9916 encoder, offset, _depth
9917 )
9918 }
9919 }
9920 unsafe impl<
9921 T0: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
9922 T1: fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>,
9923 > fidl::encoding::Encode<CoverageData, fidl::encoding::DefaultFuchsiaResourceDialect>
9924 for (T0, T1)
9925 {
9926 #[inline]
9927 unsafe fn encode(
9928 self,
9929 encoder: &mut fidl::encoding::Encoder<
9930 '_,
9931 fidl::encoding::DefaultFuchsiaResourceDialect,
9932 >,
9933 offset: usize,
9934 depth: fidl::encoding::Depth,
9935 ) -> fidl::Result<()> {
9936 encoder.debug_check_bounds::<CoverageData>(offset);
9937 self.0.encode(encoder, offset + 0, depth)?;
9941 self.1.encode(encoder, offset + 8, depth)?;
9942 Ok(())
9943 }
9944 }
9945
9946 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for CoverageData {
9947 #[inline(always)]
9948 fn new_empty() -> Self {
9949 Self {
9950 target_id: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
9951 data: fidl::new_empty!(Data, fidl::encoding::DefaultFuchsiaResourceDialect),
9952 }
9953 }
9954
9955 #[inline]
9956 unsafe fn decode(
9957 &mut self,
9958 decoder: &mut fidl::encoding::Decoder<
9959 '_,
9960 fidl::encoding::DefaultFuchsiaResourceDialect,
9961 >,
9962 offset: usize,
9963 _depth: fidl::encoding::Depth,
9964 ) -> fidl::Result<()> {
9965 decoder.debug_check_bounds::<Self>(offset);
9966 fidl::decode!(
9968 u64,
9969 fidl::encoding::DefaultFuchsiaResourceDialect,
9970 &mut self.target_id,
9971 decoder,
9972 offset + 0,
9973 _depth
9974 )?;
9975 fidl::decode!(
9976 Data,
9977 fidl::encoding::DefaultFuchsiaResourceDialect,
9978 &mut self.data,
9979 decoder,
9980 offset + 8,
9981 _depth
9982 )?;
9983 Ok(())
9984 }
9985 }
9986
9987 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9988 type Borrowed<'a> = &'a mut Self;
9989 fn take_or_borrow<'a>(
9990 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9991 ) -> Self::Borrowed<'a> {
9992 value
9993 }
9994 }
9995
9996 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorAddInline8bitCountersRequest {
9997 type Owned = Self;
9998
9999 #[inline(always)]
10000 fn inline_align(_context: fidl::encoding::Context) -> usize {
10001 4
10002 }
10003
10004 #[inline(always)]
10005 fn inline_size(_context: fidl::encoding::Context) -> usize {
10006 4
10007 }
10008 }
10009
10010 unsafe impl
10011 fidl::encoding::Encode<
10012 CoverageDataCollectorAddInline8bitCountersRequest,
10013 fidl::encoding::DefaultFuchsiaResourceDialect,
10014 > for &mut CoverageDataCollectorAddInline8bitCountersRequest
10015 {
10016 #[inline]
10017 unsafe fn encode(
10018 self,
10019 encoder: &mut fidl::encoding::Encoder<
10020 '_,
10021 fidl::encoding::DefaultFuchsiaResourceDialect,
10022 >,
10023 offset: usize,
10024 _depth: fidl::encoding::Depth,
10025 ) -> fidl::Result<()> {
10026 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
10027 fidl::encoding::Encode::<
10029 CoverageDataCollectorAddInline8bitCountersRequest,
10030 fidl::encoding::DefaultFuchsiaResourceDialect,
10031 >::encode(
10032 (<fidl::encoding::HandleType<
10033 fidl::Vmo,
10034 { fidl::ObjectType::VMO.into_raw() },
10035 2147483648,
10036 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10037 &mut self.inline_8bit_counters,
10038 ),),
10039 encoder,
10040 offset,
10041 _depth,
10042 )
10043 }
10044 }
10045 unsafe impl<
10046 T0: fidl::encoding::Encode<
10047 fidl::encoding::HandleType<
10048 fidl::Vmo,
10049 { fidl::ObjectType::VMO.into_raw() },
10050 2147483648,
10051 >,
10052 fidl::encoding::DefaultFuchsiaResourceDialect,
10053 >,
10054 >
10055 fidl::encoding::Encode<
10056 CoverageDataCollectorAddInline8bitCountersRequest,
10057 fidl::encoding::DefaultFuchsiaResourceDialect,
10058 > for (T0,)
10059 {
10060 #[inline]
10061 unsafe fn encode(
10062 self,
10063 encoder: &mut fidl::encoding::Encoder<
10064 '_,
10065 fidl::encoding::DefaultFuchsiaResourceDialect,
10066 >,
10067 offset: usize,
10068 depth: fidl::encoding::Depth,
10069 ) -> fidl::Result<()> {
10070 encoder.debug_check_bounds::<CoverageDataCollectorAddInline8bitCountersRequest>(offset);
10071 self.0.encode(encoder, offset + 0, depth)?;
10075 Ok(())
10076 }
10077 }
10078
10079 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10080 for CoverageDataCollectorAddInline8bitCountersRequest
10081 {
10082 #[inline(always)]
10083 fn new_empty() -> Self {
10084 Self {
10085 inline_8bit_counters: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10086 }
10087 }
10088
10089 #[inline]
10090 unsafe fn decode(
10091 &mut self,
10092 decoder: &mut fidl::encoding::Decoder<
10093 '_,
10094 fidl::encoding::DefaultFuchsiaResourceDialect,
10095 >,
10096 offset: usize,
10097 _depth: fidl::encoding::Depth,
10098 ) -> fidl::Result<()> {
10099 decoder.debug_check_bounds::<Self>(offset);
10100 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)?;
10102 Ok(())
10103 }
10104 }
10105
10106 impl fidl::encoding::ResourceTypeMarker for CoverageDataCollectorInitializeRequest {
10107 type Borrowed<'a> = &'a mut Self;
10108 fn take_or_borrow<'a>(
10109 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10110 ) -> Self::Borrowed<'a> {
10111 value
10112 }
10113 }
10114
10115 unsafe impl fidl::encoding::TypeMarker for CoverageDataCollectorInitializeRequest {
10116 type Owned = Self;
10117
10118 #[inline(always)]
10119 fn inline_align(_context: fidl::encoding::Context) -> usize {
10120 4
10121 }
10122
10123 #[inline(always)]
10124 fn inline_size(_context: fidl::encoding::Context) -> usize {
10125 8
10126 }
10127 }
10128
10129 unsafe impl
10130 fidl::encoding::Encode<
10131 CoverageDataCollectorInitializeRequest,
10132 fidl::encoding::DefaultFuchsiaResourceDialect,
10133 > for &mut CoverageDataCollectorInitializeRequest
10134 {
10135 #[inline]
10136 unsafe fn encode(
10137 self,
10138 encoder: &mut fidl::encoding::Encoder<
10139 '_,
10140 fidl::encoding::DefaultFuchsiaResourceDialect,
10141 >,
10142 offset: usize,
10143 _depth: fidl::encoding::Depth,
10144 ) -> fidl::Result<()> {
10145 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10146 fidl::encoding::Encode::<
10148 CoverageDataCollectorInitializeRequest,
10149 fidl::encoding::DefaultFuchsiaResourceDialect,
10150 >::encode(
10151 (
10152 <fidl::encoding::HandleType<
10153 fidl::EventPair,
10154 { fidl::ObjectType::EVENTPAIR.into_raw() },
10155 2147483648,
10156 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10157 &mut self.eventpair
10158 ),
10159 <fidl::encoding::HandleType<
10160 fidl::Process,
10161 { fidl::ObjectType::PROCESS.into_raw() },
10162 2147483648,
10163 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10164 &mut self.process
10165 ),
10166 ),
10167 encoder,
10168 offset,
10169 _depth,
10170 )
10171 }
10172 }
10173 unsafe impl<
10174 T0: fidl::encoding::Encode<
10175 fidl::encoding::HandleType<
10176 fidl::EventPair,
10177 { fidl::ObjectType::EVENTPAIR.into_raw() },
10178 2147483648,
10179 >,
10180 fidl::encoding::DefaultFuchsiaResourceDialect,
10181 >,
10182 T1: fidl::encoding::Encode<
10183 fidl::encoding::HandleType<
10184 fidl::Process,
10185 { fidl::ObjectType::PROCESS.into_raw() },
10186 2147483648,
10187 >,
10188 fidl::encoding::DefaultFuchsiaResourceDialect,
10189 >,
10190 >
10191 fidl::encoding::Encode<
10192 CoverageDataCollectorInitializeRequest,
10193 fidl::encoding::DefaultFuchsiaResourceDialect,
10194 > for (T0, T1)
10195 {
10196 #[inline]
10197 unsafe fn encode(
10198 self,
10199 encoder: &mut fidl::encoding::Encoder<
10200 '_,
10201 fidl::encoding::DefaultFuchsiaResourceDialect,
10202 >,
10203 offset: usize,
10204 depth: fidl::encoding::Depth,
10205 ) -> fidl::Result<()> {
10206 encoder.debug_check_bounds::<CoverageDataCollectorInitializeRequest>(offset);
10207 self.0.encode(encoder, offset + 0, depth)?;
10211 self.1.encode(encoder, offset + 4, depth)?;
10212 Ok(())
10213 }
10214 }
10215
10216 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10217 for CoverageDataCollectorInitializeRequest
10218 {
10219 #[inline(always)]
10220 fn new_empty() -> Self {
10221 Self {
10222 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10223 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10224 }
10225 }
10226
10227 #[inline]
10228 unsafe fn decode(
10229 &mut self,
10230 decoder: &mut fidl::encoding::Decoder<
10231 '_,
10232 fidl::encoding::DefaultFuchsiaResourceDialect,
10233 >,
10234 offset: usize,
10235 _depth: fidl::encoding::Depth,
10236 ) -> fidl::Result<()> {
10237 decoder.debug_check_bounds::<Self>(offset);
10238 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10240 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10241 Ok(())
10242 }
10243 }
10244
10245 impl fidl::encoding::ResourceTypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10246 type Borrowed<'a> = &'a mut Self;
10247 fn take_or_borrow<'a>(
10248 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10249 ) -> Self::Borrowed<'a> {
10250 value
10251 }
10252 }
10253
10254 unsafe impl fidl::encoding::TypeMarker for CoverageDataProviderWatchCoverageDataResponse {
10255 type Owned = Self;
10256
10257 #[inline(always)]
10258 fn inline_align(_context: fidl::encoding::Context) -> usize {
10259 8
10260 }
10261
10262 #[inline(always)]
10263 fn inline_size(_context: fidl::encoding::Context) -> usize {
10264 16
10265 }
10266 }
10267
10268 unsafe impl
10269 fidl::encoding::Encode<
10270 CoverageDataProviderWatchCoverageDataResponse,
10271 fidl::encoding::DefaultFuchsiaResourceDialect,
10272 > for &mut CoverageDataProviderWatchCoverageDataResponse
10273 {
10274 #[inline]
10275 unsafe fn encode(
10276 self,
10277 encoder: &mut fidl::encoding::Encoder<
10278 '_,
10279 fidl::encoding::DefaultFuchsiaResourceDialect,
10280 >,
10281 offset: usize,
10282 _depth: fidl::encoding::Depth,
10283 ) -> fidl::Result<()> {
10284 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10285 fidl::encoding::Encode::<CoverageDataProviderWatchCoverageDataResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10287 (
10288 <fidl::encoding::Vector<CoverageData, 4096> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.coverage_data),
10289 ),
10290 encoder, offset, _depth
10291 )
10292 }
10293 }
10294 unsafe impl<
10295 T0: fidl::encoding::Encode<
10296 fidl::encoding::Vector<CoverageData, 4096>,
10297 fidl::encoding::DefaultFuchsiaResourceDialect,
10298 >,
10299 >
10300 fidl::encoding::Encode<
10301 CoverageDataProviderWatchCoverageDataResponse,
10302 fidl::encoding::DefaultFuchsiaResourceDialect,
10303 > for (T0,)
10304 {
10305 #[inline]
10306 unsafe fn encode(
10307 self,
10308 encoder: &mut fidl::encoding::Encoder<
10309 '_,
10310 fidl::encoding::DefaultFuchsiaResourceDialect,
10311 >,
10312 offset: usize,
10313 depth: fidl::encoding::Depth,
10314 ) -> fidl::Result<()> {
10315 encoder.debug_check_bounds::<CoverageDataProviderWatchCoverageDataResponse>(offset);
10316 self.0.encode(encoder, offset + 0, depth)?;
10320 Ok(())
10321 }
10322 }
10323
10324 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10325 for CoverageDataProviderWatchCoverageDataResponse
10326 {
10327 #[inline(always)]
10328 fn new_empty() -> Self {
10329 Self {
10330 coverage_data: fidl::new_empty!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect),
10331 }
10332 }
10333
10334 #[inline]
10335 unsafe fn decode(
10336 &mut self,
10337 decoder: &mut fidl::encoding::Decoder<
10338 '_,
10339 fidl::encoding::DefaultFuchsiaResourceDialect,
10340 >,
10341 offset: usize,
10342 _depth: fidl::encoding::Depth,
10343 ) -> fidl::Result<()> {
10344 decoder.debug_check_bounds::<Self>(offset);
10345 fidl::decode!(fidl::encoding::Vector<CoverageData, 4096>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.coverage_data, decoder, offset + 0, _depth)?;
10347 Ok(())
10348 }
10349 }
10350
10351 impl fidl::encoding::ResourceTypeMarker for Input {
10352 type Borrowed<'a> = &'a mut Self;
10353 fn take_or_borrow<'a>(
10354 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10355 ) -> Self::Borrowed<'a> {
10356 value
10357 }
10358 }
10359
10360 unsafe impl fidl::encoding::TypeMarker for Input {
10361 type Owned = Self;
10362
10363 #[inline(always)]
10364 fn inline_align(_context: fidl::encoding::Context) -> usize {
10365 8
10366 }
10367
10368 #[inline(always)]
10369 fn inline_size(_context: fidl::encoding::Context) -> usize {
10370 16
10371 }
10372 }
10373
10374 unsafe impl fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect>
10375 for &mut Input
10376 {
10377 #[inline]
10378 unsafe fn encode(
10379 self,
10380 encoder: &mut fidl::encoding::Encoder<
10381 '_,
10382 fidl::encoding::DefaultFuchsiaResourceDialect,
10383 >,
10384 offset: usize,
10385 _depth: fidl::encoding::Depth,
10386 ) -> fidl::Result<()> {
10387 encoder.debug_check_bounds::<Input>(offset);
10388 fidl::encoding::Encode::<Input, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10390 (
10391 <fidl::encoding::HandleType<
10392 fidl::Socket,
10393 { fidl::ObjectType::SOCKET.into_raw() },
10394 2147483648,
10395 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10396 &mut self.socket
10397 ),
10398 <u64 as fidl::encoding::ValueTypeMarker>::borrow(&self.size),
10399 ),
10400 encoder,
10401 offset,
10402 _depth,
10403 )
10404 }
10405 }
10406 unsafe impl<
10407 T0: fidl::encoding::Encode<
10408 fidl::encoding::HandleType<
10409 fidl::Socket,
10410 { fidl::ObjectType::SOCKET.into_raw() },
10411 2147483648,
10412 >,
10413 fidl::encoding::DefaultFuchsiaResourceDialect,
10414 >,
10415 T1: fidl::encoding::Encode<u64, fidl::encoding::DefaultFuchsiaResourceDialect>,
10416 > fidl::encoding::Encode<Input, fidl::encoding::DefaultFuchsiaResourceDialect> for (T0, T1)
10417 {
10418 #[inline]
10419 unsafe fn encode(
10420 self,
10421 encoder: &mut fidl::encoding::Encoder<
10422 '_,
10423 fidl::encoding::DefaultFuchsiaResourceDialect,
10424 >,
10425 offset: usize,
10426 depth: fidl::encoding::Depth,
10427 ) -> fidl::Result<()> {
10428 encoder.debug_check_bounds::<Input>(offset);
10429 unsafe {
10432 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
10433 (ptr as *mut u64).write_unaligned(0);
10434 }
10435 self.0.encode(encoder, offset + 0, depth)?;
10437 self.1.encode(encoder, offset + 8, depth)?;
10438 Ok(())
10439 }
10440 }
10441
10442 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Input {
10443 #[inline(always)]
10444 fn new_empty() -> Self {
10445 Self {
10446 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10447 size: fidl::new_empty!(u64, fidl::encoding::DefaultFuchsiaResourceDialect),
10448 }
10449 }
10450
10451 #[inline]
10452 unsafe fn decode(
10453 &mut self,
10454 decoder: &mut fidl::encoding::Decoder<
10455 '_,
10456 fidl::encoding::DefaultFuchsiaResourceDialect,
10457 >,
10458 offset: usize,
10459 _depth: fidl::encoding::Depth,
10460 ) -> fidl::Result<()> {
10461 decoder.debug_check_bounds::<Self>(offset);
10462 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
10464 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10465 let mask = 0xffffffff00000000u64;
10466 let maskedval = padval & mask;
10467 if maskedval != 0 {
10468 return Err(fidl::Error::NonZeroPadding {
10469 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
10470 });
10471 }
10472 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 0, _depth)?;
10473 fidl::decode!(
10474 u64,
10475 fidl::encoding::DefaultFuchsiaResourceDialect,
10476 &mut self.size,
10477 decoder,
10478 offset + 8,
10479 _depth
10480 )?;
10481 Ok(())
10482 }
10483 }
10484
10485 impl fidl::encoding::ResourceTypeMarker for InstrumentedProcess {
10486 type Borrowed<'a> = &'a mut Self;
10487 fn take_or_borrow<'a>(
10488 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10489 ) -> Self::Borrowed<'a> {
10490 value
10491 }
10492 }
10493
10494 unsafe impl fidl::encoding::TypeMarker for InstrumentedProcess {
10495 type Owned = Self;
10496
10497 #[inline(always)]
10498 fn inline_align(_context: fidl::encoding::Context) -> usize {
10499 4
10500 }
10501
10502 #[inline(always)]
10503 fn inline_size(_context: fidl::encoding::Context) -> usize {
10504 8
10505 }
10506 }
10507
10508 unsafe impl
10509 fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10510 for &mut InstrumentedProcess
10511 {
10512 #[inline]
10513 unsafe fn encode(
10514 self,
10515 encoder: &mut fidl::encoding::Encoder<
10516 '_,
10517 fidl::encoding::DefaultFuchsiaResourceDialect,
10518 >,
10519 offset: usize,
10520 _depth: fidl::encoding::Depth,
10521 ) -> fidl::Result<()> {
10522 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10523 fidl::encoding::Encode::<
10525 InstrumentedProcess,
10526 fidl::encoding::DefaultFuchsiaResourceDialect,
10527 >::encode(
10528 (
10529 <fidl::encoding::HandleType<
10530 fidl::EventPair,
10531 { fidl::ObjectType::EVENTPAIR.into_raw() },
10532 2147483648,
10533 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10534 &mut self.eventpair
10535 ),
10536 <fidl::encoding::HandleType<
10537 fidl::Process,
10538 { fidl::ObjectType::PROCESS.into_raw() },
10539 2147483648,
10540 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10541 &mut self.process
10542 ),
10543 ),
10544 encoder,
10545 offset,
10546 _depth,
10547 )
10548 }
10549 }
10550 unsafe impl<
10551 T0: fidl::encoding::Encode<
10552 fidl::encoding::HandleType<
10553 fidl::EventPair,
10554 { fidl::ObjectType::EVENTPAIR.into_raw() },
10555 2147483648,
10556 >,
10557 fidl::encoding::DefaultFuchsiaResourceDialect,
10558 >,
10559 T1: fidl::encoding::Encode<
10560 fidl::encoding::HandleType<
10561 fidl::Process,
10562 { fidl::ObjectType::PROCESS.into_raw() },
10563 2147483648,
10564 >,
10565 fidl::encoding::DefaultFuchsiaResourceDialect,
10566 >,
10567 > fidl::encoding::Encode<InstrumentedProcess, fidl::encoding::DefaultFuchsiaResourceDialect>
10568 for (T0, T1)
10569 {
10570 #[inline]
10571 unsafe fn encode(
10572 self,
10573 encoder: &mut fidl::encoding::Encoder<
10574 '_,
10575 fidl::encoding::DefaultFuchsiaResourceDialect,
10576 >,
10577 offset: usize,
10578 depth: fidl::encoding::Depth,
10579 ) -> fidl::Result<()> {
10580 encoder.debug_check_bounds::<InstrumentedProcess>(offset);
10581 self.0.encode(encoder, offset + 0, depth)?;
10585 self.1.encode(encoder, offset + 4, depth)?;
10586 Ok(())
10587 }
10588 }
10589
10590 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10591 for InstrumentedProcess
10592 {
10593 #[inline(always)]
10594 fn new_empty() -> Self {
10595 Self {
10596 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10597 process: fidl::new_empty!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10598 }
10599 }
10600
10601 #[inline]
10602 unsafe fn decode(
10603 &mut self,
10604 decoder: &mut fidl::encoding::Decoder<
10605 '_,
10606 fidl::encoding::DefaultFuchsiaResourceDialect,
10607 >,
10608 offset: usize,
10609 _depth: fidl::encoding::Depth,
10610 ) -> fidl::Result<()> {
10611 decoder.debug_check_bounds::<Self>(offset);
10612 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
10614 fidl::decode!(fidl::encoding::HandleType<fidl::Process, { fidl::ObjectType::PROCESS.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.process, decoder, offset + 4, _depth)?;
10615 Ok(())
10616 }
10617 }
10618
10619 impl fidl::encoding::ResourceTypeMarker for ManagerConnectRequest {
10620 type Borrowed<'a> = &'a mut Self;
10621 fn take_or_borrow<'a>(
10622 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10623 ) -> Self::Borrowed<'a> {
10624 value
10625 }
10626 }
10627
10628 unsafe impl fidl::encoding::TypeMarker for ManagerConnectRequest {
10629 type Owned = Self;
10630
10631 #[inline(always)]
10632 fn inline_align(_context: fidl::encoding::Context) -> usize {
10633 8
10634 }
10635
10636 #[inline(always)]
10637 fn inline_size(_context: fidl::encoding::Context) -> usize {
10638 24
10639 }
10640 }
10641
10642 unsafe impl
10643 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10644 for &mut ManagerConnectRequest
10645 {
10646 #[inline]
10647 unsafe fn encode(
10648 self,
10649 encoder: &mut fidl::encoding::Encoder<
10650 '_,
10651 fidl::encoding::DefaultFuchsiaResourceDialect,
10652 >,
10653 offset: usize,
10654 _depth: fidl::encoding::Depth,
10655 ) -> fidl::Result<()> {
10656 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10657 fidl::encoding::Encode::<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10659 (
10660 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10661 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
10662 ),
10663 encoder, offset, _depth
10664 )
10665 }
10666 }
10667 unsafe impl<
10668 T0: fidl::encoding::Encode<
10669 fidl::encoding::BoundedString<4096>,
10670 fidl::encoding::DefaultFuchsiaResourceDialect,
10671 >,
10672 T1: fidl::encoding::Encode<
10673 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10674 fidl::encoding::DefaultFuchsiaResourceDialect,
10675 >,
10676 >
10677 fidl::encoding::Encode<ManagerConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
10678 for (T0, T1)
10679 {
10680 #[inline]
10681 unsafe fn encode(
10682 self,
10683 encoder: &mut fidl::encoding::Encoder<
10684 '_,
10685 fidl::encoding::DefaultFuchsiaResourceDialect,
10686 >,
10687 offset: usize,
10688 depth: fidl::encoding::Depth,
10689 ) -> fidl::Result<()> {
10690 encoder.debug_check_bounds::<ManagerConnectRequest>(offset);
10691 unsafe {
10694 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10695 (ptr as *mut u64).write_unaligned(0);
10696 }
10697 self.0.encode(encoder, offset + 0, depth)?;
10699 self.1.encode(encoder, offset + 16, depth)?;
10700 Ok(())
10701 }
10702 }
10703
10704 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10705 for ManagerConnectRequest
10706 {
10707 #[inline(always)]
10708 fn new_empty() -> Self {
10709 Self {
10710 fuzzer_url: fidl::new_empty!(
10711 fidl::encoding::BoundedString<4096>,
10712 fidl::encoding::DefaultFuchsiaResourceDialect
10713 ),
10714 controller: fidl::new_empty!(
10715 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10716 fidl::encoding::DefaultFuchsiaResourceDialect
10717 ),
10718 }
10719 }
10720
10721 #[inline]
10722 unsafe fn decode(
10723 &mut self,
10724 decoder: &mut fidl::encoding::Decoder<
10725 '_,
10726 fidl::encoding::DefaultFuchsiaResourceDialect,
10727 >,
10728 offset: usize,
10729 _depth: fidl::encoding::Depth,
10730 ) -> fidl::Result<()> {
10731 decoder.debug_check_bounds::<Self>(offset);
10732 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
10734 let padval = unsafe { (ptr as *const u64).read_unaligned() };
10735 let mask = 0xffffffff00000000u64;
10736 let maskedval = padval & mask;
10737 if maskedval != 0 {
10738 return Err(fidl::Error::NonZeroPadding {
10739 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
10740 });
10741 }
10742 fidl::decode!(
10743 fidl::encoding::BoundedString<4096>,
10744 fidl::encoding::DefaultFuchsiaResourceDialect,
10745 &mut self.fuzzer_url,
10746 decoder,
10747 offset + 0,
10748 _depth
10749 )?;
10750 fidl::decode!(
10751 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
10752 fidl::encoding::DefaultFuchsiaResourceDialect,
10753 &mut self.controller,
10754 decoder,
10755 offset + 16,
10756 _depth
10757 )?;
10758 Ok(())
10759 }
10760 }
10761
10762 impl fidl::encoding::ResourceTypeMarker for ManagerGetOutputRequest {
10763 type Borrowed<'a> = &'a mut Self;
10764 fn take_or_borrow<'a>(
10765 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10766 ) -> Self::Borrowed<'a> {
10767 value
10768 }
10769 }
10770
10771 unsafe impl fidl::encoding::TypeMarker for ManagerGetOutputRequest {
10772 type Owned = Self;
10773
10774 #[inline(always)]
10775 fn inline_align(_context: fidl::encoding::Context) -> usize {
10776 8
10777 }
10778
10779 #[inline(always)]
10780 fn inline_size(_context: fidl::encoding::Context) -> usize {
10781 24
10782 }
10783 }
10784
10785 unsafe impl
10786 fidl::encoding::Encode<
10787 ManagerGetOutputRequest,
10788 fidl::encoding::DefaultFuchsiaResourceDialect,
10789 > for &mut ManagerGetOutputRequest
10790 {
10791 #[inline]
10792 unsafe fn encode(
10793 self,
10794 encoder: &mut fidl::encoding::Encoder<
10795 '_,
10796 fidl::encoding::DefaultFuchsiaResourceDialect,
10797 >,
10798 offset: usize,
10799 _depth: fidl::encoding::Depth,
10800 ) -> fidl::Result<()> {
10801 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10802 fidl::encoding::Encode::<ManagerGetOutputRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10804 (
10805 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10806 <TestOutput as fidl::encoding::ValueTypeMarker>::borrow(&self.output),
10807 <fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.socket),
10808 ),
10809 encoder, offset, _depth
10810 )
10811 }
10812 }
10813 unsafe impl<
10814 T0: fidl::encoding::Encode<
10815 fidl::encoding::BoundedString<4096>,
10816 fidl::encoding::DefaultFuchsiaResourceDialect,
10817 >,
10818 T1: fidl::encoding::Encode<TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect>,
10819 T2: fidl::encoding::Encode<
10820 fidl::encoding::HandleType<
10821 fidl::Socket,
10822 { fidl::ObjectType::SOCKET.into_raw() },
10823 2147483648,
10824 >,
10825 fidl::encoding::DefaultFuchsiaResourceDialect,
10826 >,
10827 >
10828 fidl::encoding::Encode<
10829 ManagerGetOutputRequest,
10830 fidl::encoding::DefaultFuchsiaResourceDialect,
10831 > for (T0, T1, T2)
10832 {
10833 #[inline]
10834 unsafe fn encode(
10835 self,
10836 encoder: &mut fidl::encoding::Encoder<
10837 '_,
10838 fidl::encoding::DefaultFuchsiaResourceDialect,
10839 >,
10840 offset: usize,
10841 depth: fidl::encoding::Depth,
10842 ) -> fidl::Result<()> {
10843 encoder.debug_check_bounds::<ManagerGetOutputRequest>(offset);
10844 self.0.encode(encoder, offset + 0, depth)?;
10848 self.1.encode(encoder, offset + 16, depth)?;
10849 self.2.encode(encoder, offset + 20, depth)?;
10850 Ok(())
10851 }
10852 }
10853
10854 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10855 for ManagerGetOutputRequest
10856 {
10857 #[inline(always)]
10858 fn new_empty() -> Self {
10859 Self {
10860 fuzzer_url: fidl::new_empty!(
10861 fidl::encoding::BoundedString<4096>,
10862 fidl::encoding::DefaultFuchsiaResourceDialect
10863 ),
10864 output: fidl::new_empty!(TestOutput, fidl::encoding::DefaultFuchsiaResourceDialect),
10865 socket: fidl::new_empty!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
10866 }
10867 }
10868
10869 #[inline]
10870 unsafe fn decode(
10871 &mut self,
10872 decoder: &mut fidl::encoding::Decoder<
10873 '_,
10874 fidl::encoding::DefaultFuchsiaResourceDialect,
10875 >,
10876 offset: usize,
10877 _depth: fidl::encoding::Depth,
10878 ) -> fidl::Result<()> {
10879 decoder.debug_check_bounds::<Self>(offset);
10880 fidl::decode!(
10882 fidl::encoding::BoundedString<4096>,
10883 fidl::encoding::DefaultFuchsiaResourceDialect,
10884 &mut self.fuzzer_url,
10885 decoder,
10886 offset + 0,
10887 _depth
10888 )?;
10889 fidl::decode!(
10890 TestOutput,
10891 fidl::encoding::DefaultFuchsiaResourceDialect,
10892 &mut self.output,
10893 decoder,
10894 offset + 16,
10895 _depth
10896 )?;
10897 fidl::decode!(fidl::encoding::HandleType<fidl::Socket, { fidl::ObjectType::SOCKET.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.socket, decoder, offset + 20, _depth)?;
10898 Ok(())
10899 }
10900 }
10901
10902 impl fidl::encoding::ResourceTypeMarker for RegistrarRegisterRequest {
10903 type Borrowed<'a> = &'a mut Self;
10904 fn take_or_borrow<'a>(
10905 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
10906 ) -> Self::Borrowed<'a> {
10907 value
10908 }
10909 }
10910
10911 unsafe impl fidl::encoding::TypeMarker for RegistrarRegisterRequest {
10912 type Owned = Self;
10913
10914 #[inline(always)]
10915 fn inline_align(_context: fidl::encoding::Context) -> usize {
10916 8
10917 }
10918
10919 #[inline(always)]
10920 fn inline_size(_context: fidl::encoding::Context) -> usize {
10921 24
10922 }
10923 }
10924
10925 unsafe impl
10926 fidl::encoding::Encode<
10927 RegistrarRegisterRequest,
10928 fidl::encoding::DefaultFuchsiaResourceDialect,
10929 > for &mut RegistrarRegisterRequest
10930 {
10931 #[inline]
10932 unsafe fn encode(
10933 self,
10934 encoder: &mut fidl::encoding::Encoder<
10935 '_,
10936 fidl::encoding::DefaultFuchsiaResourceDialect,
10937 >,
10938 offset: usize,
10939 _depth: fidl::encoding::Depth,
10940 ) -> fidl::Result<()> {
10941 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10942 fidl::encoding::Encode::<RegistrarRegisterRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
10944 (
10945 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
10946 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.provider),
10947 ),
10948 encoder, offset, _depth
10949 )
10950 }
10951 }
10952 unsafe impl<
10953 T0: fidl::encoding::Encode<
10954 fidl::encoding::BoundedString<4096>,
10955 fidl::encoding::DefaultFuchsiaResourceDialect,
10956 >,
10957 T1: fidl::encoding::Encode<
10958 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
10959 fidl::encoding::DefaultFuchsiaResourceDialect,
10960 >,
10961 >
10962 fidl::encoding::Encode<
10963 RegistrarRegisterRequest,
10964 fidl::encoding::DefaultFuchsiaResourceDialect,
10965 > for (T0, T1)
10966 {
10967 #[inline]
10968 unsafe fn encode(
10969 self,
10970 encoder: &mut fidl::encoding::Encoder<
10971 '_,
10972 fidl::encoding::DefaultFuchsiaResourceDialect,
10973 >,
10974 offset: usize,
10975 depth: fidl::encoding::Depth,
10976 ) -> fidl::Result<()> {
10977 encoder.debug_check_bounds::<RegistrarRegisterRequest>(offset);
10978 unsafe {
10981 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
10982 (ptr as *mut u64).write_unaligned(0);
10983 }
10984 self.0.encode(encoder, offset + 0, depth)?;
10986 self.1.encode(encoder, offset + 16, depth)?;
10987 Ok(())
10988 }
10989 }
10990
10991 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10992 for RegistrarRegisterRequest
10993 {
10994 #[inline(always)]
10995 fn new_empty() -> Self {
10996 Self {
10997 fuzzer_url: fidl::new_empty!(
10998 fidl::encoding::BoundedString<4096>,
10999 fidl::encoding::DefaultFuchsiaResourceDialect
11000 ),
11001 provider: fidl::new_empty!(
11002 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
11003 fidl::encoding::DefaultFuchsiaResourceDialect
11004 ),
11005 }
11006 }
11007
11008 #[inline]
11009 unsafe fn decode(
11010 &mut self,
11011 decoder: &mut fidl::encoding::Decoder<
11012 '_,
11013 fidl::encoding::DefaultFuchsiaResourceDialect,
11014 >,
11015 offset: usize,
11016 _depth: fidl::encoding::Depth,
11017 ) -> fidl::Result<()> {
11018 decoder.debug_check_bounds::<Self>(offset);
11019 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11021 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11022 let mask = 0xffffffff00000000u64;
11023 let maskedval = padval & mask;
11024 if maskedval != 0 {
11025 return Err(fidl::Error::NonZeroPadding {
11026 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11027 });
11028 }
11029 fidl::decode!(
11030 fidl::encoding::BoundedString<4096>,
11031 fidl::encoding::DefaultFuchsiaResourceDialect,
11032 &mut self.fuzzer_url,
11033 decoder,
11034 offset + 0,
11035 _depth
11036 )?;
11037 fidl::decode!(
11038 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<ControllerProviderMarker>>,
11039 fidl::encoding::DefaultFuchsiaResourceDialect,
11040 &mut self.provider,
11041 decoder,
11042 offset + 16,
11043 _depth
11044 )?;
11045 Ok(())
11046 }
11047 }
11048
11049 impl fidl::encoding::ResourceTypeMarker for RegistryConnectRequest {
11050 type Borrowed<'a> = &'a mut Self;
11051 fn take_or_borrow<'a>(
11052 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11053 ) -> Self::Borrowed<'a> {
11054 value
11055 }
11056 }
11057
11058 unsafe impl fidl::encoding::TypeMarker for RegistryConnectRequest {
11059 type Owned = Self;
11060
11061 #[inline(always)]
11062 fn inline_align(_context: fidl::encoding::Context) -> usize {
11063 8
11064 }
11065
11066 #[inline(always)]
11067 fn inline_size(_context: fidl::encoding::Context) -> usize {
11068 32
11069 }
11070 }
11071
11072 unsafe impl
11073 fidl::encoding::Encode<
11074 RegistryConnectRequest,
11075 fidl::encoding::DefaultFuchsiaResourceDialect,
11076 > for &mut RegistryConnectRequest
11077 {
11078 #[inline]
11079 unsafe fn encode(
11080 self,
11081 encoder: &mut fidl::encoding::Encoder<
11082 '_,
11083 fidl::encoding::DefaultFuchsiaResourceDialect,
11084 >,
11085 offset: usize,
11086 _depth: fidl::encoding::Depth,
11087 ) -> fidl::Result<()> {
11088 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11089 fidl::encoding::Encode::<RegistryConnectRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
11091 (
11092 <fidl::encoding::BoundedString<4096> as fidl::encoding::ValueTypeMarker>::borrow(&self.fuzzer_url),
11093 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.controller),
11094 <i64 as fidl::encoding::ValueTypeMarker>::borrow(&self.timeout),
11095 ),
11096 encoder, offset, _depth
11097 )
11098 }
11099 }
11100 unsafe impl<
11101 T0: fidl::encoding::Encode<
11102 fidl::encoding::BoundedString<4096>,
11103 fidl::encoding::DefaultFuchsiaResourceDialect,
11104 >,
11105 T1: fidl::encoding::Encode<
11106 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11107 fidl::encoding::DefaultFuchsiaResourceDialect,
11108 >,
11109 T2: fidl::encoding::Encode<i64, fidl::encoding::DefaultFuchsiaResourceDialect>,
11110 >
11111 fidl::encoding::Encode<
11112 RegistryConnectRequest,
11113 fidl::encoding::DefaultFuchsiaResourceDialect,
11114 > for (T0, T1, T2)
11115 {
11116 #[inline]
11117 unsafe fn encode(
11118 self,
11119 encoder: &mut fidl::encoding::Encoder<
11120 '_,
11121 fidl::encoding::DefaultFuchsiaResourceDialect,
11122 >,
11123 offset: usize,
11124 depth: fidl::encoding::Depth,
11125 ) -> fidl::Result<()> {
11126 encoder.debug_check_bounds::<RegistryConnectRequest>(offset);
11127 unsafe {
11130 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
11131 (ptr as *mut u64).write_unaligned(0);
11132 }
11133 self.0.encode(encoder, offset + 0, depth)?;
11135 self.1.encode(encoder, offset + 16, depth)?;
11136 self.2.encode(encoder, offset + 24, depth)?;
11137 Ok(())
11138 }
11139 }
11140
11141 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11142 for RegistryConnectRequest
11143 {
11144 #[inline(always)]
11145 fn new_empty() -> Self {
11146 Self {
11147 fuzzer_url: fidl::new_empty!(
11148 fidl::encoding::BoundedString<4096>,
11149 fidl::encoding::DefaultFuchsiaResourceDialect
11150 ),
11151 controller: fidl::new_empty!(
11152 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11153 fidl::encoding::DefaultFuchsiaResourceDialect
11154 ),
11155 timeout: fidl::new_empty!(i64, fidl::encoding::DefaultFuchsiaResourceDialect),
11156 }
11157 }
11158
11159 #[inline]
11160 unsafe fn decode(
11161 &mut self,
11162 decoder: &mut fidl::encoding::Decoder<
11163 '_,
11164 fidl::encoding::DefaultFuchsiaResourceDialect,
11165 >,
11166 offset: usize,
11167 _depth: fidl::encoding::Depth,
11168 ) -> fidl::Result<()> {
11169 decoder.debug_check_bounds::<Self>(offset);
11170 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
11172 let padval = unsafe { (ptr as *const u64).read_unaligned() };
11173 let mask = 0xffffffff00000000u64;
11174 let maskedval = padval & mask;
11175 if maskedval != 0 {
11176 return Err(fidl::Error::NonZeroPadding {
11177 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
11178 });
11179 }
11180 fidl::decode!(
11181 fidl::encoding::BoundedString<4096>,
11182 fidl::encoding::DefaultFuchsiaResourceDialect,
11183 &mut self.fuzzer_url,
11184 decoder,
11185 offset + 0,
11186 _depth
11187 )?;
11188 fidl::decode!(
11189 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<ControllerMarker>>,
11190 fidl::encoding::DefaultFuchsiaResourceDialect,
11191 &mut self.controller,
11192 decoder,
11193 offset + 16,
11194 _depth
11195 )?;
11196 fidl::decode!(
11197 i64,
11198 fidl::encoding::DefaultFuchsiaResourceDialect,
11199 &mut self.timeout,
11200 decoder,
11201 offset + 24,
11202 _depth
11203 )?;
11204 Ok(())
11205 }
11206 }
11207
11208 impl fidl::encoding::ResourceTypeMarker for TargetAdapterConnectRequest {
11209 type Borrowed<'a> = &'a mut Self;
11210 fn take_or_borrow<'a>(
11211 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11212 ) -> Self::Borrowed<'a> {
11213 value
11214 }
11215 }
11216
11217 unsafe impl fidl::encoding::TypeMarker for TargetAdapterConnectRequest {
11218 type Owned = Self;
11219
11220 #[inline(always)]
11221 fn inline_align(_context: fidl::encoding::Context) -> usize {
11222 4
11223 }
11224
11225 #[inline(always)]
11226 fn inline_size(_context: fidl::encoding::Context) -> usize {
11227 8
11228 }
11229 }
11230
11231 unsafe impl
11232 fidl::encoding::Encode<
11233 TargetAdapterConnectRequest,
11234 fidl::encoding::DefaultFuchsiaResourceDialect,
11235 > for &mut TargetAdapterConnectRequest
11236 {
11237 #[inline]
11238 unsafe fn encode(
11239 self,
11240 encoder: &mut fidl::encoding::Encoder<
11241 '_,
11242 fidl::encoding::DefaultFuchsiaResourceDialect,
11243 >,
11244 offset: usize,
11245 _depth: fidl::encoding::Depth,
11246 ) -> fidl::Result<()> {
11247 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11248 fidl::encoding::Encode::<
11250 TargetAdapterConnectRequest,
11251 fidl::encoding::DefaultFuchsiaResourceDialect,
11252 >::encode(
11253 (
11254 <fidl::encoding::HandleType<
11255 fidl::EventPair,
11256 { fidl::ObjectType::EVENTPAIR.into_raw() },
11257 2147483648,
11258 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11259 &mut self.eventpair
11260 ),
11261 <fidl::encoding::HandleType<
11262 fidl::Vmo,
11263 { fidl::ObjectType::VMO.into_raw() },
11264 2147483648,
11265 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11266 &mut self.test_input
11267 ),
11268 ),
11269 encoder,
11270 offset,
11271 _depth,
11272 )
11273 }
11274 }
11275 unsafe impl<
11276 T0: fidl::encoding::Encode<
11277 fidl::encoding::HandleType<
11278 fidl::EventPair,
11279 { fidl::ObjectType::EVENTPAIR.into_raw() },
11280 2147483648,
11281 >,
11282 fidl::encoding::DefaultFuchsiaResourceDialect,
11283 >,
11284 T1: fidl::encoding::Encode<
11285 fidl::encoding::HandleType<
11286 fidl::Vmo,
11287 { fidl::ObjectType::VMO.into_raw() },
11288 2147483648,
11289 >,
11290 fidl::encoding::DefaultFuchsiaResourceDialect,
11291 >,
11292 >
11293 fidl::encoding::Encode<
11294 TargetAdapterConnectRequest,
11295 fidl::encoding::DefaultFuchsiaResourceDialect,
11296 > for (T0, T1)
11297 {
11298 #[inline]
11299 unsafe fn encode(
11300 self,
11301 encoder: &mut fidl::encoding::Encoder<
11302 '_,
11303 fidl::encoding::DefaultFuchsiaResourceDialect,
11304 >,
11305 offset: usize,
11306 depth: fidl::encoding::Depth,
11307 ) -> fidl::Result<()> {
11308 encoder.debug_check_bounds::<TargetAdapterConnectRequest>(offset);
11309 self.0.encode(encoder, offset + 0, depth)?;
11313 self.1.encode(encoder, offset + 4, depth)?;
11314 Ok(())
11315 }
11316 }
11317
11318 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
11319 for TargetAdapterConnectRequest
11320 {
11321 #[inline(always)]
11322 fn new_empty() -> Self {
11323 Self {
11324 eventpair: fidl::new_empty!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11325 test_input: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11326 }
11327 }
11328
11329 #[inline]
11330 unsafe fn decode(
11331 &mut self,
11332 decoder: &mut fidl::encoding::Decoder<
11333 '_,
11334 fidl::encoding::DefaultFuchsiaResourceDialect,
11335 >,
11336 offset: usize,
11337 _depth: fidl::encoding::Depth,
11338 ) -> fidl::Result<()> {
11339 decoder.debug_check_bounds::<Self>(offset);
11340 fidl::decode!(fidl::encoding::HandleType<fidl::EventPair, { fidl::ObjectType::EVENTPAIR.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.eventpair, decoder, offset + 0, _depth)?;
11342 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.test_input, decoder, offset + 4, _depth)?;
11343 Ok(())
11344 }
11345 }
11346
11347 impl Artifact {
11348 #[inline(always)]
11349 fn max_ordinal_present(&self) -> u64 {
11350 if let Some(_) = self.error {
11351 return 3;
11352 }
11353 if let Some(_) = self.input {
11354 return 2;
11355 }
11356 if let Some(_) = self.result {
11357 return 1;
11358 }
11359 0
11360 }
11361 }
11362
11363 impl fidl::encoding::ResourceTypeMarker for Artifact {
11364 type Borrowed<'a> = &'a mut Self;
11365 fn take_or_borrow<'a>(
11366 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11367 ) -> Self::Borrowed<'a> {
11368 value
11369 }
11370 }
11371
11372 unsafe impl fidl::encoding::TypeMarker for Artifact {
11373 type Owned = Self;
11374
11375 #[inline(always)]
11376 fn inline_align(_context: fidl::encoding::Context) -> usize {
11377 8
11378 }
11379
11380 #[inline(always)]
11381 fn inline_size(_context: fidl::encoding::Context) -> usize {
11382 16
11383 }
11384 }
11385
11386 unsafe impl fidl::encoding::Encode<Artifact, fidl::encoding::DefaultFuchsiaResourceDialect>
11387 for &mut Artifact
11388 {
11389 unsafe fn encode(
11390 self,
11391 encoder: &mut fidl::encoding::Encoder<
11392 '_,
11393 fidl::encoding::DefaultFuchsiaResourceDialect,
11394 >,
11395 offset: usize,
11396 mut depth: fidl::encoding::Depth,
11397 ) -> fidl::Result<()> {
11398 encoder.debug_check_bounds::<Artifact>(offset);
11399 let max_ordinal: u64 = self.max_ordinal_present();
11401 encoder.write_num(max_ordinal, offset);
11402 encoder.write_num(fidl::encoding::ALLOC_PRESENT_U64, offset + 8);
11403 if max_ordinal == 0 {
11405 return Ok(());
11406 }
11407 depth.increment()?;
11408 let envelope_size = 8;
11409 let bytes_len = max_ordinal as usize * envelope_size;
11410 #[allow(unused_variables)]
11411 let offset = encoder.out_of_line_offset(bytes_len);
11412 let mut _prev_end_offset: usize = 0;
11413 if 1 > max_ordinal {
11414 return Ok(());
11415 }
11416
11417 let cur_offset: usize = (1 - 1) * envelope_size;
11420
11421 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11423
11424 fidl::encoding::encode_in_envelope_optional::<
11429 Result_,
11430 fidl::encoding::DefaultFuchsiaResourceDialect,
11431 >(
11432 self.result.as_ref().map(<Result_ as fidl::encoding::ValueTypeMarker>::borrow),
11433 encoder,
11434 offset + cur_offset,
11435 depth,
11436 )?;
11437
11438 _prev_end_offset = cur_offset + envelope_size;
11439 if 2 > max_ordinal {
11440 return Ok(());
11441 }
11442
11443 let cur_offset: usize = (2 - 1) * envelope_size;
11446
11447 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11449
11450 fidl::encoding::encode_in_envelope_optional::<
11455 Input,
11456 fidl::encoding::DefaultFuchsiaResourceDialect,
11457 >(
11458 self.input
11459 .as_mut()
11460 .map(<Input as fidl::encoding::ResourceTypeMarker>::take_or_borrow),
11461 encoder,
11462 offset + cur_offset,
11463 depth,
11464 )?;
11465
11466 _prev_end_offset = cur_offset + envelope_size;
11467 if 3 > max_ordinal {
11468 return Ok(());
11469 }
11470
11471 let cur_offset: usize = (3 - 1) * envelope_size;
11474
11475 encoder.padding(offset + _prev_end_offset, cur_offset - _prev_end_offset);
11477
11478 fidl::encoding::encode_in_envelope_optional::<
11483 i32,
11484 fidl::encoding::DefaultFuchsiaResourceDialect,
11485 >(
11486 self.error.as_ref().map(<i32 as fidl::encoding::ValueTypeMarker>::borrow),
11487 encoder,
11488 offset + cur_offset,
11489 depth,
11490 )?;
11491
11492 _prev_end_offset = cur_offset + envelope_size;
11493
11494 Ok(())
11495 }
11496 }
11497
11498 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Artifact {
11499 #[inline(always)]
11500 fn new_empty() -> Self {
11501 Self::default()
11502 }
11503
11504 unsafe fn decode(
11505 &mut self,
11506 decoder: &mut fidl::encoding::Decoder<
11507 '_,
11508 fidl::encoding::DefaultFuchsiaResourceDialect,
11509 >,
11510 offset: usize,
11511 mut depth: fidl::encoding::Depth,
11512 ) -> fidl::Result<()> {
11513 decoder.debug_check_bounds::<Self>(offset);
11514 let len = match fidl::encoding::decode_vector_header(decoder, offset)? {
11515 None => return Err(fidl::Error::NotNullable),
11516 Some(len) => len,
11517 };
11518 if len == 0 {
11520 return Ok(());
11521 };
11522 depth.increment()?;
11523 let envelope_size = 8;
11524 let bytes_len = len * envelope_size;
11525 let offset = decoder.out_of_line_offset(bytes_len)?;
11526 let mut _next_ordinal_to_read = 0;
11528 let mut next_offset = offset;
11529 let end_offset = offset + bytes_len;
11530 _next_ordinal_to_read += 1;
11531 if next_offset >= end_offset {
11532 return Ok(());
11533 }
11534
11535 while _next_ordinal_to_read < 1 {
11537 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11538 _next_ordinal_to_read += 1;
11539 next_offset += envelope_size;
11540 }
11541
11542 let next_out_of_line = decoder.next_out_of_line();
11543 let handles_before = decoder.remaining_handles();
11544 if let Some((inlined, num_bytes, num_handles)) =
11545 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11546 {
11547 let member_inline_size =
11548 <Result_ as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11549 if inlined != (member_inline_size <= 4) {
11550 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11551 }
11552 let inner_offset;
11553 let mut inner_depth = depth.clone();
11554 if inlined {
11555 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11556 inner_offset = next_offset;
11557 } else {
11558 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11559 inner_depth.increment()?;
11560 }
11561 let val_ref = self.result.get_or_insert_with(|| {
11562 fidl::new_empty!(Result_, fidl::encoding::DefaultFuchsiaResourceDialect)
11563 });
11564 fidl::decode!(
11565 Result_,
11566 fidl::encoding::DefaultFuchsiaResourceDialect,
11567 val_ref,
11568 decoder,
11569 inner_offset,
11570 inner_depth
11571 )?;
11572 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11573 {
11574 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11575 }
11576 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11577 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11578 }
11579 }
11580
11581 next_offset += envelope_size;
11582 _next_ordinal_to_read += 1;
11583 if next_offset >= end_offset {
11584 return Ok(());
11585 }
11586
11587 while _next_ordinal_to_read < 2 {
11589 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11590 _next_ordinal_to_read += 1;
11591 next_offset += envelope_size;
11592 }
11593
11594 let next_out_of_line = decoder.next_out_of_line();
11595 let handles_before = decoder.remaining_handles();
11596 if let Some((inlined, num_bytes, num_handles)) =
11597 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11598 {
11599 let member_inline_size =
11600 <Input as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11601 if inlined != (member_inline_size <= 4) {
11602 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11603 }
11604 let inner_offset;
11605 let mut inner_depth = depth.clone();
11606 if inlined {
11607 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11608 inner_offset = next_offset;
11609 } else {
11610 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11611 inner_depth.increment()?;
11612 }
11613 let val_ref = self.input.get_or_insert_with(|| {
11614 fidl::new_empty!(Input, fidl::encoding::DefaultFuchsiaResourceDialect)
11615 });
11616 fidl::decode!(
11617 Input,
11618 fidl::encoding::DefaultFuchsiaResourceDialect,
11619 val_ref,
11620 decoder,
11621 inner_offset,
11622 inner_depth
11623 )?;
11624 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11625 {
11626 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11627 }
11628 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11629 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11630 }
11631 }
11632
11633 next_offset += envelope_size;
11634 _next_ordinal_to_read += 1;
11635 if next_offset >= end_offset {
11636 return Ok(());
11637 }
11638
11639 while _next_ordinal_to_read < 3 {
11641 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11642 _next_ordinal_to_read += 1;
11643 next_offset += envelope_size;
11644 }
11645
11646 let next_out_of_line = decoder.next_out_of_line();
11647 let handles_before = decoder.remaining_handles();
11648 if let Some((inlined, num_bytes, num_handles)) =
11649 fidl::encoding::decode_envelope_header(decoder, next_offset)?
11650 {
11651 let member_inline_size =
11652 <i32 as fidl::encoding::TypeMarker>::inline_size(decoder.context);
11653 if inlined != (member_inline_size <= 4) {
11654 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11655 }
11656 let inner_offset;
11657 let mut inner_depth = depth.clone();
11658 if inlined {
11659 decoder.check_inline_envelope_padding(next_offset, member_inline_size)?;
11660 inner_offset = next_offset;
11661 } else {
11662 inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11663 inner_depth.increment()?;
11664 }
11665 let val_ref = self.error.get_or_insert_with(|| {
11666 fidl::new_empty!(i32, fidl::encoding::DefaultFuchsiaResourceDialect)
11667 });
11668 fidl::decode!(
11669 i32,
11670 fidl::encoding::DefaultFuchsiaResourceDialect,
11671 val_ref,
11672 decoder,
11673 inner_offset,
11674 inner_depth
11675 )?;
11676 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize)
11677 {
11678 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11679 }
11680 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11681 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11682 }
11683 }
11684
11685 next_offset += envelope_size;
11686
11687 while next_offset < end_offset {
11689 _next_ordinal_to_read += 1;
11690 fidl::encoding::decode_unknown_envelope(decoder, next_offset, depth)?;
11691 next_offset += envelope_size;
11692 }
11693
11694 Ok(())
11695 }
11696 }
11697
11698 impl fidl::encoding::ResourceTypeMarker for Data {
11699 type Borrowed<'a> = &'a mut Self;
11700 fn take_or_borrow<'a>(
11701 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
11702 ) -> Self::Borrowed<'a> {
11703 value
11704 }
11705 }
11706
11707 unsafe impl fidl::encoding::TypeMarker for Data {
11708 type Owned = Self;
11709
11710 #[inline(always)]
11711 fn inline_align(_context: fidl::encoding::Context) -> usize {
11712 8
11713 }
11714
11715 #[inline(always)]
11716 fn inline_size(_context: fidl::encoding::Context) -> usize {
11717 16
11718 }
11719 }
11720
11721 unsafe impl fidl::encoding::Encode<Data, fidl::encoding::DefaultFuchsiaResourceDialect>
11722 for &mut Data
11723 {
11724 #[inline]
11725 unsafe fn encode(
11726 self,
11727 encoder: &mut fidl::encoding::Encoder<
11728 '_,
11729 fidl::encoding::DefaultFuchsiaResourceDialect,
11730 >,
11731 offset: usize,
11732 _depth: fidl::encoding::Depth,
11733 ) -> fidl::Result<()> {
11734 encoder.debug_check_bounds::<Data>(offset);
11735 encoder.write_num::<u64>(self.ordinal(), offset);
11736 match self {
11737 Data::Instrumented(ref mut val) => fidl::encoding::encode_in_envelope::<
11738 InstrumentedProcess,
11739 fidl::encoding::DefaultFuchsiaResourceDialect,
11740 >(
11741 <InstrumentedProcess as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11742 val,
11743 ),
11744 encoder,
11745 offset + 8,
11746 _depth,
11747 ),
11748 Data::Inline8bitCounters(ref mut val) => fidl::encoding::encode_in_envelope::<
11749 fidl::encoding::HandleType<
11750 fidl::Vmo,
11751 { fidl::ObjectType::VMO.into_raw() },
11752 2147483648,
11753 >,
11754 fidl::encoding::DefaultFuchsiaResourceDialect,
11755 >(
11756 <fidl::encoding::HandleType<
11757 fidl::Vmo,
11758 { fidl::ObjectType::VMO.into_raw() },
11759 2147483648,
11760 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
11761 val
11762 ),
11763 encoder,
11764 offset + 8,
11765 _depth,
11766 ),
11767 Data::__SourceBreaking { .. } => Err(fidl::Error::UnknownUnionTag),
11768 }
11769 }
11770 }
11771
11772 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for Data {
11773 #[inline(always)]
11774 fn new_empty() -> Self {
11775 Self::__SourceBreaking { unknown_ordinal: 0 }
11776 }
11777
11778 #[inline]
11779 unsafe fn decode(
11780 &mut self,
11781 decoder: &mut fidl::encoding::Decoder<
11782 '_,
11783 fidl::encoding::DefaultFuchsiaResourceDialect,
11784 >,
11785 offset: usize,
11786 mut depth: fidl::encoding::Depth,
11787 ) -> fidl::Result<()> {
11788 decoder.debug_check_bounds::<Self>(offset);
11789 #[allow(unused_variables)]
11790 let next_out_of_line = decoder.next_out_of_line();
11791 let handles_before = decoder.remaining_handles();
11792 let (ordinal, inlined, num_bytes, num_handles) =
11793 fidl::encoding::decode_union_inline_portion(decoder, offset)?;
11794
11795 let member_inline_size = match ordinal {
11796 1 => <InstrumentedProcess as fidl::encoding::TypeMarker>::inline_size(
11797 decoder.context,
11798 ),
11799 2 => <fidl::encoding::HandleType<
11800 fidl::Vmo,
11801 { fidl::ObjectType::VMO.into_raw() },
11802 2147483648,
11803 > as fidl::encoding::TypeMarker>::inline_size(decoder.context),
11804 0 => return Err(fidl::Error::UnknownUnionTag),
11805 _ => num_bytes as usize,
11806 };
11807
11808 if inlined != (member_inline_size <= 4) {
11809 return Err(fidl::Error::InvalidInlineBitInEnvelope);
11810 }
11811 let _inner_offset;
11812 if inlined {
11813 decoder.check_inline_envelope_padding(offset + 8, member_inline_size)?;
11814 _inner_offset = offset + 8;
11815 } else {
11816 depth.increment()?;
11817 _inner_offset = decoder.out_of_line_offset(member_inline_size)?;
11818 }
11819 match ordinal {
11820 1 => {
11821 #[allow(irrefutable_let_patterns)]
11822 if let Data::Instrumented(_) = self {
11823 } else {
11825 *self = Data::Instrumented(fidl::new_empty!(
11827 InstrumentedProcess,
11828 fidl::encoding::DefaultFuchsiaResourceDialect
11829 ));
11830 }
11831 #[allow(irrefutable_let_patterns)]
11832 if let Data::Instrumented(ref mut val) = self {
11833 fidl::decode!(
11834 InstrumentedProcess,
11835 fidl::encoding::DefaultFuchsiaResourceDialect,
11836 val,
11837 decoder,
11838 _inner_offset,
11839 depth
11840 )?;
11841 } else {
11842 unreachable!()
11843 }
11844 }
11845 2 => {
11846 #[allow(irrefutable_let_patterns)]
11847 if let Data::Inline8bitCounters(_) = self {
11848 } else {
11850 *self = Data::Inline8bitCounters(
11852 fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
11853 );
11854 }
11855 #[allow(irrefutable_let_patterns)]
11856 if let Data::Inline8bitCounters(ref mut val) = self {
11857 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, val, decoder, _inner_offset, depth)?;
11858 } else {
11859 unreachable!()
11860 }
11861 }
11862 #[allow(deprecated)]
11863 ordinal => {
11864 for _ in 0..num_handles {
11865 decoder.drop_next_handle()?;
11866 }
11867 *self = Data::__SourceBreaking { unknown_ordinal: ordinal };
11868 }
11869 }
11870 if !inlined && decoder.next_out_of_line() != next_out_of_line + (num_bytes as usize) {
11871 return Err(fidl::Error::InvalidNumBytesInEnvelope);
11872 }
11873 if handles_before != decoder.remaining_handles() + (num_handles as usize) {
11874 return Err(fidl::Error::InvalidNumHandlesInEnvelope);
11875 }
11876 Ok(())
11877 }
11878 }
11879}