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_paver_common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
15pub struct DataSinkReadFirmwareRequest {
16 pub configuration: Configuration,
17 pub type_: String,
18}
19
20impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
21 for DataSinkReadFirmwareRequest
22{
23}
24
25#[derive(Debug, PartialEq)]
26pub struct DataSinkWriteAssetRequest {
27 pub configuration: Configuration,
28 pub asset: Asset,
29 pub payload: fidl_fuchsia_mem::Buffer,
30}
31
32impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DataSinkWriteAssetRequest {}
33
34#[derive(Debug, PartialEq)]
35pub struct DataSinkWriteFirmwareRequest {
36 pub configuration: Configuration,
37 pub type_: String,
38 pub payload: fidl_fuchsia_mem::Buffer,
39}
40
41impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
42 for DataSinkWriteFirmwareRequest
43{
44}
45
46#[derive(Debug, PartialEq)]
47pub struct DataSinkWriteOpaqueVolumeRequest {
48 pub payload: fidl_fuchsia_mem::Buffer,
49}
50
51impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
52 for DataSinkWriteOpaqueVolumeRequest
53{
54}
55
56#[derive(Debug, PartialEq)]
57pub struct DataSinkWriteSparseVolumeRequest {
58 pub payload: fidl_fuchsia_mem::Buffer,
59}
60
61impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
62 for DataSinkWriteSparseVolumeRequest
63{
64}
65
66#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct DataSinkWriteVolumesRequest {
68 pub payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
69}
70
71impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
72 for DataSinkWriteVolumesRequest
73{
74}
75
76#[derive(Debug, PartialEq)]
77pub struct DataSinkReadAssetResponse {
78 pub asset: fidl_fuchsia_mem::Buffer,
79}
80
81impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for DataSinkReadAssetResponse {}
82
83#[derive(Debug, PartialEq)]
84pub struct DataSinkReadFirmwareResponse {
85 pub firmware: fidl_fuchsia_mem::Buffer,
86}
87
88impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
89 for DataSinkReadFirmwareResponse
90{
91}
92
93#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
94pub struct PaverFindBootManagerRequest {
95 pub boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
96}
97
98impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
99 for PaverFindBootManagerRequest
100{
101}
102
103#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
104pub struct PaverFindDataSinkRequest {
105 pub data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
106}
107
108impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for PaverFindDataSinkRequest {}
109
110#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
111pub struct PaverFindPartitionTableManagerRequest {
112 pub data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
113}
114
115impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
116 for PaverFindPartitionTableManagerRequest
117{
118}
119
120#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
121pub struct PaverFindSysconfigRequest {
122 pub sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
123}
124
125impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for PaverFindSysconfigRequest {}
126
127#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
128pub struct PayloadStreamRegisterVmoRequest {
129 pub vmo: fidl::Vmo,
130}
131
132impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
133 for PayloadStreamRegisterVmoRequest
134{
135}
136
137#[derive(Debug, PartialEq)]
138pub struct SysconfigWriteRequest {
139 pub payload: fidl_fuchsia_mem::Buffer,
140}
141
142impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SysconfigWriteRequest {}
143
144#[derive(Debug, PartialEq)]
145pub struct SysconfigReadResponse {
146 pub data: fidl_fuchsia_mem::Buffer,
147}
148
149impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SysconfigReadResponse {}
150
151#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
152pub struct BootManagerMarker;
153
154impl fidl::endpoints::ProtocolMarker for BootManagerMarker {
155 type Proxy = BootManagerProxy;
156 type RequestStream = BootManagerRequestStream;
157 #[cfg(target_os = "fuchsia")]
158 type SynchronousProxy = BootManagerSynchronousProxy;
159
160 const DEBUG_NAME: &'static str = "(anonymous) BootManager";
161}
162pub type BootManagerQueryCurrentConfigurationResult = Result<Configuration, i32>;
163pub type BootManagerQueryActiveConfigurationResult = Result<Configuration, i32>;
164pub type BootManagerQueryConfigurationLastSetActiveResult = Result<Configuration, i32>;
165pub type BootManagerQueryConfigurationStatusResult = Result<ConfigurationStatus, i32>;
166pub type BootManagerQueryConfigurationStatusAndBootAttemptsResult =
167 Result<BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>;
168pub type BootManagerSetOneShotRecoveryResult = Result<(), i32>;
169
170pub trait BootManagerProxyInterface: Send + Sync {
171 type QueryCurrentConfigurationResponseFut: std::future::Future<
172 Output = Result<BootManagerQueryCurrentConfigurationResult, fidl::Error>,
173 > + Send;
174 fn r#query_current_configuration(&self) -> Self::QueryCurrentConfigurationResponseFut;
175 type QueryActiveConfigurationResponseFut: std::future::Future<Output = Result<BootManagerQueryActiveConfigurationResult, fidl::Error>>
176 + Send;
177 fn r#query_active_configuration(&self) -> Self::QueryActiveConfigurationResponseFut;
178 type QueryConfigurationLastSetActiveResponseFut: std::future::Future<
179 Output = Result<BootManagerQueryConfigurationLastSetActiveResult, fidl::Error>,
180 > + Send;
181 fn r#query_configuration_last_set_active(
182 &self,
183 ) -> Self::QueryConfigurationLastSetActiveResponseFut;
184 type QueryConfigurationStatusResponseFut: std::future::Future<Output = Result<BootManagerQueryConfigurationStatusResult, fidl::Error>>
185 + Send;
186 fn r#query_configuration_status(
187 &self,
188 configuration: Configuration,
189 ) -> Self::QueryConfigurationStatusResponseFut;
190 type QueryConfigurationStatusAndBootAttemptsResponseFut: std::future::Future<
191 Output = Result<BootManagerQueryConfigurationStatusAndBootAttemptsResult, fidl::Error>,
192 > + Send;
193 fn r#query_configuration_status_and_boot_attempts(
194 &self,
195 configuration: Configuration,
196 ) -> Self::QueryConfigurationStatusAndBootAttemptsResponseFut;
197 type SetConfigurationActiveResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
198 + Send;
199 fn r#set_configuration_active(
200 &self,
201 configuration: Configuration,
202 ) -> Self::SetConfigurationActiveResponseFut;
203 type SetConfigurationUnbootableResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
204 + Send;
205 fn r#set_configuration_unbootable(
206 &self,
207 configuration: Configuration,
208 ) -> Self::SetConfigurationUnbootableResponseFut;
209 type SetConfigurationHealthyResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
210 + Send;
211 fn r#set_configuration_healthy(
212 &self,
213 configuration: Configuration,
214 ) -> Self::SetConfigurationHealthyResponseFut;
215 type SetOneShotRecoveryResponseFut: std::future::Future<Output = Result<BootManagerSetOneShotRecoveryResult, fidl::Error>>
216 + Send;
217 fn r#set_one_shot_recovery(&self) -> Self::SetOneShotRecoveryResponseFut;
218 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
219 fn r#flush(&self) -> Self::FlushResponseFut;
220}
221#[derive(Debug)]
222#[cfg(target_os = "fuchsia")]
223pub struct BootManagerSynchronousProxy {
224 client: fidl::client::sync::Client,
225}
226
227#[cfg(target_os = "fuchsia")]
228impl fidl::endpoints::SynchronousProxy for BootManagerSynchronousProxy {
229 type Proxy = BootManagerProxy;
230 type Protocol = BootManagerMarker;
231
232 fn from_channel(inner: fidl::Channel) -> Self {
233 Self::new(inner)
234 }
235
236 fn into_channel(self) -> fidl::Channel {
237 self.client.into_channel()
238 }
239
240 fn as_channel(&self) -> &fidl::Channel {
241 self.client.as_channel()
242 }
243}
244
245#[cfg(target_os = "fuchsia")]
246impl BootManagerSynchronousProxy {
247 pub fn new(channel: fidl::Channel) -> Self {
248 let protocol_name = <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
249 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
250 }
251
252 pub fn into_channel(self) -> fidl::Channel {
253 self.client.into_channel()
254 }
255
256 pub fn wait_for_event(
259 &self,
260 deadline: zx::MonotonicInstant,
261 ) -> Result<BootManagerEvent, fidl::Error> {
262 BootManagerEvent::decode(self.client.wait_for_event(deadline)?)
263 }
264
265 pub fn r#query_current_configuration(
270 &self,
271 ___deadline: zx::MonotonicInstant,
272 ) -> Result<BootManagerQueryCurrentConfigurationResult, fidl::Error> {
273 let _response =
274 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
275 BootManagerQueryCurrentConfigurationResponse,
276 i32,
277 >>(
278 (),
279 0xc213298cbc9c371,
280 fidl::encoding::DynamicFlags::empty(),
281 ___deadline,
282 )?;
283 Ok(_response.map(|x| x.configuration))
284 }
285
286 pub fn r#query_active_configuration(
292 &self,
293 ___deadline: zx::MonotonicInstant,
294 ) -> Result<BootManagerQueryActiveConfigurationResult, fidl::Error> {
295 let _response =
296 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
297 BootManagerQueryActiveConfigurationResponse,
298 i32,
299 >>(
300 (),
301 0x71d52acdf59947a4,
302 fidl::encoding::DynamicFlags::empty(),
303 ___deadline,
304 )?;
305 Ok(_response.map(|x| x.configuration))
306 }
307
308 pub fn r#query_configuration_last_set_active(
317 &self,
318 ___deadline: zx::MonotonicInstant,
319 ) -> Result<BootManagerQueryConfigurationLastSetActiveResult, fidl::Error> {
320 let _response =
321 self.client.send_query::<fidl::encoding::EmptyPayload, fidl::encoding::ResultType<
322 BootManagerQueryConfigurationLastSetActiveResponse,
323 i32,
324 >>(
325 (),
326 0x6bcad87311b3345,
327 fidl::encoding::DynamicFlags::empty(),
328 ___deadline,
329 )?;
330 Ok(_response.map(|x| x.configuration))
331 }
332
333 pub fn r#query_configuration_status(
337 &self,
338 mut configuration: Configuration,
339 ___deadline: zx::MonotonicInstant,
340 ) -> Result<BootManagerQueryConfigurationStatusResult, fidl::Error> {
341 let _response = self.client.send_query::<
342 BootManagerQueryConfigurationStatusRequest,
343 fidl::encoding::ResultType<BootManagerQueryConfigurationStatusResponse, i32>,
344 >(
345 (configuration,),
346 0x40822ca9ca68b19a,
347 fidl::encoding::DynamicFlags::empty(),
348 ___deadline,
349 )?;
350 Ok(_response.map(|x| x.status))
351 }
352
353 pub fn r#query_configuration_status_and_boot_attempts(
373 &self,
374 mut configuration: Configuration,
375 ___deadline: zx::MonotonicInstant,
376 ) -> Result<BootManagerQueryConfigurationStatusAndBootAttemptsResult, fidl::Error> {
377 let _response = self.client.send_query::<
378 BootManagerQueryConfigurationStatusAndBootAttemptsRequest,
379 fidl::encoding::ResultType<BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
380 >(
381 (configuration,),
382 0x27f851d5809cfb3d,
383 fidl::encoding::DynamicFlags::empty(),
384 ___deadline,
385 )?;
386 Ok(_response.map(|x| x))
387 }
388
389 pub fn r#set_configuration_active(
397 &self,
398 mut configuration: Configuration,
399 ___deadline: zx::MonotonicInstant,
400 ) -> Result<i32, fidl::Error> {
401 let _response = self.client.send_query::<
402 BootManagerSetConfigurationActiveRequest,
403 BootManagerSetConfigurationActiveResponse,
404 >(
405 (configuration,),
406 0x14c64074f81f9a7f,
407 fidl::encoding::DynamicFlags::empty(),
408 ___deadline,
409 )?;
410 Ok(_response.status)
411 }
412
413 pub fn r#set_configuration_unbootable(
426 &self,
427 mut configuration: Configuration,
428 ___deadline: zx::MonotonicInstant,
429 ) -> Result<i32, fidl::Error> {
430 let _response = self.client.send_query::<
431 BootManagerSetConfigurationUnbootableRequest,
432 BootManagerSetConfigurationUnbootableResponse,
433 >(
434 (configuration,),
435 0x6f8716bf306d197f,
436 fidl::encoding::DynamicFlags::empty(),
437 ___deadline,
438 )?;
439 Ok(_response.status)
440 }
441
442 pub fn r#set_configuration_healthy(
463 &self,
464 mut configuration: Configuration,
465 ___deadline: zx::MonotonicInstant,
466 ) -> Result<i32, fidl::Error> {
467 let _response = self.client.send_query::<
468 BootManagerSetConfigurationHealthyRequest,
469 BootManagerSetConfigurationHealthyResponse,
470 >(
471 (configuration,),
472 0x5dfe31714c8ec4be,
473 fidl::encoding::DynamicFlags::empty(),
474 ___deadline,
475 )?;
476 Ok(_response.status)
477 }
478
479 pub fn r#set_one_shot_recovery(
483 &self,
484 ___deadline: zx::MonotonicInstant,
485 ) -> Result<BootManagerSetOneShotRecoveryResult, fidl::Error> {
486 let _response = self.client.send_query::<
487 fidl::encoding::EmptyPayload,
488 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
489 >(
490 (),
491 0x7a5af0a28354f24d,
492 fidl::encoding::DynamicFlags::empty(),
493 ___deadline,
494 )?;
495 Ok(_response.map(|x| x))
496 }
497
498 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
500 let _response =
501 self.client.send_query::<fidl::encoding::EmptyPayload, BootManagerFlushResponse>(
502 (),
503 0x2f29ec2322d62d3e,
504 fidl::encoding::DynamicFlags::empty(),
505 ___deadline,
506 )?;
507 Ok(_response.status)
508 }
509}
510
511#[derive(Debug, Clone)]
512pub struct BootManagerProxy {
513 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
514}
515
516impl fidl::endpoints::Proxy for BootManagerProxy {
517 type Protocol = BootManagerMarker;
518
519 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
520 Self::new(inner)
521 }
522
523 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
524 self.client.into_channel().map_err(|client| Self { client })
525 }
526
527 fn as_channel(&self) -> &::fidl::AsyncChannel {
528 self.client.as_channel()
529 }
530}
531
532impl BootManagerProxy {
533 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
535 let protocol_name = <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
536 Self { client: fidl::client::Client::new(channel, protocol_name) }
537 }
538
539 pub fn take_event_stream(&self) -> BootManagerEventStream {
545 BootManagerEventStream { event_receiver: self.client.take_event_receiver() }
546 }
547
548 pub fn r#query_current_configuration(
553 &self,
554 ) -> fidl::client::QueryResponseFut<
555 BootManagerQueryCurrentConfigurationResult,
556 fidl::encoding::DefaultFuchsiaResourceDialect,
557 > {
558 BootManagerProxyInterface::r#query_current_configuration(self)
559 }
560
561 pub fn r#query_active_configuration(
567 &self,
568 ) -> fidl::client::QueryResponseFut<
569 BootManagerQueryActiveConfigurationResult,
570 fidl::encoding::DefaultFuchsiaResourceDialect,
571 > {
572 BootManagerProxyInterface::r#query_active_configuration(self)
573 }
574
575 pub fn r#query_configuration_last_set_active(
584 &self,
585 ) -> fidl::client::QueryResponseFut<
586 BootManagerQueryConfigurationLastSetActiveResult,
587 fidl::encoding::DefaultFuchsiaResourceDialect,
588 > {
589 BootManagerProxyInterface::r#query_configuration_last_set_active(self)
590 }
591
592 pub fn r#query_configuration_status(
596 &self,
597 mut configuration: Configuration,
598 ) -> fidl::client::QueryResponseFut<
599 BootManagerQueryConfigurationStatusResult,
600 fidl::encoding::DefaultFuchsiaResourceDialect,
601 > {
602 BootManagerProxyInterface::r#query_configuration_status(self, configuration)
603 }
604
605 pub fn r#query_configuration_status_and_boot_attempts(
625 &self,
626 mut configuration: Configuration,
627 ) -> fidl::client::QueryResponseFut<
628 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
629 fidl::encoding::DefaultFuchsiaResourceDialect,
630 > {
631 BootManagerProxyInterface::r#query_configuration_status_and_boot_attempts(
632 self,
633 configuration,
634 )
635 }
636
637 pub fn r#set_configuration_active(
645 &self,
646 mut configuration: Configuration,
647 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
648 BootManagerProxyInterface::r#set_configuration_active(self, configuration)
649 }
650
651 pub fn r#set_configuration_unbootable(
664 &self,
665 mut configuration: Configuration,
666 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
667 BootManagerProxyInterface::r#set_configuration_unbootable(self, configuration)
668 }
669
670 pub fn r#set_configuration_healthy(
691 &self,
692 mut configuration: Configuration,
693 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
694 BootManagerProxyInterface::r#set_configuration_healthy(self, configuration)
695 }
696
697 pub fn r#set_one_shot_recovery(
701 &self,
702 ) -> fidl::client::QueryResponseFut<
703 BootManagerSetOneShotRecoveryResult,
704 fidl::encoding::DefaultFuchsiaResourceDialect,
705 > {
706 BootManagerProxyInterface::r#set_one_shot_recovery(self)
707 }
708
709 pub fn r#flush(
711 &self,
712 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
713 BootManagerProxyInterface::r#flush(self)
714 }
715}
716
717impl BootManagerProxyInterface for BootManagerProxy {
718 type QueryCurrentConfigurationResponseFut = fidl::client::QueryResponseFut<
719 BootManagerQueryCurrentConfigurationResult,
720 fidl::encoding::DefaultFuchsiaResourceDialect,
721 >;
722 fn r#query_current_configuration(&self) -> Self::QueryCurrentConfigurationResponseFut {
723 fn _decode(
724 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
725 ) -> Result<BootManagerQueryCurrentConfigurationResult, fidl::Error> {
726 let _response = fidl::client::decode_transaction_body::<
727 fidl::encoding::ResultType<BootManagerQueryCurrentConfigurationResponse, i32>,
728 fidl::encoding::DefaultFuchsiaResourceDialect,
729 0xc213298cbc9c371,
730 >(_buf?)?;
731 Ok(_response.map(|x| x.configuration))
732 }
733 self.client.send_query_and_decode::<
734 fidl::encoding::EmptyPayload,
735 BootManagerQueryCurrentConfigurationResult,
736 >(
737 (),
738 0xc213298cbc9c371,
739 fidl::encoding::DynamicFlags::empty(),
740 _decode,
741 )
742 }
743
744 type QueryActiveConfigurationResponseFut = fidl::client::QueryResponseFut<
745 BootManagerQueryActiveConfigurationResult,
746 fidl::encoding::DefaultFuchsiaResourceDialect,
747 >;
748 fn r#query_active_configuration(&self) -> Self::QueryActiveConfigurationResponseFut {
749 fn _decode(
750 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
751 ) -> Result<BootManagerQueryActiveConfigurationResult, fidl::Error> {
752 let _response = fidl::client::decode_transaction_body::<
753 fidl::encoding::ResultType<BootManagerQueryActiveConfigurationResponse, i32>,
754 fidl::encoding::DefaultFuchsiaResourceDialect,
755 0x71d52acdf59947a4,
756 >(_buf?)?;
757 Ok(_response.map(|x| x.configuration))
758 }
759 self.client.send_query_and_decode::<
760 fidl::encoding::EmptyPayload,
761 BootManagerQueryActiveConfigurationResult,
762 >(
763 (),
764 0x71d52acdf59947a4,
765 fidl::encoding::DynamicFlags::empty(),
766 _decode,
767 )
768 }
769
770 type QueryConfigurationLastSetActiveResponseFut = fidl::client::QueryResponseFut<
771 BootManagerQueryConfigurationLastSetActiveResult,
772 fidl::encoding::DefaultFuchsiaResourceDialect,
773 >;
774 fn r#query_configuration_last_set_active(
775 &self,
776 ) -> Self::QueryConfigurationLastSetActiveResponseFut {
777 fn _decode(
778 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
779 ) -> Result<BootManagerQueryConfigurationLastSetActiveResult, fidl::Error> {
780 let _response = fidl::client::decode_transaction_body::<
781 fidl::encoding::ResultType<BootManagerQueryConfigurationLastSetActiveResponse, i32>,
782 fidl::encoding::DefaultFuchsiaResourceDialect,
783 0x6bcad87311b3345,
784 >(_buf?)?;
785 Ok(_response.map(|x| x.configuration))
786 }
787 self.client.send_query_and_decode::<
788 fidl::encoding::EmptyPayload,
789 BootManagerQueryConfigurationLastSetActiveResult,
790 >(
791 (),
792 0x6bcad87311b3345,
793 fidl::encoding::DynamicFlags::empty(),
794 _decode,
795 )
796 }
797
798 type QueryConfigurationStatusResponseFut = fidl::client::QueryResponseFut<
799 BootManagerQueryConfigurationStatusResult,
800 fidl::encoding::DefaultFuchsiaResourceDialect,
801 >;
802 fn r#query_configuration_status(
803 &self,
804 mut configuration: Configuration,
805 ) -> Self::QueryConfigurationStatusResponseFut {
806 fn _decode(
807 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
808 ) -> Result<BootManagerQueryConfigurationStatusResult, fidl::Error> {
809 let _response = fidl::client::decode_transaction_body::<
810 fidl::encoding::ResultType<BootManagerQueryConfigurationStatusResponse, i32>,
811 fidl::encoding::DefaultFuchsiaResourceDialect,
812 0x40822ca9ca68b19a,
813 >(_buf?)?;
814 Ok(_response.map(|x| x.status))
815 }
816 self.client.send_query_and_decode::<
817 BootManagerQueryConfigurationStatusRequest,
818 BootManagerQueryConfigurationStatusResult,
819 >(
820 (configuration,),
821 0x40822ca9ca68b19a,
822 fidl::encoding::DynamicFlags::empty(),
823 _decode,
824 )
825 }
826
827 type QueryConfigurationStatusAndBootAttemptsResponseFut = fidl::client::QueryResponseFut<
828 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
829 fidl::encoding::DefaultFuchsiaResourceDialect,
830 >;
831 fn r#query_configuration_status_and_boot_attempts(
832 &self,
833 mut configuration: Configuration,
834 ) -> Self::QueryConfigurationStatusAndBootAttemptsResponseFut {
835 fn _decode(
836 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
837 ) -> Result<BootManagerQueryConfigurationStatusAndBootAttemptsResult, fidl::Error> {
838 let _response = fidl::client::decode_transaction_body::<
839 fidl::encoding::ResultType<
840 BootManagerQueryConfigurationStatusAndBootAttemptsResponse,
841 i32,
842 >,
843 fidl::encoding::DefaultFuchsiaResourceDialect,
844 0x27f851d5809cfb3d,
845 >(_buf?)?;
846 Ok(_response.map(|x| x))
847 }
848 self.client.send_query_and_decode::<
849 BootManagerQueryConfigurationStatusAndBootAttemptsRequest,
850 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
851 >(
852 (configuration,),
853 0x27f851d5809cfb3d,
854 fidl::encoding::DynamicFlags::empty(),
855 _decode,
856 )
857 }
858
859 type SetConfigurationActiveResponseFut =
860 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
861 fn r#set_configuration_active(
862 &self,
863 mut configuration: Configuration,
864 ) -> Self::SetConfigurationActiveResponseFut {
865 fn _decode(
866 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
867 ) -> Result<i32, fidl::Error> {
868 let _response = fidl::client::decode_transaction_body::<
869 BootManagerSetConfigurationActiveResponse,
870 fidl::encoding::DefaultFuchsiaResourceDialect,
871 0x14c64074f81f9a7f,
872 >(_buf?)?;
873 Ok(_response.status)
874 }
875 self.client.send_query_and_decode::<BootManagerSetConfigurationActiveRequest, i32>(
876 (configuration,),
877 0x14c64074f81f9a7f,
878 fidl::encoding::DynamicFlags::empty(),
879 _decode,
880 )
881 }
882
883 type SetConfigurationUnbootableResponseFut =
884 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
885 fn r#set_configuration_unbootable(
886 &self,
887 mut configuration: Configuration,
888 ) -> Self::SetConfigurationUnbootableResponseFut {
889 fn _decode(
890 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
891 ) -> Result<i32, fidl::Error> {
892 let _response = fidl::client::decode_transaction_body::<
893 BootManagerSetConfigurationUnbootableResponse,
894 fidl::encoding::DefaultFuchsiaResourceDialect,
895 0x6f8716bf306d197f,
896 >(_buf?)?;
897 Ok(_response.status)
898 }
899 self.client.send_query_and_decode::<BootManagerSetConfigurationUnbootableRequest, i32>(
900 (configuration,),
901 0x6f8716bf306d197f,
902 fidl::encoding::DynamicFlags::empty(),
903 _decode,
904 )
905 }
906
907 type SetConfigurationHealthyResponseFut =
908 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
909 fn r#set_configuration_healthy(
910 &self,
911 mut configuration: Configuration,
912 ) -> Self::SetConfigurationHealthyResponseFut {
913 fn _decode(
914 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
915 ) -> Result<i32, fidl::Error> {
916 let _response = fidl::client::decode_transaction_body::<
917 BootManagerSetConfigurationHealthyResponse,
918 fidl::encoding::DefaultFuchsiaResourceDialect,
919 0x5dfe31714c8ec4be,
920 >(_buf?)?;
921 Ok(_response.status)
922 }
923 self.client.send_query_and_decode::<BootManagerSetConfigurationHealthyRequest, i32>(
924 (configuration,),
925 0x5dfe31714c8ec4be,
926 fidl::encoding::DynamicFlags::empty(),
927 _decode,
928 )
929 }
930
931 type SetOneShotRecoveryResponseFut = fidl::client::QueryResponseFut<
932 BootManagerSetOneShotRecoveryResult,
933 fidl::encoding::DefaultFuchsiaResourceDialect,
934 >;
935 fn r#set_one_shot_recovery(&self) -> Self::SetOneShotRecoveryResponseFut {
936 fn _decode(
937 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
938 ) -> Result<BootManagerSetOneShotRecoveryResult, fidl::Error> {
939 let _response = fidl::client::decode_transaction_body::<
940 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
941 fidl::encoding::DefaultFuchsiaResourceDialect,
942 0x7a5af0a28354f24d,
943 >(_buf?)?;
944 Ok(_response.map(|x| x))
945 }
946 self.client.send_query_and_decode::<
947 fidl::encoding::EmptyPayload,
948 BootManagerSetOneShotRecoveryResult,
949 >(
950 (),
951 0x7a5af0a28354f24d,
952 fidl::encoding::DynamicFlags::empty(),
953 _decode,
954 )
955 }
956
957 type FlushResponseFut =
958 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
959 fn r#flush(&self) -> Self::FlushResponseFut {
960 fn _decode(
961 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
962 ) -> Result<i32, fidl::Error> {
963 let _response = fidl::client::decode_transaction_body::<
964 BootManagerFlushResponse,
965 fidl::encoding::DefaultFuchsiaResourceDialect,
966 0x2f29ec2322d62d3e,
967 >(_buf?)?;
968 Ok(_response.status)
969 }
970 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
971 (),
972 0x2f29ec2322d62d3e,
973 fidl::encoding::DynamicFlags::empty(),
974 _decode,
975 )
976 }
977}
978
979pub struct BootManagerEventStream {
980 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
981}
982
983impl std::marker::Unpin for BootManagerEventStream {}
984
985impl futures::stream::FusedStream for BootManagerEventStream {
986 fn is_terminated(&self) -> bool {
987 self.event_receiver.is_terminated()
988 }
989}
990
991impl futures::Stream for BootManagerEventStream {
992 type Item = Result<BootManagerEvent, fidl::Error>;
993
994 fn poll_next(
995 mut self: std::pin::Pin<&mut Self>,
996 cx: &mut std::task::Context<'_>,
997 ) -> std::task::Poll<Option<Self::Item>> {
998 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
999 &mut self.event_receiver,
1000 cx
1001 )?) {
1002 Some(buf) => std::task::Poll::Ready(Some(BootManagerEvent::decode(buf))),
1003 None => std::task::Poll::Ready(None),
1004 }
1005 }
1006}
1007
1008#[derive(Debug)]
1009pub enum BootManagerEvent {}
1010
1011impl BootManagerEvent {
1012 fn decode(
1014 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1015 ) -> Result<BootManagerEvent, fidl::Error> {
1016 let (bytes, _handles) = buf.split_mut();
1017 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1018 debug_assert_eq!(tx_header.tx_id, 0);
1019 match tx_header.ordinal {
1020 _ => Err(fidl::Error::UnknownOrdinal {
1021 ordinal: tx_header.ordinal,
1022 protocol_name: <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1023 }),
1024 }
1025 }
1026}
1027
1028pub struct BootManagerRequestStream {
1030 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1031 is_terminated: bool,
1032}
1033
1034impl std::marker::Unpin for BootManagerRequestStream {}
1035
1036impl futures::stream::FusedStream for BootManagerRequestStream {
1037 fn is_terminated(&self) -> bool {
1038 self.is_terminated
1039 }
1040}
1041
1042impl fidl::endpoints::RequestStream for BootManagerRequestStream {
1043 type Protocol = BootManagerMarker;
1044 type ControlHandle = BootManagerControlHandle;
1045
1046 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1047 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1048 }
1049
1050 fn control_handle(&self) -> Self::ControlHandle {
1051 BootManagerControlHandle { inner: self.inner.clone() }
1052 }
1053
1054 fn into_inner(
1055 self,
1056 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1057 {
1058 (self.inner, self.is_terminated)
1059 }
1060
1061 fn from_inner(
1062 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1063 is_terminated: bool,
1064 ) -> Self {
1065 Self { inner, is_terminated }
1066 }
1067}
1068
1069impl futures::Stream for BootManagerRequestStream {
1070 type Item = Result<BootManagerRequest, fidl::Error>;
1071
1072 fn poll_next(
1073 mut self: std::pin::Pin<&mut Self>,
1074 cx: &mut std::task::Context<'_>,
1075 ) -> std::task::Poll<Option<Self::Item>> {
1076 let this = &mut *self;
1077 if this.inner.check_shutdown(cx) {
1078 this.is_terminated = true;
1079 return std::task::Poll::Ready(None);
1080 }
1081 if this.is_terminated {
1082 panic!("polled BootManagerRequestStream after completion");
1083 }
1084 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1085 |bytes, handles| {
1086 match this.inner.channel().read_etc(cx, bytes, handles) {
1087 std::task::Poll::Ready(Ok(())) => {}
1088 std::task::Poll::Pending => return std::task::Poll::Pending,
1089 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1090 this.is_terminated = true;
1091 return std::task::Poll::Ready(None);
1092 }
1093 std::task::Poll::Ready(Err(e)) => {
1094 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1095 e.into(),
1096 ))))
1097 }
1098 }
1099
1100 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1102
1103 std::task::Poll::Ready(Some(match header.ordinal {
1104 0xc213298cbc9c371 => {
1105 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1106 let mut req = fidl::new_empty!(
1107 fidl::encoding::EmptyPayload,
1108 fidl::encoding::DefaultFuchsiaResourceDialect
1109 );
1110 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1111 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1112 Ok(BootManagerRequest::QueryCurrentConfiguration {
1113 responder: BootManagerQueryCurrentConfigurationResponder {
1114 control_handle: std::mem::ManuallyDrop::new(control_handle),
1115 tx_id: header.tx_id,
1116 },
1117 })
1118 }
1119 0x71d52acdf59947a4 => {
1120 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1121 let mut req = fidl::new_empty!(
1122 fidl::encoding::EmptyPayload,
1123 fidl::encoding::DefaultFuchsiaResourceDialect
1124 );
1125 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1126 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1127 Ok(BootManagerRequest::QueryActiveConfiguration {
1128 responder: BootManagerQueryActiveConfigurationResponder {
1129 control_handle: std::mem::ManuallyDrop::new(control_handle),
1130 tx_id: header.tx_id,
1131 },
1132 })
1133 }
1134 0x6bcad87311b3345 => {
1135 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1136 let mut req = fidl::new_empty!(
1137 fidl::encoding::EmptyPayload,
1138 fidl::encoding::DefaultFuchsiaResourceDialect
1139 );
1140 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1141 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1142 Ok(BootManagerRequest::QueryConfigurationLastSetActive {
1143 responder: BootManagerQueryConfigurationLastSetActiveResponder {
1144 control_handle: std::mem::ManuallyDrop::new(control_handle),
1145 tx_id: header.tx_id,
1146 },
1147 })
1148 }
1149 0x40822ca9ca68b19a => {
1150 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1151 let mut req = fidl::new_empty!(
1152 BootManagerQueryConfigurationStatusRequest,
1153 fidl::encoding::DefaultFuchsiaResourceDialect
1154 );
1155 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerQueryConfigurationStatusRequest>(&header, _body_bytes, handles, &mut req)?;
1156 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1157 Ok(BootManagerRequest::QueryConfigurationStatus {
1158 configuration: req.configuration,
1159
1160 responder: BootManagerQueryConfigurationStatusResponder {
1161 control_handle: std::mem::ManuallyDrop::new(control_handle),
1162 tx_id: header.tx_id,
1163 },
1164 })
1165 }
1166 0x27f851d5809cfb3d => {
1167 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1168 let mut req = fidl::new_empty!(
1169 BootManagerQueryConfigurationStatusAndBootAttemptsRequest,
1170 fidl::encoding::DefaultFuchsiaResourceDialect
1171 );
1172 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerQueryConfigurationStatusAndBootAttemptsRequest>(&header, _body_bytes, handles, &mut req)?;
1173 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1174 Ok(BootManagerRequest::QueryConfigurationStatusAndBootAttempts {
1175 configuration: req.configuration,
1176
1177 responder:
1178 BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1179 control_handle: std::mem::ManuallyDrop::new(control_handle),
1180 tx_id: header.tx_id,
1181 },
1182 })
1183 }
1184 0x14c64074f81f9a7f => {
1185 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1186 let mut req = fidl::new_empty!(
1187 BootManagerSetConfigurationActiveRequest,
1188 fidl::encoding::DefaultFuchsiaResourceDialect
1189 );
1190 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationActiveRequest>(&header, _body_bytes, handles, &mut req)?;
1191 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1192 Ok(BootManagerRequest::SetConfigurationActive {
1193 configuration: req.configuration,
1194
1195 responder: BootManagerSetConfigurationActiveResponder {
1196 control_handle: std::mem::ManuallyDrop::new(control_handle),
1197 tx_id: header.tx_id,
1198 },
1199 })
1200 }
1201 0x6f8716bf306d197f => {
1202 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1203 let mut req = fidl::new_empty!(
1204 BootManagerSetConfigurationUnbootableRequest,
1205 fidl::encoding::DefaultFuchsiaResourceDialect
1206 );
1207 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationUnbootableRequest>(&header, _body_bytes, handles, &mut req)?;
1208 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1209 Ok(BootManagerRequest::SetConfigurationUnbootable {
1210 configuration: req.configuration,
1211
1212 responder: BootManagerSetConfigurationUnbootableResponder {
1213 control_handle: std::mem::ManuallyDrop::new(control_handle),
1214 tx_id: header.tx_id,
1215 },
1216 })
1217 }
1218 0x5dfe31714c8ec4be => {
1219 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1220 let mut req = fidl::new_empty!(
1221 BootManagerSetConfigurationHealthyRequest,
1222 fidl::encoding::DefaultFuchsiaResourceDialect
1223 );
1224 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationHealthyRequest>(&header, _body_bytes, handles, &mut req)?;
1225 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1226 Ok(BootManagerRequest::SetConfigurationHealthy {
1227 configuration: req.configuration,
1228
1229 responder: BootManagerSetConfigurationHealthyResponder {
1230 control_handle: std::mem::ManuallyDrop::new(control_handle),
1231 tx_id: header.tx_id,
1232 },
1233 })
1234 }
1235 0x7a5af0a28354f24d => {
1236 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1237 let mut req = fidl::new_empty!(
1238 fidl::encoding::EmptyPayload,
1239 fidl::encoding::DefaultFuchsiaResourceDialect
1240 );
1241 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1242 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1243 Ok(BootManagerRequest::SetOneShotRecovery {
1244 responder: BootManagerSetOneShotRecoveryResponder {
1245 control_handle: std::mem::ManuallyDrop::new(control_handle),
1246 tx_id: header.tx_id,
1247 },
1248 })
1249 }
1250 0x2f29ec2322d62d3e => {
1251 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1252 let mut req = fidl::new_empty!(
1253 fidl::encoding::EmptyPayload,
1254 fidl::encoding::DefaultFuchsiaResourceDialect
1255 );
1256 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1257 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1258 Ok(BootManagerRequest::Flush {
1259 responder: BootManagerFlushResponder {
1260 control_handle: std::mem::ManuallyDrop::new(control_handle),
1261 tx_id: header.tx_id,
1262 },
1263 })
1264 }
1265 _ => Err(fidl::Error::UnknownOrdinal {
1266 ordinal: header.ordinal,
1267 protocol_name:
1268 <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1269 }),
1270 }))
1271 },
1272 )
1273 }
1274}
1275
1276#[derive(Debug)]
1289pub enum BootManagerRequest {
1290 QueryCurrentConfiguration { responder: BootManagerQueryCurrentConfigurationResponder },
1295 QueryActiveConfiguration { responder: BootManagerQueryActiveConfigurationResponder },
1301 QueryConfigurationLastSetActive {
1310 responder: BootManagerQueryConfigurationLastSetActiveResponder,
1311 },
1312 QueryConfigurationStatus {
1316 configuration: Configuration,
1317 responder: BootManagerQueryConfigurationStatusResponder,
1318 },
1319 QueryConfigurationStatusAndBootAttempts {
1339 configuration: Configuration,
1340 responder: BootManagerQueryConfigurationStatusAndBootAttemptsResponder,
1341 },
1342 SetConfigurationActive {
1350 configuration: Configuration,
1351 responder: BootManagerSetConfigurationActiveResponder,
1352 },
1353 SetConfigurationUnbootable {
1366 configuration: Configuration,
1367 responder: BootManagerSetConfigurationUnbootableResponder,
1368 },
1369 SetConfigurationHealthy {
1390 configuration: Configuration,
1391 responder: BootManagerSetConfigurationHealthyResponder,
1392 },
1393 SetOneShotRecovery { responder: BootManagerSetOneShotRecoveryResponder },
1397 Flush { responder: BootManagerFlushResponder },
1399}
1400
1401impl BootManagerRequest {
1402 #[allow(irrefutable_let_patterns)]
1403 pub fn into_query_current_configuration(
1404 self,
1405 ) -> Option<(BootManagerQueryCurrentConfigurationResponder)> {
1406 if let BootManagerRequest::QueryCurrentConfiguration { responder } = self {
1407 Some((responder))
1408 } else {
1409 None
1410 }
1411 }
1412
1413 #[allow(irrefutable_let_patterns)]
1414 pub fn into_query_active_configuration(
1415 self,
1416 ) -> Option<(BootManagerQueryActiveConfigurationResponder)> {
1417 if let BootManagerRequest::QueryActiveConfiguration { responder } = self {
1418 Some((responder))
1419 } else {
1420 None
1421 }
1422 }
1423
1424 #[allow(irrefutable_let_patterns)]
1425 pub fn into_query_configuration_last_set_active(
1426 self,
1427 ) -> Option<(BootManagerQueryConfigurationLastSetActiveResponder)> {
1428 if let BootManagerRequest::QueryConfigurationLastSetActive { responder } = self {
1429 Some((responder))
1430 } else {
1431 None
1432 }
1433 }
1434
1435 #[allow(irrefutable_let_patterns)]
1436 pub fn into_query_configuration_status(
1437 self,
1438 ) -> Option<(Configuration, BootManagerQueryConfigurationStatusResponder)> {
1439 if let BootManagerRequest::QueryConfigurationStatus { configuration, responder } = self {
1440 Some((configuration, responder))
1441 } else {
1442 None
1443 }
1444 }
1445
1446 #[allow(irrefutable_let_patterns)]
1447 pub fn into_query_configuration_status_and_boot_attempts(
1448 self,
1449 ) -> Option<(Configuration, BootManagerQueryConfigurationStatusAndBootAttemptsResponder)> {
1450 if let BootManagerRequest::QueryConfigurationStatusAndBootAttempts {
1451 configuration,
1452 responder,
1453 } = self
1454 {
1455 Some((configuration, responder))
1456 } else {
1457 None
1458 }
1459 }
1460
1461 #[allow(irrefutable_let_patterns)]
1462 pub fn into_set_configuration_active(
1463 self,
1464 ) -> Option<(Configuration, BootManagerSetConfigurationActiveResponder)> {
1465 if let BootManagerRequest::SetConfigurationActive { configuration, responder } = self {
1466 Some((configuration, responder))
1467 } else {
1468 None
1469 }
1470 }
1471
1472 #[allow(irrefutable_let_patterns)]
1473 pub fn into_set_configuration_unbootable(
1474 self,
1475 ) -> Option<(Configuration, BootManagerSetConfigurationUnbootableResponder)> {
1476 if let BootManagerRequest::SetConfigurationUnbootable { configuration, responder } = self {
1477 Some((configuration, responder))
1478 } else {
1479 None
1480 }
1481 }
1482
1483 #[allow(irrefutable_let_patterns)]
1484 pub fn into_set_configuration_healthy(
1485 self,
1486 ) -> Option<(Configuration, BootManagerSetConfigurationHealthyResponder)> {
1487 if let BootManagerRequest::SetConfigurationHealthy { configuration, responder } = self {
1488 Some((configuration, responder))
1489 } else {
1490 None
1491 }
1492 }
1493
1494 #[allow(irrefutable_let_patterns)]
1495 pub fn into_set_one_shot_recovery(self) -> Option<(BootManagerSetOneShotRecoveryResponder)> {
1496 if let BootManagerRequest::SetOneShotRecovery { responder } = self {
1497 Some((responder))
1498 } else {
1499 None
1500 }
1501 }
1502
1503 #[allow(irrefutable_let_patterns)]
1504 pub fn into_flush(self) -> Option<(BootManagerFlushResponder)> {
1505 if let BootManagerRequest::Flush { responder } = self {
1506 Some((responder))
1507 } else {
1508 None
1509 }
1510 }
1511
1512 pub fn method_name(&self) -> &'static str {
1514 match *self {
1515 BootManagerRequest::QueryCurrentConfiguration { .. } => "query_current_configuration",
1516 BootManagerRequest::QueryActiveConfiguration { .. } => "query_active_configuration",
1517 BootManagerRequest::QueryConfigurationLastSetActive { .. } => {
1518 "query_configuration_last_set_active"
1519 }
1520 BootManagerRequest::QueryConfigurationStatus { .. } => "query_configuration_status",
1521 BootManagerRequest::QueryConfigurationStatusAndBootAttempts { .. } => {
1522 "query_configuration_status_and_boot_attempts"
1523 }
1524 BootManagerRequest::SetConfigurationActive { .. } => "set_configuration_active",
1525 BootManagerRequest::SetConfigurationUnbootable { .. } => "set_configuration_unbootable",
1526 BootManagerRequest::SetConfigurationHealthy { .. } => "set_configuration_healthy",
1527 BootManagerRequest::SetOneShotRecovery { .. } => "set_one_shot_recovery",
1528 BootManagerRequest::Flush { .. } => "flush",
1529 }
1530 }
1531}
1532
1533#[derive(Debug, Clone)]
1534pub struct BootManagerControlHandle {
1535 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1536}
1537
1538impl fidl::endpoints::ControlHandle for BootManagerControlHandle {
1539 fn shutdown(&self) {
1540 self.inner.shutdown()
1541 }
1542 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1543 self.inner.shutdown_with_epitaph(status)
1544 }
1545
1546 fn is_closed(&self) -> bool {
1547 self.inner.channel().is_closed()
1548 }
1549 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1550 self.inner.channel().on_closed()
1551 }
1552
1553 #[cfg(target_os = "fuchsia")]
1554 fn signal_peer(
1555 &self,
1556 clear_mask: zx::Signals,
1557 set_mask: zx::Signals,
1558 ) -> Result<(), zx_status::Status> {
1559 use fidl::Peered;
1560 self.inner.channel().signal_peer(clear_mask, set_mask)
1561 }
1562}
1563
1564impl BootManagerControlHandle {}
1565
1566#[must_use = "FIDL methods require a response to be sent"]
1567#[derive(Debug)]
1568pub struct BootManagerQueryCurrentConfigurationResponder {
1569 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1570 tx_id: u32,
1571}
1572
1573impl std::ops::Drop for BootManagerQueryCurrentConfigurationResponder {
1577 fn drop(&mut self) {
1578 self.control_handle.shutdown();
1579 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1581 }
1582}
1583
1584impl fidl::endpoints::Responder for BootManagerQueryCurrentConfigurationResponder {
1585 type ControlHandle = BootManagerControlHandle;
1586
1587 fn control_handle(&self) -> &BootManagerControlHandle {
1588 &self.control_handle
1589 }
1590
1591 fn drop_without_shutdown(mut self) {
1592 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1594 std::mem::forget(self);
1596 }
1597}
1598
1599impl BootManagerQueryCurrentConfigurationResponder {
1600 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1604 let _result = self.send_raw(result);
1605 if _result.is_err() {
1606 self.control_handle.shutdown();
1607 }
1608 self.drop_without_shutdown();
1609 _result
1610 }
1611
1612 pub fn send_no_shutdown_on_err(
1614 self,
1615 mut result: Result<Configuration, i32>,
1616 ) -> Result<(), fidl::Error> {
1617 let _result = self.send_raw(result);
1618 self.drop_without_shutdown();
1619 _result
1620 }
1621
1622 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1623 self.control_handle.inner.send::<fidl::encoding::ResultType<
1624 BootManagerQueryCurrentConfigurationResponse,
1625 i32,
1626 >>(
1627 result.map(|configuration| (configuration,)),
1628 self.tx_id,
1629 0xc213298cbc9c371,
1630 fidl::encoding::DynamicFlags::empty(),
1631 )
1632 }
1633}
1634
1635#[must_use = "FIDL methods require a response to be sent"]
1636#[derive(Debug)]
1637pub struct BootManagerQueryActiveConfigurationResponder {
1638 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1639 tx_id: u32,
1640}
1641
1642impl std::ops::Drop for BootManagerQueryActiveConfigurationResponder {
1646 fn drop(&mut self) {
1647 self.control_handle.shutdown();
1648 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1650 }
1651}
1652
1653impl fidl::endpoints::Responder for BootManagerQueryActiveConfigurationResponder {
1654 type ControlHandle = BootManagerControlHandle;
1655
1656 fn control_handle(&self) -> &BootManagerControlHandle {
1657 &self.control_handle
1658 }
1659
1660 fn drop_without_shutdown(mut self) {
1661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1663 std::mem::forget(self);
1665 }
1666}
1667
1668impl BootManagerQueryActiveConfigurationResponder {
1669 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1673 let _result = self.send_raw(result);
1674 if _result.is_err() {
1675 self.control_handle.shutdown();
1676 }
1677 self.drop_without_shutdown();
1678 _result
1679 }
1680
1681 pub fn send_no_shutdown_on_err(
1683 self,
1684 mut result: Result<Configuration, i32>,
1685 ) -> Result<(), fidl::Error> {
1686 let _result = self.send_raw(result);
1687 self.drop_without_shutdown();
1688 _result
1689 }
1690
1691 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1692 self.control_handle.inner.send::<fidl::encoding::ResultType<
1693 BootManagerQueryActiveConfigurationResponse,
1694 i32,
1695 >>(
1696 result.map(|configuration| (configuration,)),
1697 self.tx_id,
1698 0x71d52acdf59947a4,
1699 fidl::encoding::DynamicFlags::empty(),
1700 )
1701 }
1702}
1703
1704#[must_use = "FIDL methods require a response to be sent"]
1705#[derive(Debug)]
1706pub struct BootManagerQueryConfigurationLastSetActiveResponder {
1707 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1708 tx_id: u32,
1709}
1710
1711impl std::ops::Drop for BootManagerQueryConfigurationLastSetActiveResponder {
1715 fn drop(&mut self) {
1716 self.control_handle.shutdown();
1717 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1719 }
1720}
1721
1722impl fidl::endpoints::Responder for BootManagerQueryConfigurationLastSetActiveResponder {
1723 type ControlHandle = BootManagerControlHandle;
1724
1725 fn control_handle(&self) -> &BootManagerControlHandle {
1726 &self.control_handle
1727 }
1728
1729 fn drop_without_shutdown(mut self) {
1730 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1732 std::mem::forget(self);
1734 }
1735}
1736
1737impl BootManagerQueryConfigurationLastSetActiveResponder {
1738 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1742 let _result = self.send_raw(result);
1743 if _result.is_err() {
1744 self.control_handle.shutdown();
1745 }
1746 self.drop_without_shutdown();
1747 _result
1748 }
1749
1750 pub fn send_no_shutdown_on_err(
1752 self,
1753 mut result: Result<Configuration, i32>,
1754 ) -> Result<(), fidl::Error> {
1755 let _result = self.send_raw(result);
1756 self.drop_without_shutdown();
1757 _result
1758 }
1759
1760 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1761 self.control_handle.inner.send::<fidl::encoding::ResultType<
1762 BootManagerQueryConfigurationLastSetActiveResponse,
1763 i32,
1764 >>(
1765 result.map(|configuration| (configuration,)),
1766 self.tx_id,
1767 0x6bcad87311b3345,
1768 fidl::encoding::DynamicFlags::empty(),
1769 )
1770 }
1771}
1772
1773#[must_use = "FIDL methods require a response to be sent"]
1774#[derive(Debug)]
1775pub struct BootManagerQueryConfigurationStatusResponder {
1776 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1777 tx_id: u32,
1778}
1779
1780impl std::ops::Drop for BootManagerQueryConfigurationStatusResponder {
1784 fn drop(&mut self) {
1785 self.control_handle.shutdown();
1786 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1788 }
1789}
1790
1791impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusResponder {
1792 type ControlHandle = BootManagerControlHandle;
1793
1794 fn control_handle(&self) -> &BootManagerControlHandle {
1795 &self.control_handle
1796 }
1797
1798 fn drop_without_shutdown(mut self) {
1799 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1801 std::mem::forget(self);
1803 }
1804}
1805
1806impl BootManagerQueryConfigurationStatusResponder {
1807 pub fn send(self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1811 let _result = self.send_raw(result);
1812 if _result.is_err() {
1813 self.control_handle.shutdown();
1814 }
1815 self.drop_without_shutdown();
1816 _result
1817 }
1818
1819 pub fn send_no_shutdown_on_err(
1821 self,
1822 mut result: Result<ConfigurationStatus, i32>,
1823 ) -> Result<(), fidl::Error> {
1824 let _result = self.send_raw(result);
1825 self.drop_without_shutdown();
1826 _result
1827 }
1828
1829 fn send_raw(&self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1830 self.control_handle.inner.send::<fidl::encoding::ResultType<
1831 BootManagerQueryConfigurationStatusResponse,
1832 i32,
1833 >>(
1834 result.map(|status| (status,)),
1835 self.tx_id,
1836 0x40822ca9ca68b19a,
1837 fidl::encoding::DynamicFlags::empty(),
1838 )
1839 }
1840}
1841
1842#[must_use = "FIDL methods require a response to be sent"]
1843#[derive(Debug)]
1844pub struct BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1845 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1846 tx_id: u32,
1847}
1848
1849impl std::ops::Drop for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1853 fn drop(&mut self) {
1854 self.control_handle.shutdown();
1855 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1857 }
1858}
1859
1860impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1861 type ControlHandle = BootManagerControlHandle;
1862
1863 fn control_handle(&self) -> &BootManagerControlHandle {
1864 &self.control_handle
1865 }
1866
1867 fn drop_without_shutdown(mut self) {
1868 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1870 std::mem::forget(self);
1872 }
1873}
1874
1875impl BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1876 pub fn send(
1880 self,
1881 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1882 ) -> Result<(), fidl::Error> {
1883 let _result = self.send_raw(result);
1884 if _result.is_err() {
1885 self.control_handle.shutdown();
1886 }
1887 self.drop_without_shutdown();
1888 _result
1889 }
1890
1891 pub fn send_no_shutdown_on_err(
1893 self,
1894 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1895 ) -> Result<(), fidl::Error> {
1896 let _result = self.send_raw(result);
1897 self.drop_without_shutdown();
1898 _result
1899 }
1900
1901 fn send_raw(
1902 &self,
1903 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1904 ) -> Result<(), fidl::Error> {
1905 self.control_handle.inner.send::<fidl::encoding::ResultType<
1906 BootManagerQueryConfigurationStatusAndBootAttemptsResponse,
1907 i32,
1908 >>(
1909 result,
1910 self.tx_id,
1911 0x27f851d5809cfb3d,
1912 fidl::encoding::DynamicFlags::empty(),
1913 )
1914 }
1915}
1916
1917#[must_use = "FIDL methods require a response to be sent"]
1918#[derive(Debug)]
1919pub struct BootManagerSetConfigurationActiveResponder {
1920 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1921 tx_id: u32,
1922}
1923
1924impl std::ops::Drop for BootManagerSetConfigurationActiveResponder {
1928 fn drop(&mut self) {
1929 self.control_handle.shutdown();
1930 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1932 }
1933}
1934
1935impl fidl::endpoints::Responder for BootManagerSetConfigurationActiveResponder {
1936 type ControlHandle = BootManagerControlHandle;
1937
1938 fn control_handle(&self) -> &BootManagerControlHandle {
1939 &self.control_handle
1940 }
1941
1942 fn drop_without_shutdown(mut self) {
1943 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1945 std::mem::forget(self);
1947 }
1948}
1949
1950impl BootManagerSetConfigurationActiveResponder {
1951 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
1955 let _result = self.send_raw(status);
1956 if _result.is_err() {
1957 self.control_handle.shutdown();
1958 }
1959 self.drop_without_shutdown();
1960 _result
1961 }
1962
1963 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
1965 let _result = self.send_raw(status);
1966 self.drop_without_shutdown();
1967 _result
1968 }
1969
1970 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
1971 self.control_handle.inner.send::<BootManagerSetConfigurationActiveResponse>(
1972 (status,),
1973 self.tx_id,
1974 0x14c64074f81f9a7f,
1975 fidl::encoding::DynamicFlags::empty(),
1976 )
1977 }
1978}
1979
1980#[must_use = "FIDL methods require a response to be sent"]
1981#[derive(Debug)]
1982pub struct BootManagerSetConfigurationUnbootableResponder {
1983 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1984 tx_id: u32,
1985}
1986
1987impl std::ops::Drop for BootManagerSetConfigurationUnbootableResponder {
1991 fn drop(&mut self) {
1992 self.control_handle.shutdown();
1993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1995 }
1996}
1997
1998impl fidl::endpoints::Responder for BootManagerSetConfigurationUnbootableResponder {
1999 type ControlHandle = BootManagerControlHandle;
2000
2001 fn control_handle(&self) -> &BootManagerControlHandle {
2002 &self.control_handle
2003 }
2004
2005 fn drop_without_shutdown(mut self) {
2006 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2008 std::mem::forget(self);
2010 }
2011}
2012
2013impl BootManagerSetConfigurationUnbootableResponder {
2014 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2018 let _result = self.send_raw(status);
2019 if _result.is_err() {
2020 self.control_handle.shutdown();
2021 }
2022 self.drop_without_shutdown();
2023 _result
2024 }
2025
2026 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2028 let _result = self.send_raw(status);
2029 self.drop_without_shutdown();
2030 _result
2031 }
2032
2033 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2034 self.control_handle.inner.send::<BootManagerSetConfigurationUnbootableResponse>(
2035 (status,),
2036 self.tx_id,
2037 0x6f8716bf306d197f,
2038 fidl::encoding::DynamicFlags::empty(),
2039 )
2040 }
2041}
2042
2043#[must_use = "FIDL methods require a response to be sent"]
2044#[derive(Debug)]
2045pub struct BootManagerSetConfigurationHealthyResponder {
2046 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2047 tx_id: u32,
2048}
2049
2050impl std::ops::Drop for BootManagerSetConfigurationHealthyResponder {
2054 fn drop(&mut self) {
2055 self.control_handle.shutdown();
2056 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2058 }
2059}
2060
2061impl fidl::endpoints::Responder for BootManagerSetConfigurationHealthyResponder {
2062 type ControlHandle = BootManagerControlHandle;
2063
2064 fn control_handle(&self) -> &BootManagerControlHandle {
2065 &self.control_handle
2066 }
2067
2068 fn drop_without_shutdown(mut self) {
2069 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2071 std::mem::forget(self);
2073 }
2074}
2075
2076impl BootManagerSetConfigurationHealthyResponder {
2077 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2081 let _result = self.send_raw(status);
2082 if _result.is_err() {
2083 self.control_handle.shutdown();
2084 }
2085 self.drop_without_shutdown();
2086 _result
2087 }
2088
2089 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2091 let _result = self.send_raw(status);
2092 self.drop_without_shutdown();
2093 _result
2094 }
2095
2096 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2097 self.control_handle.inner.send::<BootManagerSetConfigurationHealthyResponse>(
2098 (status,),
2099 self.tx_id,
2100 0x5dfe31714c8ec4be,
2101 fidl::encoding::DynamicFlags::empty(),
2102 )
2103 }
2104}
2105
2106#[must_use = "FIDL methods require a response to be sent"]
2107#[derive(Debug)]
2108pub struct BootManagerSetOneShotRecoveryResponder {
2109 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2110 tx_id: u32,
2111}
2112
2113impl std::ops::Drop for BootManagerSetOneShotRecoveryResponder {
2117 fn drop(&mut self) {
2118 self.control_handle.shutdown();
2119 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2121 }
2122}
2123
2124impl fidl::endpoints::Responder for BootManagerSetOneShotRecoveryResponder {
2125 type ControlHandle = BootManagerControlHandle;
2126
2127 fn control_handle(&self) -> &BootManagerControlHandle {
2128 &self.control_handle
2129 }
2130
2131 fn drop_without_shutdown(mut self) {
2132 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2134 std::mem::forget(self);
2136 }
2137}
2138
2139impl BootManagerSetOneShotRecoveryResponder {
2140 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2144 let _result = self.send_raw(result);
2145 if _result.is_err() {
2146 self.control_handle.shutdown();
2147 }
2148 self.drop_without_shutdown();
2149 _result
2150 }
2151
2152 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2154 let _result = self.send_raw(result);
2155 self.drop_without_shutdown();
2156 _result
2157 }
2158
2159 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2160 self.control_handle
2161 .inner
2162 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2163 result,
2164 self.tx_id,
2165 0x7a5af0a28354f24d,
2166 fidl::encoding::DynamicFlags::empty(),
2167 )
2168 }
2169}
2170
2171#[must_use = "FIDL methods require a response to be sent"]
2172#[derive(Debug)]
2173pub struct BootManagerFlushResponder {
2174 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2175 tx_id: u32,
2176}
2177
2178impl std::ops::Drop for BootManagerFlushResponder {
2182 fn drop(&mut self) {
2183 self.control_handle.shutdown();
2184 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2186 }
2187}
2188
2189impl fidl::endpoints::Responder for BootManagerFlushResponder {
2190 type ControlHandle = BootManagerControlHandle;
2191
2192 fn control_handle(&self) -> &BootManagerControlHandle {
2193 &self.control_handle
2194 }
2195
2196 fn drop_without_shutdown(mut self) {
2197 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2199 std::mem::forget(self);
2201 }
2202}
2203
2204impl BootManagerFlushResponder {
2205 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2209 let _result = self.send_raw(status);
2210 if _result.is_err() {
2211 self.control_handle.shutdown();
2212 }
2213 self.drop_without_shutdown();
2214 _result
2215 }
2216
2217 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2219 let _result = self.send_raw(status);
2220 self.drop_without_shutdown();
2221 _result
2222 }
2223
2224 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2225 self.control_handle.inner.send::<BootManagerFlushResponse>(
2226 (status,),
2227 self.tx_id,
2228 0x2f29ec2322d62d3e,
2229 fidl::encoding::DynamicFlags::empty(),
2230 )
2231 }
2232}
2233
2234#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2235pub struct DataSinkMarker;
2236
2237impl fidl::endpoints::ProtocolMarker for DataSinkMarker {
2238 type Proxy = DataSinkProxy;
2239 type RequestStream = DataSinkRequestStream;
2240 #[cfg(target_os = "fuchsia")]
2241 type SynchronousProxy = DataSinkSynchronousProxy;
2242
2243 const DEBUG_NAME: &'static str = "(anonymous) DataSink";
2244}
2245pub type DataSinkReadAssetResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2246pub type DataSinkReadFirmwareResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2247pub type DataSinkWriteOpaqueVolumeResult = Result<(), i32>;
2248pub type DataSinkWriteSparseVolumeResult = Result<(), i32>;
2249
2250pub trait DataSinkProxyInterface: Send + Sync {
2251 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
2252 + Send;
2253 fn r#read_asset(
2254 &self,
2255 configuration: Configuration,
2256 asset: Asset,
2257 ) -> Self::ReadAssetResponseFut;
2258 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2259 fn r#write_asset(
2260 &self,
2261 configuration: Configuration,
2262 asset: Asset,
2263 payload: fidl_fuchsia_mem::Buffer,
2264 ) -> Self::WriteAssetResponseFut;
2265 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
2266 + Send;
2267 fn r#write_firmware(
2268 &self,
2269 configuration: Configuration,
2270 type_: &str,
2271 payload: fidl_fuchsia_mem::Buffer,
2272 ) -> Self::WriteFirmwareResponseFut;
2273 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
2274 + Send;
2275 fn r#read_firmware(
2276 &self,
2277 configuration: Configuration,
2278 type_: &str,
2279 ) -> Self::ReadFirmwareResponseFut;
2280 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2281 fn r#write_volumes(
2282 &self,
2283 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2284 ) -> Self::WriteVolumesResponseFut;
2285 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
2286 + Send;
2287 fn r#write_opaque_volume(
2288 &self,
2289 payload: fidl_fuchsia_mem::Buffer,
2290 ) -> Self::WriteOpaqueVolumeResponseFut;
2291 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
2292 + Send;
2293 fn r#write_sparse_volume(
2294 &self,
2295 payload: fidl_fuchsia_mem::Buffer,
2296 ) -> Self::WriteSparseVolumeResponseFut;
2297 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2298 fn r#flush(&self) -> Self::FlushResponseFut;
2299}
2300#[derive(Debug)]
2301#[cfg(target_os = "fuchsia")]
2302pub struct DataSinkSynchronousProxy {
2303 client: fidl::client::sync::Client,
2304}
2305
2306#[cfg(target_os = "fuchsia")]
2307impl fidl::endpoints::SynchronousProxy for DataSinkSynchronousProxy {
2308 type Proxy = DataSinkProxy;
2309 type Protocol = DataSinkMarker;
2310
2311 fn from_channel(inner: fidl::Channel) -> Self {
2312 Self::new(inner)
2313 }
2314
2315 fn into_channel(self) -> fidl::Channel {
2316 self.client.into_channel()
2317 }
2318
2319 fn as_channel(&self) -> &fidl::Channel {
2320 self.client.as_channel()
2321 }
2322}
2323
2324#[cfg(target_os = "fuchsia")]
2325impl DataSinkSynchronousProxy {
2326 pub fn new(channel: fidl::Channel) -> Self {
2327 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2328 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2329 }
2330
2331 pub fn into_channel(self) -> fidl::Channel {
2332 self.client.into_channel()
2333 }
2334
2335 pub fn wait_for_event(
2338 &self,
2339 deadline: zx::MonotonicInstant,
2340 ) -> Result<DataSinkEvent, fidl::Error> {
2341 DataSinkEvent::decode(self.client.wait_for_event(deadline)?)
2342 }
2343
2344 pub fn r#read_asset(
2350 &self,
2351 mut configuration: Configuration,
2352 mut asset: Asset,
2353 ___deadline: zx::MonotonicInstant,
2354 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2355 let _response = self.client.send_query::<
2356 DataSinkReadAssetRequest,
2357 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2358 >(
2359 (configuration, asset,),
2360 0x125a23e561007898,
2361 fidl::encoding::DynamicFlags::empty(),
2362 ___deadline,
2363 )?;
2364 Ok(_response.map(|x| x.asset))
2365 }
2366
2367 pub fn r#write_asset(
2376 &self,
2377 mut configuration: Configuration,
2378 mut asset: Asset,
2379 mut payload: fidl_fuchsia_mem::Buffer,
2380 ___deadline: zx::MonotonicInstant,
2381 ) -> Result<i32, fidl::Error> {
2382 let _response =
2383 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
2384 (configuration, asset, &mut payload),
2385 0x516839ce76c4d0a9,
2386 fidl::encoding::DynamicFlags::empty(),
2387 ___deadline,
2388 )?;
2389 Ok(_response.status)
2390 }
2391
2392 pub fn r#write_firmware(
2407 &self,
2408 mut configuration: Configuration,
2409 mut type_: &str,
2410 mut payload: fidl_fuchsia_mem::Buffer,
2411 ___deadline: zx::MonotonicInstant,
2412 ) -> Result<WriteFirmwareResult, fidl::Error> {
2413 let _response =
2414 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
2415 (configuration, type_, &mut payload),
2416 0x514b93454ac0be97,
2417 fidl::encoding::DynamicFlags::empty(),
2418 ___deadline,
2419 )?;
2420 Ok(_response.result)
2421 }
2422
2423 pub fn r#read_firmware(
2430 &self,
2431 mut configuration: Configuration,
2432 mut type_: &str,
2433 ___deadline: zx::MonotonicInstant,
2434 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2435 let _response = self.client.send_query::<
2436 DataSinkReadFirmwareRequest,
2437 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2438 >(
2439 (configuration, type_,),
2440 0xcb67f9830cae9c3,
2441 fidl::encoding::DynamicFlags::empty(),
2442 ___deadline,
2443 )?;
2444 Ok(_response.map(|x| x.firmware))
2445 }
2446
2447 pub fn r#write_volumes(
2450 &self,
2451 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2452 ___deadline: zx::MonotonicInstant,
2453 ) -> Result<i32, fidl::Error> {
2454 let _response =
2455 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
2456 (payload,),
2457 0x5ee32c861d0259df,
2458 fidl::encoding::DynamicFlags::empty(),
2459 ___deadline,
2460 )?;
2461 Ok(_response.status)
2462 }
2463
2464 pub fn r#write_opaque_volume(
2473 &self,
2474 mut payload: fidl_fuchsia_mem::Buffer,
2475 ___deadline: zx::MonotonicInstant,
2476 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2477 let _response = self.client.send_query::<
2478 DataSinkWriteOpaqueVolumeRequest,
2479 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2480 >(
2481 (&mut payload,),
2482 0x4884b6ebaf660d79,
2483 fidl::encoding::DynamicFlags::empty(),
2484 ___deadline,
2485 )?;
2486 Ok(_response.map(|x| x))
2487 }
2488
2489 pub fn r#write_sparse_volume(
2493 &self,
2494 mut payload: fidl_fuchsia_mem::Buffer,
2495 ___deadline: zx::MonotonicInstant,
2496 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2497 let _response = self.client.send_query::<
2498 DataSinkWriteSparseVolumeRequest,
2499 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2500 >(
2501 (&mut payload,),
2502 0x340f5370c5b1e026,
2503 fidl::encoding::DynamicFlags::empty(),
2504 ___deadline,
2505 )?;
2506 Ok(_response.map(|x| x))
2507 }
2508
2509 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
2511 let _response =
2512 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
2513 (),
2514 0x3b59d3e2338e3139,
2515 fidl::encoding::DynamicFlags::empty(),
2516 ___deadline,
2517 )?;
2518 Ok(_response.status)
2519 }
2520}
2521
2522#[derive(Debug, Clone)]
2523pub struct DataSinkProxy {
2524 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2525}
2526
2527impl fidl::endpoints::Proxy for DataSinkProxy {
2528 type Protocol = DataSinkMarker;
2529
2530 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2531 Self::new(inner)
2532 }
2533
2534 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2535 self.client.into_channel().map_err(|client| Self { client })
2536 }
2537
2538 fn as_channel(&self) -> &::fidl::AsyncChannel {
2539 self.client.as_channel()
2540 }
2541}
2542
2543impl DataSinkProxy {
2544 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2546 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2547 Self { client: fidl::client::Client::new(channel, protocol_name) }
2548 }
2549
2550 pub fn take_event_stream(&self) -> DataSinkEventStream {
2556 DataSinkEventStream { event_receiver: self.client.take_event_receiver() }
2557 }
2558
2559 pub fn r#read_asset(
2565 &self,
2566 mut configuration: Configuration,
2567 mut asset: Asset,
2568 ) -> fidl::client::QueryResponseFut<
2569 DataSinkReadAssetResult,
2570 fidl::encoding::DefaultFuchsiaResourceDialect,
2571 > {
2572 DataSinkProxyInterface::r#read_asset(self, configuration, asset)
2573 }
2574
2575 pub fn r#write_asset(
2584 &self,
2585 mut configuration: Configuration,
2586 mut asset: Asset,
2587 mut payload: fidl_fuchsia_mem::Buffer,
2588 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2589 DataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
2590 }
2591
2592 pub fn r#write_firmware(
2607 &self,
2608 mut configuration: Configuration,
2609 mut type_: &str,
2610 mut payload: fidl_fuchsia_mem::Buffer,
2611 ) -> fidl::client::QueryResponseFut<
2612 WriteFirmwareResult,
2613 fidl::encoding::DefaultFuchsiaResourceDialect,
2614 > {
2615 DataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
2616 }
2617
2618 pub fn r#read_firmware(
2625 &self,
2626 mut configuration: Configuration,
2627 mut type_: &str,
2628 ) -> fidl::client::QueryResponseFut<
2629 DataSinkReadFirmwareResult,
2630 fidl::encoding::DefaultFuchsiaResourceDialect,
2631 > {
2632 DataSinkProxyInterface::r#read_firmware(self, configuration, type_)
2633 }
2634
2635 pub fn r#write_volumes(
2638 &self,
2639 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2640 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2641 DataSinkProxyInterface::r#write_volumes(self, payload)
2642 }
2643
2644 pub fn r#write_opaque_volume(
2653 &self,
2654 mut payload: fidl_fuchsia_mem::Buffer,
2655 ) -> fidl::client::QueryResponseFut<
2656 DataSinkWriteOpaqueVolumeResult,
2657 fidl::encoding::DefaultFuchsiaResourceDialect,
2658 > {
2659 DataSinkProxyInterface::r#write_opaque_volume(self, payload)
2660 }
2661
2662 pub fn r#write_sparse_volume(
2666 &self,
2667 mut payload: fidl_fuchsia_mem::Buffer,
2668 ) -> fidl::client::QueryResponseFut<
2669 DataSinkWriteSparseVolumeResult,
2670 fidl::encoding::DefaultFuchsiaResourceDialect,
2671 > {
2672 DataSinkProxyInterface::r#write_sparse_volume(self, payload)
2673 }
2674
2675 pub fn r#flush(
2677 &self,
2678 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2679 DataSinkProxyInterface::r#flush(self)
2680 }
2681}
2682
2683impl DataSinkProxyInterface for DataSinkProxy {
2684 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
2685 DataSinkReadAssetResult,
2686 fidl::encoding::DefaultFuchsiaResourceDialect,
2687 >;
2688 fn r#read_asset(
2689 &self,
2690 mut configuration: Configuration,
2691 mut asset: Asset,
2692 ) -> Self::ReadAssetResponseFut {
2693 fn _decode(
2694 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2695 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2696 let _response = fidl::client::decode_transaction_body::<
2697 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2698 fidl::encoding::DefaultFuchsiaResourceDialect,
2699 0x125a23e561007898,
2700 >(_buf?)?;
2701 Ok(_response.map(|x| x.asset))
2702 }
2703 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
2704 (configuration, asset),
2705 0x125a23e561007898,
2706 fidl::encoding::DynamicFlags::empty(),
2707 _decode,
2708 )
2709 }
2710
2711 type WriteAssetResponseFut =
2712 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2713 fn r#write_asset(
2714 &self,
2715 mut configuration: Configuration,
2716 mut asset: Asset,
2717 mut payload: fidl_fuchsia_mem::Buffer,
2718 ) -> Self::WriteAssetResponseFut {
2719 fn _decode(
2720 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2721 ) -> Result<i32, fidl::Error> {
2722 let _response = fidl::client::decode_transaction_body::<
2723 DataSinkWriteAssetResponse,
2724 fidl::encoding::DefaultFuchsiaResourceDialect,
2725 0x516839ce76c4d0a9,
2726 >(_buf?)?;
2727 Ok(_response.status)
2728 }
2729 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
2730 (configuration, asset, &mut payload),
2731 0x516839ce76c4d0a9,
2732 fidl::encoding::DynamicFlags::empty(),
2733 _decode,
2734 )
2735 }
2736
2737 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
2738 WriteFirmwareResult,
2739 fidl::encoding::DefaultFuchsiaResourceDialect,
2740 >;
2741 fn r#write_firmware(
2742 &self,
2743 mut configuration: Configuration,
2744 mut type_: &str,
2745 mut payload: fidl_fuchsia_mem::Buffer,
2746 ) -> Self::WriteFirmwareResponseFut {
2747 fn _decode(
2748 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2749 ) -> Result<WriteFirmwareResult, fidl::Error> {
2750 let _response = fidl::client::decode_transaction_body::<
2751 DataSinkWriteFirmwareResponse,
2752 fidl::encoding::DefaultFuchsiaResourceDialect,
2753 0x514b93454ac0be97,
2754 >(_buf?)?;
2755 Ok(_response.result)
2756 }
2757 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
2758 (configuration, type_, &mut payload),
2759 0x514b93454ac0be97,
2760 fidl::encoding::DynamicFlags::empty(),
2761 _decode,
2762 )
2763 }
2764
2765 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
2766 DataSinkReadFirmwareResult,
2767 fidl::encoding::DefaultFuchsiaResourceDialect,
2768 >;
2769 fn r#read_firmware(
2770 &self,
2771 mut configuration: Configuration,
2772 mut type_: &str,
2773 ) -> Self::ReadFirmwareResponseFut {
2774 fn _decode(
2775 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2776 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2777 let _response = fidl::client::decode_transaction_body::<
2778 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2779 fidl::encoding::DefaultFuchsiaResourceDialect,
2780 0xcb67f9830cae9c3,
2781 >(_buf?)?;
2782 Ok(_response.map(|x| x.firmware))
2783 }
2784 self.client
2785 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
2786 (configuration, type_),
2787 0xcb67f9830cae9c3,
2788 fidl::encoding::DynamicFlags::empty(),
2789 _decode,
2790 )
2791 }
2792
2793 type WriteVolumesResponseFut =
2794 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2795 fn r#write_volumes(
2796 &self,
2797 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2798 ) -> Self::WriteVolumesResponseFut {
2799 fn _decode(
2800 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2801 ) -> Result<i32, fidl::Error> {
2802 let _response = fidl::client::decode_transaction_body::<
2803 DataSinkWriteVolumesResponse,
2804 fidl::encoding::DefaultFuchsiaResourceDialect,
2805 0x5ee32c861d0259df,
2806 >(_buf?)?;
2807 Ok(_response.status)
2808 }
2809 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
2810 (payload,),
2811 0x5ee32c861d0259df,
2812 fidl::encoding::DynamicFlags::empty(),
2813 _decode,
2814 )
2815 }
2816
2817 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
2818 DataSinkWriteOpaqueVolumeResult,
2819 fidl::encoding::DefaultFuchsiaResourceDialect,
2820 >;
2821 fn r#write_opaque_volume(
2822 &self,
2823 mut payload: fidl_fuchsia_mem::Buffer,
2824 ) -> Self::WriteOpaqueVolumeResponseFut {
2825 fn _decode(
2826 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2827 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2828 let _response = fidl::client::decode_transaction_body::<
2829 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2830 fidl::encoding::DefaultFuchsiaResourceDialect,
2831 0x4884b6ebaf660d79,
2832 >(_buf?)?;
2833 Ok(_response.map(|x| x))
2834 }
2835 self.client.send_query_and_decode::<
2836 DataSinkWriteOpaqueVolumeRequest,
2837 DataSinkWriteOpaqueVolumeResult,
2838 >(
2839 (&mut payload,),
2840 0x4884b6ebaf660d79,
2841 fidl::encoding::DynamicFlags::empty(),
2842 _decode,
2843 )
2844 }
2845
2846 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
2847 DataSinkWriteSparseVolumeResult,
2848 fidl::encoding::DefaultFuchsiaResourceDialect,
2849 >;
2850 fn r#write_sparse_volume(
2851 &self,
2852 mut payload: fidl_fuchsia_mem::Buffer,
2853 ) -> Self::WriteSparseVolumeResponseFut {
2854 fn _decode(
2855 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2856 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2857 let _response = fidl::client::decode_transaction_body::<
2858 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2859 fidl::encoding::DefaultFuchsiaResourceDialect,
2860 0x340f5370c5b1e026,
2861 >(_buf?)?;
2862 Ok(_response.map(|x| x))
2863 }
2864 self.client.send_query_and_decode::<
2865 DataSinkWriteSparseVolumeRequest,
2866 DataSinkWriteSparseVolumeResult,
2867 >(
2868 (&mut payload,),
2869 0x340f5370c5b1e026,
2870 fidl::encoding::DynamicFlags::empty(),
2871 _decode,
2872 )
2873 }
2874
2875 type FlushResponseFut =
2876 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2877 fn r#flush(&self) -> Self::FlushResponseFut {
2878 fn _decode(
2879 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2880 ) -> Result<i32, fidl::Error> {
2881 let _response = fidl::client::decode_transaction_body::<
2882 DataSinkFlushResponse,
2883 fidl::encoding::DefaultFuchsiaResourceDialect,
2884 0x3b59d3e2338e3139,
2885 >(_buf?)?;
2886 Ok(_response.status)
2887 }
2888 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2889 (),
2890 0x3b59d3e2338e3139,
2891 fidl::encoding::DynamicFlags::empty(),
2892 _decode,
2893 )
2894 }
2895}
2896
2897pub struct DataSinkEventStream {
2898 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2899}
2900
2901impl std::marker::Unpin for DataSinkEventStream {}
2902
2903impl futures::stream::FusedStream for DataSinkEventStream {
2904 fn is_terminated(&self) -> bool {
2905 self.event_receiver.is_terminated()
2906 }
2907}
2908
2909impl futures::Stream for DataSinkEventStream {
2910 type Item = Result<DataSinkEvent, fidl::Error>;
2911
2912 fn poll_next(
2913 mut self: std::pin::Pin<&mut Self>,
2914 cx: &mut std::task::Context<'_>,
2915 ) -> std::task::Poll<Option<Self::Item>> {
2916 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2917 &mut self.event_receiver,
2918 cx
2919 )?) {
2920 Some(buf) => std::task::Poll::Ready(Some(DataSinkEvent::decode(buf))),
2921 None => std::task::Poll::Ready(None),
2922 }
2923 }
2924}
2925
2926#[derive(Debug)]
2927pub enum DataSinkEvent {}
2928
2929impl DataSinkEvent {
2930 fn decode(
2932 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2933 ) -> Result<DataSinkEvent, fidl::Error> {
2934 let (bytes, _handles) = buf.split_mut();
2935 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2936 debug_assert_eq!(tx_header.tx_id, 0);
2937 match tx_header.ordinal {
2938 _ => Err(fidl::Error::UnknownOrdinal {
2939 ordinal: tx_header.ordinal,
2940 protocol_name: <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2941 }),
2942 }
2943 }
2944}
2945
2946pub struct DataSinkRequestStream {
2948 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2949 is_terminated: bool,
2950}
2951
2952impl std::marker::Unpin for DataSinkRequestStream {}
2953
2954impl futures::stream::FusedStream for DataSinkRequestStream {
2955 fn is_terminated(&self) -> bool {
2956 self.is_terminated
2957 }
2958}
2959
2960impl fidl::endpoints::RequestStream for DataSinkRequestStream {
2961 type Protocol = DataSinkMarker;
2962 type ControlHandle = DataSinkControlHandle;
2963
2964 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2965 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2966 }
2967
2968 fn control_handle(&self) -> Self::ControlHandle {
2969 DataSinkControlHandle { inner: self.inner.clone() }
2970 }
2971
2972 fn into_inner(
2973 self,
2974 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2975 {
2976 (self.inner, self.is_terminated)
2977 }
2978
2979 fn from_inner(
2980 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2981 is_terminated: bool,
2982 ) -> Self {
2983 Self { inner, is_terminated }
2984 }
2985}
2986
2987impl futures::Stream for DataSinkRequestStream {
2988 type Item = Result<DataSinkRequest, fidl::Error>;
2989
2990 fn poll_next(
2991 mut self: std::pin::Pin<&mut Self>,
2992 cx: &mut std::task::Context<'_>,
2993 ) -> std::task::Poll<Option<Self::Item>> {
2994 let this = &mut *self;
2995 if this.inner.check_shutdown(cx) {
2996 this.is_terminated = true;
2997 return std::task::Poll::Ready(None);
2998 }
2999 if this.is_terminated {
3000 panic!("polled DataSinkRequestStream after completion");
3001 }
3002 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3003 |bytes, handles| {
3004 match this.inner.channel().read_etc(cx, bytes, handles) {
3005 std::task::Poll::Ready(Ok(())) => {}
3006 std::task::Poll::Pending => return std::task::Poll::Pending,
3007 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3008 this.is_terminated = true;
3009 return std::task::Poll::Ready(None);
3010 }
3011 std::task::Poll::Ready(Err(e)) => {
3012 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3013 e.into(),
3014 ))))
3015 }
3016 }
3017
3018 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3020
3021 std::task::Poll::Ready(Some(match header.ordinal {
3022 0x125a23e561007898 => {
3023 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3024 let mut req = fidl::new_empty!(
3025 DataSinkReadAssetRequest,
3026 fidl::encoding::DefaultFuchsiaResourceDialect
3027 );
3028 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3029 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3030 Ok(DataSinkRequest::ReadAsset {
3031 configuration: req.configuration,
3032 asset: req.asset,
3033
3034 responder: DataSinkReadAssetResponder {
3035 control_handle: std::mem::ManuallyDrop::new(control_handle),
3036 tx_id: header.tx_id,
3037 },
3038 })
3039 }
3040 0x516839ce76c4d0a9 => {
3041 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3042 let mut req = fidl::new_empty!(
3043 DataSinkWriteAssetRequest,
3044 fidl::encoding::DefaultFuchsiaResourceDialect
3045 );
3046 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3047 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3048 Ok(DataSinkRequest::WriteAsset {
3049 configuration: req.configuration,
3050 asset: req.asset,
3051 payload: req.payload,
3052
3053 responder: DataSinkWriteAssetResponder {
3054 control_handle: std::mem::ManuallyDrop::new(control_handle),
3055 tx_id: header.tx_id,
3056 },
3057 })
3058 }
3059 0x514b93454ac0be97 => {
3060 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3061 let mut req = fidl::new_empty!(
3062 DataSinkWriteFirmwareRequest,
3063 fidl::encoding::DefaultFuchsiaResourceDialect
3064 );
3065 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3066 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3067 Ok(DataSinkRequest::WriteFirmware {
3068 configuration: req.configuration,
3069 type_: req.type_,
3070 payload: req.payload,
3071
3072 responder: DataSinkWriteFirmwareResponder {
3073 control_handle: std::mem::ManuallyDrop::new(control_handle),
3074 tx_id: header.tx_id,
3075 },
3076 })
3077 }
3078 0xcb67f9830cae9c3 => {
3079 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3080 let mut req = fidl::new_empty!(
3081 DataSinkReadFirmwareRequest,
3082 fidl::encoding::DefaultFuchsiaResourceDialect
3083 );
3084 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3085 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3086 Ok(DataSinkRequest::ReadFirmware {
3087 configuration: req.configuration,
3088 type_: req.type_,
3089
3090 responder: DataSinkReadFirmwareResponder {
3091 control_handle: std::mem::ManuallyDrop::new(control_handle),
3092 tx_id: header.tx_id,
3093 },
3094 })
3095 }
3096 0x5ee32c861d0259df => {
3097 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3098 let mut req = fidl::new_empty!(
3099 DataSinkWriteVolumesRequest,
3100 fidl::encoding::DefaultFuchsiaResourceDialect
3101 );
3102 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
3103 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3104 Ok(DataSinkRequest::WriteVolumes {
3105 payload: req.payload,
3106
3107 responder: DataSinkWriteVolumesResponder {
3108 control_handle: std::mem::ManuallyDrop::new(control_handle),
3109 tx_id: header.tx_id,
3110 },
3111 })
3112 }
3113 0x4884b6ebaf660d79 => {
3114 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3115 let mut req = fidl::new_empty!(
3116 DataSinkWriteOpaqueVolumeRequest,
3117 fidl::encoding::DefaultFuchsiaResourceDialect
3118 );
3119 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3120 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3121 Ok(DataSinkRequest::WriteOpaqueVolume {
3122 payload: req.payload,
3123
3124 responder: DataSinkWriteOpaqueVolumeResponder {
3125 control_handle: std::mem::ManuallyDrop::new(control_handle),
3126 tx_id: header.tx_id,
3127 },
3128 })
3129 }
3130 0x340f5370c5b1e026 => {
3131 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3132 let mut req = fidl::new_empty!(
3133 DataSinkWriteSparseVolumeRequest,
3134 fidl::encoding::DefaultFuchsiaResourceDialect
3135 );
3136 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3137 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3138 Ok(DataSinkRequest::WriteSparseVolume {
3139 payload: req.payload,
3140
3141 responder: DataSinkWriteSparseVolumeResponder {
3142 control_handle: std::mem::ManuallyDrop::new(control_handle),
3143 tx_id: header.tx_id,
3144 },
3145 })
3146 }
3147 0x3b59d3e2338e3139 => {
3148 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3149 let mut req = fidl::new_empty!(
3150 fidl::encoding::EmptyPayload,
3151 fidl::encoding::DefaultFuchsiaResourceDialect
3152 );
3153 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3154 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3155 Ok(DataSinkRequest::Flush {
3156 responder: DataSinkFlushResponder {
3157 control_handle: std::mem::ManuallyDrop::new(control_handle),
3158 tx_id: header.tx_id,
3159 },
3160 })
3161 }
3162 _ => Err(fidl::Error::UnknownOrdinal {
3163 ordinal: header.ordinal,
3164 protocol_name:
3165 <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3166 }),
3167 }))
3168 },
3169 )
3170 }
3171}
3172
3173#[derive(Debug)]
3192pub enum DataSinkRequest {
3193 ReadAsset { configuration: Configuration, asset: Asset, responder: DataSinkReadAssetResponder },
3199 WriteAsset {
3208 configuration: Configuration,
3209 asset: Asset,
3210 payload: fidl_fuchsia_mem::Buffer,
3211 responder: DataSinkWriteAssetResponder,
3212 },
3213 WriteFirmware {
3228 configuration: Configuration,
3229 type_: String,
3230 payload: fidl_fuchsia_mem::Buffer,
3231 responder: DataSinkWriteFirmwareResponder,
3232 },
3233 ReadFirmware {
3240 configuration: Configuration,
3241 type_: String,
3242 responder: DataSinkReadFirmwareResponder,
3243 },
3244 WriteVolumes {
3247 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
3248 responder: DataSinkWriteVolumesResponder,
3249 },
3250 WriteOpaqueVolume {
3259 payload: fidl_fuchsia_mem::Buffer,
3260 responder: DataSinkWriteOpaqueVolumeResponder,
3261 },
3262 WriteSparseVolume {
3266 payload: fidl_fuchsia_mem::Buffer,
3267 responder: DataSinkWriteSparseVolumeResponder,
3268 },
3269 Flush { responder: DataSinkFlushResponder },
3271}
3272
3273impl DataSinkRequest {
3274 #[allow(irrefutable_let_patterns)]
3275 pub fn into_read_asset(self) -> Option<(Configuration, Asset, DataSinkReadAssetResponder)> {
3276 if let DataSinkRequest::ReadAsset { configuration, asset, responder } = self {
3277 Some((configuration, asset, responder))
3278 } else {
3279 None
3280 }
3281 }
3282
3283 #[allow(irrefutable_let_patterns)]
3284 pub fn into_write_asset(
3285 self,
3286 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DataSinkWriteAssetResponder)> {
3287 if let DataSinkRequest::WriteAsset { configuration, asset, payload, responder } = self {
3288 Some((configuration, asset, payload, responder))
3289 } else {
3290 None
3291 }
3292 }
3293
3294 #[allow(irrefutable_let_patterns)]
3295 pub fn into_write_firmware(
3296 self,
3297 ) -> Option<(Configuration, String, fidl_fuchsia_mem::Buffer, DataSinkWriteFirmwareResponder)>
3298 {
3299 if let DataSinkRequest::WriteFirmware { configuration, type_, payload, responder } = self {
3300 Some((configuration, type_, payload, responder))
3301 } else {
3302 None
3303 }
3304 }
3305
3306 #[allow(irrefutable_let_patterns)]
3307 pub fn into_read_firmware(
3308 self,
3309 ) -> Option<(Configuration, String, DataSinkReadFirmwareResponder)> {
3310 if let DataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
3311 Some((configuration, type_, responder))
3312 } else {
3313 None
3314 }
3315 }
3316
3317 #[allow(irrefutable_let_patterns)]
3318 pub fn into_write_volumes(
3319 self,
3320 ) -> Option<(fidl::endpoints::ClientEnd<PayloadStreamMarker>, DataSinkWriteVolumesResponder)>
3321 {
3322 if let DataSinkRequest::WriteVolumes { payload, responder } = self {
3323 Some((payload, responder))
3324 } else {
3325 None
3326 }
3327 }
3328
3329 #[allow(irrefutable_let_patterns)]
3330 pub fn into_write_opaque_volume(
3331 self,
3332 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteOpaqueVolumeResponder)> {
3333 if let DataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
3334 Some((payload, responder))
3335 } else {
3336 None
3337 }
3338 }
3339
3340 #[allow(irrefutable_let_patterns)]
3341 pub fn into_write_sparse_volume(
3342 self,
3343 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteSparseVolumeResponder)> {
3344 if let DataSinkRequest::WriteSparseVolume { payload, responder } = self {
3345 Some((payload, responder))
3346 } else {
3347 None
3348 }
3349 }
3350
3351 #[allow(irrefutable_let_patterns)]
3352 pub fn into_flush(self) -> Option<(DataSinkFlushResponder)> {
3353 if let DataSinkRequest::Flush { responder } = self {
3354 Some((responder))
3355 } else {
3356 None
3357 }
3358 }
3359
3360 pub fn method_name(&self) -> &'static str {
3362 match *self {
3363 DataSinkRequest::ReadAsset { .. } => "read_asset",
3364 DataSinkRequest::WriteAsset { .. } => "write_asset",
3365 DataSinkRequest::WriteFirmware { .. } => "write_firmware",
3366 DataSinkRequest::ReadFirmware { .. } => "read_firmware",
3367 DataSinkRequest::WriteVolumes { .. } => "write_volumes",
3368 DataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
3369 DataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
3370 DataSinkRequest::Flush { .. } => "flush",
3371 }
3372 }
3373}
3374
3375#[derive(Debug, Clone)]
3376pub struct DataSinkControlHandle {
3377 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3378}
3379
3380impl fidl::endpoints::ControlHandle for DataSinkControlHandle {
3381 fn shutdown(&self) {
3382 self.inner.shutdown()
3383 }
3384 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3385 self.inner.shutdown_with_epitaph(status)
3386 }
3387
3388 fn is_closed(&self) -> bool {
3389 self.inner.channel().is_closed()
3390 }
3391 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3392 self.inner.channel().on_closed()
3393 }
3394
3395 #[cfg(target_os = "fuchsia")]
3396 fn signal_peer(
3397 &self,
3398 clear_mask: zx::Signals,
3399 set_mask: zx::Signals,
3400 ) -> Result<(), zx_status::Status> {
3401 use fidl::Peered;
3402 self.inner.channel().signal_peer(clear_mask, set_mask)
3403 }
3404}
3405
3406impl DataSinkControlHandle {}
3407
3408#[must_use = "FIDL methods require a response to be sent"]
3409#[derive(Debug)]
3410pub struct DataSinkReadAssetResponder {
3411 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3412 tx_id: u32,
3413}
3414
3415impl std::ops::Drop for DataSinkReadAssetResponder {
3419 fn drop(&mut self) {
3420 self.control_handle.shutdown();
3421 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3423 }
3424}
3425
3426impl fidl::endpoints::Responder for DataSinkReadAssetResponder {
3427 type ControlHandle = DataSinkControlHandle;
3428
3429 fn control_handle(&self) -> &DataSinkControlHandle {
3430 &self.control_handle
3431 }
3432
3433 fn drop_without_shutdown(mut self) {
3434 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3436 std::mem::forget(self);
3438 }
3439}
3440
3441impl DataSinkReadAssetResponder {
3442 pub fn send(
3446 self,
3447 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3448 ) -> Result<(), fidl::Error> {
3449 let _result = self.send_raw(result);
3450 if _result.is_err() {
3451 self.control_handle.shutdown();
3452 }
3453 self.drop_without_shutdown();
3454 _result
3455 }
3456
3457 pub fn send_no_shutdown_on_err(
3459 self,
3460 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3461 ) -> Result<(), fidl::Error> {
3462 let _result = self.send_raw(result);
3463 self.drop_without_shutdown();
3464 _result
3465 }
3466
3467 fn send_raw(
3468 &self,
3469 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3470 ) -> Result<(), fidl::Error> {
3471 self.control_handle
3472 .inner
3473 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
3474 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
3475 self.tx_id,
3476 0x125a23e561007898,
3477 fidl::encoding::DynamicFlags::empty(),
3478 )
3479 }
3480}
3481
3482#[must_use = "FIDL methods require a response to be sent"]
3483#[derive(Debug)]
3484pub struct DataSinkWriteAssetResponder {
3485 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3486 tx_id: u32,
3487}
3488
3489impl std::ops::Drop for DataSinkWriteAssetResponder {
3493 fn drop(&mut self) {
3494 self.control_handle.shutdown();
3495 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3497 }
3498}
3499
3500impl fidl::endpoints::Responder for DataSinkWriteAssetResponder {
3501 type ControlHandle = DataSinkControlHandle;
3502
3503 fn control_handle(&self) -> &DataSinkControlHandle {
3504 &self.control_handle
3505 }
3506
3507 fn drop_without_shutdown(mut self) {
3508 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3510 std::mem::forget(self);
3512 }
3513}
3514
3515impl DataSinkWriteAssetResponder {
3516 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3520 let _result = self.send_raw(status);
3521 if _result.is_err() {
3522 self.control_handle.shutdown();
3523 }
3524 self.drop_without_shutdown();
3525 _result
3526 }
3527
3528 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3530 let _result = self.send_raw(status);
3531 self.drop_without_shutdown();
3532 _result
3533 }
3534
3535 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3536 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
3537 (status,),
3538 self.tx_id,
3539 0x516839ce76c4d0a9,
3540 fidl::encoding::DynamicFlags::empty(),
3541 )
3542 }
3543}
3544
3545#[must_use = "FIDL methods require a response to be sent"]
3546#[derive(Debug)]
3547pub struct DataSinkWriteFirmwareResponder {
3548 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3549 tx_id: u32,
3550}
3551
3552impl std::ops::Drop for DataSinkWriteFirmwareResponder {
3556 fn drop(&mut self) {
3557 self.control_handle.shutdown();
3558 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3560 }
3561}
3562
3563impl fidl::endpoints::Responder for DataSinkWriteFirmwareResponder {
3564 type ControlHandle = DataSinkControlHandle;
3565
3566 fn control_handle(&self) -> &DataSinkControlHandle {
3567 &self.control_handle
3568 }
3569
3570 fn drop_without_shutdown(mut self) {
3571 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3573 std::mem::forget(self);
3575 }
3576}
3577
3578impl DataSinkWriteFirmwareResponder {
3579 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3583 let _result = self.send_raw(result);
3584 if _result.is_err() {
3585 self.control_handle.shutdown();
3586 }
3587 self.drop_without_shutdown();
3588 _result
3589 }
3590
3591 pub fn send_no_shutdown_on_err(
3593 self,
3594 mut result: &WriteFirmwareResult,
3595 ) -> Result<(), fidl::Error> {
3596 let _result = self.send_raw(result);
3597 self.drop_without_shutdown();
3598 _result
3599 }
3600
3601 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3602 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
3603 (result,),
3604 self.tx_id,
3605 0x514b93454ac0be97,
3606 fidl::encoding::DynamicFlags::empty(),
3607 )
3608 }
3609}
3610
3611#[must_use = "FIDL methods require a response to be sent"]
3612#[derive(Debug)]
3613pub struct DataSinkReadFirmwareResponder {
3614 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3615 tx_id: u32,
3616}
3617
3618impl std::ops::Drop for DataSinkReadFirmwareResponder {
3622 fn drop(&mut self) {
3623 self.control_handle.shutdown();
3624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3626 }
3627}
3628
3629impl fidl::endpoints::Responder for DataSinkReadFirmwareResponder {
3630 type ControlHandle = DataSinkControlHandle;
3631
3632 fn control_handle(&self) -> &DataSinkControlHandle {
3633 &self.control_handle
3634 }
3635
3636 fn drop_without_shutdown(mut self) {
3637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3639 std::mem::forget(self);
3641 }
3642}
3643
3644impl DataSinkReadFirmwareResponder {
3645 pub fn send(
3649 self,
3650 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3651 ) -> Result<(), fidl::Error> {
3652 let _result = self.send_raw(result);
3653 if _result.is_err() {
3654 self.control_handle.shutdown();
3655 }
3656 self.drop_without_shutdown();
3657 _result
3658 }
3659
3660 pub fn send_no_shutdown_on_err(
3662 self,
3663 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3664 ) -> Result<(), fidl::Error> {
3665 let _result = self.send_raw(result);
3666 self.drop_without_shutdown();
3667 _result
3668 }
3669
3670 fn send_raw(
3671 &self,
3672 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3673 ) -> Result<(), fidl::Error> {
3674 self.control_handle
3675 .inner
3676 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
3677 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
3678 self.tx_id,
3679 0xcb67f9830cae9c3,
3680 fidl::encoding::DynamicFlags::empty(),
3681 )
3682 }
3683}
3684
3685#[must_use = "FIDL methods require a response to be sent"]
3686#[derive(Debug)]
3687pub struct DataSinkWriteVolumesResponder {
3688 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3689 tx_id: u32,
3690}
3691
3692impl std::ops::Drop for DataSinkWriteVolumesResponder {
3696 fn drop(&mut self) {
3697 self.control_handle.shutdown();
3698 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3700 }
3701}
3702
3703impl fidl::endpoints::Responder for DataSinkWriteVolumesResponder {
3704 type ControlHandle = DataSinkControlHandle;
3705
3706 fn control_handle(&self) -> &DataSinkControlHandle {
3707 &self.control_handle
3708 }
3709
3710 fn drop_without_shutdown(mut self) {
3711 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3713 std::mem::forget(self);
3715 }
3716}
3717
3718impl DataSinkWriteVolumesResponder {
3719 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3723 let _result = self.send_raw(status);
3724 if _result.is_err() {
3725 self.control_handle.shutdown();
3726 }
3727 self.drop_without_shutdown();
3728 _result
3729 }
3730
3731 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3733 let _result = self.send_raw(status);
3734 self.drop_without_shutdown();
3735 _result
3736 }
3737
3738 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3739 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
3740 (status,),
3741 self.tx_id,
3742 0x5ee32c861d0259df,
3743 fidl::encoding::DynamicFlags::empty(),
3744 )
3745 }
3746}
3747
3748#[must_use = "FIDL methods require a response to be sent"]
3749#[derive(Debug)]
3750pub struct DataSinkWriteOpaqueVolumeResponder {
3751 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3752 tx_id: u32,
3753}
3754
3755impl std::ops::Drop for DataSinkWriteOpaqueVolumeResponder {
3759 fn drop(&mut self) {
3760 self.control_handle.shutdown();
3761 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3763 }
3764}
3765
3766impl fidl::endpoints::Responder for DataSinkWriteOpaqueVolumeResponder {
3767 type ControlHandle = DataSinkControlHandle;
3768
3769 fn control_handle(&self) -> &DataSinkControlHandle {
3770 &self.control_handle
3771 }
3772
3773 fn drop_without_shutdown(mut self) {
3774 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3776 std::mem::forget(self);
3778 }
3779}
3780
3781impl DataSinkWriteOpaqueVolumeResponder {
3782 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3786 let _result = self.send_raw(result);
3787 if _result.is_err() {
3788 self.control_handle.shutdown();
3789 }
3790 self.drop_without_shutdown();
3791 _result
3792 }
3793
3794 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3796 let _result = self.send_raw(result);
3797 self.drop_without_shutdown();
3798 _result
3799 }
3800
3801 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3802 self.control_handle
3803 .inner
3804 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3805 result,
3806 self.tx_id,
3807 0x4884b6ebaf660d79,
3808 fidl::encoding::DynamicFlags::empty(),
3809 )
3810 }
3811}
3812
3813#[must_use = "FIDL methods require a response to be sent"]
3814#[derive(Debug)]
3815pub struct DataSinkWriteSparseVolumeResponder {
3816 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3817 tx_id: u32,
3818}
3819
3820impl std::ops::Drop for DataSinkWriteSparseVolumeResponder {
3824 fn drop(&mut self) {
3825 self.control_handle.shutdown();
3826 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3828 }
3829}
3830
3831impl fidl::endpoints::Responder for DataSinkWriteSparseVolumeResponder {
3832 type ControlHandle = DataSinkControlHandle;
3833
3834 fn control_handle(&self) -> &DataSinkControlHandle {
3835 &self.control_handle
3836 }
3837
3838 fn drop_without_shutdown(mut self) {
3839 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3841 std::mem::forget(self);
3843 }
3844}
3845
3846impl DataSinkWriteSparseVolumeResponder {
3847 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3851 let _result = self.send_raw(result);
3852 if _result.is_err() {
3853 self.control_handle.shutdown();
3854 }
3855 self.drop_without_shutdown();
3856 _result
3857 }
3858
3859 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3861 let _result = self.send_raw(result);
3862 self.drop_without_shutdown();
3863 _result
3864 }
3865
3866 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3867 self.control_handle
3868 .inner
3869 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3870 result,
3871 self.tx_id,
3872 0x340f5370c5b1e026,
3873 fidl::encoding::DynamicFlags::empty(),
3874 )
3875 }
3876}
3877
3878#[must_use = "FIDL methods require a response to be sent"]
3879#[derive(Debug)]
3880pub struct DataSinkFlushResponder {
3881 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3882 tx_id: u32,
3883}
3884
3885impl std::ops::Drop for DataSinkFlushResponder {
3889 fn drop(&mut self) {
3890 self.control_handle.shutdown();
3891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3893 }
3894}
3895
3896impl fidl::endpoints::Responder for DataSinkFlushResponder {
3897 type ControlHandle = DataSinkControlHandle;
3898
3899 fn control_handle(&self) -> &DataSinkControlHandle {
3900 &self.control_handle
3901 }
3902
3903 fn drop_without_shutdown(mut self) {
3904 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3906 std::mem::forget(self);
3908 }
3909}
3910
3911impl DataSinkFlushResponder {
3912 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3916 let _result = self.send_raw(status);
3917 if _result.is_err() {
3918 self.control_handle.shutdown();
3919 }
3920 self.drop_without_shutdown();
3921 _result
3922 }
3923
3924 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3926 let _result = self.send_raw(status);
3927 self.drop_without_shutdown();
3928 _result
3929 }
3930
3931 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3932 self.control_handle.inner.send::<DataSinkFlushResponse>(
3933 (status,),
3934 self.tx_id,
3935 0x3b59d3e2338e3139,
3936 fidl::encoding::DynamicFlags::empty(),
3937 )
3938 }
3939}
3940
3941#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3942pub struct DynamicDataSinkMarker;
3943
3944impl fidl::endpoints::ProtocolMarker for DynamicDataSinkMarker {
3945 type Proxy = DynamicDataSinkProxy;
3946 type RequestStream = DynamicDataSinkRequestStream;
3947 #[cfg(target_os = "fuchsia")]
3948 type SynchronousProxy = DynamicDataSinkSynchronousProxy;
3949
3950 const DEBUG_NAME: &'static str = "(anonymous) DynamicDataSink";
3951}
3952
3953pub trait DynamicDataSinkProxyInterface: Send + Sync {
3954 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
3955 + Send;
3956 fn r#read_asset(
3957 &self,
3958 configuration: Configuration,
3959 asset: Asset,
3960 ) -> Self::ReadAssetResponseFut;
3961 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
3962 fn r#write_asset(
3963 &self,
3964 configuration: Configuration,
3965 asset: Asset,
3966 payload: fidl_fuchsia_mem::Buffer,
3967 ) -> Self::WriteAssetResponseFut;
3968 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
3969 + Send;
3970 fn r#write_firmware(
3971 &self,
3972 configuration: Configuration,
3973 type_: &str,
3974 payload: fidl_fuchsia_mem::Buffer,
3975 ) -> Self::WriteFirmwareResponseFut;
3976 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
3977 + Send;
3978 fn r#read_firmware(
3979 &self,
3980 configuration: Configuration,
3981 type_: &str,
3982 ) -> Self::ReadFirmwareResponseFut;
3983 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
3984 fn r#write_volumes(
3985 &self,
3986 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
3987 ) -> Self::WriteVolumesResponseFut;
3988 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
3989 + Send;
3990 fn r#write_opaque_volume(
3991 &self,
3992 payload: fidl_fuchsia_mem::Buffer,
3993 ) -> Self::WriteOpaqueVolumeResponseFut;
3994 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
3995 + Send;
3996 fn r#write_sparse_volume(
3997 &self,
3998 payload: fidl_fuchsia_mem::Buffer,
3999 ) -> Self::WriteSparseVolumeResponseFut;
4000 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4001 fn r#flush(&self) -> Self::FlushResponseFut;
4002 type InitializePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4003 + Send;
4004 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut;
4005 type WipePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4006 + Send;
4007 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut;
4008}
4009#[derive(Debug)]
4010#[cfg(target_os = "fuchsia")]
4011pub struct DynamicDataSinkSynchronousProxy {
4012 client: fidl::client::sync::Client,
4013}
4014
4015#[cfg(target_os = "fuchsia")]
4016impl fidl::endpoints::SynchronousProxy for DynamicDataSinkSynchronousProxy {
4017 type Proxy = DynamicDataSinkProxy;
4018 type Protocol = DynamicDataSinkMarker;
4019
4020 fn from_channel(inner: fidl::Channel) -> Self {
4021 Self::new(inner)
4022 }
4023
4024 fn into_channel(self) -> fidl::Channel {
4025 self.client.into_channel()
4026 }
4027
4028 fn as_channel(&self) -> &fidl::Channel {
4029 self.client.as_channel()
4030 }
4031}
4032
4033#[cfg(target_os = "fuchsia")]
4034impl DynamicDataSinkSynchronousProxy {
4035 pub fn new(channel: fidl::Channel) -> Self {
4036 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4037 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4038 }
4039
4040 pub fn into_channel(self) -> fidl::Channel {
4041 self.client.into_channel()
4042 }
4043
4044 pub fn wait_for_event(
4047 &self,
4048 deadline: zx::MonotonicInstant,
4049 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4050 DynamicDataSinkEvent::decode(self.client.wait_for_event(deadline)?)
4051 }
4052
4053 pub fn r#read_asset(
4059 &self,
4060 mut configuration: Configuration,
4061 mut asset: Asset,
4062 ___deadline: zx::MonotonicInstant,
4063 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4064 let _response = self.client.send_query::<
4065 DataSinkReadAssetRequest,
4066 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4067 >(
4068 (configuration, asset,),
4069 0x125a23e561007898,
4070 fidl::encoding::DynamicFlags::empty(),
4071 ___deadline,
4072 )?;
4073 Ok(_response.map(|x| x.asset))
4074 }
4075
4076 pub fn r#write_asset(
4085 &self,
4086 mut configuration: Configuration,
4087 mut asset: Asset,
4088 mut payload: fidl_fuchsia_mem::Buffer,
4089 ___deadline: zx::MonotonicInstant,
4090 ) -> Result<i32, fidl::Error> {
4091 let _response =
4092 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
4093 (configuration, asset, &mut payload),
4094 0x516839ce76c4d0a9,
4095 fidl::encoding::DynamicFlags::empty(),
4096 ___deadline,
4097 )?;
4098 Ok(_response.status)
4099 }
4100
4101 pub fn r#write_firmware(
4116 &self,
4117 mut configuration: Configuration,
4118 mut type_: &str,
4119 mut payload: fidl_fuchsia_mem::Buffer,
4120 ___deadline: zx::MonotonicInstant,
4121 ) -> Result<WriteFirmwareResult, fidl::Error> {
4122 let _response =
4123 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
4124 (configuration, type_, &mut payload),
4125 0x514b93454ac0be97,
4126 fidl::encoding::DynamicFlags::empty(),
4127 ___deadline,
4128 )?;
4129 Ok(_response.result)
4130 }
4131
4132 pub fn r#read_firmware(
4139 &self,
4140 mut configuration: Configuration,
4141 mut type_: &str,
4142 ___deadline: zx::MonotonicInstant,
4143 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4144 let _response = self.client.send_query::<
4145 DataSinkReadFirmwareRequest,
4146 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4147 >(
4148 (configuration, type_,),
4149 0xcb67f9830cae9c3,
4150 fidl::encoding::DynamicFlags::empty(),
4151 ___deadline,
4152 )?;
4153 Ok(_response.map(|x| x.firmware))
4154 }
4155
4156 pub fn r#write_volumes(
4159 &self,
4160 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4161 ___deadline: zx::MonotonicInstant,
4162 ) -> Result<i32, fidl::Error> {
4163 let _response =
4164 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
4165 (payload,),
4166 0x5ee32c861d0259df,
4167 fidl::encoding::DynamicFlags::empty(),
4168 ___deadline,
4169 )?;
4170 Ok(_response.status)
4171 }
4172
4173 pub fn r#write_opaque_volume(
4182 &self,
4183 mut payload: fidl_fuchsia_mem::Buffer,
4184 ___deadline: zx::MonotonicInstant,
4185 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4186 let _response = self.client.send_query::<
4187 DataSinkWriteOpaqueVolumeRequest,
4188 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4189 >(
4190 (&mut payload,),
4191 0x4884b6ebaf660d79,
4192 fidl::encoding::DynamicFlags::empty(),
4193 ___deadline,
4194 )?;
4195 Ok(_response.map(|x| x))
4196 }
4197
4198 pub fn r#write_sparse_volume(
4202 &self,
4203 mut payload: fidl_fuchsia_mem::Buffer,
4204 ___deadline: zx::MonotonicInstant,
4205 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4206 let _response = self.client.send_query::<
4207 DataSinkWriteSparseVolumeRequest,
4208 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4209 >(
4210 (&mut payload,),
4211 0x340f5370c5b1e026,
4212 fidl::encoding::DynamicFlags::empty(),
4213 ___deadline,
4214 )?;
4215 Ok(_response.map(|x| x))
4216 }
4217
4218 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
4220 let _response =
4221 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
4222 (),
4223 0x3b59d3e2338e3139,
4224 fidl::encoding::DynamicFlags::empty(),
4225 ___deadline,
4226 )?;
4227 Ok(_response.status)
4228 }
4229
4230 pub fn r#initialize_partition_tables(
4238 &self,
4239 ___deadline: zx::MonotonicInstant,
4240 ) -> Result<i32, fidl::Error> {
4241 let _response = self.client.send_query::<
4242 fidl::encoding::EmptyPayload,
4243 DynamicDataSinkInitializePartitionTablesResponse,
4244 >(
4245 (),
4246 0x4c798b3813ea9f7e,
4247 fidl::encoding::DynamicFlags::empty(),
4248 ___deadline,
4249 )?;
4250 Ok(_response.status)
4251 }
4252
4253 pub fn r#wipe_partition_tables(
4259 &self,
4260 ___deadline: zx::MonotonicInstant,
4261 ) -> Result<i32, fidl::Error> {
4262 let _response = self
4263 .client
4264 .send_query::<fidl::encoding::EmptyPayload, DynamicDataSinkWipePartitionTablesResponse>(
4265 (),
4266 0x797c0ebeedaf2cc,
4267 fidl::encoding::DynamicFlags::empty(),
4268 ___deadline,
4269 )?;
4270 Ok(_response.status)
4271 }
4272}
4273
4274#[derive(Debug, Clone)]
4275pub struct DynamicDataSinkProxy {
4276 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4277}
4278
4279impl fidl::endpoints::Proxy for DynamicDataSinkProxy {
4280 type Protocol = DynamicDataSinkMarker;
4281
4282 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4283 Self::new(inner)
4284 }
4285
4286 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4287 self.client.into_channel().map_err(|client| Self { client })
4288 }
4289
4290 fn as_channel(&self) -> &::fidl::AsyncChannel {
4291 self.client.as_channel()
4292 }
4293}
4294
4295impl DynamicDataSinkProxy {
4296 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4298 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4299 Self { client: fidl::client::Client::new(channel, protocol_name) }
4300 }
4301
4302 pub fn take_event_stream(&self) -> DynamicDataSinkEventStream {
4308 DynamicDataSinkEventStream { event_receiver: self.client.take_event_receiver() }
4309 }
4310
4311 pub fn r#read_asset(
4317 &self,
4318 mut configuration: Configuration,
4319 mut asset: Asset,
4320 ) -> fidl::client::QueryResponseFut<
4321 DataSinkReadAssetResult,
4322 fidl::encoding::DefaultFuchsiaResourceDialect,
4323 > {
4324 DynamicDataSinkProxyInterface::r#read_asset(self, configuration, asset)
4325 }
4326
4327 pub fn r#write_asset(
4336 &self,
4337 mut configuration: Configuration,
4338 mut asset: Asset,
4339 mut payload: fidl_fuchsia_mem::Buffer,
4340 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4341 DynamicDataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
4342 }
4343
4344 pub fn r#write_firmware(
4359 &self,
4360 mut configuration: Configuration,
4361 mut type_: &str,
4362 mut payload: fidl_fuchsia_mem::Buffer,
4363 ) -> fidl::client::QueryResponseFut<
4364 WriteFirmwareResult,
4365 fidl::encoding::DefaultFuchsiaResourceDialect,
4366 > {
4367 DynamicDataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
4368 }
4369
4370 pub fn r#read_firmware(
4377 &self,
4378 mut configuration: Configuration,
4379 mut type_: &str,
4380 ) -> fidl::client::QueryResponseFut<
4381 DataSinkReadFirmwareResult,
4382 fidl::encoding::DefaultFuchsiaResourceDialect,
4383 > {
4384 DynamicDataSinkProxyInterface::r#read_firmware(self, configuration, type_)
4385 }
4386
4387 pub fn r#write_volumes(
4390 &self,
4391 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4392 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4393 DynamicDataSinkProxyInterface::r#write_volumes(self, payload)
4394 }
4395
4396 pub fn r#write_opaque_volume(
4405 &self,
4406 mut payload: fidl_fuchsia_mem::Buffer,
4407 ) -> fidl::client::QueryResponseFut<
4408 DataSinkWriteOpaqueVolumeResult,
4409 fidl::encoding::DefaultFuchsiaResourceDialect,
4410 > {
4411 DynamicDataSinkProxyInterface::r#write_opaque_volume(self, payload)
4412 }
4413
4414 pub fn r#write_sparse_volume(
4418 &self,
4419 mut payload: fidl_fuchsia_mem::Buffer,
4420 ) -> fidl::client::QueryResponseFut<
4421 DataSinkWriteSparseVolumeResult,
4422 fidl::encoding::DefaultFuchsiaResourceDialect,
4423 > {
4424 DynamicDataSinkProxyInterface::r#write_sparse_volume(self, payload)
4425 }
4426
4427 pub fn r#flush(
4429 &self,
4430 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4431 DynamicDataSinkProxyInterface::r#flush(self)
4432 }
4433
4434 pub fn r#initialize_partition_tables(
4442 &self,
4443 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4444 DynamicDataSinkProxyInterface::r#initialize_partition_tables(self)
4445 }
4446
4447 pub fn r#wipe_partition_tables(
4453 &self,
4454 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4455 DynamicDataSinkProxyInterface::r#wipe_partition_tables(self)
4456 }
4457}
4458
4459impl DynamicDataSinkProxyInterface for DynamicDataSinkProxy {
4460 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
4461 DataSinkReadAssetResult,
4462 fidl::encoding::DefaultFuchsiaResourceDialect,
4463 >;
4464 fn r#read_asset(
4465 &self,
4466 mut configuration: Configuration,
4467 mut asset: Asset,
4468 ) -> Self::ReadAssetResponseFut {
4469 fn _decode(
4470 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4471 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4472 let _response = fidl::client::decode_transaction_body::<
4473 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4474 fidl::encoding::DefaultFuchsiaResourceDialect,
4475 0x125a23e561007898,
4476 >(_buf?)?;
4477 Ok(_response.map(|x| x.asset))
4478 }
4479 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
4480 (configuration, asset),
4481 0x125a23e561007898,
4482 fidl::encoding::DynamicFlags::empty(),
4483 _decode,
4484 )
4485 }
4486
4487 type WriteAssetResponseFut =
4488 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4489 fn r#write_asset(
4490 &self,
4491 mut configuration: Configuration,
4492 mut asset: Asset,
4493 mut payload: fidl_fuchsia_mem::Buffer,
4494 ) -> Self::WriteAssetResponseFut {
4495 fn _decode(
4496 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4497 ) -> Result<i32, fidl::Error> {
4498 let _response = fidl::client::decode_transaction_body::<
4499 DataSinkWriteAssetResponse,
4500 fidl::encoding::DefaultFuchsiaResourceDialect,
4501 0x516839ce76c4d0a9,
4502 >(_buf?)?;
4503 Ok(_response.status)
4504 }
4505 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
4506 (configuration, asset, &mut payload),
4507 0x516839ce76c4d0a9,
4508 fidl::encoding::DynamicFlags::empty(),
4509 _decode,
4510 )
4511 }
4512
4513 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
4514 WriteFirmwareResult,
4515 fidl::encoding::DefaultFuchsiaResourceDialect,
4516 >;
4517 fn r#write_firmware(
4518 &self,
4519 mut configuration: Configuration,
4520 mut type_: &str,
4521 mut payload: fidl_fuchsia_mem::Buffer,
4522 ) -> Self::WriteFirmwareResponseFut {
4523 fn _decode(
4524 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4525 ) -> Result<WriteFirmwareResult, fidl::Error> {
4526 let _response = fidl::client::decode_transaction_body::<
4527 DataSinkWriteFirmwareResponse,
4528 fidl::encoding::DefaultFuchsiaResourceDialect,
4529 0x514b93454ac0be97,
4530 >(_buf?)?;
4531 Ok(_response.result)
4532 }
4533 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
4534 (configuration, type_, &mut payload),
4535 0x514b93454ac0be97,
4536 fidl::encoding::DynamicFlags::empty(),
4537 _decode,
4538 )
4539 }
4540
4541 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
4542 DataSinkReadFirmwareResult,
4543 fidl::encoding::DefaultFuchsiaResourceDialect,
4544 >;
4545 fn r#read_firmware(
4546 &self,
4547 mut configuration: Configuration,
4548 mut type_: &str,
4549 ) -> Self::ReadFirmwareResponseFut {
4550 fn _decode(
4551 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4552 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4553 let _response = fidl::client::decode_transaction_body::<
4554 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4555 fidl::encoding::DefaultFuchsiaResourceDialect,
4556 0xcb67f9830cae9c3,
4557 >(_buf?)?;
4558 Ok(_response.map(|x| x.firmware))
4559 }
4560 self.client
4561 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
4562 (configuration, type_),
4563 0xcb67f9830cae9c3,
4564 fidl::encoding::DynamicFlags::empty(),
4565 _decode,
4566 )
4567 }
4568
4569 type WriteVolumesResponseFut =
4570 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4571 fn r#write_volumes(
4572 &self,
4573 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4574 ) -> Self::WriteVolumesResponseFut {
4575 fn _decode(
4576 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4577 ) -> Result<i32, fidl::Error> {
4578 let _response = fidl::client::decode_transaction_body::<
4579 DataSinkWriteVolumesResponse,
4580 fidl::encoding::DefaultFuchsiaResourceDialect,
4581 0x5ee32c861d0259df,
4582 >(_buf?)?;
4583 Ok(_response.status)
4584 }
4585 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
4586 (payload,),
4587 0x5ee32c861d0259df,
4588 fidl::encoding::DynamicFlags::empty(),
4589 _decode,
4590 )
4591 }
4592
4593 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
4594 DataSinkWriteOpaqueVolumeResult,
4595 fidl::encoding::DefaultFuchsiaResourceDialect,
4596 >;
4597 fn r#write_opaque_volume(
4598 &self,
4599 mut payload: fidl_fuchsia_mem::Buffer,
4600 ) -> Self::WriteOpaqueVolumeResponseFut {
4601 fn _decode(
4602 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4603 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4604 let _response = fidl::client::decode_transaction_body::<
4605 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4606 fidl::encoding::DefaultFuchsiaResourceDialect,
4607 0x4884b6ebaf660d79,
4608 >(_buf?)?;
4609 Ok(_response.map(|x| x))
4610 }
4611 self.client.send_query_and_decode::<
4612 DataSinkWriteOpaqueVolumeRequest,
4613 DataSinkWriteOpaqueVolumeResult,
4614 >(
4615 (&mut payload,),
4616 0x4884b6ebaf660d79,
4617 fidl::encoding::DynamicFlags::empty(),
4618 _decode,
4619 )
4620 }
4621
4622 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
4623 DataSinkWriteSparseVolumeResult,
4624 fidl::encoding::DefaultFuchsiaResourceDialect,
4625 >;
4626 fn r#write_sparse_volume(
4627 &self,
4628 mut payload: fidl_fuchsia_mem::Buffer,
4629 ) -> Self::WriteSparseVolumeResponseFut {
4630 fn _decode(
4631 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4632 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4633 let _response = fidl::client::decode_transaction_body::<
4634 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4635 fidl::encoding::DefaultFuchsiaResourceDialect,
4636 0x340f5370c5b1e026,
4637 >(_buf?)?;
4638 Ok(_response.map(|x| x))
4639 }
4640 self.client.send_query_and_decode::<
4641 DataSinkWriteSparseVolumeRequest,
4642 DataSinkWriteSparseVolumeResult,
4643 >(
4644 (&mut payload,),
4645 0x340f5370c5b1e026,
4646 fidl::encoding::DynamicFlags::empty(),
4647 _decode,
4648 )
4649 }
4650
4651 type FlushResponseFut =
4652 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4653 fn r#flush(&self) -> Self::FlushResponseFut {
4654 fn _decode(
4655 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4656 ) -> Result<i32, fidl::Error> {
4657 let _response = fidl::client::decode_transaction_body::<
4658 DataSinkFlushResponse,
4659 fidl::encoding::DefaultFuchsiaResourceDialect,
4660 0x3b59d3e2338e3139,
4661 >(_buf?)?;
4662 Ok(_response.status)
4663 }
4664 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4665 (),
4666 0x3b59d3e2338e3139,
4667 fidl::encoding::DynamicFlags::empty(),
4668 _decode,
4669 )
4670 }
4671
4672 type InitializePartitionTablesResponseFut =
4673 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4674 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut {
4675 fn _decode(
4676 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4677 ) -> Result<i32, fidl::Error> {
4678 let _response = fidl::client::decode_transaction_body::<
4679 DynamicDataSinkInitializePartitionTablesResponse,
4680 fidl::encoding::DefaultFuchsiaResourceDialect,
4681 0x4c798b3813ea9f7e,
4682 >(_buf?)?;
4683 Ok(_response.status)
4684 }
4685 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4686 (),
4687 0x4c798b3813ea9f7e,
4688 fidl::encoding::DynamicFlags::empty(),
4689 _decode,
4690 )
4691 }
4692
4693 type WipePartitionTablesResponseFut =
4694 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4695 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut {
4696 fn _decode(
4697 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4698 ) -> Result<i32, fidl::Error> {
4699 let _response = fidl::client::decode_transaction_body::<
4700 DynamicDataSinkWipePartitionTablesResponse,
4701 fidl::encoding::DefaultFuchsiaResourceDialect,
4702 0x797c0ebeedaf2cc,
4703 >(_buf?)?;
4704 Ok(_response.status)
4705 }
4706 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4707 (),
4708 0x797c0ebeedaf2cc,
4709 fidl::encoding::DynamicFlags::empty(),
4710 _decode,
4711 )
4712 }
4713}
4714
4715pub struct DynamicDataSinkEventStream {
4716 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4717}
4718
4719impl std::marker::Unpin for DynamicDataSinkEventStream {}
4720
4721impl futures::stream::FusedStream for DynamicDataSinkEventStream {
4722 fn is_terminated(&self) -> bool {
4723 self.event_receiver.is_terminated()
4724 }
4725}
4726
4727impl futures::Stream for DynamicDataSinkEventStream {
4728 type Item = Result<DynamicDataSinkEvent, fidl::Error>;
4729
4730 fn poll_next(
4731 mut self: std::pin::Pin<&mut Self>,
4732 cx: &mut std::task::Context<'_>,
4733 ) -> std::task::Poll<Option<Self::Item>> {
4734 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4735 &mut self.event_receiver,
4736 cx
4737 )?) {
4738 Some(buf) => std::task::Poll::Ready(Some(DynamicDataSinkEvent::decode(buf))),
4739 None => std::task::Poll::Ready(None),
4740 }
4741 }
4742}
4743
4744#[derive(Debug)]
4745pub enum DynamicDataSinkEvent {}
4746
4747impl DynamicDataSinkEvent {
4748 fn decode(
4750 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4751 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4752 let (bytes, _handles) = buf.split_mut();
4753 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4754 debug_assert_eq!(tx_header.tx_id, 0);
4755 match tx_header.ordinal {
4756 _ => Err(fidl::Error::UnknownOrdinal {
4757 ordinal: tx_header.ordinal,
4758 protocol_name:
4759 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4760 }),
4761 }
4762 }
4763}
4764
4765pub struct DynamicDataSinkRequestStream {
4767 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4768 is_terminated: bool,
4769}
4770
4771impl std::marker::Unpin for DynamicDataSinkRequestStream {}
4772
4773impl futures::stream::FusedStream for DynamicDataSinkRequestStream {
4774 fn is_terminated(&self) -> bool {
4775 self.is_terminated
4776 }
4777}
4778
4779impl fidl::endpoints::RequestStream for DynamicDataSinkRequestStream {
4780 type Protocol = DynamicDataSinkMarker;
4781 type ControlHandle = DynamicDataSinkControlHandle;
4782
4783 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4784 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4785 }
4786
4787 fn control_handle(&self) -> Self::ControlHandle {
4788 DynamicDataSinkControlHandle { inner: self.inner.clone() }
4789 }
4790
4791 fn into_inner(
4792 self,
4793 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4794 {
4795 (self.inner, self.is_terminated)
4796 }
4797
4798 fn from_inner(
4799 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4800 is_terminated: bool,
4801 ) -> Self {
4802 Self { inner, is_terminated }
4803 }
4804}
4805
4806impl futures::Stream for DynamicDataSinkRequestStream {
4807 type Item = Result<DynamicDataSinkRequest, fidl::Error>;
4808
4809 fn poll_next(
4810 mut self: std::pin::Pin<&mut Self>,
4811 cx: &mut std::task::Context<'_>,
4812 ) -> std::task::Poll<Option<Self::Item>> {
4813 let this = &mut *self;
4814 if this.inner.check_shutdown(cx) {
4815 this.is_terminated = true;
4816 return std::task::Poll::Ready(None);
4817 }
4818 if this.is_terminated {
4819 panic!("polled DynamicDataSinkRequestStream after completion");
4820 }
4821 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4822 |bytes, handles| {
4823 match this.inner.channel().read_etc(cx, bytes, handles) {
4824 std::task::Poll::Ready(Ok(())) => {}
4825 std::task::Poll::Pending => return std::task::Poll::Pending,
4826 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4827 this.is_terminated = true;
4828 return std::task::Poll::Ready(None);
4829 }
4830 std::task::Poll::Ready(Err(e)) => {
4831 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4832 e.into(),
4833 ))))
4834 }
4835 }
4836
4837 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4839
4840 std::task::Poll::Ready(Some(match header.ordinal {
4841 0x125a23e561007898 => {
4842 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4843 let mut req = fidl::new_empty!(
4844 DataSinkReadAssetRequest,
4845 fidl::encoding::DefaultFuchsiaResourceDialect
4846 );
4847 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4848 let control_handle =
4849 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4850 Ok(DynamicDataSinkRequest::ReadAsset {
4851 configuration: req.configuration,
4852 asset: req.asset,
4853
4854 responder: DynamicDataSinkReadAssetResponder {
4855 control_handle: std::mem::ManuallyDrop::new(control_handle),
4856 tx_id: header.tx_id,
4857 },
4858 })
4859 }
4860 0x516839ce76c4d0a9 => {
4861 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4862 let mut req = fidl::new_empty!(
4863 DataSinkWriteAssetRequest,
4864 fidl::encoding::DefaultFuchsiaResourceDialect
4865 );
4866 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4867 let control_handle =
4868 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4869 Ok(DynamicDataSinkRequest::WriteAsset {
4870 configuration: req.configuration,
4871 asset: req.asset,
4872 payload: req.payload,
4873
4874 responder: DynamicDataSinkWriteAssetResponder {
4875 control_handle: std::mem::ManuallyDrop::new(control_handle),
4876 tx_id: header.tx_id,
4877 },
4878 })
4879 }
4880 0x514b93454ac0be97 => {
4881 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4882 let mut req = fidl::new_empty!(
4883 DataSinkWriteFirmwareRequest,
4884 fidl::encoding::DefaultFuchsiaResourceDialect
4885 );
4886 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4887 let control_handle =
4888 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4889 Ok(DynamicDataSinkRequest::WriteFirmware {
4890 configuration: req.configuration,
4891 type_: req.type_,
4892 payload: req.payload,
4893
4894 responder: DynamicDataSinkWriteFirmwareResponder {
4895 control_handle: std::mem::ManuallyDrop::new(control_handle),
4896 tx_id: header.tx_id,
4897 },
4898 })
4899 }
4900 0xcb67f9830cae9c3 => {
4901 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4902 let mut req = fidl::new_empty!(
4903 DataSinkReadFirmwareRequest,
4904 fidl::encoding::DefaultFuchsiaResourceDialect
4905 );
4906 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4907 let control_handle =
4908 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4909 Ok(DynamicDataSinkRequest::ReadFirmware {
4910 configuration: req.configuration,
4911 type_: req.type_,
4912
4913 responder: DynamicDataSinkReadFirmwareResponder {
4914 control_handle: std::mem::ManuallyDrop::new(control_handle),
4915 tx_id: header.tx_id,
4916 },
4917 })
4918 }
4919 0x5ee32c861d0259df => {
4920 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4921 let mut req = fidl::new_empty!(
4922 DataSinkWriteVolumesRequest,
4923 fidl::encoding::DefaultFuchsiaResourceDialect
4924 );
4925 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
4926 let control_handle =
4927 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4928 Ok(DynamicDataSinkRequest::WriteVolumes {
4929 payload: req.payload,
4930
4931 responder: DynamicDataSinkWriteVolumesResponder {
4932 control_handle: std::mem::ManuallyDrop::new(control_handle),
4933 tx_id: header.tx_id,
4934 },
4935 })
4936 }
4937 0x4884b6ebaf660d79 => {
4938 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4939 let mut req = fidl::new_empty!(
4940 DataSinkWriteOpaqueVolumeRequest,
4941 fidl::encoding::DefaultFuchsiaResourceDialect
4942 );
4943 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
4944 let control_handle =
4945 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4946 Ok(DynamicDataSinkRequest::WriteOpaqueVolume {
4947 payload: req.payload,
4948
4949 responder: DynamicDataSinkWriteOpaqueVolumeResponder {
4950 control_handle: std::mem::ManuallyDrop::new(control_handle),
4951 tx_id: header.tx_id,
4952 },
4953 })
4954 }
4955 0x340f5370c5b1e026 => {
4956 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4957 let mut req = fidl::new_empty!(
4958 DataSinkWriteSparseVolumeRequest,
4959 fidl::encoding::DefaultFuchsiaResourceDialect
4960 );
4961 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
4962 let control_handle =
4963 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4964 Ok(DynamicDataSinkRequest::WriteSparseVolume {
4965 payload: req.payload,
4966
4967 responder: DynamicDataSinkWriteSparseVolumeResponder {
4968 control_handle: std::mem::ManuallyDrop::new(control_handle),
4969 tx_id: header.tx_id,
4970 },
4971 })
4972 }
4973 0x3b59d3e2338e3139 => {
4974 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4975 let mut req = fidl::new_empty!(
4976 fidl::encoding::EmptyPayload,
4977 fidl::encoding::DefaultFuchsiaResourceDialect
4978 );
4979 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4980 let control_handle =
4981 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4982 Ok(DynamicDataSinkRequest::Flush {
4983 responder: DynamicDataSinkFlushResponder {
4984 control_handle: std::mem::ManuallyDrop::new(control_handle),
4985 tx_id: header.tx_id,
4986 },
4987 })
4988 }
4989 0x4c798b3813ea9f7e => {
4990 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4991 let mut req = fidl::new_empty!(
4992 fidl::encoding::EmptyPayload,
4993 fidl::encoding::DefaultFuchsiaResourceDialect
4994 );
4995 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4996 let control_handle =
4997 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4998 Ok(DynamicDataSinkRequest::InitializePartitionTables {
4999 responder: DynamicDataSinkInitializePartitionTablesResponder {
5000 control_handle: std::mem::ManuallyDrop::new(control_handle),
5001 tx_id: header.tx_id,
5002 },
5003 })
5004 }
5005 0x797c0ebeedaf2cc => {
5006 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5007 let mut req = fidl::new_empty!(
5008 fidl::encoding::EmptyPayload,
5009 fidl::encoding::DefaultFuchsiaResourceDialect
5010 );
5011 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5012 let control_handle =
5013 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5014 Ok(DynamicDataSinkRequest::WipePartitionTables {
5015 responder: DynamicDataSinkWipePartitionTablesResponder {
5016 control_handle: std::mem::ManuallyDrop::new(control_handle),
5017 tx_id: header.tx_id,
5018 },
5019 })
5020 }
5021 _ => Err(fidl::Error::UnknownOrdinal {
5022 ordinal: header.ordinal,
5023 protocol_name:
5024 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5025 }),
5026 }))
5027 },
5028 )
5029 }
5030}
5031
5032#[derive(Debug)]
5034pub enum DynamicDataSinkRequest {
5035 ReadAsset {
5041 configuration: Configuration,
5042 asset: Asset,
5043 responder: DynamicDataSinkReadAssetResponder,
5044 },
5045 WriteAsset {
5054 configuration: Configuration,
5055 asset: Asset,
5056 payload: fidl_fuchsia_mem::Buffer,
5057 responder: DynamicDataSinkWriteAssetResponder,
5058 },
5059 WriteFirmware {
5074 configuration: Configuration,
5075 type_: String,
5076 payload: fidl_fuchsia_mem::Buffer,
5077 responder: DynamicDataSinkWriteFirmwareResponder,
5078 },
5079 ReadFirmware {
5086 configuration: Configuration,
5087 type_: String,
5088 responder: DynamicDataSinkReadFirmwareResponder,
5089 },
5090 WriteVolumes {
5093 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5094 responder: DynamicDataSinkWriteVolumesResponder,
5095 },
5096 WriteOpaqueVolume {
5105 payload: fidl_fuchsia_mem::Buffer,
5106 responder: DynamicDataSinkWriteOpaqueVolumeResponder,
5107 },
5108 WriteSparseVolume {
5112 payload: fidl_fuchsia_mem::Buffer,
5113 responder: DynamicDataSinkWriteSparseVolumeResponder,
5114 },
5115 Flush { responder: DynamicDataSinkFlushResponder },
5117 InitializePartitionTables { responder: DynamicDataSinkInitializePartitionTablesResponder },
5125 WipePartitionTables { responder: DynamicDataSinkWipePartitionTablesResponder },
5131}
5132
5133impl DynamicDataSinkRequest {
5134 #[allow(irrefutable_let_patterns)]
5135 pub fn into_read_asset(
5136 self,
5137 ) -> Option<(Configuration, Asset, DynamicDataSinkReadAssetResponder)> {
5138 if let DynamicDataSinkRequest::ReadAsset { configuration, asset, responder } = self {
5139 Some((configuration, asset, responder))
5140 } else {
5141 None
5142 }
5143 }
5144
5145 #[allow(irrefutable_let_patterns)]
5146 pub fn into_write_asset(
5147 self,
5148 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteAssetResponder)>
5149 {
5150 if let DynamicDataSinkRequest::WriteAsset { configuration, asset, payload, responder } =
5151 self
5152 {
5153 Some((configuration, asset, payload, responder))
5154 } else {
5155 None
5156 }
5157 }
5158
5159 #[allow(irrefutable_let_patterns)]
5160 pub fn into_write_firmware(
5161 self,
5162 ) -> Option<(
5163 Configuration,
5164 String,
5165 fidl_fuchsia_mem::Buffer,
5166 DynamicDataSinkWriteFirmwareResponder,
5167 )> {
5168 if let DynamicDataSinkRequest::WriteFirmware { configuration, type_, payload, responder } =
5169 self
5170 {
5171 Some((configuration, type_, payload, responder))
5172 } else {
5173 None
5174 }
5175 }
5176
5177 #[allow(irrefutable_let_patterns)]
5178 pub fn into_read_firmware(
5179 self,
5180 ) -> Option<(Configuration, String, DynamicDataSinkReadFirmwareResponder)> {
5181 if let DynamicDataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
5182 Some((configuration, type_, responder))
5183 } else {
5184 None
5185 }
5186 }
5187
5188 #[allow(irrefutable_let_patterns)]
5189 pub fn into_write_volumes(
5190 self,
5191 ) -> Option<(
5192 fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5193 DynamicDataSinkWriteVolumesResponder,
5194 )> {
5195 if let DynamicDataSinkRequest::WriteVolumes { payload, responder } = self {
5196 Some((payload, responder))
5197 } else {
5198 None
5199 }
5200 }
5201
5202 #[allow(irrefutable_let_patterns)]
5203 pub fn into_write_opaque_volume(
5204 self,
5205 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteOpaqueVolumeResponder)> {
5206 if let DynamicDataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
5207 Some((payload, responder))
5208 } else {
5209 None
5210 }
5211 }
5212
5213 #[allow(irrefutable_let_patterns)]
5214 pub fn into_write_sparse_volume(
5215 self,
5216 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteSparseVolumeResponder)> {
5217 if let DynamicDataSinkRequest::WriteSparseVolume { payload, responder } = self {
5218 Some((payload, responder))
5219 } else {
5220 None
5221 }
5222 }
5223
5224 #[allow(irrefutable_let_patterns)]
5225 pub fn into_flush(self) -> Option<(DynamicDataSinkFlushResponder)> {
5226 if let DynamicDataSinkRequest::Flush { responder } = self {
5227 Some((responder))
5228 } else {
5229 None
5230 }
5231 }
5232
5233 #[allow(irrefutable_let_patterns)]
5234 pub fn into_initialize_partition_tables(
5235 self,
5236 ) -> Option<(DynamicDataSinkInitializePartitionTablesResponder)> {
5237 if let DynamicDataSinkRequest::InitializePartitionTables { responder } = self {
5238 Some((responder))
5239 } else {
5240 None
5241 }
5242 }
5243
5244 #[allow(irrefutable_let_patterns)]
5245 pub fn into_wipe_partition_tables(
5246 self,
5247 ) -> Option<(DynamicDataSinkWipePartitionTablesResponder)> {
5248 if let DynamicDataSinkRequest::WipePartitionTables { responder } = self {
5249 Some((responder))
5250 } else {
5251 None
5252 }
5253 }
5254
5255 pub fn method_name(&self) -> &'static str {
5257 match *self {
5258 DynamicDataSinkRequest::ReadAsset { .. } => "read_asset",
5259 DynamicDataSinkRequest::WriteAsset { .. } => "write_asset",
5260 DynamicDataSinkRequest::WriteFirmware { .. } => "write_firmware",
5261 DynamicDataSinkRequest::ReadFirmware { .. } => "read_firmware",
5262 DynamicDataSinkRequest::WriteVolumes { .. } => "write_volumes",
5263 DynamicDataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
5264 DynamicDataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
5265 DynamicDataSinkRequest::Flush { .. } => "flush",
5266 DynamicDataSinkRequest::InitializePartitionTables { .. } => {
5267 "initialize_partition_tables"
5268 }
5269 DynamicDataSinkRequest::WipePartitionTables { .. } => "wipe_partition_tables",
5270 }
5271 }
5272}
5273
5274#[derive(Debug, Clone)]
5275pub struct DynamicDataSinkControlHandle {
5276 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5277}
5278
5279impl fidl::endpoints::ControlHandle for DynamicDataSinkControlHandle {
5280 fn shutdown(&self) {
5281 self.inner.shutdown()
5282 }
5283 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5284 self.inner.shutdown_with_epitaph(status)
5285 }
5286
5287 fn is_closed(&self) -> bool {
5288 self.inner.channel().is_closed()
5289 }
5290 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5291 self.inner.channel().on_closed()
5292 }
5293
5294 #[cfg(target_os = "fuchsia")]
5295 fn signal_peer(
5296 &self,
5297 clear_mask: zx::Signals,
5298 set_mask: zx::Signals,
5299 ) -> Result<(), zx_status::Status> {
5300 use fidl::Peered;
5301 self.inner.channel().signal_peer(clear_mask, set_mask)
5302 }
5303}
5304
5305impl DynamicDataSinkControlHandle {}
5306
5307#[must_use = "FIDL methods require a response to be sent"]
5308#[derive(Debug)]
5309pub struct DynamicDataSinkReadAssetResponder {
5310 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5311 tx_id: u32,
5312}
5313
5314impl std::ops::Drop for DynamicDataSinkReadAssetResponder {
5318 fn drop(&mut self) {
5319 self.control_handle.shutdown();
5320 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5322 }
5323}
5324
5325impl fidl::endpoints::Responder for DynamicDataSinkReadAssetResponder {
5326 type ControlHandle = DynamicDataSinkControlHandle;
5327
5328 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5329 &self.control_handle
5330 }
5331
5332 fn drop_without_shutdown(mut self) {
5333 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5335 std::mem::forget(self);
5337 }
5338}
5339
5340impl DynamicDataSinkReadAssetResponder {
5341 pub fn send(
5345 self,
5346 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5347 ) -> Result<(), fidl::Error> {
5348 let _result = self.send_raw(result);
5349 if _result.is_err() {
5350 self.control_handle.shutdown();
5351 }
5352 self.drop_without_shutdown();
5353 _result
5354 }
5355
5356 pub fn send_no_shutdown_on_err(
5358 self,
5359 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5360 ) -> Result<(), fidl::Error> {
5361 let _result = self.send_raw(result);
5362 self.drop_without_shutdown();
5363 _result
5364 }
5365
5366 fn send_raw(
5367 &self,
5368 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5369 ) -> Result<(), fidl::Error> {
5370 self.control_handle
5371 .inner
5372 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
5373 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
5374 self.tx_id,
5375 0x125a23e561007898,
5376 fidl::encoding::DynamicFlags::empty(),
5377 )
5378 }
5379}
5380
5381#[must_use = "FIDL methods require a response to be sent"]
5382#[derive(Debug)]
5383pub struct DynamicDataSinkWriteAssetResponder {
5384 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5385 tx_id: u32,
5386}
5387
5388impl std::ops::Drop for DynamicDataSinkWriteAssetResponder {
5392 fn drop(&mut self) {
5393 self.control_handle.shutdown();
5394 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5396 }
5397}
5398
5399impl fidl::endpoints::Responder for DynamicDataSinkWriteAssetResponder {
5400 type ControlHandle = DynamicDataSinkControlHandle;
5401
5402 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5403 &self.control_handle
5404 }
5405
5406 fn drop_without_shutdown(mut self) {
5407 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5409 std::mem::forget(self);
5411 }
5412}
5413
5414impl DynamicDataSinkWriteAssetResponder {
5415 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5419 let _result = self.send_raw(status);
5420 if _result.is_err() {
5421 self.control_handle.shutdown();
5422 }
5423 self.drop_without_shutdown();
5424 _result
5425 }
5426
5427 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5429 let _result = self.send_raw(status);
5430 self.drop_without_shutdown();
5431 _result
5432 }
5433
5434 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5435 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
5436 (status,),
5437 self.tx_id,
5438 0x516839ce76c4d0a9,
5439 fidl::encoding::DynamicFlags::empty(),
5440 )
5441 }
5442}
5443
5444#[must_use = "FIDL methods require a response to be sent"]
5445#[derive(Debug)]
5446pub struct DynamicDataSinkWriteFirmwareResponder {
5447 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5448 tx_id: u32,
5449}
5450
5451impl std::ops::Drop for DynamicDataSinkWriteFirmwareResponder {
5455 fn drop(&mut self) {
5456 self.control_handle.shutdown();
5457 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5459 }
5460}
5461
5462impl fidl::endpoints::Responder for DynamicDataSinkWriteFirmwareResponder {
5463 type ControlHandle = DynamicDataSinkControlHandle;
5464
5465 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5466 &self.control_handle
5467 }
5468
5469 fn drop_without_shutdown(mut self) {
5470 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5472 std::mem::forget(self);
5474 }
5475}
5476
5477impl DynamicDataSinkWriteFirmwareResponder {
5478 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5482 let _result = self.send_raw(result);
5483 if _result.is_err() {
5484 self.control_handle.shutdown();
5485 }
5486 self.drop_without_shutdown();
5487 _result
5488 }
5489
5490 pub fn send_no_shutdown_on_err(
5492 self,
5493 mut result: &WriteFirmwareResult,
5494 ) -> Result<(), fidl::Error> {
5495 let _result = self.send_raw(result);
5496 self.drop_without_shutdown();
5497 _result
5498 }
5499
5500 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5501 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
5502 (result,),
5503 self.tx_id,
5504 0x514b93454ac0be97,
5505 fidl::encoding::DynamicFlags::empty(),
5506 )
5507 }
5508}
5509
5510#[must_use = "FIDL methods require a response to be sent"]
5511#[derive(Debug)]
5512pub struct DynamicDataSinkReadFirmwareResponder {
5513 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5514 tx_id: u32,
5515}
5516
5517impl std::ops::Drop for DynamicDataSinkReadFirmwareResponder {
5521 fn drop(&mut self) {
5522 self.control_handle.shutdown();
5523 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5525 }
5526}
5527
5528impl fidl::endpoints::Responder for DynamicDataSinkReadFirmwareResponder {
5529 type ControlHandle = DynamicDataSinkControlHandle;
5530
5531 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5532 &self.control_handle
5533 }
5534
5535 fn drop_without_shutdown(mut self) {
5536 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5538 std::mem::forget(self);
5540 }
5541}
5542
5543impl DynamicDataSinkReadFirmwareResponder {
5544 pub fn send(
5548 self,
5549 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5550 ) -> Result<(), fidl::Error> {
5551 let _result = self.send_raw(result);
5552 if _result.is_err() {
5553 self.control_handle.shutdown();
5554 }
5555 self.drop_without_shutdown();
5556 _result
5557 }
5558
5559 pub fn send_no_shutdown_on_err(
5561 self,
5562 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5563 ) -> Result<(), fidl::Error> {
5564 let _result = self.send_raw(result);
5565 self.drop_without_shutdown();
5566 _result
5567 }
5568
5569 fn send_raw(
5570 &self,
5571 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5572 ) -> Result<(), fidl::Error> {
5573 self.control_handle
5574 .inner
5575 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
5576 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
5577 self.tx_id,
5578 0xcb67f9830cae9c3,
5579 fidl::encoding::DynamicFlags::empty(),
5580 )
5581 }
5582}
5583
5584#[must_use = "FIDL methods require a response to be sent"]
5585#[derive(Debug)]
5586pub struct DynamicDataSinkWriteVolumesResponder {
5587 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5588 tx_id: u32,
5589}
5590
5591impl std::ops::Drop for DynamicDataSinkWriteVolumesResponder {
5595 fn drop(&mut self) {
5596 self.control_handle.shutdown();
5597 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5599 }
5600}
5601
5602impl fidl::endpoints::Responder for DynamicDataSinkWriteVolumesResponder {
5603 type ControlHandle = DynamicDataSinkControlHandle;
5604
5605 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5606 &self.control_handle
5607 }
5608
5609 fn drop_without_shutdown(mut self) {
5610 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5612 std::mem::forget(self);
5614 }
5615}
5616
5617impl DynamicDataSinkWriteVolumesResponder {
5618 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5622 let _result = self.send_raw(status);
5623 if _result.is_err() {
5624 self.control_handle.shutdown();
5625 }
5626 self.drop_without_shutdown();
5627 _result
5628 }
5629
5630 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5632 let _result = self.send_raw(status);
5633 self.drop_without_shutdown();
5634 _result
5635 }
5636
5637 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5638 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
5639 (status,),
5640 self.tx_id,
5641 0x5ee32c861d0259df,
5642 fidl::encoding::DynamicFlags::empty(),
5643 )
5644 }
5645}
5646
5647#[must_use = "FIDL methods require a response to be sent"]
5648#[derive(Debug)]
5649pub struct DynamicDataSinkWriteOpaqueVolumeResponder {
5650 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5651 tx_id: u32,
5652}
5653
5654impl std::ops::Drop for DynamicDataSinkWriteOpaqueVolumeResponder {
5658 fn drop(&mut self) {
5659 self.control_handle.shutdown();
5660 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5662 }
5663}
5664
5665impl fidl::endpoints::Responder for DynamicDataSinkWriteOpaqueVolumeResponder {
5666 type ControlHandle = DynamicDataSinkControlHandle;
5667
5668 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5669 &self.control_handle
5670 }
5671
5672 fn drop_without_shutdown(mut self) {
5673 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5675 std::mem::forget(self);
5677 }
5678}
5679
5680impl DynamicDataSinkWriteOpaqueVolumeResponder {
5681 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5685 let _result = self.send_raw(result);
5686 if _result.is_err() {
5687 self.control_handle.shutdown();
5688 }
5689 self.drop_without_shutdown();
5690 _result
5691 }
5692
5693 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5695 let _result = self.send_raw(result);
5696 self.drop_without_shutdown();
5697 _result
5698 }
5699
5700 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5701 self.control_handle
5702 .inner
5703 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5704 result,
5705 self.tx_id,
5706 0x4884b6ebaf660d79,
5707 fidl::encoding::DynamicFlags::empty(),
5708 )
5709 }
5710}
5711
5712#[must_use = "FIDL methods require a response to be sent"]
5713#[derive(Debug)]
5714pub struct DynamicDataSinkWriteSparseVolumeResponder {
5715 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5716 tx_id: u32,
5717}
5718
5719impl std::ops::Drop for DynamicDataSinkWriteSparseVolumeResponder {
5723 fn drop(&mut self) {
5724 self.control_handle.shutdown();
5725 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5727 }
5728}
5729
5730impl fidl::endpoints::Responder for DynamicDataSinkWriteSparseVolumeResponder {
5731 type ControlHandle = DynamicDataSinkControlHandle;
5732
5733 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5734 &self.control_handle
5735 }
5736
5737 fn drop_without_shutdown(mut self) {
5738 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5740 std::mem::forget(self);
5742 }
5743}
5744
5745impl DynamicDataSinkWriteSparseVolumeResponder {
5746 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5750 let _result = self.send_raw(result);
5751 if _result.is_err() {
5752 self.control_handle.shutdown();
5753 }
5754 self.drop_without_shutdown();
5755 _result
5756 }
5757
5758 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5760 let _result = self.send_raw(result);
5761 self.drop_without_shutdown();
5762 _result
5763 }
5764
5765 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5766 self.control_handle
5767 .inner
5768 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5769 result,
5770 self.tx_id,
5771 0x340f5370c5b1e026,
5772 fidl::encoding::DynamicFlags::empty(),
5773 )
5774 }
5775}
5776
5777#[must_use = "FIDL methods require a response to be sent"]
5778#[derive(Debug)]
5779pub struct DynamicDataSinkFlushResponder {
5780 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5781 tx_id: u32,
5782}
5783
5784impl std::ops::Drop for DynamicDataSinkFlushResponder {
5788 fn drop(&mut self) {
5789 self.control_handle.shutdown();
5790 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5792 }
5793}
5794
5795impl fidl::endpoints::Responder for DynamicDataSinkFlushResponder {
5796 type ControlHandle = DynamicDataSinkControlHandle;
5797
5798 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5799 &self.control_handle
5800 }
5801
5802 fn drop_without_shutdown(mut self) {
5803 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5805 std::mem::forget(self);
5807 }
5808}
5809
5810impl DynamicDataSinkFlushResponder {
5811 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5815 let _result = self.send_raw(status);
5816 if _result.is_err() {
5817 self.control_handle.shutdown();
5818 }
5819 self.drop_without_shutdown();
5820 _result
5821 }
5822
5823 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5825 let _result = self.send_raw(status);
5826 self.drop_without_shutdown();
5827 _result
5828 }
5829
5830 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5831 self.control_handle.inner.send::<DataSinkFlushResponse>(
5832 (status,),
5833 self.tx_id,
5834 0x3b59d3e2338e3139,
5835 fidl::encoding::DynamicFlags::empty(),
5836 )
5837 }
5838}
5839
5840#[must_use = "FIDL methods require a response to be sent"]
5841#[derive(Debug)]
5842pub struct DynamicDataSinkInitializePartitionTablesResponder {
5843 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5844 tx_id: u32,
5845}
5846
5847impl std::ops::Drop for DynamicDataSinkInitializePartitionTablesResponder {
5851 fn drop(&mut self) {
5852 self.control_handle.shutdown();
5853 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5855 }
5856}
5857
5858impl fidl::endpoints::Responder for DynamicDataSinkInitializePartitionTablesResponder {
5859 type ControlHandle = DynamicDataSinkControlHandle;
5860
5861 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5862 &self.control_handle
5863 }
5864
5865 fn drop_without_shutdown(mut self) {
5866 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5868 std::mem::forget(self);
5870 }
5871}
5872
5873impl DynamicDataSinkInitializePartitionTablesResponder {
5874 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5878 let _result = self.send_raw(status);
5879 if _result.is_err() {
5880 self.control_handle.shutdown();
5881 }
5882 self.drop_without_shutdown();
5883 _result
5884 }
5885
5886 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5888 let _result = self.send_raw(status);
5889 self.drop_without_shutdown();
5890 _result
5891 }
5892
5893 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5894 self.control_handle.inner.send::<DynamicDataSinkInitializePartitionTablesResponse>(
5895 (status,),
5896 self.tx_id,
5897 0x4c798b3813ea9f7e,
5898 fidl::encoding::DynamicFlags::empty(),
5899 )
5900 }
5901}
5902
5903#[must_use = "FIDL methods require a response to be sent"]
5904#[derive(Debug)]
5905pub struct DynamicDataSinkWipePartitionTablesResponder {
5906 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5907 tx_id: u32,
5908}
5909
5910impl std::ops::Drop for DynamicDataSinkWipePartitionTablesResponder {
5914 fn drop(&mut self) {
5915 self.control_handle.shutdown();
5916 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5918 }
5919}
5920
5921impl fidl::endpoints::Responder for DynamicDataSinkWipePartitionTablesResponder {
5922 type ControlHandle = DynamicDataSinkControlHandle;
5923
5924 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5925 &self.control_handle
5926 }
5927
5928 fn drop_without_shutdown(mut self) {
5929 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5931 std::mem::forget(self);
5933 }
5934}
5935
5936impl DynamicDataSinkWipePartitionTablesResponder {
5937 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5941 let _result = self.send_raw(status);
5942 if _result.is_err() {
5943 self.control_handle.shutdown();
5944 }
5945 self.drop_without_shutdown();
5946 _result
5947 }
5948
5949 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5951 let _result = self.send_raw(status);
5952 self.drop_without_shutdown();
5953 _result
5954 }
5955
5956 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5957 self.control_handle.inner.send::<DynamicDataSinkWipePartitionTablesResponse>(
5958 (status,),
5959 self.tx_id,
5960 0x797c0ebeedaf2cc,
5961 fidl::encoding::DynamicFlags::empty(),
5962 )
5963 }
5964}
5965
5966#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
5967pub struct PaverMarker;
5968
5969impl fidl::endpoints::ProtocolMarker for PaverMarker {
5970 type Proxy = PaverProxy;
5971 type RequestStream = PaverRequestStream;
5972 #[cfg(target_os = "fuchsia")]
5973 type SynchronousProxy = PaverSynchronousProxy;
5974
5975 const DEBUG_NAME: &'static str = "fuchsia.paver.Paver";
5976}
5977impl fidl::endpoints::DiscoverableProtocolMarker for PaverMarker {}
5978
5979pub trait PaverProxyInterface: Send + Sync {
5980 fn r#find_data_sink(
5981 &self,
5982 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
5983 ) -> Result<(), fidl::Error>;
5984 fn r#find_partition_table_manager(
5985 &self,
5986 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
5987 ) -> Result<(), fidl::Error>;
5988 fn r#find_boot_manager(
5989 &self,
5990 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
5991 ) -> Result<(), fidl::Error>;
5992 fn r#find_sysconfig(
5993 &self,
5994 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
5995 ) -> Result<(), fidl::Error>;
5996}
5997#[derive(Debug)]
5998#[cfg(target_os = "fuchsia")]
5999pub struct PaverSynchronousProxy {
6000 client: fidl::client::sync::Client,
6001}
6002
6003#[cfg(target_os = "fuchsia")]
6004impl fidl::endpoints::SynchronousProxy for PaverSynchronousProxy {
6005 type Proxy = PaverProxy;
6006 type Protocol = PaverMarker;
6007
6008 fn from_channel(inner: fidl::Channel) -> Self {
6009 Self::new(inner)
6010 }
6011
6012 fn into_channel(self) -> fidl::Channel {
6013 self.client.into_channel()
6014 }
6015
6016 fn as_channel(&self) -> &fidl::Channel {
6017 self.client.as_channel()
6018 }
6019}
6020
6021#[cfg(target_os = "fuchsia")]
6022impl PaverSynchronousProxy {
6023 pub fn new(channel: fidl::Channel) -> Self {
6024 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6025 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6026 }
6027
6028 pub fn into_channel(self) -> fidl::Channel {
6029 self.client.into_channel()
6030 }
6031
6032 pub fn wait_for_event(
6035 &self,
6036 deadline: zx::MonotonicInstant,
6037 ) -> Result<PaverEvent, fidl::Error> {
6038 PaverEvent::decode(self.client.wait_for_event(deadline)?)
6039 }
6040
6041 pub fn r#find_data_sink(
6047 &self,
6048 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6049 ) -> Result<(), fidl::Error> {
6050 self.client.send::<PaverFindDataSinkRequest>(
6051 (data_sink,),
6052 0x710a34c6f9c8a0e9,
6053 fidl::encoding::DynamicFlags::empty(),
6054 )
6055 }
6056
6057 pub fn r#find_partition_table_manager(
6062 &self,
6063 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6064 ) -> Result<(), fidl::Error> {
6065 self.client.send::<PaverFindPartitionTableManagerRequest>(
6066 (data_sink,),
6067 0x10991ecc6fb9f47b,
6068 fidl::encoding::DynamicFlags::empty(),
6069 )
6070 }
6071
6072 pub fn r#find_boot_manager(
6077 &self,
6078 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6079 ) -> Result<(), fidl::Error> {
6080 self.client.send::<PaverFindBootManagerRequest>(
6081 (boot_manager,),
6082 0x5d500b0633102443,
6083 fidl::encoding::DynamicFlags::empty(),
6084 )
6085 }
6086
6087 pub fn r#find_sysconfig(
6089 &self,
6090 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6091 ) -> Result<(), fidl::Error> {
6092 self.client.send::<PaverFindSysconfigRequest>(
6093 (sysconfig,),
6094 0x542cdb5be9b5c02d,
6095 fidl::encoding::DynamicFlags::empty(),
6096 )
6097 }
6098}
6099
6100#[derive(Debug, Clone)]
6101pub struct PaverProxy {
6102 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6103}
6104
6105impl fidl::endpoints::Proxy for PaverProxy {
6106 type Protocol = PaverMarker;
6107
6108 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6109 Self::new(inner)
6110 }
6111
6112 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6113 self.client.into_channel().map_err(|client| Self { client })
6114 }
6115
6116 fn as_channel(&self) -> &::fidl::AsyncChannel {
6117 self.client.as_channel()
6118 }
6119}
6120
6121impl PaverProxy {
6122 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6124 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6125 Self { client: fidl::client::Client::new(channel, protocol_name) }
6126 }
6127
6128 pub fn take_event_stream(&self) -> PaverEventStream {
6134 PaverEventStream { event_receiver: self.client.take_event_receiver() }
6135 }
6136
6137 pub fn r#find_data_sink(
6143 &self,
6144 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6145 ) -> Result<(), fidl::Error> {
6146 PaverProxyInterface::r#find_data_sink(self, data_sink)
6147 }
6148
6149 pub fn r#find_partition_table_manager(
6154 &self,
6155 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6156 ) -> Result<(), fidl::Error> {
6157 PaverProxyInterface::r#find_partition_table_manager(self, data_sink)
6158 }
6159
6160 pub fn r#find_boot_manager(
6165 &self,
6166 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6167 ) -> Result<(), fidl::Error> {
6168 PaverProxyInterface::r#find_boot_manager(self, boot_manager)
6169 }
6170
6171 pub fn r#find_sysconfig(
6173 &self,
6174 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6175 ) -> Result<(), fidl::Error> {
6176 PaverProxyInterface::r#find_sysconfig(self, sysconfig)
6177 }
6178}
6179
6180impl PaverProxyInterface for PaverProxy {
6181 fn r#find_data_sink(
6182 &self,
6183 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6184 ) -> Result<(), fidl::Error> {
6185 self.client.send::<PaverFindDataSinkRequest>(
6186 (data_sink,),
6187 0x710a34c6f9c8a0e9,
6188 fidl::encoding::DynamicFlags::empty(),
6189 )
6190 }
6191
6192 fn r#find_partition_table_manager(
6193 &self,
6194 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6195 ) -> Result<(), fidl::Error> {
6196 self.client.send::<PaverFindPartitionTableManagerRequest>(
6197 (data_sink,),
6198 0x10991ecc6fb9f47b,
6199 fidl::encoding::DynamicFlags::empty(),
6200 )
6201 }
6202
6203 fn r#find_boot_manager(
6204 &self,
6205 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6206 ) -> Result<(), fidl::Error> {
6207 self.client.send::<PaverFindBootManagerRequest>(
6208 (boot_manager,),
6209 0x5d500b0633102443,
6210 fidl::encoding::DynamicFlags::empty(),
6211 )
6212 }
6213
6214 fn r#find_sysconfig(
6215 &self,
6216 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6217 ) -> Result<(), fidl::Error> {
6218 self.client.send::<PaverFindSysconfigRequest>(
6219 (sysconfig,),
6220 0x542cdb5be9b5c02d,
6221 fidl::encoding::DynamicFlags::empty(),
6222 )
6223 }
6224}
6225
6226pub struct PaverEventStream {
6227 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6228}
6229
6230impl std::marker::Unpin for PaverEventStream {}
6231
6232impl futures::stream::FusedStream for PaverEventStream {
6233 fn is_terminated(&self) -> bool {
6234 self.event_receiver.is_terminated()
6235 }
6236}
6237
6238impl futures::Stream for PaverEventStream {
6239 type Item = Result<PaverEvent, fidl::Error>;
6240
6241 fn poll_next(
6242 mut self: std::pin::Pin<&mut Self>,
6243 cx: &mut std::task::Context<'_>,
6244 ) -> std::task::Poll<Option<Self::Item>> {
6245 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6246 &mut self.event_receiver,
6247 cx
6248 )?) {
6249 Some(buf) => std::task::Poll::Ready(Some(PaverEvent::decode(buf))),
6250 None => std::task::Poll::Ready(None),
6251 }
6252 }
6253}
6254
6255#[derive(Debug)]
6256pub enum PaverEvent {}
6257
6258impl PaverEvent {
6259 fn decode(
6261 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6262 ) -> Result<PaverEvent, fidl::Error> {
6263 let (bytes, _handles) = buf.split_mut();
6264 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6265 debug_assert_eq!(tx_header.tx_id, 0);
6266 match tx_header.ordinal {
6267 _ => Err(fidl::Error::UnknownOrdinal {
6268 ordinal: tx_header.ordinal,
6269 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6270 }),
6271 }
6272 }
6273}
6274
6275pub struct PaverRequestStream {
6277 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6278 is_terminated: bool,
6279}
6280
6281impl std::marker::Unpin for PaverRequestStream {}
6282
6283impl futures::stream::FusedStream for PaverRequestStream {
6284 fn is_terminated(&self) -> bool {
6285 self.is_terminated
6286 }
6287}
6288
6289impl fidl::endpoints::RequestStream for PaverRequestStream {
6290 type Protocol = PaverMarker;
6291 type ControlHandle = PaverControlHandle;
6292
6293 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6294 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6295 }
6296
6297 fn control_handle(&self) -> Self::ControlHandle {
6298 PaverControlHandle { inner: self.inner.clone() }
6299 }
6300
6301 fn into_inner(
6302 self,
6303 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6304 {
6305 (self.inner, self.is_terminated)
6306 }
6307
6308 fn from_inner(
6309 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6310 is_terminated: bool,
6311 ) -> Self {
6312 Self { inner, is_terminated }
6313 }
6314}
6315
6316impl futures::Stream for PaverRequestStream {
6317 type Item = Result<PaverRequest, fidl::Error>;
6318
6319 fn poll_next(
6320 mut self: std::pin::Pin<&mut Self>,
6321 cx: &mut std::task::Context<'_>,
6322 ) -> std::task::Poll<Option<Self::Item>> {
6323 let this = &mut *self;
6324 if this.inner.check_shutdown(cx) {
6325 this.is_terminated = true;
6326 return std::task::Poll::Ready(None);
6327 }
6328 if this.is_terminated {
6329 panic!("polled PaverRequestStream after completion");
6330 }
6331 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6332 |bytes, handles| {
6333 match this.inner.channel().read_etc(cx, bytes, handles) {
6334 std::task::Poll::Ready(Ok(())) => {}
6335 std::task::Poll::Pending => return std::task::Poll::Pending,
6336 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6337 this.is_terminated = true;
6338 return std::task::Poll::Ready(None);
6339 }
6340 std::task::Poll::Ready(Err(e)) => {
6341 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6342 e.into(),
6343 ))))
6344 }
6345 }
6346
6347 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6349
6350 std::task::Poll::Ready(Some(match header.ordinal {
6351 0x710a34c6f9c8a0e9 => {
6352 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6353 let mut req = fidl::new_empty!(
6354 PaverFindDataSinkRequest,
6355 fidl::encoding::DefaultFuchsiaResourceDialect
6356 );
6357 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindDataSinkRequest>(&header, _body_bytes, handles, &mut req)?;
6358 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6359 Ok(PaverRequest::FindDataSink { data_sink: req.data_sink, control_handle })
6360 }
6361 0x10991ecc6fb9f47b => {
6362 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6363 let mut req = fidl::new_empty!(
6364 PaverFindPartitionTableManagerRequest,
6365 fidl::encoding::DefaultFuchsiaResourceDialect
6366 );
6367 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindPartitionTableManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6368 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6369 Ok(PaverRequest::FindPartitionTableManager {
6370 data_sink: req.data_sink,
6371
6372 control_handle,
6373 })
6374 }
6375 0x5d500b0633102443 => {
6376 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6377 let mut req = fidl::new_empty!(
6378 PaverFindBootManagerRequest,
6379 fidl::encoding::DefaultFuchsiaResourceDialect
6380 );
6381 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindBootManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6382 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6383 Ok(PaverRequest::FindBootManager {
6384 boot_manager: req.boot_manager,
6385
6386 control_handle,
6387 })
6388 }
6389 0x542cdb5be9b5c02d => {
6390 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6391 let mut req = fidl::new_empty!(
6392 PaverFindSysconfigRequest,
6393 fidl::encoding::DefaultFuchsiaResourceDialect
6394 );
6395 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindSysconfigRequest>(&header, _body_bytes, handles, &mut req)?;
6396 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6397 Ok(PaverRequest::FindSysconfig { sysconfig: req.sysconfig, control_handle })
6398 }
6399 _ => Err(fidl::Error::UnknownOrdinal {
6400 ordinal: header.ordinal,
6401 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6402 }),
6403 }))
6404 },
6405 )
6406 }
6407}
6408
6409#[derive(Debug)]
6410pub enum PaverRequest {
6411 FindDataSink {
6417 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6418 control_handle: PaverControlHandle,
6419 },
6420 FindPartitionTableManager {
6425 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6426 control_handle: PaverControlHandle,
6427 },
6428 FindBootManager {
6433 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6434 control_handle: PaverControlHandle,
6435 },
6436 FindSysconfig {
6438 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6439 control_handle: PaverControlHandle,
6440 },
6441}
6442
6443impl PaverRequest {
6444 #[allow(irrefutable_let_patterns)]
6445 pub fn into_find_data_sink(
6446 self,
6447 ) -> Option<(fidl::endpoints::ServerEnd<DataSinkMarker>, PaverControlHandle)> {
6448 if let PaverRequest::FindDataSink { data_sink, control_handle } = self {
6449 Some((data_sink, control_handle))
6450 } else {
6451 None
6452 }
6453 }
6454
6455 #[allow(irrefutable_let_patterns)]
6456 pub fn into_find_partition_table_manager(
6457 self,
6458 ) -> Option<(fidl::endpoints::ServerEnd<DynamicDataSinkMarker>, PaverControlHandle)> {
6459 if let PaverRequest::FindPartitionTableManager { data_sink, control_handle } = self {
6460 Some((data_sink, control_handle))
6461 } else {
6462 None
6463 }
6464 }
6465
6466 #[allow(irrefutable_let_patterns)]
6467 pub fn into_find_boot_manager(
6468 self,
6469 ) -> Option<(fidl::endpoints::ServerEnd<BootManagerMarker>, PaverControlHandle)> {
6470 if let PaverRequest::FindBootManager { boot_manager, control_handle } = self {
6471 Some((boot_manager, control_handle))
6472 } else {
6473 None
6474 }
6475 }
6476
6477 #[allow(irrefutable_let_patterns)]
6478 pub fn into_find_sysconfig(
6479 self,
6480 ) -> Option<(fidl::endpoints::ServerEnd<SysconfigMarker>, PaverControlHandle)> {
6481 if let PaverRequest::FindSysconfig { sysconfig, control_handle } = self {
6482 Some((sysconfig, control_handle))
6483 } else {
6484 None
6485 }
6486 }
6487
6488 pub fn method_name(&self) -> &'static str {
6490 match *self {
6491 PaverRequest::FindDataSink { .. } => "find_data_sink",
6492 PaverRequest::FindPartitionTableManager { .. } => "find_partition_table_manager",
6493 PaverRequest::FindBootManager { .. } => "find_boot_manager",
6494 PaverRequest::FindSysconfig { .. } => "find_sysconfig",
6495 }
6496 }
6497}
6498
6499#[derive(Debug, Clone)]
6500pub struct PaverControlHandle {
6501 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6502}
6503
6504impl fidl::endpoints::ControlHandle for PaverControlHandle {
6505 fn shutdown(&self) {
6506 self.inner.shutdown()
6507 }
6508 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6509 self.inner.shutdown_with_epitaph(status)
6510 }
6511
6512 fn is_closed(&self) -> bool {
6513 self.inner.channel().is_closed()
6514 }
6515 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6516 self.inner.channel().on_closed()
6517 }
6518
6519 #[cfg(target_os = "fuchsia")]
6520 fn signal_peer(
6521 &self,
6522 clear_mask: zx::Signals,
6523 set_mask: zx::Signals,
6524 ) -> Result<(), zx_status::Status> {
6525 use fidl::Peered;
6526 self.inner.channel().signal_peer(clear_mask, set_mask)
6527 }
6528}
6529
6530impl PaverControlHandle {}
6531
6532#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6533pub struct PayloadStreamMarker;
6534
6535impl fidl::endpoints::ProtocolMarker for PayloadStreamMarker {
6536 type Proxy = PayloadStreamProxy;
6537 type RequestStream = PayloadStreamRequestStream;
6538 #[cfg(target_os = "fuchsia")]
6539 type SynchronousProxy = PayloadStreamSynchronousProxy;
6540
6541 const DEBUG_NAME: &'static str = "(anonymous) PayloadStream";
6542}
6543
6544pub trait PayloadStreamProxyInterface: Send + Sync {
6545 type RegisterVmoResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6546 fn r#register_vmo(&self, vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut;
6547 type ReadDataResponseFut: std::future::Future<Output = Result<ReadResult, fidl::Error>> + Send;
6548 fn r#read_data(&self) -> Self::ReadDataResponseFut;
6549}
6550#[derive(Debug)]
6551#[cfg(target_os = "fuchsia")]
6552pub struct PayloadStreamSynchronousProxy {
6553 client: fidl::client::sync::Client,
6554}
6555
6556#[cfg(target_os = "fuchsia")]
6557impl fidl::endpoints::SynchronousProxy for PayloadStreamSynchronousProxy {
6558 type Proxy = PayloadStreamProxy;
6559 type Protocol = PayloadStreamMarker;
6560
6561 fn from_channel(inner: fidl::Channel) -> Self {
6562 Self::new(inner)
6563 }
6564
6565 fn into_channel(self) -> fidl::Channel {
6566 self.client.into_channel()
6567 }
6568
6569 fn as_channel(&self) -> &fidl::Channel {
6570 self.client.as_channel()
6571 }
6572}
6573
6574#[cfg(target_os = "fuchsia")]
6575impl PayloadStreamSynchronousProxy {
6576 pub fn new(channel: fidl::Channel) -> Self {
6577 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6578 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6579 }
6580
6581 pub fn into_channel(self) -> fidl::Channel {
6582 self.client.into_channel()
6583 }
6584
6585 pub fn wait_for_event(
6588 &self,
6589 deadline: zx::MonotonicInstant,
6590 ) -> Result<PayloadStreamEvent, fidl::Error> {
6591 PayloadStreamEvent::decode(self.client.wait_for_event(deadline)?)
6592 }
6593
6594 pub fn r#register_vmo(
6599 &self,
6600 mut vmo: fidl::Vmo,
6601 ___deadline: zx::MonotonicInstant,
6602 ) -> Result<i32, fidl::Error> {
6603 let _response = self
6604 .client
6605 .send_query::<PayloadStreamRegisterVmoRequest, PayloadStreamRegisterVmoResponse>(
6606 (vmo,),
6607 0x388d7fe44bcb4c,
6608 fidl::encoding::DynamicFlags::empty(),
6609 ___deadline,
6610 )?;
6611 Ok(_response.status)
6612 }
6613
6614 pub fn r#read_data(
6616 &self,
6617 ___deadline: zx::MonotonicInstant,
6618 ) -> Result<ReadResult, fidl::Error> {
6619 let _response =
6620 self.client.send_query::<fidl::encoding::EmptyPayload, PayloadStreamReadDataResponse>(
6621 (),
6622 0x2ccde55366318afa,
6623 fidl::encoding::DynamicFlags::empty(),
6624 ___deadline,
6625 )?;
6626 Ok(_response.result)
6627 }
6628}
6629
6630#[derive(Debug, Clone)]
6631pub struct PayloadStreamProxy {
6632 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6633}
6634
6635impl fidl::endpoints::Proxy for PayloadStreamProxy {
6636 type Protocol = PayloadStreamMarker;
6637
6638 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6639 Self::new(inner)
6640 }
6641
6642 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6643 self.client.into_channel().map_err(|client| Self { client })
6644 }
6645
6646 fn as_channel(&self) -> &::fidl::AsyncChannel {
6647 self.client.as_channel()
6648 }
6649}
6650
6651impl PayloadStreamProxy {
6652 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6654 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6655 Self { client: fidl::client::Client::new(channel, protocol_name) }
6656 }
6657
6658 pub fn take_event_stream(&self) -> PayloadStreamEventStream {
6664 PayloadStreamEventStream { event_receiver: self.client.take_event_receiver() }
6665 }
6666
6667 pub fn r#register_vmo(
6672 &self,
6673 mut vmo: fidl::Vmo,
6674 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
6675 PayloadStreamProxyInterface::r#register_vmo(self, vmo)
6676 }
6677
6678 pub fn r#read_data(
6680 &self,
6681 ) -> fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>
6682 {
6683 PayloadStreamProxyInterface::r#read_data(self)
6684 }
6685}
6686
6687impl PayloadStreamProxyInterface for PayloadStreamProxy {
6688 type RegisterVmoResponseFut =
6689 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
6690 fn r#register_vmo(&self, mut vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut {
6691 fn _decode(
6692 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6693 ) -> Result<i32, fidl::Error> {
6694 let _response = fidl::client::decode_transaction_body::<
6695 PayloadStreamRegisterVmoResponse,
6696 fidl::encoding::DefaultFuchsiaResourceDialect,
6697 0x388d7fe44bcb4c,
6698 >(_buf?)?;
6699 Ok(_response.status)
6700 }
6701 self.client.send_query_and_decode::<PayloadStreamRegisterVmoRequest, i32>(
6702 (vmo,),
6703 0x388d7fe44bcb4c,
6704 fidl::encoding::DynamicFlags::empty(),
6705 _decode,
6706 )
6707 }
6708
6709 type ReadDataResponseFut =
6710 fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
6711 fn r#read_data(&self) -> Self::ReadDataResponseFut {
6712 fn _decode(
6713 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6714 ) -> Result<ReadResult, fidl::Error> {
6715 let _response = fidl::client::decode_transaction_body::<
6716 PayloadStreamReadDataResponse,
6717 fidl::encoding::DefaultFuchsiaResourceDialect,
6718 0x2ccde55366318afa,
6719 >(_buf?)?;
6720 Ok(_response.result)
6721 }
6722 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ReadResult>(
6723 (),
6724 0x2ccde55366318afa,
6725 fidl::encoding::DynamicFlags::empty(),
6726 _decode,
6727 )
6728 }
6729}
6730
6731pub struct PayloadStreamEventStream {
6732 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6733}
6734
6735impl std::marker::Unpin for PayloadStreamEventStream {}
6736
6737impl futures::stream::FusedStream for PayloadStreamEventStream {
6738 fn is_terminated(&self) -> bool {
6739 self.event_receiver.is_terminated()
6740 }
6741}
6742
6743impl futures::Stream for PayloadStreamEventStream {
6744 type Item = Result<PayloadStreamEvent, fidl::Error>;
6745
6746 fn poll_next(
6747 mut self: std::pin::Pin<&mut Self>,
6748 cx: &mut std::task::Context<'_>,
6749 ) -> std::task::Poll<Option<Self::Item>> {
6750 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6751 &mut self.event_receiver,
6752 cx
6753 )?) {
6754 Some(buf) => std::task::Poll::Ready(Some(PayloadStreamEvent::decode(buf))),
6755 None => std::task::Poll::Ready(None),
6756 }
6757 }
6758}
6759
6760#[derive(Debug)]
6761pub enum PayloadStreamEvent {}
6762
6763impl PayloadStreamEvent {
6764 fn decode(
6766 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6767 ) -> Result<PayloadStreamEvent, fidl::Error> {
6768 let (bytes, _handles) = buf.split_mut();
6769 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6770 debug_assert_eq!(tx_header.tx_id, 0);
6771 match tx_header.ordinal {
6772 _ => Err(fidl::Error::UnknownOrdinal {
6773 ordinal: tx_header.ordinal,
6774 protocol_name: <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6775 }),
6776 }
6777 }
6778}
6779
6780pub struct PayloadStreamRequestStream {
6782 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6783 is_terminated: bool,
6784}
6785
6786impl std::marker::Unpin for PayloadStreamRequestStream {}
6787
6788impl futures::stream::FusedStream for PayloadStreamRequestStream {
6789 fn is_terminated(&self) -> bool {
6790 self.is_terminated
6791 }
6792}
6793
6794impl fidl::endpoints::RequestStream for PayloadStreamRequestStream {
6795 type Protocol = PayloadStreamMarker;
6796 type ControlHandle = PayloadStreamControlHandle;
6797
6798 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6799 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6800 }
6801
6802 fn control_handle(&self) -> Self::ControlHandle {
6803 PayloadStreamControlHandle { inner: self.inner.clone() }
6804 }
6805
6806 fn into_inner(
6807 self,
6808 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6809 {
6810 (self.inner, self.is_terminated)
6811 }
6812
6813 fn from_inner(
6814 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6815 is_terminated: bool,
6816 ) -> Self {
6817 Self { inner, is_terminated }
6818 }
6819}
6820
6821impl futures::Stream for PayloadStreamRequestStream {
6822 type Item = Result<PayloadStreamRequest, fidl::Error>;
6823
6824 fn poll_next(
6825 mut self: std::pin::Pin<&mut Self>,
6826 cx: &mut std::task::Context<'_>,
6827 ) -> std::task::Poll<Option<Self::Item>> {
6828 let this = &mut *self;
6829 if this.inner.check_shutdown(cx) {
6830 this.is_terminated = true;
6831 return std::task::Poll::Ready(None);
6832 }
6833 if this.is_terminated {
6834 panic!("polled PayloadStreamRequestStream after completion");
6835 }
6836 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6837 |bytes, handles| {
6838 match this.inner.channel().read_etc(cx, bytes, handles) {
6839 std::task::Poll::Ready(Ok(())) => {}
6840 std::task::Poll::Pending => return std::task::Poll::Pending,
6841 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6842 this.is_terminated = true;
6843 return std::task::Poll::Ready(None);
6844 }
6845 std::task::Poll::Ready(Err(e)) => {
6846 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6847 e.into(),
6848 ))))
6849 }
6850 }
6851
6852 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6854
6855 std::task::Poll::Ready(Some(match header.ordinal {
6856 0x388d7fe44bcb4c => {
6857 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6858 let mut req = fidl::new_empty!(
6859 PayloadStreamRegisterVmoRequest,
6860 fidl::encoding::DefaultFuchsiaResourceDialect
6861 );
6862 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PayloadStreamRegisterVmoRequest>(&header, _body_bytes, handles, &mut req)?;
6863 let control_handle =
6864 PayloadStreamControlHandle { inner: this.inner.clone() };
6865 Ok(PayloadStreamRequest::RegisterVmo {
6866 vmo: req.vmo,
6867
6868 responder: PayloadStreamRegisterVmoResponder {
6869 control_handle: std::mem::ManuallyDrop::new(control_handle),
6870 tx_id: header.tx_id,
6871 },
6872 })
6873 }
6874 0x2ccde55366318afa => {
6875 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6876 let mut req = fidl::new_empty!(
6877 fidl::encoding::EmptyPayload,
6878 fidl::encoding::DefaultFuchsiaResourceDialect
6879 );
6880 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6881 let control_handle =
6882 PayloadStreamControlHandle { inner: this.inner.clone() };
6883 Ok(PayloadStreamRequest::ReadData {
6884 responder: PayloadStreamReadDataResponder {
6885 control_handle: std::mem::ManuallyDrop::new(control_handle),
6886 tx_id: header.tx_id,
6887 },
6888 })
6889 }
6890 _ => Err(fidl::Error::UnknownOrdinal {
6891 ordinal: header.ordinal,
6892 protocol_name:
6893 <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6894 }),
6895 }))
6896 },
6897 )
6898 }
6899}
6900
6901#[derive(Debug)]
6903pub enum PayloadStreamRequest {
6904 RegisterVmo { vmo: fidl::Vmo, responder: PayloadStreamRegisterVmoResponder },
6909 ReadData { responder: PayloadStreamReadDataResponder },
6911}
6912
6913impl PayloadStreamRequest {
6914 #[allow(irrefutable_let_patterns)]
6915 pub fn into_register_vmo(self) -> Option<(fidl::Vmo, PayloadStreamRegisterVmoResponder)> {
6916 if let PayloadStreamRequest::RegisterVmo { vmo, responder } = self {
6917 Some((vmo, responder))
6918 } else {
6919 None
6920 }
6921 }
6922
6923 #[allow(irrefutable_let_patterns)]
6924 pub fn into_read_data(self) -> Option<(PayloadStreamReadDataResponder)> {
6925 if let PayloadStreamRequest::ReadData { responder } = self {
6926 Some((responder))
6927 } else {
6928 None
6929 }
6930 }
6931
6932 pub fn method_name(&self) -> &'static str {
6934 match *self {
6935 PayloadStreamRequest::RegisterVmo { .. } => "register_vmo",
6936 PayloadStreamRequest::ReadData { .. } => "read_data",
6937 }
6938 }
6939}
6940
6941#[derive(Debug, Clone)]
6942pub struct PayloadStreamControlHandle {
6943 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6944}
6945
6946impl fidl::endpoints::ControlHandle for PayloadStreamControlHandle {
6947 fn shutdown(&self) {
6948 self.inner.shutdown()
6949 }
6950 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6951 self.inner.shutdown_with_epitaph(status)
6952 }
6953
6954 fn is_closed(&self) -> bool {
6955 self.inner.channel().is_closed()
6956 }
6957 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6958 self.inner.channel().on_closed()
6959 }
6960
6961 #[cfg(target_os = "fuchsia")]
6962 fn signal_peer(
6963 &self,
6964 clear_mask: zx::Signals,
6965 set_mask: zx::Signals,
6966 ) -> Result<(), zx_status::Status> {
6967 use fidl::Peered;
6968 self.inner.channel().signal_peer(clear_mask, set_mask)
6969 }
6970}
6971
6972impl PayloadStreamControlHandle {}
6973
6974#[must_use = "FIDL methods require a response to be sent"]
6975#[derive(Debug)]
6976pub struct PayloadStreamRegisterVmoResponder {
6977 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
6978 tx_id: u32,
6979}
6980
6981impl std::ops::Drop for PayloadStreamRegisterVmoResponder {
6985 fn drop(&mut self) {
6986 self.control_handle.shutdown();
6987 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6989 }
6990}
6991
6992impl fidl::endpoints::Responder for PayloadStreamRegisterVmoResponder {
6993 type ControlHandle = PayloadStreamControlHandle;
6994
6995 fn control_handle(&self) -> &PayloadStreamControlHandle {
6996 &self.control_handle
6997 }
6998
6999 fn drop_without_shutdown(mut self) {
7000 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7002 std::mem::forget(self);
7004 }
7005}
7006
7007impl PayloadStreamRegisterVmoResponder {
7008 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7012 let _result = self.send_raw(status);
7013 if _result.is_err() {
7014 self.control_handle.shutdown();
7015 }
7016 self.drop_without_shutdown();
7017 _result
7018 }
7019
7020 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
7022 let _result = self.send_raw(status);
7023 self.drop_without_shutdown();
7024 _result
7025 }
7026
7027 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
7028 self.control_handle.inner.send::<PayloadStreamRegisterVmoResponse>(
7029 (status,),
7030 self.tx_id,
7031 0x388d7fe44bcb4c,
7032 fidl::encoding::DynamicFlags::empty(),
7033 )
7034 }
7035}
7036
7037#[must_use = "FIDL methods require a response to be sent"]
7038#[derive(Debug)]
7039pub struct PayloadStreamReadDataResponder {
7040 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
7041 tx_id: u32,
7042}
7043
7044impl std::ops::Drop for PayloadStreamReadDataResponder {
7048 fn drop(&mut self) {
7049 self.control_handle.shutdown();
7050 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7052 }
7053}
7054
7055impl fidl::endpoints::Responder for PayloadStreamReadDataResponder {
7056 type ControlHandle = PayloadStreamControlHandle;
7057
7058 fn control_handle(&self) -> &PayloadStreamControlHandle {
7059 &self.control_handle
7060 }
7061
7062 fn drop_without_shutdown(mut self) {
7063 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7065 std::mem::forget(self);
7067 }
7068}
7069
7070impl PayloadStreamReadDataResponder {
7071 pub fn send(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7075 let _result = self.send_raw(result);
7076 if _result.is_err() {
7077 self.control_handle.shutdown();
7078 }
7079 self.drop_without_shutdown();
7080 _result
7081 }
7082
7083 pub fn send_no_shutdown_on_err(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7085 let _result = self.send_raw(result);
7086 self.drop_without_shutdown();
7087 _result
7088 }
7089
7090 fn send_raw(&self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7091 self.control_handle.inner.send::<PayloadStreamReadDataResponse>(
7092 (result,),
7093 self.tx_id,
7094 0x2ccde55366318afa,
7095 fidl::encoding::DynamicFlags::empty(),
7096 )
7097 }
7098}
7099
7100#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7101pub struct SysconfigMarker;
7102
7103impl fidl::endpoints::ProtocolMarker for SysconfigMarker {
7104 type Proxy = SysconfigProxy;
7105 type RequestStream = SysconfigRequestStream;
7106 #[cfg(target_os = "fuchsia")]
7107 type SynchronousProxy = SysconfigSynchronousProxy;
7108
7109 const DEBUG_NAME: &'static str = "(anonymous) Sysconfig";
7110}
7111pub type SysconfigReadResult = Result<fidl_fuchsia_mem::Buffer, i32>;
7112pub type SysconfigGetPartitionSizeResult = Result<u64, i32>;
7113
7114pub trait SysconfigProxyInterface: Send + Sync {
7115 type ReadResponseFut: std::future::Future<Output = Result<SysconfigReadResult, fidl::Error>>
7116 + Send;
7117 fn r#read(&self) -> Self::ReadResponseFut;
7118 type WriteResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7119 fn r#write(&self, payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut;
7120 type GetPartitionSizeResponseFut: std::future::Future<Output = Result<SysconfigGetPartitionSizeResult, fidl::Error>>
7121 + Send;
7122 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut;
7123 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7124 fn r#flush(&self) -> Self::FlushResponseFut;
7125 type WipeResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7126 fn r#wipe(&self) -> Self::WipeResponseFut;
7127}
7128#[derive(Debug)]
7129#[cfg(target_os = "fuchsia")]
7130pub struct SysconfigSynchronousProxy {
7131 client: fidl::client::sync::Client,
7132}
7133
7134#[cfg(target_os = "fuchsia")]
7135impl fidl::endpoints::SynchronousProxy for SysconfigSynchronousProxy {
7136 type Proxy = SysconfigProxy;
7137 type Protocol = SysconfigMarker;
7138
7139 fn from_channel(inner: fidl::Channel) -> Self {
7140 Self::new(inner)
7141 }
7142
7143 fn into_channel(self) -> fidl::Channel {
7144 self.client.into_channel()
7145 }
7146
7147 fn as_channel(&self) -> &fidl::Channel {
7148 self.client.as_channel()
7149 }
7150}
7151
7152#[cfg(target_os = "fuchsia")]
7153impl SysconfigSynchronousProxy {
7154 pub fn new(channel: fidl::Channel) -> Self {
7155 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7156 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7157 }
7158
7159 pub fn into_channel(self) -> fidl::Channel {
7160 self.client.into_channel()
7161 }
7162
7163 pub fn wait_for_event(
7166 &self,
7167 deadline: zx::MonotonicInstant,
7168 ) -> Result<SysconfigEvent, fidl::Error> {
7169 SysconfigEvent::decode(self.client.wait_for_event(deadline)?)
7170 }
7171
7172 pub fn r#read(
7174 &self,
7175 ___deadline: zx::MonotonicInstant,
7176 ) -> Result<SysconfigReadResult, fidl::Error> {
7177 let _response = self.client.send_query::<
7178 fidl::encoding::EmptyPayload,
7179 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7180 >(
7181 (),
7182 0x350c317c53c226fc,
7183 fidl::encoding::DynamicFlags::empty(),
7184 ___deadline,
7185 )?;
7186 Ok(_response.map(|x| x.data))
7187 }
7188
7189 pub fn r#write(
7191 &self,
7192 mut payload: fidl_fuchsia_mem::Buffer,
7193 ___deadline: zx::MonotonicInstant,
7194 ) -> Result<i32, fidl::Error> {
7195 let _response = self.client.send_query::<SysconfigWriteRequest, SysconfigWriteResponse>(
7196 (&mut payload,),
7197 0x393786c114caf171,
7198 fidl::encoding::DynamicFlags::empty(),
7199 ___deadline,
7200 )?;
7201 Ok(_response.status)
7202 }
7203
7204 pub fn r#get_partition_size(
7206 &self,
7207 ___deadline: zx::MonotonicInstant,
7208 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7209 let _response = self.client.send_query::<
7210 fidl::encoding::EmptyPayload,
7211 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7212 >(
7213 (),
7214 0x2570c58b74fb8957,
7215 fidl::encoding::DynamicFlags::empty(),
7216 ___deadline,
7217 )?;
7218 Ok(_response.map(|x| x.size))
7219 }
7220
7221 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7223 let _response =
7224 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigFlushResponse>(
7225 (),
7226 0xc6c1bb233d003c6,
7227 fidl::encoding::DynamicFlags::empty(),
7228 ___deadline,
7229 )?;
7230 Ok(_response.status)
7231 }
7232
7233 pub fn r#wipe(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7235 let _response =
7236 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigWipeResponse>(
7237 (),
7238 0x34a634965ebfb702,
7239 fidl::encoding::DynamicFlags::empty(),
7240 ___deadline,
7241 )?;
7242 Ok(_response.status)
7243 }
7244}
7245
7246#[derive(Debug, Clone)]
7247pub struct SysconfigProxy {
7248 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7249}
7250
7251impl fidl::endpoints::Proxy for SysconfigProxy {
7252 type Protocol = SysconfigMarker;
7253
7254 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7255 Self::new(inner)
7256 }
7257
7258 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7259 self.client.into_channel().map_err(|client| Self { client })
7260 }
7261
7262 fn as_channel(&self) -> &::fidl::AsyncChannel {
7263 self.client.as_channel()
7264 }
7265}
7266
7267impl SysconfigProxy {
7268 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7270 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7271 Self { client: fidl::client::Client::new(channel, protocol_name) }
7272 }
7273
7274 pub fn take_event_stream(&self) -> SysconfigEventStream {
7280 SysconfigEventStream { event_receiver: self.client.take_event_receiver() }
7281 }
7282
7283 pub fn r#read(
7285 &self,
7286 ) -> fidl::client::QueryResponseFut<
7287 SysconfigReadResult,
7288 fidl::encoding::DefaultFuchsiaResourceDialect,
7289 > {
7290 SysconfigProxyInterface::r#read(self)
7291 }
7292
7293 pub fn r#write(
7295 &self,
7296 mut payload: fidl_fuchsia_mem::Buffer,
7297 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7298 SysconfigProxyInterface::r#write(self, payload)
7299 }
7300
7301 pub fn r#get_partition_size(
7303 &self,
7304 ) -> fidl::client::QueryResponseFut<
7305 SysconfigGetPartitionSizeResult,
7306 fidl::encoding::DefaultFuchsiaResourceDialect,
7307 > {
7308 SysconfigProxyInterface::r#get_partition_size(self)
7309 }
7310
7311 pub fn r#flush(
7313 &self,
7314 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7315 SysconfigProxyInterface::r#flush(self)
7316 }
7317
7318 pub fn r#wipe(
7320 &self,
7321 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7322 SysconfigProxyInterface::r#wipe(self)
7323 }
7324}
7325
7326impl SysconfigProxyInterface for SysconfigProxy {
7327 type ReadResponseFut = fidl::client::QueryResponseFut<
7328 SysconfigReadResult,
7329 fidl::encoding::DefaultFuchsiaResourceDialect,
7330 >;
7331 fn r#read(&self) -> Self::ReadResponseFut {
7332 fn _decode(
7333 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7334 ) -> Result<SysconfigReadResult, fidl::Error> {
7335 let _response = fidl::client::decode_transaction_body::<
7336 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7337 fidl::encoding::DefaultFuchsiaResourceDialect,
7338 0x350c317c53c226fc,
7339 >(_buf?)?;
7340 Ok(_response.map(|x| x.data))
7341 }
7342 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigReadResult>(
7343 (),
7344 0x350c317c53c226fc,
7345 fidl::encoding::DynamicFlags::empty(),
7346 _decode,
7347 )
7348 }
7349
7350 type WriteResponseFut =
7351 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7352 fn r#write(&self, mut payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut {
7353 fn _decode(
7354 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7355 ) -> Result<i32, fidl::Error> {
7356 let _response = fidl::client::decode_transaction_body::<
7357 SysconfigWriteResponse,
7358 fidl::encoding::DefaultFuchsiaResourceDialect,
7359 0x393786c114caf171,
7360 >(_buf?)?;
7361 Ok(_response.status)
7362 }
7363 self.client.send_query_and_decode::<SysconfigWriteRequest, i32>(
7364 (&mut payload,),
7365 0x393786c114caf171,
7366 fidl::encoding::DynamicFlags::empty(),
7367 _decode,
7368 )
7369 }
7370
7371 type GetPartitionSizeResponseFut = fidl::client::QueryResponseFut<
7372 SysconfigGetPartitionSizeResult,
7373 fidl::encoding::DefaultFuchsiaResourceDialect,
7374 >;
7375 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut {
7376 fn _decode(
7377 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7378 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7379 let _response = fidl::client::decode_transaction_body::<
7380 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7381 fidl::encoding::DefaultFuchsiaResourceDialect,
7382 0x2570c58b74fb8957,
7383 >(_buf?)?;
7384 Ok(_response.map(|x| x.size))
7385 }
7386 self.client
7387 .send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigGetPartitionSizeResult>(
7388 (),
7389 0x2570c58b74fb8957,
7390 fidl::encoding::DynamicFlags::empty(),
7391 _decode,
7392 )
7393 }
7394
7395 type FlushResponseFut =
7396 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7397 fn r#flush(&self) -> Self::FlushResponseFut {
7398 fn _decode(
7399 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7400 ) -> Result<i32, fidl::Error> {
7401 let _response = fidl::client::decode_transaction_body::<
7402 SysconfigFlushResponse,
7403 fidl::encoding::DefaultFuchsiaResourceDialect,
7404 0xc6c1bb233d003c6,
7405 >(_buf?)?;
7406 Ok(_response.status)
7407 }
7408 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7409 (),
7410 0xc6c1bb233d003c6,
7411 fidl::encoding::DynamicFlags::empty(),
7412 _decode,
7413 )
7414 }
7415
7416 type WipeResponseFut =
7417 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7418 fn r#wipe(&self) -> Self::WipeResponseFut {
7419 fn _decode(
7420 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7421 ) -> Result<i32, fidl::Error> {
7422 let _response = fidl::client::decode_transaction_body::<
7423 SysconfigWipeResponse,
7424 fidl::encoding::DefaultFuchsiaResourceDialect,
7425 0x34a634965ebfb702,
7426 >(_buf?)?;
7427 Ok(_response.status)
7428 }
7429 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7430 (),
7431 0x34a634965ebfb702,
7432 fidl::encoding::DynamicFlags::empty(),
7433 _decode,
7434 )
7435 }
7436}
7437
7438pub struct SysconfigEventStream {
7439 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7440}
7441
7442impl std::marker::Unpin for SysconfigEventStream {}
7443
7444impl futures::stream::FusedStream for SysconfigEventStream {
7445 fn is_terminated(&self) -> bool {
7446 self.event_receiver.is_terminated()
7447 }
7448}
7449
7450impl futures::Stream for SysconfigEventStream {
7451 type Item = Result<SysconfigEvent, fidl::Error>;
7452
7453 fn poll_next(
7454 mut self: std::pin::Pin<&mut Self>,
7455 cx: &mut std::task::Context<'_>,
7456 ) -> std::task::Poll<Option<Self::Item>> {
7457 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7458 &mut self.event_receiver,
7459 cx
7460 )?) {
7461 Some(buf) => std::task::Poll::Ready(Some(SysconfigEvent::decode(buf))),
7462 None => std::task::Poll::Ready(None),
7463 }
7464 }
7465}
7466
7467#[derive(Debug)]
7468pub enum SysconfigEvent {}
7469
7470impl SysconfigEvent {
7471 fn decode(
7473 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7474 ) -> Result<SysconfigEvent, fidl::Error> {
7475 let (bytes, _handles) = buf.split_mut();
7476 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7477 debug_assert_eq!(tx_header.tx_id, 0);
7478 match tx_header.ordinal {
7479 _ => Err(fidl::Error::UnknownOrdinal {
7480 ordinal: tx_header.ordinal,
7481 protocol_name: <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7482 }),
7483 }
7484 }
7485}
7486
7487pub struct SysconfigRequestStream {
7489 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7490 is_terminated: bool,
7491}
7492
7493impl std::marker::Unpin for SysconfigRequestStream {}
7494
7495impl futures::stream::FusedStream for SysconfigRequestStream {
7496 fn is_terminated(&self) -> bool {
7497 self.is_terminated
7498 }
7499}
7500
7501impl fidl::endpoints::RequestStream for SysconfigRequestStream {
7502 type Protocol = SysconfigMarker;
7503 type ControlHandle = SysconfigControlHandle;
7504
7505 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7506 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7507 }
7508
7509 fn control_handle(&self) -> Self::ControlHandle {
7510 SysconfigControlHandle { inner: self.inner.clone() }
7511 }
7512
7513 fn into_inner(
7514 self,
7515 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7516 {
7517 (self.inner, self.is_terminated)
7518 }
7519
7520 fn from_inner(
7521 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7522 is_terminated: bool,
7523 ) -> Self {
7524 Self { inner, is_terminated }
7525 }
7526}
7527
7528impl futures::Stream for SysconfigRequestStream {
7529 type Item = Result<SysconfigRequest, fidl::Error>;
7530
7531 fn poll_next(
7532 mut self: std::pin::Pin<&mut Self>,
7533 cx: &mut std::task::Context<'_>,
7534 ) -> std::task::Poll<Option<Self::Item>> {
7535 let this = &mut *self;
7536 if this.inner.check_shutdown(cx) {
7537 this.is_terminated = true;
7538 return std::task::Poll::Ready(None);
7539 }
7540 if this.is_terminated {
7541 panic!("polled SysconfigRequestStream after completion");
7542 }
7543 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7544 |bytes, handles| {
7545 match this.inner.channel().read_etc(cx, bytes, handles) {
7546 std::task::Poll::Ready(Ok(())) => {}
7547 std::task::Poll::Pending => return std::task::Poll::Pending,
7548 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7549 this.is_terminated = true;
7550 return std::task::Poll::Ready(None);
7551 }
7552 std::task::Poll::Ready(Err(e)) => {
7553 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7554 e.into(),
7555 ))))
7556 }
7557 }
7558
7559 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7561
7562 std::task::Poll::Ready(Some(match header.ordinal {
7563 0x350c317c53c226fc => {
7564 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7565 let mut req = fidl::new_empty!(
7566 fidl::encoding::EmptyPayload,
7567 fidl::encoding::DefaultFuchsiaResourceDialect
7568 );
7569 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7570 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7571 Ok(SysconfigRequest::Read {
7572 responder: SysconfigReadResponder {
7573 control_handle: std::mem::ManuallyDrop::new(control_handle),
7574 tx_id: header.tx_id,
7575 },
7576 })
7577 }
7578 0x393786c114caf171 => {
7579 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7580 let mut req = fidl::new_empty!(
7581 SysconfigWriteRequest,
7582 fidl::encoding::DefaultFuchsiaResourceDialect
7583 );
7584 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SysconfigWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7585 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7586 Ok(SysconfigRequest::Write {
7587 payload: req.payload,
7588
7589 responder: SysconfigWriteResponder {
7590 control_handle: std::mem::ManuallyDrop::new(control_handle),
7591 tx_id: header.tx_id,
7592 },
7593 })
7594 }
7595 0x2570c58b74fb8957 => {
7596 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7597 let mut req = fidl::new_empty!(
7598 fidl::encoding::EmptyPayload,
7599 fidl::encoding::DefaultFuchsiaResourceDialect
7600 );
7601 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7602 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7603 Ok(SysconfigRequest::GetPartitionSize {
7604 responder: SysconfigGetPartitionSizeResponder {
7605 control_handle: std::mem::ManuallyDrop::new(control_handle),
7606 tx_id: header.tx_id,
7607 },
7608 })
7609 }
7610 0xc6c1bb233d003c6 => {
7611 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7612 let mut req = fidl::new_empty!(
7613 fidl::encoding::EmptyPayload,
7614 fidl::encoding::DefaultFuchsiaResourceDialect
7615 );
7616 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7617 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7618 Ok(SysconfigRequest::Flush {
7619 responder: SysconfigFlushResponder {
7620 control_handle: std::mem::ManuallyDrop::new(control_handle),
7621 tx_id: header.tx_id,
7622 },
7623 })
7624 }
7625 0x34a634965ebfb702 => {
7626 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7627 let mut req = fidl::new_empty!(
7628 fidl::encoding::EmptyPayload,
7629 fidl::encoding::DefaultFuchsiaResourceDialect
7630 );
7631 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7632 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7633 Ok(SysconfigRequest::Wipe {
7634 responder: SysconfigWipeResponder {
7635 control_handle: std::mem::ManuallyDrop::new(control_handle),
7636 tx_id: header.tx_id,
7637 },
7638 })
7639 }
7640 _ => Err(fidl::Error::UnknownOrdinal {
7641 ordinal: header.ordinal,
7642 protocol_name:
7643 <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7644 }),
7645 }))
7646 },
7647 )
7648 }
7649}
7650
7651#[derive(Debug)]
7655pub enum SysconfigRequest {
7656 Read { responder: SysconfigReadResponder },
7658 Write { payload: fidl_fuchsia_mem::Buffer, responder: SysconfigWriteResponder },
7660 GetPartitionSize { responder: SysconfigGetPartitionSizeResponder },
7662 Flush { responder: SysconfigFlushResponder },
7664 Wipe { responder: SysconfigWipeResponder },
7666}
7667
7668impl SysconfigRequest {
7669 #[allow(irrefutable_let_patterns)]
7670 pub fn into_read(self) -> Option<(SysconfigReadResponder)> {
7671 if let SysconfigRequest::Read { responder } = self {
7672 Some((responder))
7673 } else {
7674 None
7675 }
7676 }
7677
7678 #[allow(irrefutable_let_patterns)]
7679 pub fn into_write(self) -> Option<(fidl_fuchsia_mem::Buffer, SysconfigWriteResponder)> {
7680 if let SysconfigRequest::Write { payload, responder } = self {
7681 Some((payload, responder))
7682 } else {
7683 None
7684 }
7685 }
7686
7687 #[allow(irrefutable_let_patterns)]
7688 pub fn into_get_partition_size(self) -> Option<(SysconfigGetPartitionSizeResponder)> {
7689 if let SysconfigRequest::GetPartitionSize { responder } = self {
7690 Some((responder))
7691 } else {
7692 None
7693 }
7694 }
7695
7696 #[allow(irrefutable_let_patterns)]
7697 pub fn into_flush(self) -> Option<(SysconfigFlushResponder)> {
7698 if let SysconfigRequest::Flush { responder } = self {
7699 Some((responder))
7700 } else {
7701 None
7702 }
7703 }
7704
7705 #[allow(irrefutable_let_patterns)]
7706 pub fn into_wipe(self) -> Option<(SysconfigWipeResponder)> {
7707 if let SysconfigRequest::Wipe { responder } = self {
7708 Some((responder))
7709 } else {
7710 None
7711 }
7712 }
7713
7714 pub fn method_name(&self) -> &'static str {
7716 match *self {
7717 SysconfigRequest::Read { .. } => "read",
7718 SysconfigRequest::Write { .. } => "write",
7719 SysconfigRequest::GetPartitionSize { .. } => "get_partition_size",
7720 SysconfigRequest::Flush { .. } => "flush",
7721 SysconfigRequest::Wipe { .. } => "wipe",
7722 }
7723 }
7724}
7725
7726#[derive(Debug, Clone)]
7727pub struct SysconfigControlHandle {
7728 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7729}
7730
7731impl fidl::endpoints::ControlHandle for SysconfigControlHandle {
7732 fn shutdown(&self) {
7733 self.inner.shutdown()
7734 }
7735 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7736 self.inner.shutdown_with_epitaph(status)
7737 }
7738
7739 fn is_closed(&self) -> bool {
7740 self.inner.channel().is_closed()
7741 }
7742 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7743 self.inner.channel().on_closed()
7744 }
7745
7746 #[cfg(target_os = "fuchsia")]
7747 fn signal_peer(
7748 &self,
7749 clear_mask: zx::Signals,
7750 set_mask: zx::Signals,
7751 ) -> Result<(), zx_status::Status> {
7752 use fidl::Peered;
7753 self.inner.channel().signal_peer(clear_mask, set_mask)
7754 }
7755}
7756
7757impl SysconfigControlHandle {}
7758
7759#[must_use = "FIDL methods require a response to be sent"]
7760#[derive(Debug)]
7761pub struct SysconfigReadResponder {
7762 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7763 tx_id: u32,
7764}
7765
7766impl std::ops::Drop for SysconfigReadResponder {
7770 fn drop(&mut self) {
7771 self.control_handle.shutdown();
7772 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7774 }
7775}
7776
7777impl fidl::endpoints::Responder for SysconfigReadResponder {
7778 type ControlHandle = SysconfigControlHandle;
7779
7780 fn control_handle(&self) -> &SysconfigControlHandle {
7781 &self.control_handle
7782 }
7783
7784 fn drop_without_shutdown(mut self) {
7785 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7787 std::mem::forget(self);
7789 }
7790}
7791
7792impl SysconfigReadResponder {
7793 pub fn send(
7797 self,
7798 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7799 ) -> Result<(), fidl::Error> {
7800 let _result = self.send_raw(result);
7801 if _result.is_err() {
7802 self.control_handle.shutdown();
7803 }
7804 self.drop_without_shutdown();
7805 _result
7806 }
7807
7808 pub fn send_no_shutdown_on_err(
7810 self,
7811 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7812 ) -> Result<(), fidl::Error> {
7813 let _result = self.send_raw(result);
7814 self.drop_without_shutdown();
7815 _result
7816 }
7817
7818 fn send_raw(
7819 &self,
7820 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7821 ) -> Result<(), fidl::Error> {
7822 self.control_handle.inner.send::<fidl::encoding::ResultType<SysconfigReadResponse, i32>>(
7823 result.as_mut().map_err(|e| *e).map(|data| (data,)),
7824 self.tx_id,
7825 0x350c317c53c226fc,
7826 fidl::encoding::DynamicFlags::empty(),
7827 )
7828 }
7829}
7830
7831#[must_use = "FIDL methods require a response to be sent"]
7832#[derive(Debug)]
7833pub struct SysconfigWriteResponder {
7834 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7835 tx_id: u32,
7836}
7837
7838impl std::ops::Drop for SysconfigWriteResponder {
7842 fn drop(&mut self) {
7843 self.control_handle.shutdown();
7844 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7846 }
7847}
7848
7849impl fidl::endpoints::Responder for SysconfigWriteResponder {
7850 type ControlHandle = SysconfigControlHandle;
7851
7852 fn control_handle(&self) -> &SysconfigControlHandle {
7853 &self.control_handle
7854 }
7855
7856 fn drop_without_shutdown(mut self) {
7857 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7859 std::mem::forget(self);
7861 }
7862}
7863
7864impl SysconfigWriteResponder {
7865 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7869 let _result = self.send_raw(status);
7870 if _result.is_err() {
7871 self.control_handle.shutdown();
7872 }
7873 self.drop_without_shutdown();
7874 _result
7875 }
7876
7877 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
7879 let _result = self.send_raw(status);
7880 self.drop_without_shutdown();
7881 _result
7882 }
7883
7884 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
7885 self.control_handle.inner.send::<SysconfigWriteResponse>(
7886 (status,),
7887 self.tx_id,
7888 0x393786c114caf171,
7889 fidl::encoding::DynamicFlags::empty(),
7890 )
7891 }
7892}
7893
7894#[must_use = "FIDL methods require a response to be sent"]
7895#[derive(Debug)]
7896pub struct SysconfigGetPartitionSizeResponder {
7897 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7898 tx_id: u32,
7899}
7900
7901impl std::ops::Drop for SysconfigGetPartitionSizeResponder {
7905 fn drop(&mut self) {
7906 self.control_handle.shutdown();
7907 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7909 }
7910}
7911
7912impl fidl::endpoints::Responder for SysconfigGetPartitionSizeResponder {
7913 type ControlHandle = SysconfigControlHandle;
7914
7915 fn control_handle(&self) -> &SysconfigControlHandle {
7916 &self.control_handle
7917 }
7918
7919 fn drop_without_shutdown(mut self) {
7920 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7922 std::mem::forget(self);
7924 }
7925}
7926
7927impl SysconfigGetPartitionSizeResponder {
7928 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
7932 let _result = self.send_raw(result);
7933 if _result.is_err() {
7934 self.control_handle.shutdown();
7935 }
7936 self.drop_without_shutdown();
7937 _result
7938 }
7939
7940 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
7942 let _result = self.send_raw(result);
7943 self.drop_without_shutdown();
7944 _result
7945 }
7946
7947 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
7948 self.control_handle
7949 .inner
7950 .send::<fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>>(
7951 result.map(|size| (size,)),
7952 self.tx_id,
7953 0x2570c58b74fb8957,
7954 fidl::encoding::DynamicFlags::empty(),
7955 )
7956 }
7957}
7958
7959#[must_use = "FIDL methods require a response to be sent"]
7960#[derive(Debug)]
7961pub struct SysconfigFlushResponder {
7962 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7963 tx_id: u32,
7964}
7965
7966impl std::ops::Drop for SysconfigFlushResponder {
7970 fn drop(&mut self) {
7971 self.control_handle.shutdown();
7972 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7974 }
7975}
7976
7977impl fidl::endpoints::Responder for SysconfigFlushResponder {
7978 type ControlHandle = SysconfigControlHandle;
7979
7980 fn control_handle(&self) -> &SysconfigControlHandle {
7981 &self.control_handle
7982 }
7983
7984 fn drop_without_shutdown(mut self) {
7985 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7987 std::mem::forget(self);
7989 }
7990}
7991
7992impl SysconfigFlushResponder {
7993 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7997 let _result = self.send_raw(status);
7998 if _result.is_err() {
7999 self.control_handle.shutdown();
8000 }
8001 self.drop_without_shutdown();
8002 _result
8003 }
8004
8005 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8007 let _result = self.send_raw(status);
8008 self.drop_without_shutdown();
8009 _result
8010 }
8011
8012 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8013 self.control_handle.inner.send::<SysconfigFlushResponse>(
8014 (status,),
8015 self.tx_id,
8016 0xc6c1bb233d003c6,
8017 fidl::encoding::DynamicFlags::empty(),
8018 )
8019 }
8020}
8021
8022#[must_use = "FIDL methods require a response to be sent"]
8023#[derive(Debug)]
8024pub struct SysconfigWipeResponder {
8025 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8026 tx_id: u32,
8027}
8028
8029impl std::ops::Drop for SysconfigWipeResponder {
8033 fn drop(&mut self) {
8034 self.control_handle.shutdown();
8035 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8037 }
8038}
8039
8040impl fidl::endpoints::Responder for SysconfigWipeResponder {
8041 type ControlHandle = SysconfigControlHandle;
8042
8043 fn control_handle(&self) -> &SysconfigControlHandle {
8044 &self.control_handle
8045 }
8046
8047 fn drop_without_shutdown(mut self) {
8048 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8050 std::mem::forget(self);
8052 }
8053}
8054
8055impl SysconfigWipeResponder {
8056 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8060 let _result = self.send_raw(status);
8061 if _result.is_err() {
8062 self.control_handle.shutdown();
8063 }
8064 self.drop_without_shutdown();
8065 _result
8066 }
8067
8068 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8070 let _result = self.send_raw(status);
8071 self.drop_without_shutdown();
8072 _result
8073 }
8074
8075 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8076 self.control_handle.inner.send::<SysconfigWipeResponse>(
8077 (status,),
8078 self.tx_id,
8079 0x34a634965ebfb702,
8080 fidl::encoding::DynamicFlags::empty(),
8081 )
8082 }
8083}
8084
8085mod internal {
8086 use super::*;
8087
8088 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareRequest {
8089 type Borrowed<'a> = &'a mut Self;
8090 fn take_or_borrow<'a>(
8091 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8092 ) -> Self::Borrowed<'a> {
8093 value
8094 }
8095 }
8096
8097 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareRequest {
8098 type Owned = Self;
8099
8100 #[inline(always)]
8101 fn inline_align(_context: fidl::encoding::Context) -> usize {
8102 8
8103 }
8104
8105 #[inline(always)]
8106 fn inline_size(_context: fidl::encoding::Context) -> usize {
8107 24
8108 }
8109 }
8110
8111 unsafe impl
8112 fidl::encoding::Encode<
8113 DataSinkReadFirmwareRequest,
8114 fidl::encoding::DefaultFuchsiaResourceDialect,
8115 > for &mut DataSinkReadFirmwareRequest
8116 {
8117 #[inline]
8118 unsafe fn encode(
8119 self,
8120 encoder: &mut fidl::encoding::Encoder<
8121 '_,
8122 fidl::encoding::DefaultFuchsiaResourceDialect,
8123 >,
8124 offset: usize,
8125 _depth: fidl::encoding::Depth,
8126 ) -> fidl::Result<()> {
8127 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8128 fidl::encoding::Encode::<
8130 DataSinkReadFirmwareRequest,
8131 fidl::encoding::DefaultFuchsiaResourceDialect,
8132 >::encode(
8133 (
8134 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8135 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(
8136 &self.type_,
8137 ),
8138 ),
8139 encoder,
8140 offset,
8141 _depth,
8142 )
8143 }
8144 }
8145 unsafe impl<
8146 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8147 T1: fidl::encoding::Encode<
8148 fidl::encoding::BoundedString<256>,
8149 fidl::encoding::DefaultFuchsiaResourceDialect,
8150 >,
8151 >
8152 fidl::encoding::Encode<
8153 DataSinkReadFirmwareRequest,
8154 fidl::encoding::DefaultFuchsiaResourceDialect,
8155 > for (T0, T1)
8156 {
8157 #[inline]
8158 unsafe fn encode(
8159 self,
8160 encoder: &mut fidl::encoding::Encoder<
8161 '_,
8162 fidl::encoding::DefaultFuchsiaResourceDialect,
8163 >,
8164 offset: usize,
8165 depth: fidl::encoding::Depth,
8166 ) -> fidl::Result<()> {
8167 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8168 unsafe {
8171 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8172 (ptr as *mut u64).write_unaligned(0);
8173 }
8174 self.0.encode(encoder, offset + 0, depth)?;
8176 self.1.encode(encoder, offset + 8, depth)?;
8177 Ok(())
8178 }
8179 }
8180
8181 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8182 for DataSinkReadFirmwareRequest
8183 {
8184 #[inline(always)]
8185 fn new_empty() -> Self {
8186 Self {
8187 configuration: fidl::new_empty!(
8188 Configuration,
8189 fidl::encoding::DefaultFuchsiaResourceDialect
8190 ),
8191 type_: fidl::new_empty!(
8192 fidl::encoding::BoundedString<256>,
8193 fidl::encoding::DefaultFuchsiaResourceDialect
8194 ),
8195 }
8196 }
8197
8198 #[inline]
8199 unsafe fn decode(
8200 &mut self,
8201 decoder: &mut fidl::encoding::Decoder<
8202 '_,
8203 fidl::encoding::DefaultFuchsiaResourceDialect,
8204 >,
8205 offset: usize,
8206 _depth: fidl::encoding::Depth,
8207 ) -> fidl::Result<()> {
8208 decoder.debug_check_bounds::<Self>(offset);
8209 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8211 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8212 let mask = 0xffffffff00000000u64;
8213 let maskedval = padval & mask;
8214 if maskedval != 0 {
8215 return Err(fidl::Error::NonZeroPadding {
8216 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8217 });
8218 }
8219 fidl::decode!(
8220 Configuration,
8221 fidl::encoding::DefaultFuchsiaResourceDialect,
8222 &mut self.configuration,
8223 decoder,
8224 offset + 0,
8225 _depth
8226 )?;
8227 fidl::decode!(
8228 fidl::encoding::BoundedString<256>,
8229 fidl::encoding::DefaultFuchsiaResourceDialect,
8230 &mut self.type_,
8231 decoder,
8232 offset + 8,
8233 _depth
8234 )?;
8235 Ok(())
8236 }
8237 }
8238
8239 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteAssetRequest {
8240 type Borrowed<'a> = &'a mut Self;
8241 fn take_or_borrow<'a>(
8242 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8243 ) -> Self::Borrowed<'a> {
8244 value
8245 }
8246 }
8247
8248 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteAssetRequest {
8249 type Owned = Self;
8250
8251 #[inline(always)]
8252 fn inline_align(_context: fidl::encoding::Context) -> usize {
8253 8
8254 }
8255
8256 #[inline(always)]
8257 fn inline_size(_context: fidl::encoding::Context) -> usize {
8258 24
8259 }
8260 }
8261
8262 unsafe impl
8263 fidl::encoding::Encode<
8264 DataSinkWriteAssetRequest,
8265 fidl::encoding::DefaultFuchsiaResourceDialect,
8266 > for &mut DataSinkWriteAssetRequest
8267 {
8268 #[inline]
8269 unsafe fn encode(
8270 self,
8271 encoder: &mut fidl::encoding::Encoder<
8272 '_,
8273 fidl::encoding::DefaultFuchsiaResourceDialect,
8274 >,
8275 offset: usize,
8276 _depth: fidl::encoding::Depth,
8277 ) -> fidl::Result<()> {
8278 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8279 fidl::encoding::Encode::<DataSinkWriteAssetRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8281 (
8282 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8283 <Asset as fidl::encoding::ValueTypeMarker>::borrow(&self.asset),
8284 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8285 ),
8286 encoder, offset, _depth
8287 )
8288 }
8289 }
8290 unsafe impl<
8291 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8292 T1: fidl::encoding::Encode<Asset, fidl::encoding::DefaultFuchsiaResourceDialect>,
8293 T2: fidl::encoding::Encode<
8294 fidl_fuchsia_mem::Buffer,
8295 fidl::encoding::DefaultFuchsiaResourceDialect,
8296 >,
8297 >
8298 fidl::encoding::Encode<
8299 DataSinkWriteAssetRequest,
8300 fidl::encoding::DefaultFuchsiaResourceDialect,
8301 > for (T0, T1, T2)
8302 {
8303 #[inline]
8304 unsafe fn encode(
8305 self,
8306 encoder: &mut fidl::encoding::Encoder<
8307 '_,
8308 fidl::encoding::DefaultFuchsiaResourceDialect,
8309 >,
8310 offset: usize,
8311 depth: fidl::encoding::Depth,
8312 ) -> fidl::Result<()> {
8313 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8314 self.0.encode(encoder, offset + 0, depth)?;
8318 self.1.encode(encoder, offset + 4, depth)?;
8319 self.2.encode(encoder, offset + 8, depth)?;
8320 Ok(())
8321 }
8322 }
8323
8324 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8325 for DataSinkWriteAssetRequest
8326 {
8327 #[inline(always)]
8328 fn new_empty() -> Self {
8329 Self {
8330 configuration: fidl::new_empty!(
8331 Configuration,
8332 fidl::encoding::DefaultFuchsiaResourceDialect
8333 ),
8334 asset: fidl::new_empty!(Asset, fidl::encoding::DefaultFuchsiaResourceDialect),
8335 payload: fidl::new_empty!(
8336 fidl_fuchsia_mem::Buffer,
8337 fidl::encoding::DefaultFuchsiaResourceDialect
8338 ),
8339 }
8340 }
8341
8342 #[inline]
8343 unsafe fn decode(
8344 &mut self,
8345 decoder: &mut fidl::encoding::Decoder<
8346 '_,
8347 fidl::encoding::DefaultFuchsiaResourceDialect,
8348 >,
8349 offset: usize,
8350 _depth: fidl::encoding::Depth,
8351 ) -> fidl::Result<()> {
8352 decoder.debug_check_bounds::<Self>(offset);
8353 fidl::decode!(
8355 Configuration,
8356 fidl::encoding::DefaultFuchsiaResourceDialect,
8357 &mut self.configuration,
8358 decoder,
8359 offset + 0,
8360 _depth
8361 )?;
8362 fidl::decode!(
8363 Asset,
8364 fidl::encoding::DefaultFuchsiaResourceDialect,
8365 &mut self.asset,
8366 decoder,
8367 offset + 4,
8368 _depth
8369 )?;
8370 fidl::decode!(
8371 fidl_fuchsia_mem::Buffer,
8372 fidl::encoding::DefaultFuchsiaResourceDialect,
8373 &mut self.payload,
8374 decoder,
8375 offset + 8,
8376 _depth
8377 )?;
8378 Ok(())
8379 }
8380 }
8381
8382 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteFirmwareRequest {
8383 type Borrowed<'a> = &'a mut Self;
8384 fn take_or_borrow<'a>(
8385 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8386 ) -> Self::Borrowed<'a> {
8387 value
8388 }
8389 }
8390
8391 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteFirmwareRequest {
8392 type Owned = Self;
8393
8394 #[inline(always)]
8395 fn inline_align(_context: fidl::encoding::Context) -> usize {
8396 8
8397 }
8398
8399 #[inline(always)]
8400 fn inline_size(_context: fidl::encoding::Context) -> usize {
8401 40
8402 }
8403 }
8404
8405 unsafe impl
8406 fidl::encoding::Encode<
8407 DataSinkWriteFirmwareRequest,
8408 fidl::encoding::DefaultFuchsiaResourceDialect,
8409 > for &mut DataSinkWriteFirmwareRequest
8410 {
8411 #[inline]
8412 unsafe fn encode(
8413 self,
8414 encoder: &mut fidl::encoding::Encoder<
8415 '_,
8416 fidl::encoding::DefaultFuchsiaResourceDialect,
8417 >,
8418 offset: usize,
8419 _depth: fidl::encoding::Depth,
8420 ) -> fidl::Result<()> {
8421 encoder.debug_check_bounds::<DataSinkWriteFirmwareRequest>(offset);
8422 fidl::encoding::Encode::<DataSinkWriteFirmwareRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8424 (
8425 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8426 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
8427 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8428 ),
8429 encoder, offset, _depth
8430 )
8431 }
8432 }
8433 unsafe impl<
8434 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8435 T1: fidl::encoding::Encode<
8436 fidl::encoding::BoundedString<256>,
8437 fidl::encoding::DefaultFuchsiaResourceDialect,
8438 >,
8439 T2: fidl::encoding::Encode<
8440 fidl_fuchsia_mem::Buffer,
8441 fidl::encoding::DefaultFuchsiaResourceDialect,
8442 >,
8443 >
8444 fidl::encoding::Encode<
8445 DataSinkWriteFirmwareRequest,
8446 fidl::encoding::DefaultFuchsiaResourceDialect,
8447 > for (T0, T1, T2)
8448 {
8449 #[inline]
8450 unsafe fn encode(
8451 self,
8452 encoder: &mut fidl::encoding::Encoder<
8453 '_,
8454 fidl::encoding::DefaultFuchsiaResourceDialect,
8455 >,
8456 offset: usize,
8457 depth: fidl::encoding::Depth,
8458 ) -> fidl::Result<()> {
8459 encoder.debug_check_bounds::<DataSinkWriteFirmwareRequest>(offset);
8460 unsafe {
8463 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8464 (ptr as *mut u64).write_unaligned(0);
8465 }
8466 self.0.encode(encoder, offset + 0, depth)?;
8468 self.1.encode(encoder, offset + 8, depth)?;
8469 self.2.encode(encoder, offset + 24, depth)?;
8470 Ok(())
8471 }
8472 }
8473
8474 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8475 for DataSinkWriteFirmwareRequest
8476 {
8477 #[inline(always)]
8478 fn new_empty() -> Self {
8479 Self {
8480 configuration: fidl::new_empty!(
8481 Configuration,
8482 fidl::encoding::DefaultFuchsiaResourceDialect
8483 ),
8484 type_: fidl::new_empty!(
8485 fidl::encoding::BoundedString<256>,
8486 fidl::encoding::DefaultFuchsiaResourceDialect
8487 ),
8488 payload: fidl::new_empty!(
8489 fidl_fuchsia_mem::Buffer,
8490 fidl::encoding::DefaultFuchsiaResourceDialect
8491 ),
8492 }
8493 }
8494
8495 #[inline]
8496 unsafe fn decode(
8497 &mut self,
8498 decoder: &mut fidl::encoding::Decoder<
8499 '_,
8500 fidl::encoding::DefaultFuchsiaResourceDialect,
8501 >,
8502 offset: usize,
8503 _depth: fidl::encoding::Depth,
8504 ) -> fidl::Result<()> {
8505 decoder.debug_check_bounds::<Self>(offset);
8506 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8508 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8509 let mask = 0xffffffff00000000u64;
8510 let maskedval = padval & mask;
8511 if maskedval != 0 {
8512 return Err(fidl::Error::NonZeroPadding {
8513 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8514 });
8515 }
8516 fidl::decode!(
8517 Configuration,
8518 fidl::encoding::DefaultFuchsiaResourceDialect,
8519 &mut self.configuration,
8520 decoder,
8521 offset + 0,
8522 _depth
8523 )?;
8524 fidl::decode!(
8525 fidl::encoding::BoundedString<256>,
8526 fidl::encoding::DefaultFuchsiaResourceDialect,
8527 &mut self.type_,
8528 decoder,
8529 offset + 8,
8530 _depth
8531 )?;
8532 fidl::decode!(
8533 fidl_fuchsia_mem::Buffer,
8534 fidl::encoding::DefaultFuchsiaResourceDialect,
8535 &mut self.payload,
8536 decoder,
8537 offset + 24,
8538 _depth
8539 )?;
8540 Ok(())
8541 }
8542 }
8543
8544 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteOpaqueVolumeRequest {
8545 type Borrowed<'a> = &'a mut Self;
8546 fn take_or_borrow<'a>(
8547 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8548 ) -> Self::Borrowed<'a> {
8549 value
8550 }
8551 }
8552
8553 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteOpaqueVolumeRequest {
8554 type Owned = Self;
8555
8556 #[inline(always)]
8557 fn inline_align(_context: fidl::encoding::Context) -> usize {
8558 8
8559 }
8560
8561 #[inline(always)]
8562 fn inline_size(_context: fidl::encoding::Context) -> usize {
8563 16
8564 }
8565 }
8566
8567 unsafe impl
8568 fidl::encoding::Encode<
8569 DataSinkWriteOpaqueVolumeRequest,
8570 fidl::encoding::DefaultFuchsiaResourceDialect,
8571 > for &mut DataSinkWriteOpaqueVolumeRequest
8572 {
8573 #[inline]
8574 unsafe fn encode(
8575 self,
8576 encoder: &mut fidl::encoding::Encoder<
8577 '_,
8578 fidl::encoding::DefaultFuchsiaResourceDialect,
8579 >,
8580 offset: usize,
8581 _depth: fidl::encoding::Depth,
8582 ) -> fidl::Result<()> {
8583 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8584 fidl::encoding::Encode::<
8586 DataSinkWriteOpaqueVolumeRequest,
8587 fidl::encoding::DefaultFuchsiaResourceDialect,
8588 >::encode(
8589 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8590 &mut self.payload,
8591 ),),
8592 encoder,
8593 offset,
8594 _depth,
8595 )
8596 }
8597 }
8598 unsafe impl<
8599 T0: fidl::encoding::Encode<
8600 fidl_fuchsia_mem::Buffer,
8601 fidl::encoding::DefaultFuchsiaResourceDialect,
8602 >,
8603 >
8604 fidl::encoding::Encode<
8605 DataSinkWriteOpaqueVolumeRequest,
8606 fidl::encoding::DefaultFuchsiaResourceDialect,
8607 > for (T0,)
8608 {
8609 #[inline]
8610 unsafe fn encode(
8611 self,
8612 encoder: &mut fidl::encoding::Encoder<
8613 '_,
8614 fidl::encoding::DefaultFuchsiaResourceDialect,
8615 >,
8616 offset: usize,
8617 depth: fidl::encoding::Depth,
8618 ) -> fidl::Result<()> {
8619 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8620 self.0.encode(encoder, offset + 0, depth)?;
8624 Ok(())
8625 }
8626 }
8627
8628 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8629 for DataSinkWriteOpaqueVolumeRequest
8630 {
8631 #[inline(always)]
8632 fn new_empty() -> Self {
8633 Self {
8634 payload: fidl::new_empty!(
8635 fidl_fuchsia_mem::Buffer,
8636 fidl::encoding::DefaultFuchsiaResourceDialect
8637 ),
8638 }
8639 }
8640
8641 #[inline]
8642 unsafe fn decode(
8643 &mut self,
8644 decoder: &mut fidl::encoding::Decoder<
8645 '_,
8646 fidl::encoding::DefaultFuchsiaResourceDialect,
8647 >,
8648 offset: usize,
8649 _depth: fidl::encoding::Depth,
8650 ) -> fidl::Result<()> {
8651 decoder.debug_check_bounds::<Self>(offset);
8652 fidl::decode!(
8654 fidl_fuchsia_mem::Buffer,
8655 fidl::encoding::DefaultFuchsiaResourceDialect,
8656 &mut self.payload,
8657 decoder,
8658 offset + 0,
8659 _depth
8660 )?;
8661 Ok(())
8662 }
8663 }
8664
8665 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteSparseVolumeRequest {
8666 type Borrowed<'a> = &'a mut Self;
8667 fn take_or_borrow<'a>(
8668 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8669 ) -> Self::Borrowed<'a> {
8670 value
8671 }
8672 }
8673
8674 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteSparseVolumeRequest {
8675 type Owned = Self;
8676
8677 #[inline(always)]
8678 fn inline_align(_context: fidl::encoding::Context) -> usize {
8679 8
8680 }
8681
8682 #[inline(always)]
8683 fn inline_size(_context: fidl::encoding::Context) -> usize {
8684 16
8685 }
8686 }
8687
8688 unsafe impl
8689 fidl::encoding::Encode<
8690 DataSinkWriteSparseVolumeRequest,
8691 fidl::encoding::DefaultFuchsiaResourceDialect,
8692 > for &mut DataSinkWriteSparseVolumeRequest
8693 {
8694 #[inline]
8695 unsafe fn encode(
8696 self,
8697 encoder: &mut fidl::encoding::Encoder<
8698 '_,
8699 fidl::encoding::DefaultFuchsiaResourceDialect,
8700 >,
8701 offset: usize,
8702 _depth: fidl::encoding::Depth,
8703 ) -> fidl::Result<()> {
8704 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8705 fidl::encoding::Encode::<
8707 DataSinkWriteSparseVolumeRequest,
8708 fidl::encoding::DefaultFuchsiaResourceDialect,
8709 >::encode(
8710 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8711 &mut self.payload,
8712 ),),
8713 encoder,
8714 offset,
8715 _depth,
8716 )
8717 }
8718 }
8719 unsafe impl<
8720 T0: fidl::encoding::Encode<
8721 fidl_fuchsia_mem::Buffer,
8722 fidl::encoding::DefaultFuchsiaResourceDialect,
8723 >,
8724 >
8725 fidl::encoding::Encode<
8726 DataSinkWriteSparseVolumeRequest,
8727 fidl::encoding::DefaultFuchsiaResourceDialect,
8728 > for (T0,)
8729 {
8730 #[inline]
8731 unsafe fn encode(
8732 self,
8733 encoder: &mut fidl::encoding::Encoder<
8734 '_,
8735 fidl::encoding::DefaultFuchsiaResourceDialect,
8736 >,
8737 offset: usize,
8738 depth: fidl::encoding::Depth,
8739 ) -> fidl::Result<()> {
8740 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8741 self.0.encode(encoder, offset + 0, depth)?;
8745 Ok(())
8746 }
8747 }
8748
8749 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8750 for DataSinkWriteSparseVolumeRequest
8751 {
8752 #[inline(always)]
8753 fn new_empty() -> Self {
8754 Self {
8755 payload: fidl::new_empty!(
8756 fidl_fuchsia_mem::Buffer,
8757 fidl::encoding::DefaultFuchsiaResourceDialect
8758 ),
8759 }
8760 }
8761
8762 #[inline]
8763 unsafe fn decode(
8764 &mut self,
8765 decoder: &mut fidl::encoding::Decoder<
8766 '_,
8767 fidl::encoding::DefaultFuchsiaResourceDialect,
8768 >,
8769 offset: usize,
8770 _depth: fidl::encoding::Depth,
8771 ) -> fidl::Result<()> {
8772 decoder.debug_check_bounds::<Self>(offset);
8773 fidl::decode!(
8775 fidl_fuchsia_mem::Buffer,
8776 fidl::encoding::DefaultFuchsiaResourceDialect,
8777 &mut self.payload,
8778 decoder,
8779 offset + 0,
8780 _depth
8781 )?;
8782 Ok(())
8783 }
8784 }
8785
8786 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteVolumesRequest {
8787 type Borrowed<'a> = &'a mut Self;
8788 fn take_or_borrow<'a>(
8789 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8790 ) -> Self::Borrowed<'a> {
8791 value
8792 }
8793 }
8794
8795 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteVolumesRequest {
8796 type Owned = Self;
8797
8798 #[inline(always)]
8799 fn inline_align(_context: fidl::encoding::Context) -> usize {
8800 4
8801 }
8802
8803 #[inline(always)]
8804 fn inline_size(_context: fidl::encoding::Context) -> usize {
8805 4
8806 }
8807 }
8808
8809 unsafe impl
8810 fidl::encoding::Encode<
8811 DataSinkWriteVolumesRequest,
8812 fidl::encoding::DefaultFuchsiaResourceDialect,
8813 > for &mut DataSinkWriteVolumesRequest
8814 {
8815 #[inline]
8816 unsafe fn encode(
8817 self,
8818 encoder: &mut fidl::encoding::Encoder<
8819 '_,
8820 fidl::encoding::DefaultFuchsiaResourceDialect,
8821 >,
8822 offset: usize,
8823 _depth: fidl::encoding::Depth,
8824 ) -> fidl::Result<()> {
8825 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8826 fidl::encoding::Encode::<DataSinkWriteVolumesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8828 (
8829 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8830 ),
8831 encoder, offset, _depth
8832 )
8833 }
8834 }
8835 unsafe impl<
8836 T0: fidl::encoding::Encode<
8837 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8838 fidl::encoding::DefaultFuchsiaResourceDialect,
8839 >,
8840 >
8841 fidl::encoding::Encode<
8842 DataSinkWriteVolumesRequest,
8843 fidl::encoding::DefaultFuchsiaResourceDialect,
8844 > for (T0,)
8845 {
8846 #[inline]
8847 unsafe fn encode(
8848 self,
8849 encoder: &mut fidl::encoding::Encoder<
8850 '_,
8851 fidl::encoding::DefaultFuchsiaResourceDialect,
8852 >,
8853 offset: usize,
8854 depth: fidl::encoding::Depth,
8855 ) -> fidl::Result<()> {
8856 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8857 self.0.encode(encoder, offset + 0, depth)?;
8861 Ok(())
8862 }
8863 }
8864
8865 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8866 for DataSinkWriteVolumesRequest
8867 {
8868 #[inline(always)]
8869 fn new_empty() -> Self {
8870 Self {
8871 payload: fidl::new_empty!(
8872 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8873 fidl::encoding::DefaultFuchsiaResourceDialect
8874 ),
8875 }
8876 }
8877
8878 #[inline]
8879 unsafe fn decode(
8880 &mut self,
8881 decoder: &mut fidl::encoding::Decoder<
8882 '_,
8883 fidl::encoding::DefaultFuchsiaResourceDialect,
8884 >,
8885 offset: usize,
8886 _depth: fidl::encoding::Depth,
8887 ) -> fidl::Result<()> {
8888 decoder.debug_check_bounds::<Self>(offset);
8889 fidl::decode!(
8891 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8892 fidl::encoding::DefaultFuchsiaResourceDialect,
8893 &mut self.payload,
8894 decoder,
8895 offset + 0,
8896 _depth
8897 )?;
8898 Ok(())
8899 }
8900 }
8901
8902 impl fidl::encoding::ResourceTypeMarker for DataSinkReadAssetResponse {
8903 type Borrowed<'a> = &'a mut Self;
8904 fn take_or_borrow<'a>(
8905 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8906 ) -> Self::Borrowed<'a> {
8907 value
8908 }
8909 }
8910
8911 unsafe impl fidl::encoding::TypeMarker for DataSinkReadAssetResponse {
8912 type Owned = Self;
8913
8914 #[inline(always)]
8915 fn inline_align(_context: fidl::encoding::Context) -> usize {
8916 8
8917 }
8918
8919 #[inline(always)]
8920 fn inline_size(_context: fidl::encoding::Context) -> usize {
8921 16
8922 }
8923 }
8924
8925 unsafe impl
8926 fidl::encoding::Encode<
8927 DataSinkReadAssetResponse,
8928 fidl::encoding::DefaultFuchsiaResourceDialect,
8929 > for &mut DataSinkReadAssetResponse
8930 {
8931 #[inline]
8932 unsafe fn encode(
8933 self,
8934 encoder: &mut fidl::encoding::Encoder<
8935 '_,
8936 fidl::encoding::DefaultFuchsiaResourceDialect,
8937 >,
8938 offset: usize,
8939 _depth: fidl::encoding::Depth,
8940 ) -> fidl::Result<()> {
8941 encoder.debug_check_bounds::<DataSinkReadAssetResponse>(offset);
8942 fidl::encoding::Encode::<
8944 DataSinkReadAssetResponse,
8945 fidl::encoding::DefaultFuchsiaResourceDialect,
8946 >::encode(
8947 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8948 &mut self.asset,
8949 ),),
8950 encoder,
8951 offset,
8952 _depth,
8953 )
8954 }
8955 }
8956 unsafe impl<
8957 T0: fidl::encoding::Encode<
8958 fidl_fuchsia_mem::Buffer,
8959 fidl::encoding::DefaultFuchsiaResourceDialect,
8960 >,
8961 >
8962 fidl::encoding::Encode<
8963 DataSinkReadAssetResponse,
8964 fidl::encoding::DefaultFuchsiaResourceDialect,
8965 > for (T0,)
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::<DataSinkReadAssetResponse>(offset);
8978 self.0.encode(encoder, offset + 0, depth)?;
8982 Ok(())
8983 }
8984 }
8985
8986 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8987 for DataSinkReadAssetResponse
8988 {
8989 #[inline(always)]
8990 fn new_empty() -> Self {
8991 Self {
8992 asset: fidl::new_empty!(
8993 fidl_fuchsia_mem::Buffer,
8994 fidl::encoding::DefaultFuchsiaResourceDialect
8995 ),
8996 }
8997 }
8998
8999 #[inline]
9000 unsafe fn decode(
9001 &mut self,
9002 decoder: &mut fidl::encoding::Decoder<
9003 '_,
9004 fidl::encoding::DefaultFuchsiaResourceDialect,
9005 >,
9006 offset: usize,
9007 _depth: fidl::encoding::Depth,
9008 ) -> fidl::Result<()> {
9009 decoder.debug_check_bounds::<Self>(offset);
9010 fidl::decode!(
9012 fidl_fuchsia_mem::Buffer,
9013 fidl::encoding::DefaultFuchsiaResourceDialect,
9014 &mut self.asset,
9015 decoder,
9016 offset + 0,
9017 _depth
9018 )?;
9019 Ok(())
9020 }
9021 }
9022
9023 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareResponse {
9024 type Borrowed<'a> = &'a mut Self;
9025 fn take_or_borrow<'a>(
9026 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9027 ) -> Self::Borrowed<'a> {
9028 value
9029 }
9030 }
9031
9032 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareResponse {
9033 type Owned = Self;
9034
9035 #[inline(always)]
9036 fn inline_align(_context: fidl::encoding::Context) -> usize {
9037 8
9038 }
9039
9040 #[inline(always)]
9041 fn inline_size(_context: fidl::encoding::Context) -> usize {
9042 16
9043 }
9044 }
9045
9046 unsafe impl
9047 fidl::encoding::Encode<
9048 DataSinkReadFirmwareResponse,
9049 fidl::encoding::DefaultFuchsiaResourceDialect,
9050 > for &mut DataSinkReadFirmwareResponse
9051 {
9052 #[inline]
9053 unsafe fn encode(
9054 self,
9055 encoder: &mut fidl::encoding::Encoder<
9056 '_,
9057 fidl::encoding::DefaultFuchsiaResourceDialect,
9058 >,
9059 offset: usize,
9060 _depth: fidl::encoding::Depth,
9061 ) -> fidl::Result<()> {
9062 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9063 fidl::encoding::Encode::<
9065 DataSinkReadFirmwareResponse,
9066 fidl::encoding::DefaultFuchsiaResourceDialect,
9067 >::encode(
9068 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9069 &mut self.firmware,
9070 ),),
9071 encoder,
9072 offset,
9073 _depth,
9074 )
9075 }
9076 }
9077 unsafe impl<
9078 T0: fidl::encoding::Encode<
9079 fidl_fuchsia_mem::Buffer,
9080 fidl::encoding::DefaultFuchsiaResourceDialect,
9081 >,
9082 >
9083 fidl::encoding::Encode<
9084 DataSinkReadFirmwareResponse,
9085 fidl::encoding::DefaultFuchsiaResourceDialect,
9086 > for (T0,)
9087 {
9088 #[inline]
9089 unsafe fn encode(
9090 self,
9091 encoder: &mut fidl::encoding::Encoder<
9092 '_,
9093 fidl::encoding::DefaultFuchsiaResourceDialect,
9094 >,
9095 offset: usize,
9096 depth: fidl::encoding::Depth,
9097 ) -> fidl::Result<()> {
9098 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9099 self.0.encode(encoder, offset + 0, depth)?;
9103 Ok(())
9104 }
9105 }
9106
9107 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9108 for DataSinkReadFirmwareResponse
9109 {
9110 #[inline(always)]
9111 fn new_empty() -> Self {
9112 Self {
9113 firmware: fidl::new_empty!(
9114 fidl_fuchsia_mem::Buffer,
9115 fidl::encoding::DefaultFuchsiaResourceDialect
9116 ),
9117 }
9118 }
9119
9120 #[inline]
9121 unsafe fn decode(
9122 &mut self,
9123 decoder: &mut fidl::encoding::Decoder<
9124 '_,
9125 fidl::encoding::DefaultFuchsiaResourceDialect,
9126 >,
9127 offset: usize,
9128 _depth: fidl::encoding::Depth,
9129 ) -> fidl::Result<()> {
9130 decoder.debug_check_bounds::<Self>(offset);
9131 fidl::decode!(
9133 fidl_fuchsia_mem::Buffer,
9134 fidl::encoding::DefaultFuchsiaResourceDialect,
9135 &mut self.firmware,
9136 decoder,
9137 offset + 0,
9138 _depth
9139 )?;
9140 Ok(())
9141 }
9142 }
9143
9144 impl fidl::encoding::ResourceTypeMarker for PaverFindBootManagerRequest {
9145 type Borrowed<'a> = &'a mut Self;
9146 fn take_or_borrow<'a>(
9147 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9148 ) -> Self::Borrowed<'a> {
9149 value
9150 }
9151 }
9152
9153 unsafe impl fidl::encoding::TypeMarker for PaverFindBootManagerRequest {
9154 type Owned = Self;
9155
9156 #[inline(always)]
9157 fn inline_align(_context: fidl::encoding::Context) -> usize {
9158 4
9159 }
9160
9161 #[inline(always)]
9162 fn inline_size(_context: fidl::encoding::Context) -> usize {
9163 4
9164 }
9165 }
9166
9167 unsafe impl
9168 fidl::encoding::Encode<
9169 PaverFindBootManagerRequest,
9170 fidl::encoding::DefaultFuchsiaResourceDialect,
9171 > for &mut PaverFindBootManagerRequest
9172 {
9173 #[inline]
9174 unsafe fn encode(
9175 self,
9176 encoder: &mut fidl::encoding::Encoder<
9177 '_,
9178 fidl::encoding::DefaultFuchsiaResourceDialect,
9179 >,
9180 offset: usize,
9181 _depth: fidl::encoding::Depth,
9182 ) -> fidl::Result<()> {
9183 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9184 fidl::encoding::Encode::<PaverFindBootManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9186 (
9187 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.boot_manager),
9188 ),
9189 encoder, offset, _depth
9190 )
9191 }
9192 }
9193 unsafe impl<
9194 T0: fidl::encoding::Encode<
9195 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9196 fidl::encoding::DefaultFuchsiaResourceDialect,
9197 >,
9198 >
9199 fidl::encoding::Encode<
9200 PaverFindBootManagerRequest,
9201 fidl::encoding::DefaultFuchsiaResourceDialect,
9202 > for (T0,)
9203 {
9204 #[inline]
9205 unsafe fn encode(
9206 self,
9207 encoder: &mut fidl::encoding::Encoder<
9208 '_,
9209 fidl::encoding::DefaultFuchsiaResourceDialect,
9210 >,
9211 offset: usize,
9212 depth: fidl::encoding::Depth,
9213 ) -> fidl::Result<()> {
9214 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9215 self.0.encode(encoder, offset + 0, depth)?;
9219 Ok(())
9220 }
9221 }
9222
9223 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9224 for PaverFindBootManagerRequest
9225 {
9226 #[inline(always)]
9227 fn new_empty() -> Self {
9228 Self {
9229 boot_manager: fidl::new_empty!(
9230 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9231 fidl::encoding::DefaultFuchsiaResourceDialect
9232 ),
9233 }
9234 }
9235
9236 #[inline]
9237 unsafe fn decode(
9238 &mut self,
9239 decoder: &mut fidl::encoding::Decoder<
9240 '_,
9241 fidl::encoding::DefaultFuchsiaResourceDialect,
9242 >,
9243 offset: usize,
9244 _depth: fidl::encoding::Depth,
9245 ) -> fidl::Result<()> {
9246 decoder.debug_check_bounds::<Self>(offset);
9247 fidl::decode!(
9249 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9250 fidl::encoding::DefaultFuchsiaResourceDialect,
9251 &mut self.boot_manager,
9252 decoder,
9253 offset + 0,
9254 _depth
9255 )?;
9256 Ok(())
9257 }
9258 }
9259
9260 impl fidl::encoding::ResourceTypeMarker for PaverFindDataSinkRequest {
9261 type Borrowed<'a> = &'a mut Self;
9262 fn take_or_borrow<'a>(
9263 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9264 ) -> Self::Borrowed<'a> {
9265 value
9266 }
9267 }
9268
9269 unsafe impl fidl::encoding::TypeMarker for PaverFindDataSinkRequest {
9270 type Owned = Self;
9271
9272 #[inline(always)]
9273 fn inline_align(_context: fidl::encoding::Context) -> usize {
9274 4
9275 }
9276
9277 #[inline(always)]
9278 fn inline_size(_context: fidl::encoding::Context) -> usize {
9279 4
9280 }
9281 }
9282
9283 unsafe impl
9284 fidl::encoding::Encode<
9285 PaverFindDataSinkRequest,
9286 fidl::encoding::DefaultFuchsiaResourceDialect,
9287 > for &mut PaverFindDataSinkRequest
9288 {
9289 #[inline]
9290 unsafe fn encode(
9291 self,
9292 encoder: &mut fidl::encoding::Encoder<
9293 '_,
9294 fidl::encoding::DefaultFuchsiaResourceDialect,
9295 >,
9296 offset: usize,
9297 _depth: fidl::encoding::Depth,
9298 ) -> fidl::Result<()> {
9299 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9300 fidl::encoding::Encode::<PaverFindDataSinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9302 (
9303 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9304 ),
9305 encoder, offset, _depth
9306 )
9307 }
9308 }
9309 unsafe impl<
9310 T0: fidl::encoding::Encode<
9311 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9312 fidl::encoding::DefaultFuchsiaResourceDialect,
9313 >,
9314 >
9315 fidl::encoding::Encode<
9316 PaverFindDataSinkRequest,
9317 fidl::encoding::DefaultFuchsiaResourceDialect,
9318 > for (T0,)
9319 {
9320 #[inline]
9321 unsafe fn encode(
9322 self,
9323 encoder: &mut fidl::encoding::Encoder<
9324 '_,
9325 fidl::encoding::DefaultFuchsiaResourceDialect,
9326 >,
9327 offset: usize,
9328 depth: fidl::encoding::Depth,
9329 ) -> fidl::Result<()> {
9330 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9331 self.0.encode(encoder, offset + 0, depth)?;
9335 Ok(())
9336 }
9337 }
9338
9339 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9340 for PaverFindDataSinkRequest
9341 {
9342 #[inline(always)]
9343 fn new_empty() -> Self {
9344 Self {
9345 data_sink: fidl::new_empty!(
9346 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9347 fidl::encoding::DefaultFuchsiaResourceDialect
9348 ),
9349 }
9350 }
9351
9352 #[inline]
9353 unsafe fn decode(
9354 &mut self,
9355 decoder: &mut fidl::encoding::Decoder<
9356 '_,
9357 fidl::encoding::DefaultFuchsiaResourceDialect,
9358 >,
9359 offset: usize,
9360 _depth: fidl::encoding::Depth,
9361 ) -> fidl::Result<()> {
9362 decoder.debug_check_bounds::<Self>(offset);
9363 fidl::decode!(
9365 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9366 fidl::encoding::DefaultFuchsiaResourceDialect,
9367 &mut self.data_sink,
9368 decoder,
9369 offset + 0,
9370 _depth
9371 )?;
9372 Ok(())
9373 }
9374 }
9375
9376 impl fidl::encoding::ResourceTypeMarker for PaverFindPartitionTableManagerRequest {
9377 type Borrowed<'a> = &'a mut Self;
9378 fn take_or_borrow<'a>(
9379 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9380 ) -> Self::Borrowed<'a> {
9381 value
9382 }
9383 }
9384
9385 unsafe impl fidl::encoding::TypeMarker for PaverFindPartitionTableManagerRequest {
9386 type Owned = Self;
9387
9388 #[inline(always)]
9389 fn inline_align(_context: fidl::encoding::Context) -> usize {
9390 4
9391 }
9392
9393 #[inline(always)]
9394 fn inline_size(_context: fidl::encoding::Context) -> usize {
9395 4
9396 }
9397 }
9398
9399 unsafe impl
9400 fidl::encoding::Encode<
9401 PaverFindPartitionTableManagerRequest,
9402 fidl::encoding::DefaultFuchsiaResourceDialect,
9403 > for &mut PaverFindPartitionTableManagerRequest
9404 {
9405 #[inline]
9406 unsafe fn encode(
9407 self,
9408 encoder: &mut fidl::encoding::Encoder<
9409 '_,
9410 fidl::encoding::DefaultFuchsiaResourceDialect,
9411 >,
9412 offset: usize,
9413 _depth: fidl::encoding::Depth,
9414 ) -> fidl::Result<()> {
9415 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9416 fidl::encoding::Encode::<PaverFindPartitionTableManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9418 (
9419 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9420 ),
9421 encoder, offset, _depth
9422 )
9423 }
9424 }
9425 unsafe impl<
9426 T0: fidl::encoding::Encode<
9427 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9428 fidl::encoding::DefaultFuchsiaResourceDialect,
9429 >,
9430 >
9431 fidl::encoding::Encode<
9432 PaverFindPartitionTableManagerRequest,
9433 fidl::encoding::DefaultFuchsiaResourceDialect,
9434 > for (T0,)
9435 {
9436 #[inline]
9437 unsafe fn encode(
9438 self,
9439 encoder: &mut fidl::encoding::Encoder<
9440 '_,
9441 fidl::encoding::DefaultFuchsiaResourceDialect,
9442 >,
9443 offset: usize,
9444 depth: fidl::encoding::Depth,
9445 ) -> fidl::Result<()> {
9446 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9447 self.0.encode(encoder, offset + 0, depth)?;
9451 Ok(())
9452 }
9453 }
9454
9455 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9456 for PaverFindPartitionTableManagerRequest
9457 {
9458 #[inline(always)]
9459 fn new_empty() -> Self {
9460 Self {
9461 data_sink: fidl::new_empty!(
9462 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9463 fidl::encoding::DefaultFuchsiaResourceDialect
9464 ),
9465 }
9466 }
9467
9468 #[inline]
9469 unsafe fn decode(
9470 &mut self,
9471 decoder: &mut fidl::encoding::Decoder<
9472 '_,
9473 fidl::encoding::DefaultFuchsiaResourceDialect,
9474 >,
9475 offset: usize,
9476 _depth: fidl::encoding::Depth,
9477 ) -> fidl::Result<()> {
9478 decoder.debug_check_bounds::<Self>(offset);
9479 fidl::decode!(
9481 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9482 fidl::encoding::DefaultFuchsiaResourceDialect,
9483 &mut self.data_sink,
9484 decoder,
9485 offset + 0,
9486 _depth
9487 )?;
9488 Ok(())
9489 }
9490 }
9491
9492 impl fidl::encoding::ResourceTypeMarker for PaverFindSysconfigRequest {
9493 type Borrowed<'a> = &'a mut Self;
9494 fn take_or_borrow<'a>(
9495 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9496 ) -> Self::Borrowed<'a> {
9497 value
9498 }
9499 }
9500
9501 unsafe impl fidl::encoding::TypeMarker for PaverFindSysconfigRequest {
9502 type Owned = Self;
9503
9504 #[inline(always)]
9505 fn inline_align(_context: fidl::encoding::Context) -> usize {
9506 4
9507 }
9508
9509 #[inline(always)]
9510 fn inline_size(_context: fidl::encoding::Context) -> usize {
9511 4
9512 }
9513 }
9514
9515 unsafe impl
9516 fidl::encoding::Encode<
9517 PaverFindSysconfigRequest,
9518 fidl::encoding::DefaultFuchsiaResourceDialect,
9519 > for &mut PaverFindSysconfigRequest
9520 {
9521 #[inline]
9522 unsafe fn encode(
9523 self,
9524 encoder: &mut fidl::encoding::Encoder<
9525 '_,
9526 fidl::encoding::DefaultFuchsiaResourceDialect,
9527 >,
9528 offset: usize,
9529 _depth: fidl::encoding::Depth,
9530 ) -> fidl::Result<()> {
9531 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9532 fidl::encoding::Encode::<PaverFindSysconfigRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9534 (
9535 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sysconfig),
9536 ),
9537 encoder, offset, _depth
9538 )
9539 }
9540 }
9541 unsafe impl<
9542 T0: fidl::encoding::Encode<
9543 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9544 fidl::encoding::DefaultFuchsiaResourceDialect,
9545 >,
9546 >
9547 fidl::encoding::Encode<
9548 PaverFindSysconfigRequest,
9549 fidl::encoding::DefaultFuchsiaResourceDialect,
9550 > for (T0,)
9551 {
9552 #[inline]
9553 unsafe fn encode(
9554 self,
9555 encoder: &mut fidl::encoding::Encoder<
9556 '_,
9557 fidl::encoding::DefaultFuchsiaResourceDialect,
9558 >,
9559 offset: usize,
9560 depth: fidl::encoding::Depth,
9561 ) -> fidl::Result<()> {
9562 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9563 self.0.encode(encoder, offset + 0, depth)?;
9567 Ok(())
9568 }
9569 }
9570
9571 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9572 for PaverFindSysconfigRequest
9573 {
9574 #[inline(always)]
9575 fn new_empty() -> Self {
9576 Self {
9577 sysconfig: fidl::new_empty!(
9578 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9579 fidl::encoding::DefaultFuchsiaResourceDialect
9580 ),
9581 }
9582 }
9583
9584 #[inline]
9585 unsafe fn decode(
9586 &mut self,
9587 decoder: &mut fidl::encoding::Decoder<
9588 '_,
9589 fidl::encoding::DefaultFuchsiaResourceDialect,
9590 >,
9591 offset: usize,
9592 _depth: fidl::encoding::Depth,
9593 ) -> fidl::Result<()> {
9594 decoder.debug_check_bounds::<Self>(offset);
9595 fidl::decode!(
9597 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9598 fidl::encoding::DefaultFuchsiaResourceDialect,
9599 &mut self.sysconfig,
9600 decoder,
9601 offset + 0,
9602 _depth
9603 )?;
9604 Ok(())
9605 }
9606 }
9607
9608 impl fidl::encoding::ResourceTypeMarker for PayloadStreamRegisterVmoRequest {
9609 type Borrowed<'a> = &'a mut Self;
9610 fn take_or_borrow<'a>(
9611 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9612 ) -> Self::Borrowed<'a> {
9613 value
9614 }
9615 }
9616
9617 unsafe impl fidl::encoding::TypeMarker for PayloadStreamRegisterVmoRequest {
9618 type Owned = Self;
9619
9620 #[inline(always)]
9621 fn inline_align(_context: fidl::encoding::Context) -> usize {
9622 4
9623 }
9624
9625 #[inline(always)]
9626 fn inline_size(_context: fidl::encoding::Context) -> usize {
9627 4
9628 }
9629 }
9630
9631 unsafe impl
9632 fidl::encoding::Encode<
9633 PayloadStreamRegisterVmoRequest,
9634 fidl::encoding::DefaultFuchsiaResourceDialect,
9635 > for &mut PayloadStreamRegisterVmoRequest
9636 {
9637 #[inline]
9638 unsafe fn encode(
9639 self,
9640 encoder: &mut fidl::encoding::Encoder<
9641 '_,
9642 fidl::encoding::DefaultFuchsiaResourceDialect,
9643 >,
9644 offset: usize,
9645 _depth: fidl::encoding::Depth,
9646 ) -> fidl::Result<()> {
9647 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9648 fidl::encoding::Encode::<
9650 PayloadStreamRegisterVmoRequest,
9651 fidl::encoding::DefaultFuchsiaResourceDialect,
9652 >::encode(
9653 (<fidl::encoding::HandleType<
9654 fidl::Vmo,
9655 { fidl::ObjectType::VMO.into_raw() },
9656 2147483648,
9657 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9658 &mut self.vmo
9659 ),),
9660 encoder,
9661 offset,
9662 _depth,
9663 )
9664 }
9665 }
9666 unsafe impl<
9667 T0: fidl::encoding::Encode<
9668 fidl::encoding::HandleType<
9669 fidl::Vmo,
9670 { fidl::ObjectType::VMO.into_raw() },
9671 2147483648,
9672 >,
9673 fidl::encoding::DefaultFuchsiaResourceDialect,
9674 >,
9675 >
9676 fidl::encoding::Encode<
9677 PayloadStreamRegisterVmoRequest,
9678 fidl::encoding::DefaultFuchsiaResourceDialect,
9679 > for (T0,)
9680 {
9681 #[inline]
9682 unsafe fn encode(
9683 self,
9684 encoder: &mut fidl::encoding::Encoder<
9685 '_,
9686 fidl::encoding::DefaultFuchsiaResourceDialect,
9687 >,
9688 offset: usize,
9689 depth: fidl::encoding::Depth,
9690 ) -> fidl::Result<()> {
9691 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9692 self.0.encode(encoder, offset + 0, depth)?;
9696 Ok(())
9697 }
9698 }
9699
9700 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9701 for PayloadStreamRegisterVmoRequest
9702 {
9703 #[inline(always)]
9704 fn new_empty() -> Self {
9705 Self {
9706 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
9707 }
9708 }
9709
9710 #[inline]
9711 unsafe fn decode(
9712 &mut self,
9713 decoder: &mut fidl::encoding::Decoder<
9714 '_,
9715 fidl::encoding::DefaultFuchsiaResourceDialect,
9716 >,
9717 offset: usize,
9718 _depth: fidl::encoding::Depth,
9719 ) -> fidl::Result<()> {
9720 decoder.debug_check_bounds::<Self>(offset);
9721 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
9723 Ok(())
9724 }
9725 }
9726
9727 impl fidl::encoding::ResourceTypeMarker for SysconfigWriteRequest {
9728 type Borrowed<'a> = &'a mut Self;
9729 fn take_or_borrow<'a>(
9730 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9731 ) -> Self::Borrowed<'a> {
9732 value
9733 }
9734 }
9735
9736 unsafe impl fidl::encoding::TypeMarker for SysconfigWriteRequest {
9737 type Owned = Self;
9738
9739 #[inline(always)]
9740 fn inline_align(_context: fidl::encoding::Context) -> usize {
9741 8
9742 }
9743
9744 #[inline(always)]
9745 fn inline_size(_context: fidl::encoding::Context) -> usize {
9746 16
9747 }
9748 }
9749
9750 unsafe impl
9751 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9752 for &mut SysconfigWriteRequest
9753 {
9754 #[inline]
9755 unsafe fn encode(
9756 self,
9757 encoder: &mut fidl::encoding::Encoder<
9758 '_,
9759 fidl::encoding::DefaultFuchsiaResourceDialect,
9760 >,
9761 offset: usize,
9762 _depth: fidl::encoding::Depth,
9763 ) -> fidl::Result<()> {
9764 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9765 fidl::encoding::Encode::<
9767 SysconfigWriteRequest,
9768 fidl::encoding::DefaultFuchsiaResourceDialect,
9769 >::encode(
9770 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9771 &mut self.payload,
9772 ),),
9773 encoder,
9774 offset,
9775 _depth,
9776 )
9777 }
9778 }
9779 unsafe impl<
9780 T0: fidl::encoding::Encode<
9781 fidl_fuchsia_mem::Buffer,
9782 fidl::encoding::DefaultFuchsiaResourceDialect,
9783 >,
9784 >
9785 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9786 for (T0,)
9787 {
9788 #[inline]
9789 unsafe fn encode(
9790 self,
9791 encoder: &mut fidl::encoding::Encoder<
9792 '_,
9793 fidl::encoding::DefaultFuchsiaResourceDialect,
9794 >,
9795 offset: usize,
9796 depth: fidl::encoding::Depth,
9797 ) -> fidl::Result<()> {
9798 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9799 self.0.encode(encoder, offset + 0, depth)?;
9803 Ok(())
9804 }
9805 }
9806
9807 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9808 for SysconfigWriteRequest
9809 {
9810 #[inline(always)]
9811 fn new_empty() -> Self {
9812 Self {
9813 payload: fidl::new_empty!(
9814 fidl_fuchsia_mem::Buffer,
9815 fidl::encoding::DefaultFuchsiaResourceDialect
9816 ),
9817 }
9818 }
9819
9820 #[inline]
9821 unsafe fn decode(
9822 &mut self,
9823 decoder: &mut fidl::encoding::Decoder<
9824 '_,
9825 fidl::encoding::DefaultFuchsiaResourceDialect,
9826 >,
9827 offset: usize,
9828 _depth: fidl::encoding::Depth,
9829 ) -> fidl::Result<()> {
9830 decoder.debug_check_bounds::<Self>(offset);
9831 fidl::decode!(
9833 fidl_fuchsia_mem::Buffer,
9834 fidl::encoding::DefaultFuchsiaResourceDialect,
9835 &mut self.payload,
9836 decoder,
9837 offset + 0,
9838 _depth
9839 )?;
9840 Ok(())
9841 }
9842 }
9843
9844 impl fidl::encoding::ResourceTypeMarker for SysconfigReadResponse {
9845 type Borrowed<'a> = &'a mut Self;
9846 fn take_or_borrow<'a>(
9847 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9848 ) -> Self::Borrowed<'a> {
9849 value
9850 }
9851 }
9852
9853 unsafe impl fidl::encoding::TypeMarker for SysconfigReadResponse {
9854 type Owned = Self;
9855
9856 #[inline(always)]
9857 fn inline_align(_context: fidl::encoding::Context) -> usize {
9858 8
9859 }
9860
9861 #[inline(always)]
9862 fn inline_size(_context: fidl::encoding::Context) -> usize {
9863 16
9864 }
9865 }
9866
9867 unsafe impl
9868 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
9869 for &mut SysconfigReadResponse
9870 {
9871 #[inline]
9872 unsafe fn encode(
9873 self,
9874 encoder: &mut fidl::encoding::Encoder<
9875 '_,
9876 fidl::encoding::DefaultFuchsiaResourceDialect,
9877 >,
9878 offset: usize,
9879 _depth: fidl::encoding::Depth,
9880 ) -> fidl::Result<()> {
9881 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
9882 fidl::encoding::Encode::<
9884 SysconfigReadResponse,
9885 fidl::encoding::DefaultFuchsiaResourceDialect,
9886 >::encode(
9887 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9888 &mut self.data,
9889 ),),
9890 encoder,
9891 offset,
9892 _depth,
9893 )
9894 }
9895 }
9896 unsafe impl<
9897 T0: fidl::encoding::Encode<
9898 fidl_fuchsia_mem::Buffer,
9899 fidl::encoding::DefaultFuchsiaResourceDialect,
9900 >,
9901 >
9902 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
9903 for (T0,)
9904 {
9905 #[inline]
9906 unsafe fn encode(
9907 self,
9908 encoder: &mut fidl::encoding::Encoder<
9909 '_,
9910 fidl::encoding::DefaultFuchsiaResourceDialect,
9911 >,
9912 offset: usize,
9913 depth: fidl::encoding::Depth,
9914 ) -> fidl::Result<()> {
9915 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
9916 self.0.encode(encoder, offset + 0, depth)?;
9920 Ok(())
9921 }
9922 }
9923
9924 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9925 for SysconfigReadResponse
9926 {
9927 #[inline(always)]
9928 fn new_empty() -> Self {
9929 Self {
9930 data: fidl::new_empty!(
9931 fidl_fuchsia_mem::Buffer,
9932 fidl::encoding::DefaultFuchsiaResourceDialect
9933 ),
9934 }
9935 }
9936
9937 #[inline]
9938 unsafe fn decode(
9939 &mut self,
9940 decoder: &mut fidl::encoding::Decoder<
9941 '_,
9942 fidl::encoding::DefaultFuchsiaResourceDialect,
9943 >,
9944 offset: usize,
9945 _depth: fidl::encoding::Depth,
9946 ) -> fidl::Result<()> {
9947 decoder.debug_check_bounds::<Self>(offset);
9948 fidl::decode!(
9950 fidl_fuchsia_mem::Buffer,
9951 fidl::encoding::DefaultFuchsiaResourceDialect,
9952 &mut self.data,
9953 decoder,
9954 offset + 0,
9955 _depth
9956 )?;
9957 Ok(())
9958 }
9959 }
9960}