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#[cfg(target_os = "fuchsia")]
512impl From<BootManagerSynchronousProxy> for zx::NullableHandle {
513 fn from(value: BootManagerSynchronousProxy) -> Self {
514 value.into_channel().into()
515 }
516}
517
518#[cfg(target_os = "fuchsia")]
519impl From<fidl::Channel> for BootManagerSynchronousProxy {
520 fn from(value: fidl::Channel) -> Self {
521 Self::new(value)
522 }
523}
524
525#[cfg(target_os = "fuchsia")]
526impl fidl::endpoints::FromClient for BootManagerSynchronousProxy {
527 type Protocol = BootManagerMarker;
528
529 fn from_client(value: fidl::endpoints::ClientEnd<BootManagerMarker>) -> Self {
530 Self::new(value.into_channel())
531 }
532}
533
534#[derive(Debug, Clone)]
535pub struct BootManagerProxy {
536 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
537}
538
539impl fidl::endpoints::Proxy for BootManagerProxy {
540 type Protocol = BootManagerMarker;
541
542 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
543 Self::new(inner)
544 }
545
546 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
547 self.client.into_channel().map_err(|client| Self { client })
548 }
549
550 fn as_channel(&self) -> &::fidl::AsyncChannel {
551 self.client.as_channel()
552 }
553}
554
555impl BootManagerProxy {
556 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
558 let protocol_name = <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
559 Self { client: fidl::client::Client::new(channel, protocol_name) }
560 }
561
562 pub fn take_event_stream(&self) -> BootManagerEventStream {
568 BootManagerEventStream { event_receiver: self.client.take_event_receiver() }
569 }
570
571 pub fn r#query_current_configuration(
576 &self,
577 ) -> fidl::client::QueryResponseFut<
578 BootManagerQueryCurrentConfigurationResult,
579 fidl::encoding::DefaultFuchsiaResourceDialect,
580 > {
581 BootManagerProxyInterface::r#query_current_configuration(self)
582 }
583
584 pub fn r#query_active_configuration(
590 &self,
591 ) -> fidl::client::QueryResponseFut<
592 BootManagerQueryActiveConfigurationResult,
593 fidl::encoding::DefaultFuchsiaResourceDialect,
594 > {
595 BootManagerProxyInterface::r#query_active_configuration(self)
596 }
597
598 pub fn r#query_configuration_last_set_active(
607 &self,
608 ) -> fidl::client::QueryResponseFut<
609 BootManagerQueryConfigurationLastSetActiveResult,
610 fidl::encoding::DefaultFuchsiaResourceDialect,
611 > {
612 BootManagerProxyInterface::r#query_configuration_last_set_active(self)
613 }
614
615 pub fn r#query_configuration_status(
619 &self,
620 mut configuration: Configuration,
621 ) -> fidl::client::QueryResponseFut<
622 BootManagerQueryConfigurationStatusResult,
623 fidl::encoding::DefaultFuchsiaResourceDialect,
624 > {
625 BootManagerProxyInterface::r#query_configuration_status(self, configuration)
626 }
627
628 pub fn r#query_configuration_status_and_boot_attempts(
648 &self,
649 mut configuration: Configuration,
650 ) -> fidl::client::QueryResponseFut<
651 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
652 fidl::encoding::DefaultFuchsiaResourceDialect,
653 > {
654 BootManagerProxyInterface::r#query_configuration_status_and_boot_attempts(
655 self,
656 configuration,
657 )
658 }
659
660 pub fn r#set_configuration_active(
668 &self,
669 mut configuration: Configuration,
670 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
671 BootManagerProxyInterface::r#set_configuration_active(self, configuration)
672 }
673
674 pub fn r#set_configuration_unbootable(
687 &self,
688 mut configuration: Configuration,
689 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
690 BootManagerProxyInterface::r#set_configuration_unbootable(self, configuration)
691 }
692
693 pub fn r#set_configuration_healthy(
714 &self,
715 mut configuration: Configuration,
716 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
717 BootManagerProxyInterface::r#set_configuration_healthy(self, configuration)
718 }
719
720 pub fn r#set_one_shot_recovery(
724 &self,
725 ) -> fidl::client::QueryResponseFut<
726 BootManagerSetOneShotRecoveryResult,
727 fidl::encoding::DefaultFuchsiaResourceDialect,
728 > {
729 BootManagerProxyInterface::r#set_one_shot_recovery(self)
730 }
731
732 pub fn r#flush(
734 &self,
735 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
736 BootManagerProxyInterface::r#flush(self)
737 }
738}
739
740impl BootManagerProxyInterface for BootManagerProxy {
741 type QueryCurrentConfigurationResponseFut = fidl::client::QueryResponseFut<
742 BootManagerQueryCurrentConfigurationResult,
743 fidl::encoding::DefaultFuchsiaResourceDialect,
744 >;
745 fn r#query_current_configuration(&self) -> Self::QueryCurrentConfigurationResponseFut {
746 fn _decode(
747 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
748 ) -> Result<BootManagerQueryCurrentConfigurationResult, fidl::Error> {
749 let _response = fidl::client::decode_transaction_body::<
750 fidl::encoding::ResultType<BootManagerQueryCurrentConfigurationResponse, i32>,
751 fidl::encoding::DefaultFuchsiaResourceDialect,
752 0xc213298cbc9c371,
753 >(_buf?)?;
754 Ok(_response.map(|x| x.configuration))
755 }
756 self.client.send_query_and_decode::<
757 fidl::encoding::EmptyPayload,
758 BootManagerQueryCurrentConfigurationResult,
759 >(
760 (),
761 0xc213298cbc9c371,
762 fidl::encoding::DynamicFlags::empty(),
763 _decode,
764 )
765 }
766
767 type QueryActiveConfigurationResponseFut = fidl::client::QueryResponseFut<
768 BootManagerQueryActiveConfigurationResult,
769 fidl::encoding::DefaultFuchsiaResourceDialect,
770 >;
771 fn r#query_active_configuration(&self) -> Self::QueryActiveConfigurationResponseFut {
772 fn _decode(
773 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
774 ) -> Result<BootManagerQueryActiveConfigurationResult, fidl::Error> {
775 let _response = fidl::client::decode_transaction_body::<
776 fidl::encoding::ResultType<BootManagerQueryActiveConfigurationResponse, i32>,
777 fidl::encoding::DefaultFuchsiaResourceDialect,
778 0x71d52acdf59947a4,
779 >(_buf?)?;
780 Ok(_response.map(|x| x.configuration))
781 }
782 self.client.send_query_and_decode::<
783 fidl::encoding::EmptyPayload,
784 BootManagerQueryActiveConfigurationResult,
785 >(
786 (),
787 0x71d52acdf59947a4,
788 fidl::encoding::DynamicFlags::empty(),
789 _decode,
790 )
791 }
792
793 type QueryConfigurationLastSetActiveResponseFut = fidl::client::QueryResponseFut<
794 BootManagerQueryConfigurationLastSetActiveResult,
795 fidl::encoding::DefaultFuchsiaResourceDialect,
796 >;
797 fn r#query_configuration_last_set_active(
798 &self,
799 ) -> Self::QueryConfigurationLastSetActiveResponseFut {
800 fn _decode(
801 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
802 ) -> Result<BootManagerQueryConfigurationLastSetActiveResult, fidl::Error> {
803 let _response = fidl::client::decode_transaction_body::<
804 fidl::encoding::ResultType<BootManagerQueryConfigurationLastSetActiveResponse, i32>,
805 fidl::encoding::DefaultFuchsiaResourceDialect,
806 0x6bcad87311b3345,
807 >(_buf?)?;
808 Ok(_response.map(|x| x.configuration))
809 }
810 self.client.send_query_and_decode::<
811 fidl::encoding::EmptyPayload,
812 BootManagerQueryConfigurationLastSetActiveResult,
813 >(
814 (),
815 0x6bcad87311b3345,
816 fidl::encoding::DynamicFlags::empty(),
817 _decode,
818 )
819 }
820
821 type QueryConfigurationStatusResponseFut = fidl::client::QueryResponseFut<
822 BootManagerQueryConfigurationStatusResult,
823 fidl::encoding::DefaultFuchsiaResourceDialect,
824 >;
825 fn r#query_configuration_status(
826 &self,
827 mut configuration: Configuration,
828 ) -> Self::QueryConfigurationStatusResponseFut {
829 fn _decode(
830 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
831 ) -> Result<BootManagerQueryConfigurationStatusResult, fidl::Error> {
832 let _response = fidl::client::decode_transaction_body::<
833 fidl::encoding::ResultType<BootManagerQueryConfigurationStatusResponse, i32>,
834 fidl::encoding::DefaultFuchsiaResourceDialect,
835 0x40822ca9ca68b19a,
836 >(_buf?)?;
837 Ok(_response.map(|x| x.status))
838 }
839 self.client.send_query_and_decode::<
840 BootManagerQueryConfigurationStatusRequest,
841 BootManagerQueryConfigurationStatusResult,
842 >(
843 (configuration,),
844 0x40822ca9ca68b19a,
845 fidl::encoding::DynamicFlags::empty(),
846 _decode,
847 )
848 }
849
850 type QueryConfigurationStatusAndBootAttemptsResponseFut = fidl::client::QueryResponseFut<
851 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
852 fidl::encoding::DefaultFuchsiaResourceDialect,
853 >;
854 fn r#query_configuration_status_and_boot_attempts(
855 &self,
856 mut configuration: Configuration,
857 ) -> Self::QueryConfigurationStatusAndBootAttemptsResponseFut {
858 fn _decode(
859 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
860 ) -> Result<BootManagerQueryConfigurationStatusAndBootAttemptsResult, fidl::Error> {
861 let _response = fidl::client::decode_transaction_body::<
862 fidl::encoding::ResultType<
863 BootManagerQueryConfigurationStatusAndBootAttemptsResponse,
864 i32,
865 >,
866 fidl::encoding::DefaultFuchsiaResourceDialect,
867 0x27f851d5809cfb3d,
868 >(_buf?)?;
869 Ok(_response.map(|x| x))
870 }
871 self.client.send_query_and_decode::<
872 BootManagerQueryConfigurationStatusAndBootAttemptsRequest,
873 BootManagerQueryConfigurationStatusAndBootAttemptsResult,
874 >(
875 (configuration,),
876 0x27f851d5809cfb3d,
877 fidl::encoding::DynamicFlags::empty(),
878 _decode,
879 )
880 }
881
882 type SetConfigurationActiveResponseFut =
883 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
884 fn r#set_configuration_active(
885 &self,
886 mut configuration: Configuration,
887 ) -> Self::SetConfigurationActiveResponseFut {
888 fn _decode(
889 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
890 ) -> Result<i32, fidl::Error> {
891 let _response = fidl::client::decode_transaction_body::<
892 BootManagerSetConfigurationActiveResponse,
893 fidl::encoding::DefaultFuchsiaResourceDialect,
894 0x14c64074f81f9a7f,
895 >(_buf?)?;
896 Ok(_response.status)
897 }
898 self.client.send_query_and_decode::<BootManagerSetConfigurationActiveRequest, i32>(
899 (configuration,),
900 0x14c64074f81f9a7f,
901 fidl::encoding::DynamicFlags::empty(),
902 _decode,
903 )
904 }
905
906 type SetConfigurationUnbootableResponseFut =
907 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
908 fn r#set_configuration_unbootable(
909 &self,
910 mut configuration: Configuration,
911 ) -> Self::SetConfigurationUnbootableResponseFut {
912 fn _decode(
913 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
914 ) -> Result<i32, fidl::Error> {
915 let _response = fidl::client::decode_transaction_body::<
916 BootManagerSetConfigurationUnbootableResponse,
917 fidl::encoding::DefaultFuchsiaResourceDialect,
918 0x6f8716bf306d197f,
919 >(_buf?)?;
920 Ok(_response.status)
921 }
922 self.client.send_query_and_decode::<BootManagerSetConfigurationUnbootableRequest, i32>(
923 (configuration,),
924 0x6f8716bf306d197f,
925 fidl::encoding::DynamicFlags::empty(),
926 _decode,
927 )
928 }
929
930 type SetConfigurationHealthyResponseFut =
931 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
932 fn r#set_configuration_healthy(
933 &self,
934 mut configuration: Configuration,
935 ) -> Self::SetConfigurationHealthyResponseFut {
936 fn _decode(
937 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
938 ) -> Result<i32, fidl::Error> {
939 let _response = fidl::client::decode_transaction_body::<
940 BootManagerSetConfigurationHealthyResponse,
941 fidl::encoding::DefaultFuchsiaResourceDialect,
942 0x5dfe31714c8ec4be,
943 >(_buf?)?;
944 Ok(_response.status)
945 }
946 self.client.send_query_and_decode::<BootManagerSetConfigurationHealthyRequest, i32>(
947 (configuration,),
948 0x5dfe31714c8ec4be,
949 fidl::encoding::DynamicFlags::empty(),
950 _decode,
951 )
952 }
953
954 type SetOneShotRecoveryResponseFut = fidl::client::QueryResponseFut<
955 BootManagerSetOneShotRecoveryResult,
956 fidl::encoding::DefaultFuchsiaResourceDialect,
957 >;
958 fn r#set_one_shot_recovery(&self) -> Self::SetOneShotRecoveryResponseFut {
959 fn _decode(
960 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
961 ) -> Result<BootManagerSetOneShotRecoveryResult, fidl::Error> {
962 let _response = fidl::client::decode_transaction_body::<
963 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
964 fidl::encoding::DefaultFuchsiaResourceDialect,
965 0x7a5af0a28354f24d,
966 >(_buf?)?;
967 Ok(_response.map(|x| x))
968 }
969 self.client.send_query_and_decode::<
970 fidl::encoding::EmptyPayload,
971 BootManagerSetOneShotRecoveryResult,
972 >(
973 (),
974 0x7a5af0a28354f24d,
975 fidl::encoding::DynamicFlags::empty(),
976 _decode,
977 )
978 }
979
980 type FlushResponseFut =
981 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
982 fn r#flush(&self) -> Self::FlushResponseFut {
983 fn _decode(
984 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
985 ) -> Result<i32, fidl::Error> {
986 let _response = fidl::client::decode_transaction_body::<
987 BootManagerFlushResponse,
988 fidl::encoding::DefaultFuchsiaResourceDialect,
989 0x2f29ec2322d62d3e,
990 >(_buf?)?;
991 Ok(_response.status)
992 }
993 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
994 (),
995 0x2f29ec2322d62d3e,
996 fidl::encoding::DynamicFlags::empty(),
997 _decode,
998 )
999 }
1000}
1001
1002pub struct BootManagerEventStream {
1003 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1004}
1005
1006impl std::marker::Unpin for BootManagerEventStream {}
1007
1008impl futures::stream::FusedStream for BootManagerEventStream {
1009 fn is_terminated(&self) -> bool {
1010 self.event_receiver.is_terminated()
1011 }
1012}
1013
1014impl futures::Stream for BootManagerEventStream {
1015 type Item = Result<BootManagerEvent, fidl::Error>;
1016
1017 fn poll_next(
1018 mut self: std::pin::Pin<&mut Self>,
1019 cx: &mut std::task::Context<'_>,
1020 ) -> std::task::Poll<Option<Self::Item>> {
1021 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1022 &mut self.event_receiver,
1023 cx
1024 )?) {
1025 Some(buf) => std::task::Poll::Ready(Some(BootManagerEvent::decode(buf))),
1026 None => std::task::Poll::Ready(None),
1027 }
1028 }
1029}
1030
1031#[derive(Debug)]
1032pub enum BootManagerEvent {}
1033
1034impl BootManagerEvent {
1035 fn decode(
1037 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1038 ) -> Result<BootManagerEvent, fidl::Error> {
1039 let (bytes, _handles) = buf.split_mut();
1040 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1041 debug_assert_eq!(tx_header.tx_id, 0);
1042 match tx_header.ordinal {
1043 _ => Err(fidl::Error::UnknownOrdinal {
1044 ordinal: tx_header.ordinal,
1045 protocol_name: <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1046 }),
1047 }
1048 }
1049}
1050
1051pub struct BootManagerRequestStream {
1053 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1054 is_terminated: bool,
1055}
1056
1057impl std::marker::Unpin for BootManagerRequestStream {}
1058
1059impl futures::stream::FusedStream for BootManagerRequestStream {
1060 fn is_terminated(&self) -> bool {
1061 self.is_terminated
1062 }
1063}
1064
1065impl fidl::endpoints::RequestStream for BootManagerRequestStream {
1066 type Protocol = BootManagerMarker;
1067 type ControlHandle = BootManagerControlHandle;
1068
1069 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1070 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1071 }
1072
1073 fn control_handle(&self) -> Self::ControlHandle {
1074 BootManagerControlHandle { inner: self.inner.clone() }
1075 }
1076
1077 fn into_inner(
1078 self,
1079 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1080 {
1081 (self.inner, self.is_terminated)
1082 }
1083
1084 fn from_inner(
1085 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1086 is_terminated: bool,
1087 ) -> Self {
1088 Self { inner, is_terminated }
1089 }
1090}
1091
1092impl futures::Stream for BootManagerRequestStream {
1093 type Item = Result<BootManagerRequest, fidl::Error>;
1094
1095 fn poll_next(
1096 mut self: std::pin::Pin<&mut Self>,
1097 cx: &mut std::task::Context<'_>,
1098 ) -> std::task::Poll<Option<Self::Item>> {
1099 let this = &mut *self;
1100 if this.inner.check_shutdown(cx) {
1101 this.is_terminated = true;
1102 return std::task::Poll::Ready(None);
1103 }
1104 if this.is_terminated {
1105 panic!("polled BootManagerRequestStream after completion");
1106 }
1107 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1108 |bytes, handles| {
1109 match this.inner.channel().read_etc(cx, bytes, handles) {
1110 std::task::Poll::Ready(Ok(())) => {}
1111 std::task::Poll::Pending => return std::task::Poll::Pending,
1112 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1113 this.is_terminated = true;
1114 return std::task::Poll::Ready(None);
1115 }
1116 std::task::Poll::Ready(Err(e)) => {
1117 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1118 e.into(),
1119 ))));
1120 }
1121 }
1122
1123 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1125
1126 std::task::Poll::Ready(Some(match header.ordinal {
1127 0xc213298cbc9c371 => {
1128 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1129 let mut req = fidl::new_empty!(
1130 fidl::encoding::EmptyPayload,
1131 fidl::encoding::DefaultFuchsiaResourceDialect
1132 );
1133 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1134 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1135 Ok(BootManagerRequest::QueryCurrentConfiguration {
1136 responder: BootManagerQueryCurrentConfigurationResponder {
1137 control_handle: std::mem::ManuallyDrop::new(control_handle),
1138 tx_id: header.tx_id,
1139 },
1140 })
1141 }
1142 0x71d52acdf59947a4 => {
1143 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1144 let mut req = fidl::new_empty!(
1145 fidl::encoding::EmptyPayload,
1146 fidl::encoding::DefaultFuchsiaResourceDialect
1147 );
1148 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1149 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1150 Ok(BootManagerRequest::QueryActiveConfiguration {
1151 responder: BootManagerQueryActiveConfigurationResponder {
1152 control_handle: std::mem::ManuallyDrop::new(control_handle),
1153 tx_id: header.tx_id,
1154 },
1155 })
1156 }
1157 0x6bcad87311b3345 => {
1158 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1159 let mut req = fidl::new_empty!(
1160 fidl::encoding::EmptyPayload,
1161 fidl::encoding::DefaultFuchsiaResourceDialect
1162 );
1163 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1164 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1165 Ok(BootManagerRequest::QueryConfigurationLastSetActive {
1166 responder: BootManagerQueryConfigurationLastSetActiveResponder {
1167 control_handle: std::mem::ManuallyDrop::new(control_handle),
1168 tx_id: header.tx_id,
1169 },
1170 })
1171 }
1172 0x40822ca9ca68b19a => {
1173 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1174 let mut req = fidl::new_empty!(
1175 BootManagerQueryConfigurationStatusRequest,
1176 fidl::encoding::DefaultFuchsiaResourceDialect
1177 );
1178 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerQueryConfigurationStatusRequest>(&header, _body_bytes, handles, &mut req)?;
1179 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1180 Ok(BootManagerRequest::QueryConfigurationStatus {
1181 configuration: req.configuration,
1182
1183 responder: BootManagerQueryConfigurationStatusResponder {
1184 control_handle: std::mem::ManuallyDrop::new(control_handle),
1185 tx_id: header.tx_id,
1186 },
1187 })
1188 }
1189 0x27f851d5809cfb3d => {
1190 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1191 let mut req = fidl::new_empty!(
1192 BootManagerQueryConfigurationStatusAndBootAttemptsRequest,
1193 fidl::encoding::DefaultFuchsiaResourceDialect
1194 );
1195 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerQueryConfigurationStatusAndBootAttemptsRequest>(&header, _body_bytes, handles, &mut req)?;
1196 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1197 Ok(BootManagerRequest::QueryConfigurationStatusAndBootAttempts {
1198 configuration: req.configuration,
1199
1200 responder:
1201 BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1202 control_handle: std::mem::ManuallyDrop::new(control_handle),
1203 tx_id: header.tx_id,
1204 },
1205 })
1206 }
1207 0x14c64074f81f9a7f => {
1208 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1209 let mut req = fidl::new_empty!(
1210 BootManagerSetConfigurationActiveRequest,
1211 fidl::encoding::DefaultFuchsiaResourceDialect
1212 );
1213 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationActiveRequest>(&header, _body_bytes, handles, &mut req)?;
1214 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1215 Ok(BootManagerRequest::SetConfigurationActive {
1216 configuration: req.configuration,
1217
1218 responder: BootManagerSetConfigurationActiveResponder {
1219 control_handle: std::mem::ManuallyDrop::new(control_handle),
1220 tx_id: header.tx_id,
1221 },
1222 })
1223 }
1224 0x6f8716bf306d197f => {
1225 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1226 let mut req = fidl::new_empty!(
1227 BootManagerSetConfigurationUnbootableRequest,
1228 fidl::encoding::DefaultFuchsiaResourceDialect
1229 );
1230 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationUnbootableRequest>(&header, _body_bytes, handles, &mut req)?;
1231 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1232 Ok(BootManagerRequest::SetConfigurationUnbootable {
1233 configuration: req.configuration,
1234
1235 responder: BootManagerSetConfigurationUnbootableResponder {
1236 control_handle: std::mem::ManuallyDrop::new(control_handle),
1237 tx_id: header.tx_id,
1238 },
1239 })
1240 }
1241 0x5dfe31714c8ec4be => {
1242 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1243 let mut req = fidl::new_empty!(
1244 BootManagerSetConfigurationHealthyRequest,
1245 fidl::encoding::DefaultFuchsiaResourceDialect
1246 );
1247 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<BootManagerSetConfigurationHealthyRequest>(&header, _body_bytes, handles, &mut req)?;
1248 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1249 Ok(BootManagerRequest::SetConfigurationHealthy {
1250 configuration: req.configuration,
1251
1252 responder: BootManagerSetConfigurationHealthyResponder {
1253 control_handle: std::mem::ManuallyDrop::new(control_handle),
1254 tx_id: header.tx_id,
1255 },
1256 })
1257 }
1258 0x7a5af0a28354f24d => {
1259 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1260 let mut req = fidl::new_empty!(
1261 fidl::encoding::EmptyPayload,
1262 fidl::encoding::DefaultFuchsiaResourceDialect
1263 );
1264 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1265 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1266 Ok(BootManagerRequest::SetOneShotRecovery {
1267 responder: BootManagerSetOneShotRecoveryResponder {
1268 control_handle: std::mem::ManuallyDrop::new(control_handle),
1269 tx_id: header.tx_id,
1270 },
1271 })
1272 }
1273 0x2f29ec2322d62d3e => {
1274 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1275 let mut req = fidl::new_empty!(
1276 fidl::encoding::EmptyPayload,
1277 fidl::encoding::DefaultFuchsiaResourceDialect
1278 );
1279 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
1280 let control_handle = BootManagerControlHandle { inner: this.inner.clone() };
1281 Ok(BootManagerRequest::Flush {
1282 responder: BootManagerFlushResponder {
1283 control_handle: std::mem::ManuallyDrop::new(control_handle),
1284 tx_id: header.tx_id,
1285 },
1286 })
1287 }
1288 _ => Err(fidl::Error::UnknownOrdinal {
1289 ordinal: header.ordinal,
1290 protocol_name:
1291 <BootManagerMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1292 }),
1293 }))
1294 },
1295 )
1296 }
1297}
1298
1299#[derive(Debug)]
1312pub enum BootManagerRequest {
1313 QueryCurrentConfiguration { responder: BootManagerQueryCurrentConfigurationResponder },
1318 QueryActiveConfiguration { responder: BootManagerQueryActiveConfigurationResponder },
1324 QueryConfigurationLastSetActive {
1333 responder: BootManagerQueryConfigurationLastSetActiveResponder,
1334 },
1335 QueryConfigurationStatus {
1339 configuration: Configuration,
1340 responder: BootManagerQueryConfigurationStatusResponder,
1341 },
1342 QueryConfigurationStatusAndBootAttempts {
1362 configuration: Configuration,
1363 responder: BootManagerQueryConfigurationStatusAndBootAttemptsResponder,
1364 },
1365 SetConfigurationActive {
1373 configuration: Configuration,
1374 responder: BootManagerSetConfigurationActiveResponder,
1375 },
1376 SetConfigurationUnbootable {
1389 configuration: Configuration,
1390 responder: BootManagerSetConfigurationUnbootableResponder,
1391 },
1392 SetConfigurationHealthy {
1413 configuration: Configuration,
1414 responder: BootManagerSetConfigurationHealthyResponder,
1415 },
1416 SetOneShotRecovery { responder: BootManagerSetOneShotRecoveryResponder },
1420 Flush { responder: BootManagerFlushResponder },
1422}
1423
1424impl BootManagerRequest {
1425 #[allow(irrefutable_let_patterns)]
1426 pub fn into_query_current_configuration(
1427 self,
1428 ) -> Option<(BootManagerQueryCurrentConfigurationResponder)> {
1429 if let BootManagerRequest::QueryCurrentConfiguration { responder } = self {
1430 Some((responder))
1431 } else {
1432 None
1433 }
1434 }
1435
1436 #[allow(irrefutable_let_patterns)]
1437 pub fn into_query_active_configuration(
1438 self,
1439 ) -> Option<(BootManagerQueryActiveConfigurationResponder)> {
1440 if let BootManagerRequest::QueryActiveConfiguration { responder } = self {
1441 Some((responder))
1442 } else {
1443 None
1444 }
1445 }
1446
1447 #[allow(irrefutable_let_patterns)]
1448 pub fn into_query_configuration_last_set_active(
1449 self,
1450 ) -> Option<(BootManagerQueryConfigurationLastSetActiveResponder)> {
1451 if let BootManagerRequest::QueryConfigurationLastSetActive { responder } = self {
1452 Some((responder))
1453 } else {
1454 None
1455 }
1456 }
1457
1458 #[allow(irrefutable_let_patterns)]
1459 pub fn into_query_configuration_status(
1460 self,
1461 ) -> Option<(Configuration, BootManagerQueryConfigurationStatusResponder)> {
1462 if let BootManagerRequest::QueryConfigurationStatus { configuration, responder } = self {
1463 Some((configuration, responder))
1464 } else {
1465 None
1466 }
1467 }
1468
1469 #[allow(irrefutable_let_patterns)]
1470 pub fn into_query_configuration_status_and_boot_attempts(
1471 self,
1472 ) -> Option<(Configuration, BootManagerQueryConfigurationStatusAndBootAttemptsResponder)> {
1473 if let BootManagerRequest::QueryConfigurationStatusAndBootAttempts {
1474 configuration,
1475 responder,
1476 } = self
1477 {
1478 Some((configuration, responder))
1479 } else {
1480 None
1481 }
1482 }
1483
1484 #[allow(irrefutable_let_patterns)]
1485 pub fn into_set_configuration_active(
1486 self,
1487 ) -> Option<(Configuration, BootManagerSetConfigurationActiveResponder)> {
1488 if let BootManagerRequest::SetConfigurationActive { configuration, responder } = self {
1489 Some((configuration, responder))
1490 } else {
1491 None
1492 }
1493 }
1494
1495 #[allow(irrefutable_let_patterns)]
1496 pub fn into_set_configuration_unbootable(
1497 self,
1498 ) -> Option<(Configuration, BootManagerSetConfigurationUnbootableResponder)> {
1499 if let BootManagerRequest::SetConfigurationUnbootable { configuration, responder } = self {
1500 Some((configuration, responder))
1501 } else {
1502 None
1503 }
1504 }
1505
1506 #[allow(irrefutable_let_patterns)]
1507 pub fn into_set_configuration_healthy(
1508 self,
1509 ) -> Option<(Configuration, BootManagerSetConfigurationHealthyResponder)> {
1510 if let BootManagerRequest::SetConfigurationHealthy { configuration, responder } = self {
1511 Some((configuration, responder))
1512 } else {
1513 None
1514 }
1515 }
1516
1517 #[allow(irrefutable_let_patterns)]
1518 pub fn into_set_one_shot_recovery(self) -> Option<(BootManagerSetOneShotRecoveryResponder)> {
1519 if let BootManagerRequest::SetOneShotRecovery { responder } = self {
1520 Some((responder))
1521 } else {
1522 None
1523 }
1524 }
1525
1526 #[allow(irrefutable_let_patterns)]
1527 pub fn into_flush(self) -> Option<(BootManagerFlushResponder)> {
1528 if let BootManagerRequest::Flush { responder } = self { Some((responder)) } else { None }
1529 }
1530
1531 pub fn method_name(&self) -> &'static str {
1533 match *self {
1534 BootManagerRequest::QueryCurrentConfiguration { .. } => "query_current_configuration",
1535 BootManagerRequest::QueryActiveConfiguration { .. } => "query_active_configuration",
1536 BootManagerRequest::QueryConfigurationLastSetActive { .. } => {
1537 "query_configuration_last_set_active"
1538 }
1539 BootManagerRequest::QueryConfigurationStatus { .. } => "query_configuration_status",
1540 BootManagerRequest::QueryConfigurationStatusAndBootAttempts { .. } => {
1541 "query_configuration_status_and_boot_attempts"
1542 }
1543 BootManagerRequest::SetConfigurationActive { .. } => "set_configuration_active",
1544 BootManagerRequest::SetConfigurationUnbootable { .. } => "set_configuration_unbootable",
1545 BootManagerRequest::SetConfigurationHealthy { .. } => "set_configuration_healthy",
1546 BootManagerRequest::SetOneShotRecovery { .. } => "set_one_shot_recovery",
1547 BootManagerRequest::Flush { .. } => "flush",
1548 }
1549 }
1550}
1551
1552#[derive(Debug, Clone)]
1553pub struct BootManagerControlHandle {
1554 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1555}
1556
1557impl fidl::endpoints::ControlHandle for BootManagerControlHandle {
1558 fn shutdown(&self) {
1559 self.inner.shutdown()
1560 }
1561
1562 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1563 self.inner.shutdown_with_epitaph(status)
1564 }
1565
1566 fn is_closed(&self) -> bool {
1567 self.inner.channel().is_closed()
1568 }
1569 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1570 self.inner.channel().on_closed()
1571 }
1572
1573 #[cfg(target_os = "fuchsia")]
1574 fn signal_peer(
1575 &self,
1576 clear_mask: zx::Signals,
1577 set_mask: zx::Signals,
1578 ) -> Result<(), zx_status::Status> {
1579 use fidl::Peered;
1580 self.inner.channel().signal_peer(clear_mask, set_mask)
1581 }
1582}
1583
1584impl BootManagerControlHandle {}
1585
1586#[must_use = "FIDL methods require a response to be sent"]
1587#[derive(Debug)]
1588pub struct BootManagerQueryCurrentConfigurationResponder {
1589 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1590 tx_id: u32,
1591}
1592
1593impl std::ops::Drop for BootManagerQueryCurrentConfigurationResponder {
1597 fn drop(&mut self) {
1598 self.control_handle.shutdown();
1599 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1601 }
1602}
1603
1604impl fidl::endpoints::Responder for BootManagerQueryCurrentConfigurationResponder {
1605 type ControlHandle = BootManagerControlHandle;
1606
1607 fn control_handle(&self) -> &BootManagerControlHandle {
1608 &self.control_handle
1609 }
1610
1611 fn drop_without_shutdown(mut self) {
1612 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1614 std::mem::forget(self);
1616 }
1617}
1618
1619impl BootManagerQueryCurrentConfigurationResponder {
1620 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1624 let _result = self.send_raw(result);
1625 if _result.is_err() {
1626 self.control_handle.shutdown();
1627 }
1628 self.drop_without_shutdown();
1629 _result
1630 }
1631
1632 pub fn send_no_shutdown_on_err(
1634 self,
1635 mut result: Result<Configuration, i32>,
1636 ) -> Result<(), fidl::Error> {
1637 let _result = self.send_raw(result);
1638 self.drop_without_shutdown();
1639 _result
1640 }
1641
1642 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1643 self.control_handle.inner.send::<fidl::encoding::ResultType<
1644 BootManagerQueryCurrentConfigurationResponse,
1645 i32,
1646 >>(
1647 result.map(|configuration| (configuration,)),
1648 self.tx_id,
1649 0xc213298cbc9c371,
1650 fidl::encoding::DynamicFlags::empty(),
1651 )
1652 }
1653}
1654
1655#[must_use = "FIDL methods require a response to be sent"]
1656#[derive(Debug)]
1657pub struct BootManagerQueryActiveConfigurationResponder {
1658 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1659 tx_id: u32,
1660}
1661
1662impl std::ops::Drop for BootManagerQueryActiveConfigurationResponder {
1666 fn drop(&mut self) {
1667 self.control_handle.shutdown();
1668 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1670 }
1671}
1672
1673impl fidl::endpoints::Responder for BootManagerQueryActiveConfigurationResponder {
1674 type ControlHandle = BootManagerControlHandle;
1675
1676 fn control_handle(&self) -> &BootManagerControlHandle {
1677 &self.control_handle
1678 }
1679
1680 fn drop_without_shutdown(mut self) {
1681 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1683 std::mem::forget(self);
1685 }
1686}
1687
1688impl BootManagerQueryActiveConfigurationResponder {
1689 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1693 let _result = self.send_raw(result);
1694 if _result.is_err() {
1695 self.control_handle.shutdown();
1696 }
1697 self.drop_without_shutdown();
1698 _result
1699 }
1700
1701 pub fn send_no_shutdown_on_err(
1703 self,
1704 mut result: Result<Configuration, i32>,
1705 ) -> Result<(), fidl::Error> {
1706 let _result = self.send_raw(result);
1707 self.drop_without_shutdown();
1708 _result
1709 }
1710
1711 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1712 self.control_handle.inner.send::<fidl::encoding::ResultType<
1713 BootManagerQueryActiveConfigurationResponse,
1714 i32,
1715 >>(
1716 result.map(|configuration| (configuration,)),
1717 self.tx_id,
1718 0x71d52acdf59947a4,
1719 fidl::encoding::DynamicFlags::empty(),
1720 )
1721 }
1722}
1723
1724#[must_use = "FIDL methods require a response to be sent"]
1725#[derive(Debug)]
1726pub struct BootManagerQueryConfigurationLastSetActiveResponder {
1727 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1728 tx_id: u32,
1729}
1730
1731impl std::ops::Drop for BootManagerQueryConfigurationLastSetActiveResponder {
1735 fn drop(&mut self) {
1736 self.control_handle.shutdown();
1737 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1739 }
1740}
1741
1742impl fidl::endpoints::Responder for BootManagerQueryConfigurationLastSetActiveResponder {
1743 type ControlHandle = BootManagerControlHandle;
1744
1745 fn control_handle(&self) -> &BootManagerControlHandle {
1746 &self.control_handle
1747 }
1748
1749 fn drop_without_shutdown(mut self) {
1750 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1752 std::mem::forget(self);
1754 }
1755}
1756
1757impl BootManagerQueryConfigurationLastSetActiveResponder {
1758 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1762 let _result = self.send_raw(result);
1763 if _result.is_err() {
1764 self.control_handle.shutdown();
1765 }
1766 self.drop_without_shutdown();
1767 _result
1768 }
1769
1770 pub fn send_no_shutdown_on_err(
1772 self,
1773 mut result: Result<Configuration, i32>,
1774 ) -> Result<(), fidl::Error> {
1775 let _result = self.send_raw(result);
1776 self.drop_without_shutdown();
1777 _result
1778 }
1779
1780 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1781 self.control_handle.inner.send::<fidl::encoding::ResultType<
1782 BootManagerQueryConfigurationLastSetActiveResponse,
1783 i32,
1784 >>(
1785 result.map(|configuration| (configuration,)),
1786 self.tx_id,
1787 0x6bcad87311b3345,
1788 fidl::encoding::DynamicFlags::empty(),
1789 )
1790 }
1791}
1792
1793#[must_use = "FIDL methods require a response to be sent"]
1794#[derive(Debug)]
1795pub struct BootManagerQueryConfigurationStatusResponder {
1796 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1797 tx_id: u32,
1798}
1799
1800impl std::ops::Drop for BootManagerQueryConfigurationStatusResponder {
1804 fn drop(&mut self) {
1805 self.control_handle.shutdown();
1806 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1808 }
1809}
1810
1811impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusResponder {
1812 type ControlHandle = BootManagerControlHandle;
1813
1814 fn control_handle(&self) -> &BootManagerControlHandle {
1815 &self.control_handle
1816 }
1817
1818 fn drop_without_shutdown(mut self) {
1819 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1821 std::mem::forget(self);
1823 }
1824}
1825
1826impl BootManagerQueryConfigurationStatusResponder {
1827 pub fn send(self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1831 let _result = self.send_raw(result);
1832 if _result.is_err() {
1833 self.control_handle.shutdown();
1834 }
1835 self.drop_without_shutdown();
1836 _result
1837 }
1838
1839 pub fn send_no_shutdown_on_err(
1841 self,
1842 mut result: Result<ConfigurationStatus, i32>,
1843 ) -> Result<(), fidl::Error> {
1844 let _result = self.send_raw(result);
1845 self.drop_without_shutdown();
1846 _result
1847 }
1848
1849 fn send_raw(&self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1850 self.control_handle.inner.send::<fidl::encoding::ResultType<
1851 BootManagerQueryConfigurationStatusResponse,
1852 i32,
1853 >>(
1854 result.map(|status| (status,)),
1855 self.tx_id,
1856 0x40822ca9ca68b19a,
1857 fidl::encoding::DynamicFlags::empty(),
1858 )
1859 }
1860}
1861
1862#[must_use = "FIDL methods require a response to be sent"]
1863#[derive(Debug)]
1864pub struct BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1865 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1866 tx_id: u32,
1867}
1868
1869impl std::ops::Drop for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1873 fn drop(&mut self) {
1874 self.control_handle.shutdown();
1875 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1877 }
1878}
1879
1880impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1881 type ControlHandle = BootManagerControlHandle;
1882
1883 fn control_handle(&self) -> &BootManagerControlHandle {
1884 &self.control_handle
1885 }
1886
1887 fn drop_without_shutdown(mut self) {
1888 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1890 std::mem::forget(self);
1892 }
1893}
1894
1895impl BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1896 pub fn send(
1900 self,
1901 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1902 ) -> Result<(), fidl::Error> {
1903 let _result = self.send_raw(result);
1904 if _result.is_err() {
1905 self.control_handle.shutdown();
1906 }
1907 self.drop_without_shutdown();
1908 _result
1909 }
1910
1911 pub fn send_no_shutdown_on_err(
1913 self,
1914 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1915 ) -> Result<(), fidl::Error> {
1916 let _result = self.send_raw(result);
1917 self.drop_without_shutdown();
1918 _result
1919 }
1920
1921 fn send_raw(
1922 &self,
1923 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1924 ) -> Result<(), fidl::Error> {
1925 self.control_handle.inner.send::<fidl::encoding::ResultType<
1926 BootManagerQueryConfigurationStatusAndBootAttemptsResponse,
1927 i32,
1928 >>(
1929 result,
1930 self.tx_id,
1931 0x27f851d5809cfb3d,
1932 fidl::encoding::DynamicFlags::empty(),
1933 )
1934 }
1935}
1936
1937#[must_use = "FIDL methods require a response to be sent"]
1938#[derive(Debug)]
1939pub struct BootManagerSetConfigurationActiveResponder {
1940 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1941 tx_id: u32,
1942}
1943
1944impl std::ops::Drop for BootManagerSetConfigurationActiveResponder {
1948 fn drop(&mut self) {
1949 self.control_handle.shutdown();
1950 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1952 }
1953}
1954
1955impl fidl::endpoints::Responder for BootManagerSetConfigurationActiveResponder {
1956 type ControlHandle = BootManagerControlHandle;
1957
1958 fn control_handle(&self) -> &BootManagerControlHandle {
1959 &self.control_handle
1960 }
1961
1962 fn drop_without_shutdown(mut self) {
1963 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1965 std::mem::forget(self);
1967 }
1968}
1969
1970impl BootManagerSetConfigurationActiveResponder {
1971 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
1975 let _result = self.send_raw(status);
1976 if _result.is_err() {
1977 self.control_handle.shutdown();
1978 }
1979 self.drop_without_shutdown();
1980 _result
1981 }
1982
1983 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
1985 let _result = self.send_raw(status);
1986 self.drop_without_shutdown();
1987 _result
1988 }
1989
1990 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
1991 self.control_handle.inner.send::<BootManagerSetConfigurationActiveResponse>(
1992 (status,),
1993 self.tx_id,
1994 0x14c64074f81f9a7f,
1995 fidl::encoding::DynamicFlags::empty(),
1996 )
1997 }
1998}
1999
2000#[must_use = "FIDL methods require a response to be sent"]
2001#[derive(Debug)]
2002pub struct BootManagerSetConfigurationUnbootableResponder {
2003 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2004 tx_id: u32,
2005}
2006
2007impl std::ops::Drop for BootManagerSetConfigurationUnbootableResponder {
2011 fn drop(&mut self) {
2012 self.control_handle.shutdown();
2013 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2015 }
2016}
2017
2018impl fidl::endpoints::Responder for BootManagerSetConfigurationUnbootableResponder {
2019 type ControlHandle = BootManagerControlHandle;
2020
2021 fn control_handle(&self) -> &BootManagerControlHandle {
2022 &self.control_handle
2023 }
2024
2025 fn drop_without_shutdown(mut self) {
2026 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2028 std::mem::forget(self);
2030 }
2031}
2032
2033impl BootManagerSetConfigurationUnbootableResponder {
2034 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2038 let _result = self.send_raw(status);
2039 if _result.is_err() {
2040 self.control_handle.shutdown();
2041 }
2042 self.drop_without_shutdown();
2043 _result
2044 }
2045
2046 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2048 let _result = self.send_raw(status);
2049 self.drop_without_shutdown();
2050 _result
2051 }
2052
2053 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2054 self.control_handle.inner.send::<BootManagerSetConfigurationUnbootableResponse>(
2055 (status,),
2056 self.tx_id,
2057 0x6f8716bf306d197f,
2058 fidl::encoding::DynamicFlags::empty(),
2059 )
2060 }
2061}
2062
2063#[must_use = "FIDL methods require a response to be sent"]
2064#[derive(Debug)]
2065pub struct BootManagerSetConfigurationHealthyResponder {
2066 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2067 tx_id: u32,
2068}
2069
2070impl std::ops::Drop for BootManagerSetConfigurationHealthyResponder {
2074 fn drop(&mut self) {
2075 self.control_handle.shutdown();
2076 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2078 }
2079}
2080
2081impl fidl::endpoints::Responder for BootManagerSetConfigurationHealthyResponder {
2082 type ControlHandle = BootManagerControlHandle;
2083
2084 fn control_handle(&self) -> &BootManagerControlHandle {
2085 &self.control_handle
2086 }
2087
2088 fn drop_without_shutdown(mut self) {
2089 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2091 std::mem::forget(self);
2093 }
2094}
2095
2096impl BootManagerSetConfigurationHealthyResponder {
2097 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2101 let _result = self.send_raw(status);
2102 if _result.is_err() {
2103 self.control_handle.shutdown();
2104 }
2105 self.drop_without_shutdown();
2106 _result
2107 }
2108
2109 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2111 let _result = self.send_raw(status);
2112 self.drop_without_shutdown();
2113 _result
2114 }
2115
2116 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2117 self.control_handle.inner.send::<BootManagerSetConfigurationHealthyResponse>(
2118 (status,),
2119 self.tx_id,
2120 0x5dfe31714c8ec4be,
2121 fidl::encoding::DynamicFlags::empty(),
2122 )
2123 }
2124}
2125
2126#[must_use = "FIDL methods require a response to be sent"]
2127#[derive(Debug)]
2128pub struct BootManagerSetOneShotRecoveryResponder {
2129 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2130 tx_id: u32,
2131}
2132
2133impl std::ops::Drop for BootManagerSetOneShotRecoveryResponder {
2137 fn drop(&mut self) {
2138 self.control_handle.shutdown();
2139 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2141 }
2142}
2143
2144impl fidl::endpoints::Responder for BootManagerSetOneShotRecoveryResponder {
2145 type ControlHandle = BootManagerControlHandle;
2146
2147 fn control_handle(&self) -> &BootManagerControlHandle {
2148 &self.control_handle
2149 }
2150
2151 fn drop_without_shutdown(mut self) {
2152 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2154 std::mem::forget(self);
2156 }
2157}
2158
2159impl BootManagerSetOneShotRecoveryResponder {
2160 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2164 let _result = self.send_raw(result);
2165 if _result.is_err() {
2166 self.control_handle.shutdown();
2167 }
2168 self.drop_without_shutdown();
2169 _result
2170 }
2171
2172 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2174 let _result = self.send_raw(result);
2175 self.drop_without_shutdown();
2176 _result
2177 }
2178
2179 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2180 self.control_handle
2181 .inner
2182 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2183 result,
2184 self.tx_id,
2185 0x7a5af0a28354f24d,
2186 fidl::encoding::DynamicFlags::empty(),
2187 )
2188 }
2189}
2190
2191#[must_use = "FIDL methods require a response to be sent"]
2192#[derive(Debug)]
2193pub struct BootManagerFlushResponder {
2194 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2195 tx_id: u32,
2196}
2197
2198impl std::ops::Drop for BootManagerFlushResponder {
2202 fn drop(&mut self) {
2203 self.control_handle.shutdown();
2204 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2206 }
2207}
2208
2209impl fidl::endpoints::Responder for BootManagerFlushResponder {
2210 type ControlHandle = BootManagerControlHandle;
2211
2212 fn control_handle(&self) -> &BootManagerControlHandle {
2213 &self.control_handle
2214 }
2215
2216 fn drop_without_shutdown(mut self) {
2217 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2219 std::mem::forget(self);
2221 }
2222}
2223
2224impl BootManagerFlushResponder {
2225 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2229 let _result = self.send_raw(status);
2230 if _result.is_err() {
2231 self.control_handle.shutdown();
2232 }
2233 self.drop_without_shutdown();
2234 _result
2235 }
2236
2237 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2239 let _result = self.send_raw(status);
2240 self.drop_without_shutdown();
2241 _result
2242 }
2243
2244 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2245 self.control_handle.inner.send::<BootManagerFlushResponse>(
2246 (status,),
2247 self.tx_id,
2248 0x2f29ec2322d62d3e,
2249 fidl::encoding::DynamicFlags::empty(),
2250 )
2251 }
2252}
2253
2254#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2255pub struct DataSinkMarker;
2256
2257impl fidl::endpoints::ProtocolMarker for DataSinkMarker {
2258 type Proxy = DataSinkProxy;
2259 type RequestStream = DataSinkRequestStream;
2260 #[cfg(target_os = "fuchsia")]
2261 type SynchronousProxy = DataSinkSynchronousProxy;
2262
2263 const DEBUG_NAME: &'static str = "(anonymous) DataSink";
2264}
2265pub type DataSinkReadAssetResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2266pub type DataSinkReadFirmwareResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2267pub type DataSinkWriteOpaqueVolumeResult = Result<(), i32>;
2268pub type DataSinkWriteSparseVolumeResult = Result<(), i32>;
2269
2270pub trait DataSinkProxyInterface: Send + Sync {
2271 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
2272 + Send;
2273 fn r#read_asset(
2274 &self,
2275 configuration: Configuration,
2276 asset: Asset,
2277 ) -> Self::ReadAssetResponseFut;
2278 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2279 fn r#write_asset(
2280 &self,
2281 configuration: Configuration,
2282 asset: Asset,
2283 payload: fidl_fuchsia_mem::Buffer,
2284 ) -> Self::WriteAssetResponseFut;
2285 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
2286 + Send;
2287 fn r#write_firmware(
2288 &self,
2289 configuration: Configuration,
2290 type_: &str,
2291 payload: fidl_fuchsia_mem::Buffer,
2292 ) -> Self::WriteFirmwareResponseFut;
2293 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
2294 + Send;
2295 fn r#read_firmware(
2296 &self,
2297 configuration: Configuration,
2298 type_: &str,
2299 ) -> Self::ReadFirmwareResponseFut;
2300 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2301 fn r#write_volumes(
2302 &self,
2303 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2304 ) -> Self::WriteVolumesResponseFut;
2305 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
2306 + Send;
2307 fn r#write_opaque_volume(
2308 &self,
2309 payload: fidl_fuchsia_mem::Buffer,
2310 ) -> Self::WriteOpaqueVolumeResponseFut;
2311 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
2312 + Send;
2313 fn r#write_sparse_volume(
2314 &self,
2315 payload: fidl_fuchsia_mem::Buffer,
2316 ) -> Self::WriteSparseVolumeResponseFut;
2317 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2318 fn r#flush(&self) -> Self::FlushResponseFut;
2319}
2320#[derive(Debug)]
2321#[cfg(target_os = "fuchsia")]
2322pub struct DataSinkSynchronousProxy {
2323 client: fidl::client::sync::Client,
2324}
2325
2326#[cfg(target_os = "fuchsia")]
2327impl fidl::endpoints::SynchronousProxy for DataSinkSynchronousProxy {
2328 type Proxy = DataSinkProxy;
2329 type Protocol = DataSinkMarker;
2330
2331 fn from_channel(inner: fidl::Channel) -> Self {
2332 Self::new(inner)
2333 }
2334
2335 fn into_channel(self) -> fidl::Channel {
2336 self.client.into_channel()
2337 }
2338
2339 fn as_channel(&self) -> &fidl::Channel {
2340 self.client.as_channel()
2341 }
2342}
2343
2344#[cfg(target_os = "fuchsia")]
2345impl DataSinkSynchronousProxy {
2346 pub fn new(channel: fidl::Channel) -> Self {
2347 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2348 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2349 }
2350
2351 pub fn into_channel(self) -> fidl::Channel {
2352 self.client.into_channel()
2353 }
2354
2355 pub fn wait_for_event(
2358 &self,
2359 deadline: zx::MonotonicInstant,
2360 ) -> Result<DataSinkEvent, fidl::Error> {
2361 DataSinkEvent::decode(self.client.wait_for_event(deadline)?)
2362 }
2363
2364 pub fn r#read_asset(
2370 &self,
2371 mut configuration: Configuration,
2372 mut asset: Asset,
2373 ___deadline: zx::MonotonicInstant,
2374 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2375 let _response = self.client.send_query::<
2376 DataSinkReadAssetRequest,
2377 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2378 >(
2379 (configuration, asset,),
2380 0x125a23e561007898,
2381 fidl::encoding::DynamicFlags::empty(),
2382 ___deadline,
2383 )?;
2384 Ok(_response.map(|x| x.asset))
2385 }
2386
2387 pub fn r#write_asset(
2396 &self,
2397 mut configuration: Configuration,
2398 mut asset: Asset,
2399 mut payload: fidl_fuchsia_mem::Buffer,
2400 ___deadline: zx::MonotonicInstant,
2401 ) -> Result<i32, fidl::Error> {
2402 let _response =
2403 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
2404 (configuration, asset, &mut payload),
2405 0x516839ce76c4d0a9,
2406 fidl::encoding::DynamicFlags::empty(),
2407 ___deadline,
2408 )?;
2409 Ok(_response.status)
2410 }
2411
2412 pub fn r#write_firmware(
2427 &self,
2428 mut configuration: Configuration,
2429 mut type_: &str,
2430 mut payload: fidl_fuchsia_mem::Buffer,
2431 ___deadline: zx::MonotonicInstant,
2432 ) -> Result<WriteFirmwareResult, fidl::Error> {
2433 let _response =
2434 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
2435 (configuration, type_, &mut payload),
2436 0x514b93454ac0be97,
2437 fidl::encoding::DynamicFlags::empty(),
2438 ___deadline,
2439 )?;
2440 Ok(_response.result)
2441 }
2442
2443 pub fn r#read_firmware(
2450 &self,
2451 mut configuration: Configuration,
2452 mut type_: &str,
2453 ___deadline: zx::MonotonicInstant,
2454 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2455 let _response = self.client.send_query::<
2456 DataSinkReadFirmwareRequest,
2457 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2458 >(
2459 (configuration, type_,),
2460 0xcb67f9830cae9c3,
2461 fidl::encoding::DynamicFlags::empty(),
2462 ___deadline,
2463 )?;
2464 Ok(_response.map(|x| x.firmware))
2465 }
2466
2467 pub fn r#write_volumes(
2470 &self,
2471 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2472 ___deadline: zx::MonotonicInstant,
2473 ) -> Result<i32, fidl::Error> {
2474 let _response =
2475 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
2476 (payload,),
2477 0x5ee32c861d0259df,
2478 fidl::encoding::DynamicFlags::empty(),
2479 ___deadline,
2480 )?;
2481 Ok(_response.status)
2482 }
2483
2484 pub fn r#write_opaque_volume(
2493 &self,
2494 mut payload: fidl_fuchsia_mem::Buffer,
2495 ___deadline: zx::MonotonicInstant,
2496 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2497 let _response = self.client.send_query::<
2498 DataSinkWriteOpaqueVolumeRequest,
2499 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2500 >(
2501 (&mut payload,),
2502 0x4884b6ebaf660d79,
2503 fidl::encoding::DynamicFlags::empty(),
2504 ___deadline,
2505 )?;
2506 Ok(_response.map(|x| x))
2507 }
2508
2509 pub fn r#write_sparse_volume(
2513 &self,
2514 mut payload: fidl_fuchsia_mem::Buffer,
2515 ___deadline: zx::MonotonicInstant,
2516 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2517 let _response = self.client.send_query::<
2518 DataSinkWriteSparseVolumeRequest,
2519 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2520 >(
2521 (&mut payload,),
2522 0x340f5370c5b1e026,
2523 fidl::encoding::DynamicFlags::empty(),
2524 ___deadline,
2525 )?;
2526 Ok(_response.map(|x| x))
2527 }
2528
2529 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
2531 let _response =
2532 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
2533 (),
2534 0x3b59d3e2338e3139,
2535 fidl::encoding::DynamicFlags::empty(),
2536 ___deadline,
2537 )?;
2538 Ok(_response.status)
2539 }
2540}
2541
2542#[cfg(target_os = "fuchsia")]
2543impl From<DataSinkSynchronousProxy> for zx::NullableHandle {
2544 fn from(value: DataSinkSynchronousProxy) -> Self {
2545 value.into_channel().into()
2546 }
2547}
2548
2549#[cfg(target_os = "fuchsia")]
2550impl From<fidl::Channel> for DataSinkSynchronousProxy {
2551 fn from(value: fidl::Channel) -> Self {
2552 Self::new(value)
2553 }
2554}
2555
2556#[cfg(target_os = "fuchsia")]
2557impl fidl::endpoints::FromClient for DataSinkSynchronousProxy {
2558 type Protocol = DataSinkMarker;
2559
2560 fn from_client(value: fidl::endpoints::ClientEnd<DataSinkMarker>) -> Self {
2561 Self::new(value.into_channel())
2562 }
2563}
2564
2565#[derive(Debug, Clone)]
2566pub struct DataSinkProxy {
2567 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2568}
2569
2570impl fidl::endpoints::Proxy for DataSinkProxy {
2571 type Protocol = DataSinkMarker;
2572
2573 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2574 Self::new(inner)
2575 }
2576
2577 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2578 self.client.into_channel().map_err(|client| Self { client })
2579 }
2580
2581 fn as_channel(&self) -> &::fidl::AsyncChannel {
2582 self.client.as_channel()
2583 }
2584}
2585
2586impl DataSinkProxy {
2587 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2589 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2590 Self { client: fidl::client::Client::new(channel, protocol_name) }
2591 }
2592
2593 pub fn take_event_stream(&self) -> DataSinkEventStream {
2599 DataSinkEventStream { event_receiver: self.client.take_event_receiver() }
2600 }
2601
2602 pub fn r#read_asset(
2608 &self,
2609 mut configuration: Configuration,
2610 mut asset: Asset,
2611 ) -> fidl::client::QueryResponseFut<
2612 DataSinkReadAssetResult,
2613 fidl::encoding::DefaultFuchsiaResourceDialect,
2614 > {
2615 DataSinkProxyInterface::r#read_asset(self, configuration, asset)
2616 }
2617
2618 pub fn r#write_asset(
2627 &self,
2628 mut configuration: Configuration,
2629 mut asset: Asset,
2630 mut payload: fidl_fuchsia_mem::Buffer,
2631 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2632 DataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
2633 }
2634
2635 pub fn r#write_firmware(
2650 &self,
2651 mut configuration: Configuration,
2652 mut type_: &str,
2653 mut payload: fidl_fuchsia_mem::Buffer,
2654 ) -> fidl::client::QueryResponseFut<
2655 WriteFirmwareResult,
2656 fidl::encoding::DefaultFuchsiaResourceDialect,
2657 > {
2658 DataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
2659 }
2660
2661 pub fn r#read_firmware(
2668 &self,
2669 mut configuration: Configuration,
2670 mut type_: &str,
2671 ) -> fidl::client::QueryResponseFut<
2672 DataSinkReadFirmwareResult,
2673 fidl::encoding::DefaultFuchsiaResourceDialect,
2674 > {
2675 DataSinkProxyInterface::r#read_firmware(self, configuration, type_)
2676 }
2677
2678 pub fn r#write_volumes(
2681 &self,
2682 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2683 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2684 DataSinkProxyInterface::r#write_volumes(self, payload)
2685 }
2686
2687 pub fn r#write_opaque_volume(
2696 &self,
2697 mut payload: fidl_fuchsia_mem::Buffer,
2698 ) -> fidl::client::QueryResponseFut<
2699 DataSinkWriteOpaqueVolumeResult,
2700 fidl::encoding::DefaultFuchsiaResourceDialect,
2701 > {
2702 DataSinkProxyInterface::r#write_opaque_volume(self, payload)
2703 }
2704
2705 pub fn r#write_sparse_volume(
2709 &self,
2710 mut payload: fidl_fuchsia_mem::Buffer,
2711 ) -> fidl::client::QueryResponseFut<
2712 DataSinkWriteSparseVolumeResult,
2713 fidl::encoding::DefaultFuchsiaResourceDialect,
2714 > {
2715 DataSinkProxyInterface::r#write_sparse_volume(self, payload)
2716 }
2717
2718 pub fn r#flush(
2720 &self,
2721 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2722 DataSinkProxyInterface::r#flush(self)
2723 }
2724}
2725
2726impl DataSinkProxyInterface for DataSinkProxy {
2727 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
2728 DataSinkReadAssetResult,
2729 fidl::encoding::DefaultFuchsiaResourceDialect,
2730 >;
2731 fn r#read_asset(
2732 &self,
2733 mut configuration: Configuration,
2734 mut asset: Asset,
2735 ) -> Self::ReadAssetResponseFut {
2736 fn _decode(
2737 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2738 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2739 let _response = fidl::client::decode_transaction_body::<
2740 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2741 fidl::encoding::DefaultFuchsiaResourceDialect,
2742 0x125a23e561007898,
2743 >(_buf?)?;
2744 Ok(_response.map(|x| x.asset))
2745 }
2746 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
2747 (configuration, asset),
2748 0x125a23e561007898,
2749 fidl::encoding::DynamicFlags::empty(),
2750 _decode,
2751 )
2752 }
2753
2754 type WriteAssetResponseFut =
2755 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2756 fn r#write_asset(
2757 &self,
2758 mut configuration: Configuration,
2759 mut asset: Asset,
2760 mut payload: fidl_fuchsia_mem::Buffer,
2761 ) -> Self::WriteAssetResponseFut {
2762 fn _decode(
2763 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2764 ) -> Result<i32, fidl::Error> {
2765 let _response = fidl::client::decode_transaction_body::<
2766 DataSinkWriteAssetResponse,
2767 fidl::encoding::DefaultFuchsiaResourceDialect,
2768 0x516839ce76c4d0a9,
2769 >(_buf?)?;
2770 Ok(_response.status)
2771 }
2772 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
2773 (configuration, asset, &mut payload),
2774 0x516839ce76c4d0a9,
2775 fidl::encoding::DynamicFlags::empty(),
2776 _decode,
2777 )
2778 }
2779
2780 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
2781 WriteFirmwareResult,
2782 fidl::encoding::DefaultFuchsiaResourceDialect,
2783 >;
2784 fn r#write_firmware(
2785 &self,
2786 mut configuration: Configuration,
2787 mut type_: &str,
2788 mut payload: fidl_fuchsia_mem::Buffer,
2789 ) -> Self::WriteFirmwareResponseFut {
2790 fn _decode(
2791 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2792 ) -> Result<WriteFirmwareResult, fidl::Error> {
2793 let _response = fidl::client::decode_transaction_body::<
2794 DataSinkWriteFirmwareResponse,
2795 fidl::encoding::DefaultFuchsiaResourceDialect,
2796 0x514b93454ac0be97,
2797 >(_buf?)?;
2798 Ok(_response.result)
2799 }
2800 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
2801 (configuration, type_, &mut payload),
2802 0x514b93454ac0be97,
2803 fidl::encoding::DynamicFlags::empty(),
2804 _decode,
2805 )
2806 }
2807
2808 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
2809 DataSinkReadFirmwareResult,
2810 fidl::encoding::DefaultFuchsiaResourceDialect,
2811 >;
2812 fn r#read_firmware(
2813 &self,
2814 mut configuration: Configuration,
2815 mut type_: &str,
2816 ) -> Self::ReadFirmwareResponseFut {
2817 fn _decode(
2818 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2819 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2820 let _response = fidl::client::decode_transaction_body::<
2821 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2822 fidl::encoding::DefaultFuchsiaResourceDialect,
2823 0xcb67f9830cae9c3,
2824 >(_buf?)?;
2825 Ok(_response.map(|x| x.firmware))
2826 }
2827 self.client
2828 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
2829 (configuration, type_),
2830 0xcb67f9830cae9c3,
2831 fidl::encoding::DynamicFlags::empty(),
2832 _decode,
2833 )
2834 }
2835
2836 type WriteVolumesResponseFut =
2837 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2838 fn r#write_volumes(
2839 &self,
2840 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2841 ) -> Self::WriteVolumesResponseFut {
2842 fn _decode(
2843 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2844 ) -> Result<i32, fidl::Error> {
2845 let _response = fidl::client::decode_transaction_body::<
2846 DataSinkWriteVolumesResponse,
2847 fidl::encoding::DefaultFuchsiaResourceDialect,
2848 0x5ee32c861d0259df,
2849 >(_buf?)?;
2850 Ok(_response.status)
2851 }
2852 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
2853 (payload,),
2854 0x5ee32c861d0259df,
2855 fidl::encoding::DynamicFlags::empty(),
2856 _decode,
2857 )
2858 }
2859
2860 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
2861 DataSinkWriteOpaqueVolumeResult,
2862 fidl::encoding::DefaultFuchsiaResourceDialect,
2863 >;
2864 fn r#write_opaque_volume(
2865 &self,
2866 mut payload: fidl_fuchsia_mem::Buffer,
2867 ) -> Self::WriteOpaqueVolumeResponseFut {
2868 fn _decode(
2869 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2870 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2871 let _response = fidl::client::decode_transaction_body::<
2872 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2873 fidl::encoding::DefaultFuchsiaResourceDialect,
2874 0x4884b6ebaf660d79,
2875 >(_buf?)?;
2876 Ok(_response.map(|x| x))
2877 }
2878 self.client.send_query_and_decode::<
2879 DataSinkWriteOpaqueVolumeRequest,
2880 DataSinkWriteOpaqueVolumeResult,
2881 >(
2882 (&mut payload,),
2883 0x4884b6ebaf660d79,
2884 fidl::encoding::DynamicFlags::empty(),
2885 _decode,
2886 )
2887 }
2888
2889 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
2890 DataSinkWriteSparseVolumeResult,
2891 fidl::encoding::DefaultFuchsiaResourceDialect,
2892 >;
2893 fn r#write_sparse_volume(
2894 &self,
2895 mut payload: fidl_fuchsia_mem::Buffer,
2896 ) -> Self::WriteSparseVolumeResponseFut {
2897 fn _decode(
2898 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2899 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2900 let _response = fidl::client::decode_transaction_body::<
2901 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2902 fidl::encoding::DefaultFuchsiaResourceDialect,
2903 0x340f5370c5b1e026,
2904 >(_buf?)?;
2905 Ok(_response.map(|x| x))
2906 }
2907 self.client.send_query_and_decode::<
2908 DataSinkWriteSparseVolumeRequest,
2909 DataSinkWriteSparseVolumeResult,
2910 >(
2911 (&mut payload,),
2912 0x340f5370c5b1e026,
2913 fidl::encoding::DynamicFlags::empty(),
2914 _decode,
2915 )
2916 }
2917
2918 type FlushResponseFut =
2919 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2920 fn r#flush(&self) -> Self::FlushResponseFut {
2921 fn _decode(
2922 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2923 ) -> Result<i32, fidl::Error> {
2924 let _response = fidl::client::decode_transaction_body::<
2925 DataSinkFlushResponse,
2926 fidl::encoding::DefaultFuchsiaResourceDialect,
2927 0x3b59d3e2338e3139,
2928 >(_buf?)?;
2929 Ok(_response.status)
2930 }
2931 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2932 (),
2933 0x3b59d3e2338e3139,
2934 fidl::encoding::DynamicFlags::empty(),
2935 _decode,
2936 )
2937 }
2938}
2939
2940pub struct DataSinkEventStream {
2941 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2942}
2943
2944impl std::marker::Unpin for DataSinkEventStream {}
2945
2946impl futures::stream::FusedStream for DataSinkEventStream {
2947 fn is_terminated(&self) -> bool {
2948 self.event_receiver.is_terminated()
2949 }
2950}
2951
2952impl futures::Stream for DataSinkEventStream {
2953 type Item = Result<DataSinkEvent, fidl::Error>;
2954
2955 fn poll_next(
2956 mut self: std::pin::Pin<&mut Self>,
2957 cx: &mut std::task::Context<'_>,
2958 ) -> std::task::Poll<Option<Self::Item>> {
2959 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2960 &mut self.event_receiver,
2961 cx
2962 )?) {
2963 Some(buf) => std::task::Poll::Ready(Some(DataSinkEvent::decode(buf))),
2964 None => std::task::Poll::Ready(None),
2965 }
2966 }
2967}
2968
2969#[derive(Debug)]
2970pub enum DataSinkEvent {}
2971
2972impl DataSinkEvent {
2973 fn decode(
2975 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2976 ) -> Result<DataSinkEvent, fidl::Error> {
2977 let (bytes, _handles) = buf.split_mut();
2978 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2979 debug_assert_eq!(tx_header.tx_id, 0);
2980 match tx_header.ordinal {
2981 _ => Err(fidl::Error::UnknownOrdinal {
2982 ordinal: tx_header.ordinal,
2983 protocol_name: <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2984 }),
2985 }
2986 }
2987}
2988
2989pub struct DataSinkRequestStream {
2991 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2992 is_terminated: bool,
2993}
2994
2995impl std::marker::Unpin for DataSinkRequestStream {}
2996
2997impl futures::stream::FusedStream for DataSinkRequestStream {
2998 fn is_terminated(&self) -> bool {
2999 self.is_terminated
3000 }
3001}
3002
3003impl fidl::endpoints::RequestStream for DataSinkRequestStream {
3004 type Protocol = DataSinkMarker;
3005 type ControlHandle = DataSinkControlHandle;
3006
3007 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3008 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3009 }
3010
3011 fn control_handle(&self) -> Self::ControlHandle {
3012 DataSinkControlHandle { inner: self.inner.clone() }
3013 }
3014
3015 fn into_inner(
3016 self,
3017 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3018 {
3019 (self.inner, self.is_terminated)
3020 }
3021
3022 fn from_inner(
3023 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3024 is_terminated: bool,
3025 ) -> Self {
3026 Self { inner, is_terminated }
3027 }
3028}
3029
3030impl futures::Stream for DataSinkRequestStream {
3031 type Item = Result<DataSinkRequest, fidl::Error>;
3032
3033 fn poll_next(
3034 mut self: std::pin::Pin<&mut Self>,
3035 cx: &mut std::task::Context<'_>,
3036 ) -> std::task::Poll<Option<Self::Item>> {
3037 let this = &mut *self;
3038 if this.inner.check_shutdown(cx) {
3039 this.is_terminated = true;
3040 return std::task::Poll::Ready(None);
3041 }
3042 if this.is_terminated {
3043 panic!("polled DataSinkRequestStream after completion");
3044 }
3045 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3046 |bytes, handles| {
3047 match this.inner.channel().read_etc(cx, bytes, handles) {
3048 std::task::Poll::Ready(Ok(())) => {}
3049 std::task::Poll::Pending => return std::task::Poll::Pending,
3050 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3051 this.is_terminated = true;
3052 return std::task::Poll::Ready(None);
3053 }
3054 std::task::Poll::Ready(Err(e)) => {
3055 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3056 e.into(),
3057 ))));
3058 }
3059 }
3060
3061 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3063
3064 std::task::Poll::Ready(Some(match header.ordinal {
3065 0x125a23e561007898 => {
3066 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3067 let mut req = fidl::new_empty!(
3068 DataSinkReadAssetRequest,
3069 fidl::encoding::DefaultFuchsiaResourceDialect
3070 );
3071 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3072 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3073 Ok(DataSinkRequest::ReadAsset {
3074 configuration: req.configuration,
3075 asset: req.asset,
3076
3077 responder: DataSinkReadAssetResponder {
3078 control_handle: std::mem::ManuallyDrop::new(control_handle),
3079 tx_id: header.tx_id,
3080 },
3081 })
3082 }
3083 0x516839ce76c4d0a9 => {
3084 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3085 let mut req = fidl::new_empty!(
3086 DataSinkWriteAssetRequest,
3087 fidl::encoding::DefaultFuchsiaResourceDialect
3088 );
3089 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3090 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3091 Ok(DataSinkRequest::WriteAsset {
3092 configuration: req.configuration,
3093 asset: req.asset,
3094 payload: req.payload,
3095
3096 responder: DataSinkWriteAssetResponder {
3097 control_handle: std::mem::ManuallyDrop::new(control_handle),
3098 tx_id: header.tx_id,
3099 },
3100 })
3101 }
3102 0x514b93454ac0be97 => {
3103 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3104 let mut req = fidl::new_empty!(
3105 DataSinkWriteFirmwareRequest,
3106 fidl::encoding::DefaultFuchsiaResourceDialect
3107 );
3108 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3109 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3110 Ok(DataSinkRequest::WriteFirmware {
3111 configuration: req.configuration,
3112 type_: req.type_,
3113 payload: req.payload,
3114
3115 responder: DataSinkWriteFirmwareResponder {
3116 control_handle: std::mem::ManuallyDrop::new(control_handle),
3117 tx_id: header.tx_id,
3118 },
3119 })
3120 }
3121 0xcb67f9830cae9c3 => {
3122 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3123 let mut req = fidl::new_empty!(
3124 DataSinkReadFirmwareRequest,
3125 fidl::encoding::DefaultFuchsiaResourceDialect
3126 );
3127 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3128 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3129 Ok(DataSinkRequest::ReadFirmware {
3130 configuration: req.configuration,
3131 type_: req.type_,
3132
3133 responder: DataSinkReadFirmwareResponder {
3134 control_handle: std::mem::ManuallyDrop::new(control_handle),
3135 tx_id: header.tx_id,
3136 },
3137 })
3138 }
3139 0x5ee32c861d0259df => {
3140 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3141 let mut req = fidl::new_empty!(
3142 DataSinkWriteVolumesRequest,
3143 fidl::encoding::DefaultFuchsiaResourceDialect
3144 );
3145 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
3146 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3147 Ok(DataSinkRequest::WriteVolumes {
3148 payload: req.payload,
3149
3150 responder: DataSinkWriteVolumesResponder {
3151 control_handle: std::mem::ManuallyDrop::new(control_handle),
3152 tx_id: header.tx_id,
3153 },
3154 })
3155 }
3156 0x4884b6ebaf660d79 => {
3157 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3158 let mut req = fidl::new_empty!(
3159 DataSinkWriteOpaqueVolumeRequest,
3160 fidl::encoding::DefaultFuchsiaResourceDialect
3161 );
3162 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3163 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3164 Ok(DataSinkRequest::WriteOpaqueVolume {
3165 payload: req.payload,
3166
3167 responder: DataSinkWriteOpaqueVolumeResponder {
3168 control_handle: std::mem::ManuallyDrop::new(control_handle),
3169 tx_id: header.tx_id,
3170 },
3171 })
3172 }
3173 0x340f5370c5b1e026 => {
3174 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3175 let mut req = fidl::new_empty!(
3176 DataSinkWriteSparseVolumeRequest,
3177 fidl::encoding::DefaultFuchsiaResourceDialect
3178 );
3179 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3180 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3181 Ok(DataSinkRequest::WriteSparseVolume {
3182 payload: req.payload,
3183
3184 responder: DataSinkWriteSparseVolumeResponder {
3185 control_handle: std::mem::ManuallyDrop::new(control_handle),
3186 tx_id: header.tx_id,
3187 },
3188 })
3189 }
3190 0x3b59d3e2338e3139 => {
3191 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3192 let mut req = fidl::new_empty!(
3193 fidl::encoding::EmptyPayload,
3194 fidl::encoding::DefaultFuchsiaResourceDialect
3195 );
3196 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3197 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3198 Ok(DataSinkRequest::Flush {
3199 responder: DataSinkFlushResponder {
3200 control_handle: std::mem::ManuallyDrop::new(control_handle),
3201 tx_id: header.tx_id,
3202 },
3203 })
3204 }
3205 _ => Err(fidl::Error::UnknownOrdinal {
3206 ordinal: header.ordinal,
3207 protocol_name:
3208 <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3209 }),
3210 }))
3211 },
3212 )
3213 }
3214}
3215
3216#[derive(Debug)]
3235pub enum DataSinkRequest {
3236 ReadAsset { configuration: Configuration, asset: Asset, responder: DataSinkReadAssetResponder },
3242 WriteAsset {
3251 configuration: Configuration,
3252 asset: Asset,
3253 payload: fidl_fuchsia_mem::Buffer,
3254 responder: DataSinkWriteAssetResponder,
3255 },
3256 WriteFirmware {
3271 configuration: Configuration,
3272 type_: String,
3273 payload: fidl_fuchsia_mem::Buffer,
3274 responder: DataSinkWriteFirmwareResponder,
3275 },
3276 ReadFirmware {
3283 configuration: Configuration,
3284 type_: String,
3285 responder: DataSinkReadFirmwareResponder,
3286 },
3287 WriteVolumes {
3290 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
3291 responder: DataSinkWriteVolumesResponder,
3292 },
3293 WriteOpaqueVolume {
3302 payload: fidl_fuchsia_mem::Buffer,
3303 responder: DataSinkWriteOpaqueVolumeResponder,
3304 },
3305 WriteSparseVolume {
3309 payload: fidl_fuchsia_mem::Buffer,
3310 responder: DataSinkWriteSparseVolumeResponder,
3311 },
3312 Flush { responder: DataSinkFlushResponder },
3314}
3315
3316impl DataSinkRequest {
3317 #[allow(irrefutable_let_patterns)]
3318 pub fn into_read_asset(self) -> Option<(Configuration, Asset, DataSinkReadAssetResponder)> {
3319 if let DataSinkRequest::ReadAsset { configuration, asset, responder } = self {
3320 Some((configuration, asset, responder))
3321 } else {
3322 None
3323 }
3324 }
3325
3326 #[allow(irrefutable_let_patterns)]
3327 pub fn into_write_asset(
3328 self,
3329 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DataSinkWriteAssetResponder)> {
3330 if let DataSinkRequest::WriteAsset { configuration, asset, payload, responder } = self {
3331 Some((configuration, asset, payload, responder))
3332 } else {
3333 None
3334 }
3335 }
3336
3337 #[allow(irrefutable_let_patterns)]
3338 pub fn into_write_firmware(
3339 self,
3340 ) -> Option<(Configuration, String, fidl_fuchsia_mem::Buffer, DataSinkWriteFirmwareResponder)>
3341 {
3342 if let DataSinkRequest::WriteFirmware { configuration, type_, payload, responder } = self {
3343 Some((configuration, type_, payload, responder))
3344 } else {
3345 None
3346 }
3347 }
3348
3349 #[allow(irrefutable_let_patterns)]
3350 pub fn into_read_firmware(
3351 self,
3352 ) -> Option<(Configuration, String, DataSinkReadFirmwareResponder)> {
3353 if let DataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
3354 Some((configuration, type_, responder))
3355 } else {
3356 None
3357 }
3358 }
3359
3360 #[allow(irrefutable_let_patterns)]
3361 pub fn into_write_volumes(
3362 self,
3363 ) -> Option<(fidl::endpoints::ClientEnd<PayloadStreamMarker>, DataSinkWriteVolumesResponder)>
3364 {
3365 if let DataSinkRequest::WriteVolumes { payload, responder } = self {
3366 Some((payload, responder))
3367 } else {
3368 None
3369 }
3370 }
3371
3372 #[allow(irrefutable_let_patterns)]
3373 pub fn into_write_opaque_volume(
3374 self,
3375 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteOpaqueVolumeResponder)> {
3376 if let DataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
3377 Some((payload, responder))
3378 } else {
3379 None
3380 }
3381 }
3382
3383 #[allow(irrefutable_let_patterns)]
3384 pub fn into_write_sparse_volume(
3385 self,
3386 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteSparseVolumeResponder)> {
3387 if let DataSinkRequest::WriteSparseVolume { payload, responder } = self {
3388 Some((payload, responder))
3389 } else {
3390 None
3391 }
3392 }
3393
3394 #[allow(irrefutable_let_patterns)]
3395 pub fn into_flush(self) -> Option<(DataSinkFlushResponder)> {
3396 if let DataSinkRequest::Flush { responder } = self { Some((responder)) } else { None }
3397 }
3398
3399 pub fn method_name(&self) -> &'static str {
3401 match *self {
3402 DataSinkRequest::ReadAsset { .. } => "read_asset",
3403 DataSinkRequest::WriteAsset { .. } => "write_asset",
3404 DataSinkRequest::WriteFirmware { .. } => "write_firmware",
3405 DataSinkRequest::ReadFirmware { .. } => "read_firmware",
3406 DataSinkRequest::WriteVolumes { .. } => "write_volumes",
3407 DataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
3408 DataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
3409 DataSinkRequest::Flush { .. } => "flush",
3410 }
3411 }
3412}
3413
3414#[derive(Debug, Clone)]
3415pub struct DataSinkControlHandle {
3416 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3417}
3418
3419impl fidl::endpoints::ControlHandle for DataSinkControlHandle {
3420 fn shutdown(&self) {
3421 self.inner.shutdown()
3422 }
3423
3424 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3425 self.inner.shutdown_with_epitaph(status)
3426 }
3427
3428 fn is_closed(&self) -> bool {
3429 self.inner.channel().is_closed()
3430 }
3431 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3432 self.inner.channel().on_closed()
3433 }
3434
3435 #[cfg(target_os = "fuchsia")]
3436 fn signal_peer(
3437 &self,
3438 clear_mask: zx::Signals,
3439 set_mask: zx::Signals,
3440 ) -> Result<(), zx_status::Status> {
3441 use fidl::Peered;
3442 self.inner.channel().signal_peer(clear_mask, set_mask)
3443 }
3444}
3445
3446impl DataSinkControlHandle {}
3447
3448#[must_use = "FIDL methods require a response to be sent"]
3449#[derive(Debug)]
3450pub struct DataSinkReadAssetResponder {
3451 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3452 tx_id: u32,
3453}
3454
3455impl std::ops::Drop for DataSinkReadAssetResponder {
3459 fn drop(&mut self) {
3460 self.control_handle.shutdown();
3461 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3463 }
3464}
3465
3466impl fidl::endpoints::Responder for DataSinkReadAssetResponder {
3467 type ControlHandle = DataSinkControlHandle;
3468
3469 fn control_handle(&self) -> &DataSinkControlHandle {
3470 &self.control_handle
3471 }
3472
3473 fn drop_without_shutdown(mut self) {
3474 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3476 std::mem::forget(self);
3478 }
3479}
3480
3481impl DataSinkReadAssetResponder {
3482 pub fn send(
3486 self,
3487 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3488 ) -> Result<(), fidl::Error> {
3489 let _result = self.send_raw(result);
3490 if _result.is_err() {
3491 self.control_handle.shutdown();
3492 }
3493 self.drop_without_shutdown();
3494 _result
3495 }
3496
3497 pub fn send_no_shutdown_on_err(
3499 self,
3500 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3501 ) -> Result<(), fidl::Error> {
3502 let _result = self.send_raw(result);
3503 self.drop_without_shutdown();
3504 _result
3505 }
3506
3507 fn send_raw(
3508 &self,
3509 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3510 ) -> Result<(), fidl::Error> {
3511 self.control_handle
3512 .inner
3513 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
3514 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
3515 self.tx_id,
3516 0x125a23e561007898,
3517 fidl::encoding::DynamicFlags::empty(),
3518 )
3519 }
3520}
3521
3522#[must_use = "FIDL methods require a response to be sent"]
3523#[derive(Debug)]
3524pub struct DataSinkWriteAssetResponder {
3525 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3526 tx_id: u32,
3527}
3528
3529impl std::ops::Drop for DataSinkWriteAssetResponder {
3533 fn drop(&mut self) {
3534 self.control_handle.shutdown();
3535 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3537 }
3538}
3539
3540impl fidl::endpoints::Responder for DataSinkWriteAssetResponder {
3541 type ControlHandle = DataSinkControlHandle;
3542
3543 fn control_handle(&self) -> &DataSinkControlHandle {
3544 &self.control_handle
3545 }
3546
3547 fn drop_without_shutdown(mut self) {
3548 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3550 std::mem::forget(self);
3552 }
3553}
3554
3555impl DataSinkWriteAssetResponder {
3556 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3560 let _result = self.send_raw(status);
3561 if _result.is_err() {
3562 self.control_handle.shutdown();
3563 }
3564 self.drop_without_shutdown();
3565 _result
3566 }
3567
3568 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3570 let _result = self.send_raw(status);
3571 self.drop_without_shutdown();
3572 _result
3573 }
3574
3575 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3576 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
3577 (status,),
3578 self.tx_id,
3579 0x516839ce76c4d0a9,
3580 fidl::encoding::DynamicFlags::empty(),
3581 )
3582 }
3583}
3584
3585#[must_use = "FIDL methods require a response to be sent"]
3586#[derive(Debug)]
3587pub struct DataSinkWriteFirmwareResponder {
3588 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3589 tx_id: u32,
3590}
3591
3592impl std::ops::Drop for DataSinkWriteFirmwareResponder {
3596 fn drop(&mut self) {
3597 self.control_handle.shutdown();
3598 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3600 }
3601}
3602
3603impl fidl::endpoints::Responder for DataSinkWriteFirmwareResponder {
3604 type ControlHandle = DataSinkControlHandle;
3605
3606 fn control_handle(&self) -> &DataSinkControlHandle {
3607 &self.control_handle
3608 }
3609
3610 fn drop_without_shutdown(mut self) {
3611 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3613 std::mem::forget(self);
3615 }
3616}
3617
3618impl DataSinkWriteFirmwareResponder {
3619 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3623 let _result = self.send_raw(result);
3624 if _result.is_err() {
3625 self.control_handle.shutdown();
3626 }
3627 self.drop_without_shutdown();
3628 _result
3629 }
3630
3631 pub fn send_no_shutdown_on_err(
3633 self,
3634 mut result: &WriteFirmwareResult,
3635 ) -> Result<(), fidl::Error> {
3636 let _result = self.send_raw(result);
3637 self.drop_without_shutdown();
3638 _result
3639 }
3640
3641 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3642 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
3643 (result,),
3644 self.tx_id,
3645 0x514b93454ac0be97,
3646 fidl::encoding::DynamicFlags::empty(),
3647 )
3648 }
3649}
3650
3651#[must_use = "FIDL methods require a response to be sent"]
3652#[derive(Debug)]
3653pub struct DataSinkReadFirmwareResponder {
3654 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3655 tx_id: u32,
3656}
3657
3658impl std::ops::Drop for DataSinkReadFirmwareResponder {
3662 fn drop(&mut self) {
3663 self.control_handle.shutdown();
3664 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3666 }
3667}
3668
3669impl fidl::endpoints::Responder for DataSinkReadFirmwareResponder {
3670 type ControlHandle = DataSinkControlHandle;
3671
3672 fn control_handle(&self) -> &DataSinkControlHandle {
3673 &self.control_handle
3674 }
3675
3676 fn drop_without_shutdown(mut self) {
3677 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3679 std::mem::forget(self);
3681 }
3682}
3683
3684impl DataSinkReadFirmwareResponder {
3685 pub fn send(
3689 self,
3690 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3691 ) -> Result<(), fidl::Error> {
3692 let _result = self.send_raw(result);
3693 if _result.is_err() {
3694 self.control_handle.shutdown();
3695 }
3696 self.drop_without_shutdown();
3697 _result
3698 }
3699
3700 pub fn send_no_shutdown_on_err(
3702 self,
3703 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3704 ) -> Result<(), fidl::Error> {
3705 let _result = self.send_raw(result);
3706 self.drop_without_shutdown();
3707 _result
3708 }
3709
3710 fn send_raw(
3711 &self,
3712 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3713 ) -> Result<(), fidl::Error> {
3714 self.control_handle
3715 .inner
3716 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
3717 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
3718 self.tx_id,
3719 0xcb67f9830cae9c3,
3720 fidl::encoding::DynamicFlags::empty(),
3721 )
3722 }
3723}
3724
3725#[must_use = "FIDL methods require a response to be sent"]
3726#[derive(Debug)]
3727pub struct DataSinkWriteVolumesResponder {
3728 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3729 tx_id: u32,
3730}
3731
3732impl std::ops::Drop for DataSinkWriteVolumesResponder {
3736 fn drop(&mut self) {
3737 self.control_handle.shutdown();
3738 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3740 }
3741}
3742
3743impl fidl::endpoints::Responder for DataSinkWriteVolumesResponder {
3744 type ControlHandle = DataSinkControlHandle;
3745
3746 fn control_handle(&self) -> &DataSinkControlHandle {
3747 &self.control_handle
3748 }
3749
3750 fn drop_without_shutdown(mut self) {
3751 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3753 std::mem::forget(self);
3755 }
3756}
3757
3758impl DataSinkWriteVolumesResponder {
3759 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3763 let _result = self.send_raw(status);
3764 if _result.is_err() {
3765 self.control_handle.shutdown();
3766 }
3767 self.drop_without_shutdown();
3768 _result
3769 }
3770
3771 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3773 let _result = self.send_raw(status);
3774 self.drop_without_shutdown();
3775 _result
3776 }
3777
3778 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3779 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
3780 (status,),
3781 self.tx_id,
3782 0x5ee32c861d0259df,
3783 fidl::encoding::DynamicFlags::empty(),
3784 )
3785 }
3786}
3787
3788#[must_use = "FIDL methods require a response to be sent"]
3789#[derive(Debug)]
3790pub struct DataSinkWriteOpaqueVolumeResponder {
3791 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3792 tx_id: u32,
3793}
3794
3795impl std::ops::Drop for DataSinkWriteOpaqueVolumeResponder {
3799 fn drop(&mut self) {
3800 self.control_handle.shutdown();
3801 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3803 }
3804}
3805
3806impl fidl::endpoints::Responder for DataSinkWriteOpaqueVolumeResponder {
3807 type ControlHandle = DataSinkControlHandle;
3808
3809 fn control_handle(&self) -> &DataSinkControlHandle {
3810 &self.control_handle
3811 }
3812
3813 fn drop_without_shutdown(mut self) {
3814 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3816 std::mem::forget(self);
3818 }
3819}
3820
3821impl DataSinkWriteOpaqueVolumeResponder {
3822 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3826 let _result = self.send_raw(result);
3827 if _result.is_err() {
3828 self.control_handle.shutdown();
3829 }
3830 self.drop_without_shutdown();
3831 _result
3832 }
3833
3834 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3836 let _result = self.send_raw(result);
3837 self.drop_without_shutdown();
3838 _result
3839 }
3840
3841 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3842 self.control_handle
3843 .inner
3844 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3845 result,
3846 self.tx_id,
3847 0x4884b6ebaf660d79,
3848 fidl::encoding::DynamicFlags::empty(),
3849 )
3850 }
3851}
3852
3853#[must_use = "FIDL methods require a response to be sent"]
3854#[derive(Debug)]
3855pub struct DataSinkWriteSparseVolumeResponder {
3856 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3857 tx_id: u32,
3858}
3859
3860impl std::ops::Drop for DataSinkWriteSparseVolumeResponder {
3864 fn drop(&mut self) {
3865 self.control_handle.shutdown();
3866 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3868 }
3869}
3870
3871impl fidl::endpoints::Responder for DataSinkWriteSparseVolumeResponder {
3872 type ControlHandle = DataSinkControlHandle;
3873
3874 fn control_handle(&self) -> &DataSinkControlHandle {
3875 &self.control_handle
3876 }
3877
3878 fn drop_without_shutdown(mut self) {
3879 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3881 std::mem::forget(self);
3883 }
3884}
3885
3886impl DataSinkWriteSparseVolumeResponder {
3887 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3891 let _result = self.send_raw(result);
3892 if _result.is_err() {
3893 self.control_handle.shutdown();
3894 }
3895 self.drop_without_shutdown();
3896 _result
3897 }
3898
3899 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3901 let _result = self.send_raw(result);
3902 self.drop_without_shutdown();
3903 _result
3904 }
3905
3906 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3907 self.control_handle
3908 .inner
3909 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3910 result,
3911 self.tx_id,
3912 0x340f5370c5b1e026,
3913 fidl::encoding::DynamicFlags::empty(),
3914 )
3915 }
3916}
3917
3918#[must_use = "FIDL methods require a response to be sent"]
3919#[derive(Debug)]
3920pub struct DataSinkFlushResponder {
3921 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3922 tx_id: u32,
3923}
3924
3925impl std::ops::Drop for DataSinkFlushResponder {
3929 fn drop(&mut self) {
3930 self.control_handle.shutdown();
3931 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3933 }
3934}
3935
3936impl fidl::endpoints::Responder for DataSinkFlushResponder {
3937 type ControlHandle = DataSinkControlHandle;
3938
3939 fn control_handle(&self) -> &DataSinkControlHandle {
3940 &self.control_handle
3941 }
3942
3943 fn drop_without_shutdown(mut self) {
3944 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3946 std::mem::forget(self);
3948 }
3949}
3950
3951impl DataSinkFlushResponder {
3952 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3956 let _result = self.send_raw(status);
3957 if _result.is_err() {
3958 self.control_handle.shutdown();
3959 }
3960 self.drop_without_shutdown();
3961 _result
3962 }
3963
3964 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3966 let _result = self.send_raw(status);
3967 self.drop_without_shutdown();
3968 _result
3969 }
3970
3971 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3972 self.control_handle.inner.send::<DataSinkFlushResponse>(
3973 (status,),
3974 self.tx_id,
3975 0x3b59d3e2338e3139,
3976 fidl::encoding::DynamicFlags::empty(),
3977 )
3978 }
3979}
3980
3981#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3982pub struct DynamicDataSinkMarker;
3983
3984impl fidl::endpoints::ProtocolMarker for DynamicDataSinkMarker {
3985 type Proxy = DynamicDataSinkProxy;
3986 type RequestStream = DynamicDataSinkRequestStream;
3987 #[cfg(target_os = "fuchsia")]
3988 type SynchronousProxy = DynamicDataSinkSynchronousProxy;
3989
3990 const DEBUG_NAME: &'static str = "(anonymous) DynamicDataSink";
3991}
3992
3993pub trait DynamicDataSinkProxyInterface: Send + Sync {
3994 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
3995 + Send;
3996 fn r#read_asset(
3997 &self,
3998 configuration: Configuration,
3999 asset: Asset,
4000 ) -> Self::ReadAssetResponseFut;
4001 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4002 fn r#write_asset(
4003 &self,
4004 configuration: Configuration,
4005 asset: Asset,
4006 payload: fidl_fuchsia_mem::Buffer,
4007 ) -> Self::WriteAssetResponseFut;
4008 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
4009 + Send;
4010 fn r#write_firmware(
4011 &self,
4012 configuration: Configuration,
4013 type_: &str,
4014 payload: fidl_fuchsia_mem::Buffer,
4015 ) -> Self::WriteFirmwareResponseFut;
4016 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
4017 + Send;
4018 fn r#read_firmware(
4019 &self,
4020 configuration: Configuration,
4021 type_: &str,
4022 ) -> Self::ReadFirmwareResponseFut;
4023 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4024 fn r#write_volumes(
4025 &self,
4026 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4027 ) -> Self::WriteVolumesResponseFut;
4028 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
4029 + Send;
4030 fn r#write_opaque_volume(
4031 &self,
4032 payload: fidl_fuchsia_mem::Buffer,
4033 ) -> Self::WriteOpaqueVolumeResponseFut;
4034 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
4035 + Send;
4036 fn r#write_sparse_volume(
4037 &self,
4038 payload: fidl_fuchsia_mem::Buffer,
4039 ) -> Self::WriteSparseVolumeResponseFut;
4040 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4041 fn r#flush(&self) -> Self::FlushResponseFut;
4042 type InitializePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4043 + Send;
4044 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut;
4045 type WipePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4046 + Send;
4047 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut;
4048}
4049#[derive(Debug)]
4050#[cfg(target_os = "fuchsia")]
4051pub struct DynamicDataSinkSynchronousProxy {
4052 client: fidl::client::sync::Client,
4053}
4054
4055#[cfg(target_os = "fuchsia")]
4056impl fidl::endpoints::SynchronousProxy for DynamicDataSinkSynchronousProxy {
4057 type Proxy = DynamicDataSinkProxy;
4058 type Protocol = DynamicDataSinkMarker;
4059
4060 fn from_channel(inner: fidl::Channel) -> Self {
4061 Self::new(inner)
4062 }
4063
4064 fn into_channel(self) -> fidl::Channel {
4065 self.client.into_channel()
4066 }
4067
4068 fn as_channel(&self) -> &fidl::Channel {
4069 self.client.as_channel()
4070 }
4071}
4072
4073#[cfg(target_os = "fuchsia")]
4074impl DynamicDataSinkSynchronousProxy {
4075 pub fn new(channel: fidl::Channel) -> Self {
4076 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4077 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4078 }
4079
4080 pub fn into_channel(self) -> fidl::Channel {
4081 self.client.into_channel()
4082 }
4083
4084 pub fn wait_for_event(
4087 &self,
4088 deadline: zx::MonotonicInstant,
4089 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4090 DynamicDataSinkEvent::decode(self.client.wait_for_event(deadline)?)
4091 }
4092
4093 pub fn r#read_asset(
4099 &self,
4100 mut configuration: Configuration,
4101 mut asset: Asset,
4102 ___deadline: zx::MonotonicInstant,
4103 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4104 let _response = self.client.send_query::<
4105 DataSinkReadAssetRequest,
4106 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4107 >(
4108 (configuration, asset,),
4109 0x125a23e561007898,
4110 fidl::encoding::DynamicFlags::empty(),
4111 ___deadline,
4112 )?;
4113 Ok(_response.map(|x| x.asset))
4114 }
4115
4116 pub fn r#write_asset(
4125 &self,
4126 mut configuration: Configuration,
4127 mut asset: Asset,
4128 mut payload: fidl_fuchsia_mem::Buffer,
4129 ___deadline: zx::MonotonicInstant,
4130 ) -> Result<i32, fidl::Error> {
4131 let _response =
4132 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
4133 (configuration, asset, &mut payload),
4134 0x516839ce76c4d0a9,
4135 fidl::encoding::DynamicFlags::empty(),
4136 ___deadline,
4137 )?;
4138 Ok(_response.status)
4139 }
4140
4141 pub fn r#write_firmware(
4156 &self,
4157 mut configuration: Configuration,
4158 mut type_: &str,
4159 mut payload: fidl_fuchsia_mem::Buffer,
4160 ___deadline: zx::MonotonicInstant,
4161 ) -> Result<WriteFirmwareResult, fidl::Error> {
4162 let _response =
4163 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
4164 (configuration, type_, &mut payload),
4165 0x514b93454ac0be97,
4166 fidl::encoding::DynamicFlags::empty(),
4167 ___deadline,
4168 )?;
4169 Ok(_response.result)
4170 }
4171
4172 pub fn r#read_firmware(
4179 &self,
4180 mut configuration: Configuration,
4181 mut type_: &str,
4182 ___deadline: zx::MonotonicInstant,
4183 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4184 let _response = self.client.send_query::<
4185 DataSinkReadFirmwareRequest,
4186 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4187 >(
4188 (configuration, type_,),
4189 0xcb67f9830cae9c3,
4190 fidl::encoding::DynamicFlags::empty(),
4191 ___deadline,
4192 )?;
4193 Ok(_response.map(|x| x.firmware))
4194 }
4195
4196 pub fn r#write_volumes(
4199 &self,
4200 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4201 ___deadline: zx::MonotonicInstant,
4202 ) -> Result<i32, fidl::Error> {
4203 let _response =
4204 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
4205 (payload,),
4206 0x5ee32c861d0259df,
4207 fidl::encoding::DynamicFlags::empty(),
4208 ___deadline,
4209 )?;
4210 Ok(_response.status)
4211 }
4212
4213 pub fn r#write_opaque_volume(
4222 &self,
4223 mut payload: fidl_fuchsia_mem::Buffer,
4224 ___deadline: zx::MonotonicInstant,
4225 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4226 let _response = self.client.send_query::<
4227 DataSinkWriteOpaqueVolumeRequest,
4228 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4229 >(
4230 (&mut payload,),
4231 0x4884b6ebaf660d79,
4232 fidl::encoding::DynamicFlags::empty(),
4233 ___deadline,
4234 )?;
4235 Ok(_response.map(|x| x))
4236 }
4237
4238 pub fn r#write_sparse_volume(
4242 &self,
4243 mut payload: fidl_fuchsia_mem::Buffer,
4244 ___deadline: zx::MonotonicInstant,
4245 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4246 let _response = self.client.send_query::<
4247 DataSinkWriteSparseVolumeRequest,
4248 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4249 >(
4250 (&mut payload,),
4251 0x340f5370c5b1e026,
4252 fidl::encoding::DynamicFlags::empty(),
4253 ___deadline,
4254 )?;
4255 Ok(_response.map(|x| x))
4256 }
4257
4258 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
4260 let _response =
4261 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
4262 (),
4263 0x3b59d3e2338e3139,
4264 fidl::encoding::DynamicFlags::empty(),
4265 ___deadline,
4266 )?;
4267 Ok(_response.status)
4268 }
4269
4270 pub fn r#initialize_partition_tables(
4278 &self,
4279 ___deadline: zx::MonotonicInstant,
4280 ) -> Result<i32, fidl::Error> {
4281 let _response = self.client.send_query::<
4282 fidl::encoding::EmptyPayload,
4283 DynamicDataSinkInitializePartitionTablesResponse,
4284 >(
4285 (),
4286 0x4c798b3813ea9f7e,
4287 fidl::encoding::DynamicFlags::empty(),
4288 ___deadline,
4289 )?;
4290 Ok(_response.status)
4291 }
4292
4293 pub fn r#wipe_partition_tables(
4299 &self,
4300 ___deadline: zx::MonotonicInstant,
4301 ) -> Result<i32, fidl::Error> {
4302 let _response = self
4303 .client
4304 .send_query::<fidl::encoding::EmptyPayload, DynamicDataSinkWipePartitionTablesResponse>(
4305 (),
4306 0x797c0ebeedaf2cc,
4307 fidl::encoding::DynamicFlags::empty(),
4308 ___deadline,
4309 )?;
4310 Ok(_response.status)
4311 }
4312}
4313
4314#[cfg(target_os = "fuchsia")]
4315impl From<DynamicDataSinkSynchronousProxy> for zx::NullableHandle {
4316 fn from(value: DynamicDataSinkSynchronousProxy) -> Self {
4317 value.into_channel().into()
4318 }
4319}
4320
4321#[cfg(target_os = "fuchsia")]
4322impl From<fidl::Channel> for DynamicDataSinkSynchronousProxy {
4323 fn from(value: fidl::Channel) -> Self {
4324 Self::new(value)
4325 }
4326}
4327
4328#[cfg(target_os = "fuchsia")]
4329impl fidl::endpoints::FromClient for DynamicDataSinkSynchronousProxy {
4330 type Protocol = DynamicDataSinkMarker;
4331
4332 fn from_client(value: fidl::endpoints::ClientEnd<DynamicDataSinkMarker>) -> Self {
4333 Self::new(value.into_channel())
4334 }
4335}
4336
4337#[derive(Debug, Clone)]
4338pub struct DynamicDataSinkProxy {
4339 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4340}
4341
4342impl fidl::endpoints::Proxy for DynamicDataSinkProxy {
4343 type Protocol = DynamicDataSinkMarker;
4344
4345 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4346 Self::new(inner)
4347 }
4348
4349 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4350 self.client.into_channel().map_err(|client| Self { client })
4351 }
4352
4353 fn as_channel(&self) -> &::fidl::AsyncChannel {
4354 self.client.as_channel()
4355 }
4356}
4357
4358impl DynamicDataSinkProxy {
4359 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4361 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4362 Self { client: fidl::client::Client::new(channel, protocol_name) }
4363 }
4364
4365 pub fn take_event_stream(&self) -> DynamicDataSinkEventStream {
4371 DynamicDataSinkEventStream { event_receiver: self.client.take_event_receiver() }
4372 }
4373
4374 pub fn r#read_asset(
4380 &self,
4381 mut configuration: Configuration,
4382 mut asset: Asset,
4383 ) -> fidl::client::QueryResponseFut<
4384 DataSinkReadAssetResult,
4385 fidl::encoding::DefaultFuchsiaResourceDialect,
4386 > {
4387 DynamicDataSinkProxyInterface::r#read_asset(self, configuration, asset)
4388 }
4389
4390 pub fn r#write_asset(
4399 &self,
4400 mut configuration: Configuration,
4401 mut asset: Asset,
4402 mut payload: fidl_fuchsia_mem::Buffer,
4403 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4404 DynamicDataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
4405 }
4406
4407 pub fn r#write_firmware(
4422 &self,
4423 mut configuration: Configuration,
4424 mut type_: &str,
4425 mut payload: fidl_fuchsia_mem::Buffer,
4426 ) -> fidl::client::QueryResponseFut<
4427 WriteFirmwareResult,
4428 fidl::encoding::DefaultFuchsiaResourceDialect,
4429 > {
4430 DynamicDataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
4431 }
4432
4433 pub fn r#read_firmware(
4440 &self,
4441 mut configuration: Configuration,
4442 mut type_: &str,
4443 ) -> fidl::client::QueryResponseFut<
4444 DataSinkReadFirmwareResult,
4445 fidl::encoding::DefaultFuchsiaResourceDialect,
4446 > {
4447 DynamicDataSinkProxyInterface::r#read_firmware(self, configuration, type_)
4448 }
4449
4450 pub fn r#write_volumes(
4453 &self,
4454 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4455 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4456 DynamicDataSinkProxyInterface::r#write_volumes(self, payload)
4457 }
4458
4459 pub fn r#write_opaque_volume(
4468 &self,
4469 mut payload: fidl_fuchsia_mem::Buffer,
4470 ) -> fidl::client::QueryResponseFut<
4471 DataSinkWriteOpaqueVolumeResult,
4472 fidl::encoding::DefaultFuchsiaResourceDialect,
4473 > {
4474 DynamicDataSinkProxyInterface::r#write_opaque_volume(self, payload)
4475 }
4476
4477 pub fn r#write_sparse_volume(
4481 &self,
4482 mut payload: fidl_fuchsia_mem::Buffer,
4483 ) -> fidl::client::QueryResponseFut<
4484 DataSinkWriteSparseVolumeResult,
4485 fidl::encoding::DefaultFuchsiaResourceDialect,
4486 > {
4487 DynamicDataSinkProxyInterface::r#write_sparse_volume(self, payload)
4488 }
4489
4490 pub fn r#flush(
4492 &self,
4493 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4494 DynamicDataSinkProxyInterface::r#flush(self)
4495 }
4496
4497 pub fn r#initialize_partition_tables(
4505 &self,
4506 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4507 DynamicDataSinkProxyInterface::r#initialize_partition_tables(self)
4508 }
4509
4510 pub fn r#wipe_partition_tables(
4516 &self,
4517 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4518 DynamicDataSinkProxyInterface::r#wipe_partition_tables(self)
4519 }
4520}
4521
4522impl DynamicDataSinkProxyInterface for DynamicDataSinkProxy {
4523 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
4524 DataSinkReadAssetResult,
4525 fidl::encoding::DefaultFuchsiaResourceDialect,
4526 >;
4527 fn r#read_asset(
4528 &self,
4529 mut configuration: Configuration,
4530 mut asset: Asset,
4531 ) -> Self::ReadAssetResponseFut {
4532 fn _decode(
4533 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4534 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4535 let _response = fidl::client::decode_transaction_body::<
4536 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4537 fidl::encoding::DefaultFuchsiaResourceDialect,
4538 0x125a23e561007898,
4539 >(_buf?)?;
4540 Ok(_response.map(|x| x.asset))
4541 }
4542 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
4543 (configuration, asset),
4544 0x125a23e561007898,
4545 fidl::encoding::DynamicFlags::empty(),
4546 _decode,
4547 )
4548 }
4549
4550 type WriteAssetResponseFut =
4551 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4552 fn r#write_asset(
4553 &self,
4554 mut configuration: Configuration,
4555 mut asset: Asset,
4556 mut payload: fidl_fuchsia_mem::Buffer,
4557 ) -> Self::WriteAssetResponseFut {
4558 fn _decode(
4559 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4560 ) -> Result<i32, fidl::Error> {
4561 let _response = fidl::client::decode_transaction_body::<
4562 DataSinkWriteAssetResponse,
4563 fidl::encoding::DefaultFuchsiaResourceDialect,
4564 0x516839ce76c4d0a9,
4565 >(_buf?)?;
4566 Ok(_response.status)
4567 }
4568 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
4569 (configuration, asset, &mut payload),
4570 0x516839ce76c4d0a9,
4571 fidl::encoding::DynamicFlags::empty(),
4572 _decode,
4573 )
4574 }
4575
4576 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
4577 WriteFirmwareResult,
4578 fidl::encoding::DefaultFuchsiaResourceDialect,
4579 >;
4580 fn r#write_firmware(
4581 &self,
4582 mut configuration: Configuration,
4583 mut type_: &str,
4584 mut payload: fidl_fuchsia_mem::Buffer,
4585 ) -> Self::WriteFirmwareResponseFut {
4586 fn _decode(
4587 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4588 ) -> Result<WriteFirmwareResult, fidl::Error> {
4589 let _response = fidl::client::decode_transaction_body::<
4590 DataSinkWriteFirmwareResponse,
4591 fidl::encoding::DefaultFuchsiaResourceDialect,
4592 0x514b93454ac0be97,
4593 >(_buf?)?;
4594 Ok(_response.result)
4595 }
4596 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
4597 (configuration, type_, &mut payload),
4598 0x514b93454ac0be97,
4599 fidl::encoding::DynamicFlags::empty(),
4600 _decode,
4601 )
4602 }
4603
4604 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
4605 DataSinkReadFirmwareResult,
4606 fidl::encoding::DefaultFuchsiaResourceDialect,
4607 >;
4608 fn r#read_firmware(
4609 &self,
4610 mut configuration: Configuration,
4611 mut type_: &str,
4612 ) -> Self::ReadFirmwareResponseFut {
4613 fn _decode(
4614 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4615 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4616 let _response = fidl::client::decode_transaction_body::<
4617 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4618 fidl::encoding::DefaultFuchsiaResourceDialect,
4619 0xcb67f9830cae9c3,
4620 >(_buf?)?;
4621 Ok(_response.map(|x| x.firmware))
4622 }
4623 self.client
4624 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
4625 (configuration, type_),
4626 0xcb67f9830cae9c3,
4627 fidl::encoding::DynamicFlags::empty(),
4628 _decode,
4629 )
4630 }
4631
4632 type WriteVolumesResponseFut =
4633 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4634 fn r#write_volumes(
4635 &self,
4636 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4637 ) -> Self::WriteVolumesResponseFut {
4638 fn _decode(
4639 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4640 ) -> Result<i32, fidl::Error> {
4641 let _response = fidl::client::decode_transaction_body::<
4642 DataSinkWriteVolumesResponse,
4643 fidl::encoding::DefaultFuchsiaResourceDialect,
4644 0x5ee32c861d0259df,
4645 >(_buf?)?;
4646 Ok(_response.status)
4647 }
4648 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
4649 (payload,),
4650 0x5ee32c861d0259df,
4651 fidl::encoding::DynamicFlags::empty(),
4652 _decode,
4653 )
4654 }
4655
4656 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
4657 DataSinkWriteOpaqueVolumeResult,
4658 fidl::encoding::DefaultFuchsiaResourceDialect,
4659 >;
4660 fn r#write_opaque_volume(
4661 &self,
4662 mut payload: fidl_fuchsia_mem::Buffer,
4663 ) -> Self::WriteOpaqueVolumeResponseFut {
4664 fn _decode(
4665 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4666 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4667 let _response = fidl::client::decode_transaction_body::<
4668 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4669 fidl::encoding::DefaultFuchsiaResourceDialect,
4670 0x4884b6ebaf660d79,
4671 >(_buf?)?;
4672 Ok(_response.map(|x| x))
4673 }
4674 self.client.send_query_and_decode::<
4675 DataSinkWriteOpaqueVolumeRequest,
4676 DataSinkWriteOpaqueVolumeResult,
4677 >(
4678 (&mut payload,),
4679 0x4884b6ebaf660d79,
4680 fidl::encoding::DynamicFlags::empty(),
4681 _decode,
4682 )
4683 }
4684
4685 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
4686 DataSinkWriteSparseVolumeResult,
4687 fidl::encoding::DefaultFuchsiaResourceDialect,
4688 >;
4689 fn r#write_sparse_volume(
4690 &self,
4691 mut payload: fidl_fuchsia_mem::Buffer,
4692 ) -> Self::WriteSparseVolumeResponseFut {
4693 fn _decode(
4694 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4695 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4696 let _response = fidl::client::decode_transaction_body::<
4697 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4698 fidl::encoding::DefaultFuchsiaResourceDialect,
4699 0x340f5370c5b1e026,
4700 >(_buf?)?;
4701 Ok(_response.map(|x| x))
4702 }
4703 self.client.send_query_and_decode::<
4704 DataSinkWriteSparseVolumeRequest,
4705 DataSinkWriteSparseVolumeResult,
4706 >(
4707 (&mut payload,),
4708 0x340f5370c5b1e026,
4709 fidl::encoding::DynamicFlags::empty(),
4710 _decode,
4711 )
4712 }
4713
4714 type FlushResponseFut =
4715 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4716 fn r#flush(&self) -> Self::FlushResponseFut {
4717 fn _decode(
4718 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4719 ) -> Result<i32, fidl::Error> {
4720 let _response = fidl::client::decode_transaction_body::<
4721 DataSinkFlushResponse,
4722 fidl::encoding::DefaultFuchsiaResourceDialect,
4723 0x3b59d3e2338e3139,
4724 >(_buf?)?;
4725 Ok(_response.status)
4726 }
4727 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4728 (),
4729 0x3b59d3e2338e3139,
4730 fidl::encoding::DynamicFlags::empty(),
4731 _decode,
4732 )
4733 }
4734
4735 type InitializePartitionTablesResponseFut =
4736 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4737 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut {
4738 fn _decode(
4739 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4740 ) -> Result<i32, fidl::Error> {
4741 let _response = fidl::client::decode_transaction_body::<
4742 DynamicDataSinkInitializePartitionTablesResponse,
4743 fidl::encoding::DefaultFuchsiaResourceDialect,
4744 0x4c798b3813ea9f7e,
4745 >(_buf?)?;
4746 Ok(_response.status)
4747 }
4748 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4749 (),
4750 0x4c798b3813ea9f7e,
4751 fidl::encoding::DynamicFlags::empty(),
4752 _decode,
4753 )
4754 }
4755
4756 type WipePartitionTablesResponseFut =
4757 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4758 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut {
4759 fn _decode(
4760 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4761 ) -> Result<i32, fidl::Error> {
4762 let _response = fidl::client::decode_transaction_body::<
4763 DynamicDataSinkWipePartitionTablesResponse,
4764 fidl::encoding::DefaultFuchsiaResourceDialect,
4765 0x797c0ebeedaf2cc,
4766 >(_buf?)?;
4767 Ok(_response.status)
4768 }
4769 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4770 (),
4771 0x797c0ebeedaf2cc,
4772 fidl::encoding::DynamicFlags::empty(),
4773 _decode,
4774 )
4775 }
4776}
4777
4778pub struct DynamicDataSinkEventStream {
4779 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4780}
4781
4782impl std::marker::Unpin for DynamicDataSinkEventStream {}
4783
4784impl futures::stream::FusedStream for DynamicDataSinkEventStream {
4785 fn is_terminated(&self) -> bool {
4786 self.event_receiver.is_terminated()
4787 }
4788}
4789
4790impl futures::Stream for DynamicDataSinkEventStream {
4791 type Item = Result<DynamicDataSinkEvent, fidl::Error>;
4792
4793 fn poll_next(
4794 mut self: std::pin::Pin<&mut Self>,
4795 cx: &mut std::task::Context<'_>,
4796 ) -> std::task::Poll<Option<Self::Item>> {
4797 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4798 &mut self.event_receiver,
4799 cx
4800 )?) {
4801 Some(buf) => std::task::Poll::Ready(Some(DynamicDataSinkEvent::decode(buf))),
4802 None => std::task::Poll::Ready(None),
4803 }
4804 }
4805}
4806
4807#[derive(Debug)]
4808pub enum DynamicDataSinkEvent {}
4809
4810impl DynamicDataSinkEvent {
4811 fn decode(
4813 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4814 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4815 let (bytes, _handles) = buf.split_mut();
4816 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4817 debug_assert_eq!(tx_header.tx_id, 0);
4818 match tx_header.ordinal {
4819 _ => Err(fidl::Error::UnknownOrdinal {
4820 ordinal: tx_header.ordinal,
4821 protocol_name:
4822 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4823 }),
4824 }
4825 }
4826}
4827
4828pub struct DynamicDataSinkRequestStream {
4830 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4831 is_terminated: bool,
4832}
4833
4834impl std::marker::Unpin for DynamicDataSinkRequestStream {}
4835
4836impl futures::stream::FusedStream for DynamicDataSinkRequestStream {
4837 fn is_terminated(&self) -> bool {
4838 self.is_terminated
4839 }
4840}
4841
4842impl fidl::endpoints::RequestStream for DynamicDataSinkRequestStream {
4843 type Protocol = DynamicDataSinkMarker;
4844 type ControlHandle = DynamicDataSinkControlHandle;
4845
4846 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4847 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4848 }
4849
4850 fn control_handle(&self) -> Self::ControlHandle {
4851 DynamicDataSinkControlHandle { inner: self.inner.clone() }
4852 }
4853
4854 fn into_inner(
4855 self,
4856 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4857 {
4858 (self.inner, self.is_terminated)
4859 }
4860
4861 fn from_inner(
4862 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4863 is_terminated: bool,
4864 ) -> Self {
4865 Self { inner, is_terminated }
4866 }
4867}
4868
4869impl futures::Stream for DynamicDataSinkRequestStream {
4870 type Item = Result<DynamicDataSinkRequest, fidl::Error>;
4871
4872 fn poll_next(
4873 mut self: std::pin::Pin<&mut Self>,
4874 cx: &mut std::task::Context<'_>,
4875 ) -> std::task::Poll<Option<Self::Item>> {
4876 let this = &mut *self;
4877 if this.inner.check_shutdown(cx) {
4878 this.is_terminated = true;
4879 return std::task::Poll::Ready(None);
4880 }
4881 if this.is_terminated {
4882 panic!("polled DynamicDataSinkRequestStream after completion");
4883 }
4884 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4885 |bytes, handles| {
4886 match this.inner.channel().read_etc(cx, bytes, handles) {
4887 std::task::Poll::Ready(Ok(())) => {}
4888 std::task::Poll::Pending => return std::task::Poll::Pending,
4889 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4890 this.is_terminated = true;
4891 return std::task::Poll::Ready(None);
4892 }
4893 std::task::Poll::Ready(Err(e)) => {
4894 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4895 e.into(),
4896 ))));
4897 }
4898 }
4899
4900 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4902
4903 std::task::Poll::Ready(Some(match header.ordinal {
4904 0x125a23e561007898 => {
4905 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4906 let mut req = fidl::new_empty!(
4907 DataSinkReadAssetRequest,
4908 fidl::encoding::DefaultFuchsiaResourceDialect
4909 );
4910 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4911 let control_handle =
4912 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4913 Ok(DynamicDataSinkRequest::ReadAsset {
4914 configuration: req.configuration,
4915 asset: req.asset,
4916
4917 responder: DynamicDataSinkReadAssetResponder {
4918 control_handle: std::mem::ManuallyDrop::new(control_handle),
4919 tx_id: header.tx_id,
4920 },
4921 })
4922 }
4923 0x516839ce76c4d0a9 => {
4924 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4925 let mut req = fidl::new_empty!(
4926 DataSinkWriteAssetRequest,
4927 fidl::encoding::DefaultFuchsiaResourceDialect
4928 );
4929 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4930 let control_handle =
4931 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4932 Ok(DynamicDataSinkRequest::WriteAsset {
4933 configuration: req.configuration,
4934 asset: req.asset,
4935 payload: req.payload,
4936
4937 responder: DynamicDataSinkWriteAssetResponder {
4938 control_handle: std::mem::ManuallyDrop::new(control_handle),
4939 tx_id: header.tx_id,
4940 },
4941 })
4942 }
4943 0x514b93454ac0be97 => {
4944 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4945 let mut req = fidl::new_empty!(
4946 DataSinkWriteFirmwareRequest,
4947 fidl::encoding::DefaultFuchsiaResourceDialect
4948 );
4949 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4950 let control_handle =
4951 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4952 Ok(DynamicDataSinkRequest::WriteFirmware {
4953 configuration: req.configuration,
4954 type_: req.type_,
4955 payload: req.payload,
4956
4957 responder: DynamicDataSinkWriteFirmwareResponder {
4958 control_handle: std::mem::ManuallyDrop::new(control_handle),
4959 tx_id: header.tx_id,
4960 },
4961 })
4962 }
4963 0xcb67f9830cae9c3 => {
4964 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4965 let mut req = fidl::new_empty!(
4966 DataSinkReadFirmwareRequest,
4967 fidl::encoding::DefaultFuchsiaResourceDialect
4968 );
4969 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4970 let control_handle =
4971 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4972 Ok(DynamicDataSinkRequest::ReadFirmware {
4973 configuration: req.configuration,
4974 type_: req.type_,
4975
4976 responder: DynamicDataSinkReadFirmwareResponder {
4977 control_handle: std::mem::ManuallyDrop::new(control_handle),
4978 tx_id: header.tx_id,
4979 },
4980 })
4981 }
4982 0x5ee32c861d0259df => {
4983 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4984 let mut req = fidl::new_empty!(
4985 DataSinkWriteVolumesRequest,
4986 fidl::encoding::DefaultFuchsiaResourceDialect
4987 );
4988 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
4989 let control_handle =
4990 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4991 Ok(DynamicDataSinkRequest::WriteVolumes {
4992 payload: req.payload,
4993
4994 responder: DynamicDataSinkWriteVolumesResponder {
4995 control_handle: std::mem::ManuallyDrop::new(control_handle),
4996 tx_id: header.tx_id,
4997 },
4998 })
4999 }
5000 0x4884b6ebaf660d79 => {
5001 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5002 let mut req = fidl::new_empty!(
5003 DataSinkWriteOpaqueVolumeRequest,
5004 fidl::encoding::DefaultFuchsiaResourceDialect
5005 );
5006 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
5007 let control_handle =
5008 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5009 Ok(DynamicDataSinkRequest::WriteOpaqueVolume {
5010 payload: req.payload,
5011
5012 responder: DynamicDataSinkWriteOpaqueVolumeResponder {
5013 control_handle: std::mem::ManuallyDrop::new(control_handle),
5014 tx_id: header.tx_id,
5015 },
5016 })
5017 }
5018 0x340f5370c5b1e026 => {
5019 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5020 let mut req = fidl::new_empty!(
5021 DataSinkWriteSparseVolumeRequest,
5022 fidl::encoding::DefaultFuchsiaResourceDialect
5023 );
5024 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
5025 let control_handle =
5026 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5027 Ok(DynamicDataSinkRequest::WriteSparseVolume {
5028 payload: req.payload,
5029
5030 responder: DynamicDataSinkWriteSparseVolumeResponder {
5031 control_handle: std::mem::ManuallyDrop::new(control_handle),
5032 tx_id: header.tx_id,
5033 },
5034 })
5035 }
5036 0x3b59d3e2338e3139 => {
5037 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5038 let mut req = fidl::new_empty!(
5039 fidl::encoding::EmptyPayload,
5040 fidl::encoding::DefaultFuchsiaResourceDialect
5041 );
5042 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5043 let control_handle =
5044 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5045 Ok(DynamicDataSinkRequest::Flush {
5046 responder: DynamicDataSinkFlushResponder {
5047 control_handle: std::mem::ManuallyDrop::new(control_handle),
5048 tx_id: header.tx_id,
5049 },
5050 })
5051 }
5052 0x4c798b3813ea9f7e => {
5053 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5054 let mut req = fidl::new_empty!(
5055 fidl::encoding::EmptyPayload,
5056 fidl::encoding::DefaultFuchsiaResourceDialect
5057 );
5058 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5059 let control_handle =
5060 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5061 Ok(DynamicDataSinkRequest::InitializePartitionTables {
5062 responder: DynamicDataSinkInitializePartitionTablesResponder {
5063 control_handle: std::mem::ManuallyDrop::new(control_handle),
5064 tx_id: header.tx_id,
5065 },
5066 })
5067 }
5068 0x797c0ebeedaf2cc => {
5069 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5070 let mut req = fidl::new_empty!(
5071 fidl::encoding::EmptyPayload,
5072 fidl::encoding::DefaultFuchsiaResourceDialect
5073 );
5074 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5075 let control_handle =
5076 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5077 Ok(DynamicDataSinkRequest::WipePartitionTables {
5078 responder: DynamicDataSinkWipePartitionTablesResponder {
5079 control_handle: std::mem::ManuallyDrop::new(control_handle),
5080 tx_id: header.tx_id,
5081 },
5082 })
5083 }
5084 _ => Err(fidl::Error::UnknownOrdinal {
5085 ordinal: header.ordinal,
5086 protocol_name:
5087 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5088 }),
5089 }))
5090 },
5091 )
5092 }
5093}
5094
5095#[derive(Debug)]
5097pub enum DynamicDataSinkRequest {
5098 ReadAsset {
5104 configuration: Configuration,
5105 asset: Asset,
5106 responder: DynamicDataSinkReadAssetResponder,
5107 },
5108 WriteAsset {
5117 configuration: Configuration,
5118 asset: Asset,
5119 payload: fidl_fuchsia_mem::Buffer,
5120 responder: DynamicDataSinkWriteAssetResponder,
5121 },
5122 WriteFirmware {
5137 configuration: Configuration,
5138 type_: String,
5139 payload: fidl_fuchsia_mem::Buffer,
5140 responder: DynamicDataSinkWriteFirmwareResponder,
5141 },
5142 ReadFirmware {
5149 configuration: Configuration,
5150 type_: String,
5151 responder: DynamicDataSinkReadFirmwareResponder,
5152 },
5153 WriteVolumes {
5156 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5157 responder: DynamicDataSinkWriteVolumesResponder,
5158 },
5159 WriteOpaqueVolume {
5168 payload: fidl_fuchsia_mem::Buffer,
5169 responder: DynamicDataSinkWriteOpaqueVolumeResponder,
5170 },
5171 WriteSparseVolume {
5175 payload: fidl_fuchsia_mem::Buffer,
5176 responder: DynamicDataSinkWriteSparseVolumeResponder,
5177 },
5178 Flush { responder: DynamicDataSinkFlushResponder },
5180 InitializePartitionTables { responder: DynamicDataSinkInitializePartitionTablesResponder },
5188 WipePartitionTables { responder: DynamicDataSinkWipePartitionTablesResponder },
5194}
5195
5196impl DynamicDataSinkRequest {
5197 #[allow(irrefutable_let_patterns)]
5198 pub fn into_read_asset(
5199 self,
5200 ) -> Option<(Configuration, Asset, DynamicDataSinkReadAssetResponder)> {
5201 if let DynamicDataSinkRequest::ReadAsset { configuration, asset, responder } = self {
5202 Some((configuration, asset, responder))
5203 } else {
5204 None
5205 }
5206 }
5207
5208 #[allow(irrefutable_let_patterns)]
5209 pub fn into_write_asset(
5210 self,
5211 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteAssetResponder)>
5212 {
5213 if let DynamicDataSinkRequest::WriteAsset { configuration, asset, payload, responder } =
5214 self
5215 {
5216 Some((configuration, asset, payload, responder))
5217 } else {
5218 None
5219 }
5220 }
5221
5222 #[allow(irrefutable_let_patterns)]
5223 pub fn into_write_firmware(
5224 self,
5225 ) -> Option<(
5226 Configuration,
5227 String,
5228 fidl_fuchsia_mem::Buffer,
5229 DynamicDataSinkWriteFirmwareResponder,
5230 )> {
5231 if let DynamicDataSinkRequest::WriteFirmware { configuration, type_, payload, responder } =
5232 self
5233 {
5234 Some((configuration, type_, payload, responder))
5235 } else {
5236 None
5237 }
5238 }
5239
5240 #[allow(irrefutable_let_patterns)]
5241 pub fn into_read_firmware(
5242 self,
5243 ) -> Option<(Configuration, String, DynamicDataSinkReadFirmwareResponder)> {
5244 if let DynamicDataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
5245 Some((configuration, type_, responder))
5246 } else {
5247 None
5248 }
5249 }
5250
5251 #[allow(irrefutable_let_patterns)]
5252 pub fn into_write_volumes(
5253 self,
5254 ) -> Option<(
5255 fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5256 DynamicDataSinkWriteVolumesResponder,
5257 )> {
5258 if let DynamicDataSinkRequest::WriteVolumes { payload, responder } = self {
5259 Some((payload, responder))
5260 } else {
5261 None
5262 }
5263 }
5264
5265 #[allow(irrefutable_let_patterns)]
5266 pub fn into_write_opaque_volume(
5267 self,
5268 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteOpaqueVolumeResponder)> {
5269 if let DynamicDataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
5270 Some((payload, responder))
5271 } else {
5272 None
5273 }
5274 }
5275
5276 #[allow(irrefutable_let_patterns)]
5277 pub fn into_write_sparse_volume(
5278 self,
5279 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteSparseVolumeResponder)> {
5280 if let DynamicDataSinkRequest::WriteSparseVolume { payload, responder } = self {
5281 Some((payload, responder))
5282 } else {
5283 None
5284 }
5285 }
5286
5287 #[allow(irrefutable_let_patterns)]
5288 pub fn into_flush(self) -> Option<(DynamicDataSinkFlushResponder)> {
5289 if let DynamicDataSinkRequest::Flush { responder } = self {
5290 Some((responder))
5291 } else {
5292 None
5293 }
5294 }
5295
5296 #[allow(irrefutable_let_patterns)]
5297 pub fn into_initialize_partition_tables(
5298 self,
5299 ) -> Option<(DynamicDataSinkInitializePartitionTablesResponder)> {
5300 if let DynamicDataSinkRequest::InitializePartitionTables { responder } = self {
5301 Some((responder))
5302 } else {
5303 None
5304 }
5305 }
5306
5307 #[allow(irrefutable_let_patterns)]
5308 pub fn into_wipe_partition_tables(
5309 self,
5310 ) -> Option<(DynamicDataSinkWipePartitionTablesResponder)> {
5311 if let DynamicDataSinkRequest::WipePartitionTables { responder } = self {
5312 Some((responder))
5313 } else {
5314 None
5315 }
5316 }
5317
5318 pub fn method_name(&self) -> &'static str {
5320 match *self {
5321 DynamicDataSinkRequest::ReadAsset { .. } => "read_asset",
5322 DynamicDataSinkRequest::WriteAsset { .. } => "write_asset",
5323 DynamicDataSinkRequest::WriteFirmware { .. } => "write_firmware",
5324 DynamicDataSinkRequest::ReadFirmware { .. } => "read_firmware",
5325 DynamicDataSinkRequest::WriteVolumes { .. } => "write_volumes",
5326 DynamicDataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
5327 DynamicDataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
5328 DynamicDataSinkRequest::Flush { .. } => "flush",
5329 DynamicDataSinkRequest::InitializePartitionTables { .. } => {
5330 "initialize_partition_tables"
5331 }
5332 DynamicDataSinkRequest::WipePartitionTables { .. } => "wipe_partition_tables",
5333 }
5334 }
5335}
5336
5337#[derive(Debug, Clone)]
5338pub struct DynamicDataSinkControlHandle {
5339 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5340}
5341
5342impl fidl::endpoints::ControlHandle for DynamicDataSinkControlHandle {
5343 fn shutdown(&self) {
5344 self.inner.shutdown()
5345 }
5346
5347 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5348 self.inner.shutdown_with_epitaph(status)
5349 }
5350
5351 fn is_closed(&self) -> bool {
5352 self.inner.channel().is_closed()
5353 }
5354 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5355 self.inner.channel().on_closed()
5356 }
5357
5358 #[cfg(target_os = "fuchsia")]
5359 fn signal_peer(
5360 &self,
5361 clear_mask: zx::Signals,
5362 set_mask: zx::Signals,
5363 ) -> Result<(), zx_status::Status> {
5364 use fidl::Peered;
5365 self.inner.channel().signal_peer(clear_mask, set_mask)
5366 }
5367}
5368
5369impl DynamicDataSinkControlHandle {}
5370
5371#[must_use = "FIDL methods require a response to be sent"]
5372#[derive(Debug)]
5373pub struct DynamicDataSinkReadAssetResponder {
5374 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5375 tx_id: u32,
5376}
5377
5378impl std::ops::Drop for DynamicDataSinkReadAssetResponder {
5382 fn drop(&mut self) {
5383 self.control_handle.shutdown();
5384 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5386 }
5387}
5388
5389impl fidl::endpoints::Responder for DynamicDataSinkReadAssetResponder {
5390 type ControlHandle = DynamicDataSinkControlHandle;
5391
5392 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5393 &self.control_handle
5394 }
5395
5396 fn drop_without_shutdown(mut self) {
5397 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5399 std::mem::forget(self);
5401 }
5402}
5403
5404impl DynamicDataSinkReadAssetResponder {
5405 pub fn send(
5409 self,
5410 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5411 ) -> Result<(), fidl::Error> {
5412 let _result = self.send_raw(result);
5413 if _result.is_err() {
5414 self.control_handle.shutdown();
5415 }
5416 self.drop_without_shutdown();
5417 _result
5418 }
5419
5420 pub fn send_no_shutdown_on_err(
5422 self,
5423 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5424 ) -> Result<(), fidl::Error> {
5425 let _result = self.send_raw(result);
5426 self.drop_without_shutdown();
5427 _result
5428 }
5429
5430 fn send_raw(
5431 &self,
5432 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5433 ) -> Result<(), fidl::Error> {
5434 self.control_handle
5435 .inner
5436 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
5437 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
5438 self.tx_id,
5439 0x125a23e561007898,
5440 fidl::encoding::DynamicFlags::empty(),
5441 )
5442 }
5443}
5444
5445#[must_use = "FIDL methods require a response to be sent"]
5446#[derive(Debug)]
5447pub struct DynamicDataSinkWriteAssetResponder {
5448 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5449 tx_id: u32,
5450}
5451
5452impl std::ops::Drop for DynamicDataSinkWriteAssetResponder {
5456 fn drop(&mut self) {
5457 self.control_handle.shutdown();
5458 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5460 }
5461}
5462
5463impl fidl::endpoints::Responder for DynamicDataSinkWriteAssetResponder {
5464 type ControlHandle = DynamicDataSinkControlHandle;
5465
5466 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5467 &self.control_handle
5468 }
5469
5470 fn drop_without_shutdown(mut self) {
5471 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5473 std::mem::forget(self);
5475 }
5476}
5477
5478impl DynamicDataSinkWriteAssetResponder {
5479 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5483 let _result = self.send_raw(status);
5484 if _result.is_err() {
5485 self.control_handle.shutdown();
5486 }
5487 self.drop_without_shutdown();
5488 _result
5489 }
5490
5491 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5493 let _result = self.send_raw(status);
5494 self.drop_without_shutdown();
5495 _result
5496 }
5497
5498 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5499 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
5500 (status,),
5501 self.tx_id,
5502 0x516839ce76c4d0a9,
5503 fidl::encoding::DynamicFlags::empty(),
5504 )
5505 }
5506}
5507
5508#[must_use = "FIDL methods require a response to be sent"]
5509#[derive(Debug)]
5510pub struct DynamicDataSinkWriteFirmwareResponder {
5511 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5512 tx_id: u32,
5513}
5514
5515impl std::ops::Drop for DynamicDataSinkWriteFirmwareResponder {
5519 fn drop(&mut self) {
5520 self.control_handle.shutdown();
5521 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5523 }
5524}
5525
5526impl fidl::endpoints::Responder for DynamicDataSinkWriteFirmwareResponder {
5527 type ControlHandle = DynamicDataSinkControlHandle;
5528
5529 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5530 &self.control_handle
5531 }
5532
5533 fn drop_without_shutdown(mut self) {
5534 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5536 std::mem::forget(self);
5538 }
5539}
5540
5541impl DynamicDataSinkWriteFirmwareResponder {
5542 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5546 let _result = self.send_raw(result);
5547 if _result.is_err() {
5548 self.control_handle.shutdown();
5549 }
5550 self.drop_without_shutdown();
5551 _result
5552 }
5553
5554 pub fn send_no_shutdown_on_err(
5556 self,
5557 mut result: &WriteFirmwareResult,
5558 ) -> Result<(), fidl::Error> {
5559 let _result = self.send_raw(result);
5560 self.drop_without_shutdown();
5561 _result
5562 }
5563
5564 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5565 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
5566 (result,),
5567 self.tx_id,
5568 0x514b93454ac0be97,
5569 fidl::encoding::DynamicFlags::empty(),
5570 )
5571 }
5572}
5573
5574#[must_use = "FIDL methods require a response to be sent"]
5575#[derive(Debug)]
5576pub struct DynamicDataSinkReadFirmwareResponder {
5577 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5578 tx_id: u32,
5579}
5580
5581impl std::ops::Drop for DynamicDataSinkReadFirmwareResponder {
5585 fn drop(&mut self) {
5586 self.control_handle.shutdown();
5587 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5589 }
5590}
5591
5592impl fidl::endpoints::Responder for DynamicDataSinkReadFirmwareResponder {
5593 type ControlHandle = DynamicDataSinkControlHandle;
5594
5595 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5596 &self.control_handle
5597 }
5598
5599 fn drop_without_shutdown(mut self) {
5600 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5602 std::mem::forget(self);
5604 }
5605}
5606
5607impl DynamicDataSinkReadFirmwareResponder {
5608 pub fn send(
5612 self,
5613 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5614 ) -> Result<(), fidl::Error> {
5615 let _result = self.send_raw(result);
5616 if _result.is_err() {
5617 self.control_handle.shutdown();
5618 }
5619 self.drop_without_shutdown();
5620 _result
5621 }
5622
5623 pub fn send_no_shutdown_on_err(
5625 self,
5626 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5627 ) -> Result<(), fidl::Error> {
5628 let _result = self.send_raw(result);
5629 self.drop_without_shutdown();
5630 _result
5631 }
5632
5633 fn send_raw(
5634 &self,
5635 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5636 ) -> Result<(), fidl::Error> {
5637 self.control_handle
5638 .inner
5639 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
5640 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
5641 self.tx_id,
5642 0xcb67f9830cae9c3,
5643 fidl::encoding::DynamicFlags::empty(),
5644 )
5645 }
5646}
5647
5648#[must_use = "FIDL methods require a response to be sent"]
5649#[derive(Debug)]
5650pub struct DynamicDataSinkWriteVolumesResponder {
5651 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5652 tx_id: u32,
5653}
5654
5655impl std::ops::Drop for DynamicDataSinkWriteVolumesResponder {
5659 fn drop(&mut self) {
5660 self.control_handle.shutdown();
5661 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5663 }
5664}
5665
5666impl fidl::endpoints::Responder for DynamicDataSinkWriteVolumesResponder {
5667 type ControlHandle = DynamicDataSinkControlHandle;
5668
5669 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5670 &self.control_handle
5671 }
5672
5673 fn drop_without_shutdown(mut self) {
5674 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5676 std::mem::forget(self);
5678 }
5679}
5680
5681impl DynamicDataSinkWriteVolumesResponder {
5682 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5686 let _result = self.send_raw(status);
5687 if _result.is_err() {
5688 self.control_handle.shutdown();
5689 }
5690 self.drop_without_shutdown();
5691 _result
5692 }
5693
5694 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5696 let _result = self.send_raw(status);
5697 self.drop_without_shutdown();
5698 _result
5699 }
5700
5701 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5702 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
5703 (status,),
5704 self.tx_id,
5705 0x5ee32c861d0259df,
5706 fidl::encoding::DynamicFlags::empty(),
5707 )
5708 }
5709}
5710
5711#[must_use = "FIDL methods require a response to be sent"]
5712#[derive(Debug)]
5713pub struct DynamicDataSinkWriteOpaqueVolumeResponder {
5714 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5715 tx_id: u32,
5716}
5717
5718impl std::ops::Drop for DynamicDataSinkWriteOpaqueVolumeResponder {
5722 fn drop(&mut self) {
5723 self.control_handle.shutdown();
5724 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5726 }
5727}
5728
5729impl fidl::endpoints::Responder for DynamicDataSinkWriteOpaqueVolumeResponder {
5730 type ControlHandle = DynamicDataSinkControlHandle;
5731
5732 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5733 &self.control_handle
5734 }
5735
5736 fn drop_without_shutdown(mut self) {
5737 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5739 std::mem::forget(self);
5741 }
5742}
5743
5744impl DynamicDataSinkWriteOpaqueVolumeResponder {
5745 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5749 let _result = self.send_raw(result);
5750 if _result.is_err() {
5751 self.control_handle.shutdown();
5752 }
5753 self.drop_without_shutdown();
5754 _result
5755 }
5756
5757 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5759 let _result = self.send_raw(result);
5760 self.drop_without_shutdown();
5761 _result
5762 }
5763
5764 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5765 self.control_handle
5766 .inner
5767 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5768 result,
5769 self.tx_id,
5770 0x4884b6ebaf660d79,
5771 fidl::encoding::DynamicFlags::empty(),
5772 )
5773 }
5774}
5775
5776#[must_use = "FIDL methods require a response to be sent"]
5777#[derive(Debug)]
5778pub struct DynamicDataSinkWriteSparseVolumeResponder {
5779 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5780 tx_id: u32,
5781}
5782
5783impl std::ops::Drop for DynamicDataSinkWriteSparseVolumeResponder {
5787 fn drop(&mut self) {
5788 self.control_handle.shutdown();
5789 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5791 }
5792}
5793
5794impl fidl::endpoints::Responder for DynamicDataSinkWriteSparseVolumeResponder {
5795 type ControlHandle = DynamicDataSinkControlHandle;
5796
5797 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5798 &self.control_handle
5799 }
5800
5801 fn drop_without_shutdown(mut self) {
5802 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5804 std::mem::forget(self);
5806 }
5807}
5808
5809impl DynamicDataSinkWriteSparseVolumeResponder {
5810 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5814 let _result = self.send_raw(result);
5815 if _result.is_err() {
5816 self.control_handle.shutdown();
5817 }
5818 self.drop_without_shutdown();
5819 _result
5820 }
5821
5822 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5824 let _result = self.send_raw(result);
5825 self.drop_without_shutdown();
5826 _result
5827 }
5828
5829 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5830 self.control_handle
5831 .inner
5832 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5833 result,
5834 self.tx_id,
5835 0x340f5370c5b1e026,
5836 fidl::encoding::DynamicFlags::empty(),
5837 )
5838 }
5839}
5840
5841#[must_use = "FIDL methods require a response to be sent"]
5842#[derive(Debug)]
5843pub struct DynamicDataSinkFlushResponder {
5844 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5845 tx_id: u32,
5846}
5847
5848impl std::ops::Drop for DynamicDataSinkFlushResponder {
5852 fn drop(&mut self) {
5853 self.control_handle.shutdown();
5854 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5856 }
5857}
5858
5859impl fidl::endpoints::Responder for DynamicDataSinkFlushResponder {
5860 type ControlHandle = DynamicDataSinkControlHandle;
5861
5862 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5863 &self.control_handle
5864 }
5865
5866 fn drop_without_shutdown(mut self) {
5867 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5869 std::mem::forget(self);
5871 }
5872}
5873
5874impl DynamicDataSinkFlushResponder {
5875 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5879 let _result = self.send_raw(status);
5880 if _result.is_err() {
5881 self.control_handle.shutdown();
5882 }
5883 self.drop_without_shutdown();
5884 _result
5885 }
5886
5887 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5889 let _result = self.send_raw(status);
5890 self.drop_without_shutdown();
5891 _result
5892 }
5893
5894 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5895 self.control_handle.inner.send::<DataSinkFlushResponse>(
5896 (status,),
5897 self.tx_id,
5898 0x3b59d3e2338e3139,
5899 fidl::encoding::DynamicFlags::empty(),
5900 )
5901 }
5902}
5903
5904#[must_use = "FIDL methods require a response to be sent"]
5905#[derive(Debug)]
5906pub struct DynamicDataSinkInitializePartitionTablesResponder {
5907 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5908 tx_id: u32,
5909}
5910
5911impl std::ops::Drop for DynamicDataSinkInitializePartitionTablesResponder {
5915 fn drop(&mut self) {
5916 self.control_handle.shutdown();
5917 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5919 }
5920}
5921
5922impl fidl::endpoints::Responder for DynamicDataSinkInitializePartitionTablesResponder {
5923 type ControlHandle = DynamicDataSinkControlHandle;
5924
5925 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5926 &self.control_handle
5927 }
5928
5929 fn drop_without_shutdown(mut self) {
5930 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5932 std::mem::forget(self);
5934 }
5935}
5936
5937impl DynamicDataSinkInitializePartitionTablesResponder {
5938 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5942 let _result = self.send_raw(status);
5943 if _result.is_err() {
5944 self.control_handle.shutdown();
5945 }
5946 self.drop_without_shutdown();
5947 _result
5948 }
5949
5950 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5952 let _result = self.send_raw(status);
5953 self.drop_without_shutdown();
5954 _result
5955 }
5956
5957 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5958 self.control_handle.inner.send::<DynamicDataSinkInitializePartitionTablesResponse>(
5959 (status,),
5960 self.tx_id,
5961 0x4c798b3813ea9f7e,
5962 fidl::encoding::DynamicFlags::empty(),
5963 )
5964 }
5965}
5966
5967#[must_use = "FIDL methods require a response to be sent"]
5968#[derive(Debug)]
5969pub struct DynamicDataSinkWipePartitionTablesResponder {
5970 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5971 tx_id: u32,
5972}
5973
5974impl std::ops::Drop for DynamicDataSinkWipePartitionTablesResponder {
5978 fn drop(&mut self) {
5979 self.control_handle.shutdown();
5980 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5982 }
5983}
5984
5985impl fidl::endpoints::Responder for DynamicDataSinkWipePartitionTablesResponder {
5986 type ControlHandle = DynamicDataSinkControlHandle;
5987
5988 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5989 &self.control_handle
5990 }
5991
5992 fn drop_without_shutdown(mut self) {
5993 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5995 std::mem::forget(self);
5997 }
5998}
5999
6000impl DynamicDataSinkWipePartitionTablesResponder {
6001 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
6005 let _result = self.send_raw(status);
6006 if _result.is_err() {
6007 self.control_handle.shutdown();
6008 }
6009 self.drop_without_shutdown();
6010 _result
6011 }
6012
6013 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
6015 let _result = self.send_raw(status);
6016 self.drop_without_shutdown();
6017 _result
6018 }
6019
6020 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
6021 self.control_handle.inner.send::<DynamicDataSinkWipePartitionTablesResponse>(
6022 (status,),
6023 self.tx_id,
6024 0x797c0ebeedaf2cc,
6025 fidl::encoding::DynamicFlags::empty(),
6026 )
6027 }
6028}
6029
6030#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6031pub struct PaverMarker;
6032
6033impl fidl::endpoints::ProtocolMarker for PaverMarker {
6034 type Proxy = PaverProxy;
6035 type RequestStream = PaverRequestStream;
6036 #[cfg(target_os = "fuchsia")]
6037 type SynchronousProxy = PaverSynchronousProxy;
6038
6039 const DEBUG_NAME: &'static str = "fuchsia.paver.Paver";
6040}
6041impl fidl::endpoints::DiscoverableProtocolMarker for PaverMarker {}
6042
6043pub trait PaverProxyInterface: Send + Sync {
6044 fn r#find_data_sink(
6045 &self,
6046 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6047 ) -> Result<(), fidl::Error>;
6048 fn r#find_partition_table_manager(
6049 &self,
6050 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6051 ) -> Result<(), fidl::Error>;
6052 fn r#find_boot_manager(
6053 &self,
6054 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6055 ) -> Result<(), fidl::Error>;
6056 fn r#find_sysconfig(
6057 &self,
6058 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6059 ) -> Result<(), fidl::Error>;
6060}
6061#[derive(Debug)]
6062#[cfg(target_os = "fuchsia")]
6063pub struct PaverSynchronousProxy {
6064 client: fidl::client::sync::Client,
6065}
6066
6067#[cfg(target_os = "fuchsia")]
6068impl fidl::endpoints::SynchronousProxy for PaverSynchronousProxy {
6069 type Proxy = PaverProxy;
6070 type Protocol = PaverMarker;
6071
6072 fn from_channel(inner: fidl::Channel) -> Self {
6073 Self::new(inner)
6074 }
6075
6076 fn into_channel(self) -> fidl::Channel {
6077 self.client.into_channel()
6078 }
6079
6080 fn as_channel(&self) -> &fidl::Channel {
6081 self.client.as_channel()
6082 }
6083}
6084
6085#[cfg(target_os = "fuchsia")]
6086impl PaverSynchronousProxy {
6087 pub fn new(channel: fidl::Channel) -> Self {
6088 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6089 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6090 }
6091
6092 pub fn into_channel(self) -> fidl::Channel {
6093 self.client.into_channel()
6094 }
6095
6096 pub fn wait_for_event(
6099 &self,
6100 deadline: zx::MonotonicInstant,
6101 ) -> Result<PaverEvent, fidl::Error> {
6102 PaverEvent::decode(self.client.wait_for_event(deadline)?)
6103 }
6104
6105 pub fn r#find_data_sink(
6111 &self,
6112 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6113 ) -> Result<(), fidl::Error> {
6114 self.client.send::<PaverFindDataSinkRequest>(
6115 (data_sink,),
6116 0x710a34c6f9c8a0e9,
6117 fidl::encoding::DynamicFlags::empty(),
6118 )
6119 }
6120
6121 pub fn r#find_partition_table_manager(
6126 &self,
6127 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6128 ) -> Result<(), fidl::Error> {
6129 self.client.send::<PaverFindPartitionTableManagerRequest>(
6130 (data_sink,),
6131 0x10991ecc6fb9f47b,
6132 fidl::encoding::DynamicFlags::empty(),
6133 )
6134 }
6135
6136 pub fn r#find_boot_manager(
6141 &self,
6142 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6143 ) -> Result<(), fidl::Error> {
6144 self.client.send::<PaverFindBootManagerRequest>(
6145 (boot_manager,),
6146 0x5d500b0633102443,
6147 fidl::encoding::DynamicFlags::empty(),
6148 )
6149 }
6150
6151 pub fn r#find_sysconfig(
6153 &self,
6154 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6155 ) -> Result<(), fidl::Error> {
6156 self.client.send::<PaverFindSysconfigRequest>(
6157 (sysconfig,),
6158 0x542cdb5be9b5c02d,
6159 fidl::encoding::DynamicFlags::empty(),
6160 )
6161 }
6162}
6163
6164#[cfg(target_os = "fuchsia")]
6165impl From<PaverSynchronousProxy> for zx::NullableHandle {
6166 fn from(value: PaverSynchronousProxy) -> Self {
6167 value.into_channel().into()
6168 }
6169}
6170
6171#[cfg(target_os = "fuchsia")]
6172impl From<fidl::Channel> for PaverSynchronousProxy {
6173 fn from(value: fidl::Channel) -> Self {
6174 Self::new(value)
6175 }
6176}
6177
6178#[cfg(target_os = "fuchsia")]
6179impl fidl::endpoints::FromClient for PaverSynchronousProxy {
6180 type Protocol = PaverMarker;
6181
6182 fn from_client(value: fidl::endpoints::ClientEnd<PaverMarker>) -> Self {
6183 Self::new(value.into_channel())
6184 }
6185}
6186
6187#[derive(Debug, Clone)]
6188pub struct PaverProxy {
6189 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6190}
6191
6192impl fidl::endpoints::Proxy for PaverProxy {
6193 type Protocol = PaverMarker;
6194
6195 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6196 Self::new(inner)
6197 }
6198
6199 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6200 self.client.into_channel().map_err(|client| Self { client })
6201 }
6202
6203 fn as_channel(&self) -> &::fidl::AsyncChannel {
6204 self.client.as_channel()
6205 }
6206}
6207
6208impl PaverProxy {
6209 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6211 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6212 Self { client: fidl::client::Client::new(channel, protocol_name) }
6213 }
6214
6215 pub fn take_event_stream(&self) -> PaverEventStream {
6221 PaverEventStream { event_receiver: self.client.take_event_receiver() }
6222 }
6223
6224 pub fn r#find_data_sink(
6230 &self,
6231 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6232 ) -> Result<(), fidl::Error> {
6233 PaverProxyInterface::r#find_data_sink(self, data_sink)
6234 }
6235
6236 pub fn r#find_partition_table_manager(
6241 &self,
6242 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6243 ) -> Result<(), fidl::Error> {
6244 PaverProxyInterface::r#find_partition_table_manager(self, data_sink)
6245 }
6246
6247 pub fn r#find_boot_manager(
6252 &self,
6253 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6254 ) -> Result<(), fidl::Error> {
6255 PaverProxyInterface::r#find_boot_manager(self, boot_manager)
6256 }
6257
6258 pub fn r#find_sysconfig(
6260 &self,
6261 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6262 ) -> Result<(), fidl::Error> {
6263 PaverProxyInterface::r#find_sysconfig(self, sysconfig)
6264 }
6265}
6266
6267impl PaverProxyInterface for PaverProxy {
6268 fn r#find_data_sink(
6269 &self,
6270 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6271 ) -> Result<(), fidl::Error> {
6272 self.client.send::<PaverFindDataSinkRequest>(
6273 (data_sink,),
6274 0x710a34c6f9c8a0e9,
6275 fidl::encoding::DynamicFlags::empty(),
6276 )
6277 }
6278
6279 fn r#find_partition_table_manager(
6280 &self,
6281 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6282 ) -> Result<(), fidl::Error> {
6283 self.client.send::<PaverFindPartitionTableManagerRequest>(
6284 (data_sink,),
6285 0x10991ecc6fb9f47b,
6286 fidl::encoding::DynamicFlags::empty(),
6287 )
6288 }
6289
6290 fn r#find_boot_manager(
6291 &self,
6292 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6293 ) -> Result<(), fidl::Error> {
6294 self.client.send::<PaverFindBootManagerRequest>(
6295 (boot_manager,),
6296 0x5d500b0633102443,
6297 fidl::encoding::DynamicFlags::empty(),
6298 )
6299 }
6300
6301 fn r#find_sysconfig(
6302 &self,
6303 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6304 ) -> Result<(), fidl::Error> {
6305 self.client.send::<PaverFindSysconfigRequest>(
6306 (sysconfig,),
6307 0x542cdb5be9b5c02d,
6308 fidl::encoding::DynamicFlags::empty(),
6309 )
6310 }
6311}
6312
6313pub struct PaverEventStream {
6314 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6315}
6316
6317impl std::marker::Unpin for PaverEventStream {}
6318
6319impl futures::stream::FusedStream for PaverEventStream {
6320 fn is_terminated(&self) -> bool {
6321 self.event_receiver.is_terminated()
6322 }
6323}
6324
6325impl futures::Stream for PaverEventStream {
6326 type Item = Result<PaverEvent, fidl::Error>;
6327
6328 fn poll_next(
6329 mut self: std::pin::Pin<&mut Self>,
6330 cx: &mut std::task::Context<'_>,
6331 ) -> std::task::Poll<Option<Self::Item>> {
6332 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6333 &mut self.event_receiver,
6334 cx
6335 )?) {
6336 Some(buf) => std::task::Poll::Ready(Some(PaverEvent::decode(buf))),
6337 None => std::task::Poll::Ready(None),
6338 }
6339 }
6340}
6341
6342#[derive(Debug)]
6343pub enum PaverEvent {}
6344
6345impl PaverEvent {
6346 fn decode(
6348 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6349 ) -> Result<PaverEvent, fidl::Error> {
6350 let (bytes, _handles) = buf.split_mut();
6351 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6352 debug_assert_eq!(tx_header.tx_id, 0);
6353 match tx_header.ordinal {
6354 _ => Err(fidl::Error::UnknownOrdinal {
6355 ordinal: tx_header.ordinal,
6356 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6357 }),
6358 }
6359 }
6360}
6361
6362pub struct PaverRequestStream {
6364 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6365 is_terminated: bool,
6366}
6367
6368impl std::marker::Unpin for PaverRequestStream {}
6369
6370impl futures::stream::FusedStream for PaverRequestStream {
6371 fn is_terminated(&self) -> bool {
6372 self.is_terminated
6373 }
6374}
6375
6376impl fidl::endpoints::RequestStream for PaverRequestStream {
6377 type Protocol = PaverMarker;
6378 type ControlHandle = PaverControlHandle;
6379
6380 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6381 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6382 }
6383
6384 fn control_handle(&self) -> Self::ControlHandle {
6385 PaverControlHandle { inner: self.inner.clone() }
6386 }
6387
6388 fn into_inner(
6389 self,
6390 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6391 {
6392 (self.inner, self.is_terminated)
6393 }
6394
6395 fn from_inner(
6396 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6397 is_terminated: bool,
6398 ) -> Self {
6399 Self { inner, is_terminated }
6400 }
6401}
6402
6403impl futures::Stream for PaverRequestStream {
6404 type Item = Result<PaverRequest, fidl::Error>;
6405
6406 fn poll_next(
6407 mut self: std::pin::Pin<&mut Self>,
6408 cx: &mut std::task::Context<'_>,
6409 ) -> std::task::Poll<Option<Self::Item>> {
6410 let this = &mut *self;
6411 if this.inner.check_shutdown(cx) {
6412 this.is_terminated = true;
6413 return std::task::Poll::Ready(None);
6414 }
6415 if this.is_terminated {
6416 panic!("polled PaverRequestStream after completion");
6417 }
6418 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6419 |bytes, handles| {
6420 match this.inner.channel().read_etc(cx, bytes, handles) {
6421 std::task::Poll::Ready(Ok(())) => {}
6422 std::task::Poll::Pending => return std::task::Poll::Pending,
6423 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6424 this.is_terminated = true;
6425 return std::task::Poll::Ready(None);
6426 }
6427 std::task::Poll::Ready(Err(e)) => {
6428 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6429 e.into(),
6430 ))));
6431 }
6432 }
6433
6434 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6436
6437 std::task::Poll::Ready(Some(match header.ordinal {
6438 0x710a34c6f9c8a0e9 => {
6439 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6440 let mut req = fidl::new_empty!(
6441 PaverFindDataSinkRequest,
6442 fidl::encoding::DefaultFuchsiaResourceDialect
6443 );
6444 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindDataSinkRequest>(&header, _body_bytes, handles, &mut req)?;
6445 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6446 Ok(PaverRequest::FindDataSink { data_sink: req.data_sink, control_handle })
6447 }
6448 0x10991ecc6fb9f47b => {
6449 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6450 let mut req = fidl::new_empty!(
6451 PaverFindPartitionTableManagerRequest,
6452 fidl::encoding::DefaultFuchsiaResourceDialect
6453 );
6454 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindPartitionTableManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6455 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6456 Ok(PaverRequest::FindPartitionTableManager {
6457 data_sink: req.data_sink,
6458
6459 control_handle,
6460 })
6461 }
6462 0x5d500b0633102443 => {
6463 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6464 let mut req = fidl::new_empty!(
6465 PaverFindBootManagerRequest,
6466 fidl::encoding::DefaultFuchsiaResourceDialect
6467 );
6468 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindBootManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6469 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6470 Ok(PaverRequest::FindBootManager {
6471 boot_manager: req.boot_manager,
6472
6473 control_handle,
6474 })
6475 }
6476 0x542cdb5be9b5c02d => {
6477 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6478 let mut req = fidl::new_empty!(
6479 PaverFindSysconfigRequest,
6480 fidl::encoding::DefaultFuchsiaResourceDialect
6481 );
6482 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindSysconfigRequest>(&header, _body_bytes, handles, &mut req)?;
6483 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6484 Ok(PaverRequest::FindSysconfig { sysconfig: req.sysconfig, control_handle })
6485 }
6486 _ => Err(fidl::Error::UnknownOrdinal {
6487 ordinal: header.ordinal,
6488 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6489 }),
6490 }))
6491 },
6492 )
6493 }
6494}
6495
6496#[derive(Debug)]
6497pub enum PaverRequest {
6498 FindDataSink {
6504 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6505 control_handle: PaverControlHandle,
6506 },
6507 FindPartitionTableManager {
6512 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6513 control_handle: PaverControlHandle,
6514 },
6515 FindBootManager {
6520 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6521 control_handle: PaverControlHandle,
6522 },
6523 FindSysconfig {
6525 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6526 control_handle: PaverControlHandle,
6527 },
6528}
6529
6530impl PaverRequest {
6531 #[allow(irrefutable_let_patterns)]
6532 pub fn into_find_data_sink(
6533 self,
6534 ) -> Option<(fidl::endpoints::ServerEnd<DataSinkMarker>, PaverControlHandle)> {
6535 if let PaverRequest::FindDataSink { data_sink, control_handle } = self {
6536 Some((data_sink, control_handle))
6537 } else {
6538 None
6539 }
6540 }
6541
6542 #[allow(irrefutable_let_patterns)]
6543 pub fn into_find_partition_table_manager(
6544 self,
6545 ) -> Option<(fidl::endpoints::ServerEnd<DynamicDataSinkMarker>, PaverControlHandle)> {
6546 if let PaverRequest::FindPartitionTableManager { data_sink, control_handle } = self {
6547 Some((data_sink, control_handle))
6548 } else {
6549 None
6550 }
6551 }
6552
6553 #[allow(irrefutable_let_patterns)]
6554 pub fn into_find_boot_manager(
6555 self,
6556 ) -> Option<(fidl::endpoints::ServerEnd<BootManagerMarker>, PaverControlHandle)> {
6557 if let PaverRequest::FindBootManager { boot_manager, control_handle } = self {
6558 Some((boot_manager, control_handle))
6559 } else {
6560 None
6561 }
6562 }
6563
6564 #[allow(irrefutable_let_patterns)]
6565 pub fn into_find_sysconfig(
6566 self,
6567 ) -> Option<(fidl::endpoints::ServerEnd<SysconfigMarker>, PaverControlHandle)> {
6568 if let PaverRequest::FindSysconfig { sysconfig, control_handle } = self {
6569 Some((sysconfig, control_handle))
6570 } else {
6571 None
6572 }
6573 }
6574
6575 pub fn method_name(&self) -> &'static str {
6577 match *self {
6578 PaverRequest::FindDataSink { .. } => "find_data_sink",
6579 PaverRequest::FindPartitionTableManager { .. } => "find_partition_table_manager",
6580 PaverRequest::FindBootManager { .. } => "find_boot_manager",
6581 PaverRequest::FindSysconfig { .. } => "find_sysconfig",
6582 }
6583 }
6584}
6585
6586#[derive(Debug, Clone)]
6587pub struct PaverControlHandle {
6588 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6589}
6590
6591impl fidl::endpoints::ControlHandle for PaverControlHandle {
6592 fn shutdown(&self) {
6593 self.inner.shutdown()
6594 }
6595
6596 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6597 self.inner.shutdown_with_epitaph(status)
6598 }
6599
6600 fn is_closed(&self) -> bool {
6601 self.inner.channel().is_closed()
6602 }
6603 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6604 self.inner.channel().on_closed()
6605 }
6606
6607 #[cfg(target_os = "fuchsia")]
6608 fn signal_peer(
6609 &self,
6610 clear_mask: zx::Signals,
6611 set_mask: zx::Signals,
6612 ) -> Result<(), zx_status::Status> {
6613 use fidl::Peered;
6614 self.inner.channel().signal_peer(clear_mask, set_mask)
6615 }
6616}
6617
6618impl PaverControlHandle {}
6619
6620#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6621pub struct PayloadStreamMarker;
6622
6623impl fidl::endpoints::ProtocolMarker for PayloadStreamMarker {
6624 type Proxy = PayloadStreamProxy;
6625 type RequestStream = PayloadStreamRequestStream;
6626 #[cfg(target_os = "fuchsia")]
6627 type SynchronousProxy = PayloadStreamSynchronousProxy;
6628
6629 const DEBUG_NAME: &'static str = "(anonymous) PayloadStream";
6630}
6631
6632pub trait PayloadStreamProxyInterface: Send + Sync {
6633 type RegisterVmoResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6634 fn r#register_vmo(&self, vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut;
6635 type ReadDataResponseFut: std::future::Future<Output = Result<ReadResult, fidl::Error>> + Send;
6636 fn r#read_data(&self) -> Self::ReadDataResponseFut;
6637}
6638#[derive(Debug)]
6639#[cfg(target_os = "fuchsia")]
6640pub struct PayloadStreamSynchronousProxy {
6641 client: fidl::client::sync::Client,
6642}
6643
6644#[cfg(target_os = "fuchsia")]
6645impl fidl::endpoints::SynchronousProxy for PayloadStreamSynchronousProxy {
6646 type Proxy = PayloadStreamProxy;
6647 type Protocol = PayloadStreamMarker;
6648
6649 fn from_channel(inner: fidl::Channel) -> Self {
6650 Self::new(inner)
6651 }
6652
6653 fn into_channel(self) -> fidl::Channel {
6654 self.client.into_channel()
6655 }
6656
6657 fn as_channel(&self) -> &fidl::Channel {
6658 self.client.as_channel()
6659 }
6660}
6661
6662#[cfg(target_os = "fuchsia")]
6663impl PayloadStreamSynchronousProxy {
6664 pub fn new(channel: fidl::Channel) -> Self {
6665 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6666 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6667 }
6668
6669 pub fn into_channel(self) -> fidl::Channel {
6670 self.client.into_channel()
6671 }
6672
6673 pub fn wait_for_event(
6676 &self,
6677 deadline: zx::MonotonicInstant,
6678 ) -> Result<PayloadStreamEvent, fidl::Error> {
6679 PayloadStreamEvent::decode(self.client.wait_for_event(deadline)?)
6680 }
6681
6682 pub fn r#register_vmo(
6687 &self,
6688 mut vmo: fidl::Vmo,
6689 ___deadline: zx::MonotonicInstant,
6690 ) -> Result<i32, fidl::Error> {
6691 let _response = self
6692 .client
6693 .send_query::<PayloadStreamRegisterVmoRequest, PayloadStreamRegisterVmoResponse>(
6694 (vmo,),
6695 0x388d7fe44bcb4c,
6696 fidl::encoding::DynamicFlags::empty(),
6697 ___deadline,
6698 )?;
6699 Ok(_response.status)
6700 }
6701
6702 pub fn r#read_data(
6704 &self,
6705 ___deadline: zx::MonotonicInstant,
6706 ) -> Result<ReadResult, fidl::Error> {
6707 let _response =
6708 self.client.send_query::<fidl::encoding::EmptyPayload, PayloadStreamReadDataResponse>(
6709 (),
6710 0x2ccde55366318afa,
6711 fidl::encoding::DynamicFlags::empty(),
6712 ___deadline,
6713 )?;
6714 Ok(_response.result)
6715 }
6716}
6717
6718#[cfg(target_os = "fuchsia")]
6719impl From<PayloadStreamSynchronousProxy> for zx::NullableHandle {
6720 fn from(value: PayloadStreamSynchronousProxy) -> Self {
6721 value.into_channel().into()
6722 }
6723}
6724
6725#[cfg(target_os = "fuchsia")]
6726impl From<fidl::Channel> for PayloadStreamSynchronousProxy {
6727 fn from(value: fidl::Channel) -> Self {
6728 Self::new(value)
6729 }
6730}
6731
6732#[cfg(target_os = "fuchsia")]
6733impl fidl::endpoints::FromClient for PayloadStreamSynchronousProxy {
6734 type Protocol = PayloadStreamMarker;
6735
6736 fn from_client(value: fidl::endpoints::ClientEnd<PayloadStreamMarker>) -> Self {
6737 Self::new(value.into_channel())
6738 }
6739}
6740
6741#[derive(Debug, Clone)]
6742pub struct PayloadStreamProxy {
6743 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6744}
6745
6746impl fidl::endpoints::Proxy for PayloadStreamProxy {
6747 type Protocol = PayloadStreamMarker;
6748
6749 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6750 Self::new(inner)
6751 }
6752
6753 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6754 self.client.into_channel().map_err(|client| Self { client })
6755 }
6756
6757 fn as_channel(&self) -> &::fidl::AsyncChannel {
6758 self.client.as_channel()
6759 }
6760}
6761
6762impl PayloadStreamProxy {
6763 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6765 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6766 Self { client: fidl::client::Client::new(channel, protocol_name) }
6767 }
6768
6769 pub fn take_event_stream(&self) -> PayloadStreamEventStream {
6775 PayloadStreamEventStream { event_receiver: self.client.take_event_receiver() }
6776 }
6777
6778 pub fn r#register_vmo(
6783 &self,
6784 mut vmo: fidl::Vmo,
6785 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
6786 PayloadStreamProxyInterface::r#register_vmo(self, vmo)
6787 }
6788
6789 pub fn r#read_data(
6791 &self,
6792 ) -> fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>
6793 {
6794 PayloadStreamProxyInterface::r#read_data(self)
6795 }
6796}
6797
6798impl PayloadStreamProxyInterface for PayloadStreamProxy {
6799 type RegisterVmoResponseFut =
6800 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
6801 fn r#register_vmo(&self, mut vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut {
6802 fn _decode(
6803 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6804 ) -> Result<i32, fidl::Error> {
6805 let _response = fidl::client::decode_transaction_body::<
6806 PayloadStreamRegisterVmoResponse,
6807 fidl::encoding::DefaultFuchsiaResourceDialect,
6808 0x388d7fe44bcb4c,
6809 >(_buf?)?;
6810 Ok(_response.status)
6811 }
6812 self.client.send_query_and_decode::<PayloadStreamRegisterVmoRequest, i32>(
6813 (vmo,),
6814 0x388d7fe44bcb4c,
6815 fidl::encoding::DynamicFlags::empty(),
6816 _decode,
6817 )
6818 }
6819
6820 type ReadDataResponseFut =
6821 fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
6822 fn r#read_data(&self) -> Self::ReadDataResponseFut {
6823 fn _decode(
6824 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6825 ) -> Result<ReadResult, fidl::Error> {
6826 let _response = fidl::client::decode_transaction_body::<
6827 PayloadStreamReadDataResponse,
6828 fidl::encoding::DefaultFuchsiaResourceDialect,
6829 0x2ccde55366318afa,
6830 >(_buf?)?;
6831 Ok(_response.result)
6832 }
6833 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ReadResult>(
6834 (),
6835 0x2ccde55366318afa,
6836 fidl::encoding::DynamicFlags::empty(),
6837 _decode,
6838 )
6839 }
6840}
6841
6842pub struct PayloadStreamEventStream {
6843 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6844}
6845
6846impl std::marker::Unpin for PayloadStreamEventStream {}
6847
6848impl futures::stream::FusedStream for PayloadStreamEventStream {
6849 fn is_terminated(&self) -> bool {
6850 self.event_receiver.is_terminated()
6851 }
6852}
6853
6854impl futures::Stream for PayloadStreamEventStream {
6855 type Item = Result<PayloadStreamEvent, fidl::Error>;
6856
6857 fn poll_next(
6858 mut self: std::pin::Pin<&mut Self>,
6859 cx: &mut std::task::Context<'_>,
6860 ) -> std::task::Poll<Option<Self::Item>> {
6861 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6862 &mut self.event_receiver,
6863 cx
6864 )?) {
6865 Some(buf) => std::task::Poll::Ready(Some(PayloadStreamEvent::decode(buf))),
6866 None => std::task::Poll::Ready(None),
6867 }
6868 }
6869}
6870
6871#[derive(Debug)]
6872pub enum PayloadStreamEvent {}
6873
6874impl PayloadStreamEvent {
6875 fn decode(
6877 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6878 ) -> Result<PayloadStreamEvent, fidl::Error> {
6879 let (bytes, _handles) = buf.split_mut();
6880 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6881 debug_assert_eq!(tx_header.tx_id, 0);
6882 match tx_header.ordinal {
6883 _ => Err(fidl::Error::UnknownOrdinal {
6884 ordinal: tx_header.ordinal,
6885 protocol_name: <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6886 }),
6887 }
6888 }
6889}
6890
6891pub struct PayloadStreamRequestStream {
6893 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6894 is_terminated: bool,
6895}
6896
6897impl std::marker::Unpin for PayloadStreamRequestStream {}
6898
6899impl futures::stream::FusedStream for PayloadStreamRequestStream {
6900 fn is_terminated(&self) -> bool {
6901 self.is_terminated
6902 }
6903}
6904
6905impl fidl::endpoints::RequestStream for PayloadStreamRequestStream {
6906 type Protocol = PayloadStreamMarker;
6907 type ControlHandle = PayloadStreamControlHandle;
6908
6909 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6910 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6911 }
6912
6913 fn control_handle(&self) -> Self::ControlHandle {
6914 PayloadStreamControlHandle { inner: self.inner.clone() }
6915 }
6916
6917 fn into_inner(
6918 self,
6919 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6920 {
6921 (self.inner, self.is_terminated)
6922 }
6923
6924 fn from_inner(
6925 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6926 is_terminated: bool,
6927 ) -> Self {
6928 Self { inner, is_terminated }
6929 }
6930}
6931
6932impl futures::Stream for PayloadStreamRequestStream {
6933 type Item = Result<PayloadStreamRequest, fidl::Error>;
6934
6935 fn poll_next(
6936 mut self: std::pin::Pin<&mut Self>,
6937 cx: &mut std::task::Context<'_>,
6938 ) -> std::task::Poll<Option<Self::Item>> {
6939 let this = &mut *self;
6940 if this.inner.check_shutdown(cx) {
6941 this.is_terminated = true;
6942 return std::task::Poll::Ready(None);
6943 }
6944 if this.is_terminated {
6945 panic!("polled PayloadStreamRequestStream after completion");
6946 }
6947 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6948 |bytes, handles| {
6949 match this.inner.channel().read_etc(cx, bytes, handles) {
6950 std::task::Poll::Ready(Ok(())) => {}
6951 std::task::Poll::Pending => return std::task::Poll::Pending,
6952 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6953 this.is_terminated = true;
6954 return std::task::Poll::Ready(None);
6955 }
6956 std::task::Poll::Ready(Err(e)) => {
6957 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6958 e.into(),
6959 ))));
6960 }
6961 }
6962
6963 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6965
6966 std::task::Poll::Ready(Some(match header.ordinal {
6967 0x388d7fe44bcb4c => {
6968 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6969 let mut req = fidl::new_empty!(
6970 PayloadStreamRegisterVmoRequest,
6971 fidl::encoding::DefaultFuchsiaResourceDialect
6972 );
6973 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PayloadStreamRegisterVmoRequest>(&header, _body_bytes, handles, &mut req)?;
6974 let control_handle =
6975 PayloadStreamControlHandle { inner: this.inner.clone() };
6976 Ok(PayloadStreamRequest::RegisterVmo {
6977 vmo: req.vmo,
6978
6979 responder: PayloadStreamRegisterVmoResponder {
6980 control_handle: std::mem::ManuallyDrop::new(control_handle),
6981 tx_id: header.tx_id,
6982 },
6983 })
6984 }
6985 0x2ccde55366318afa => {
6986 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6987 let mut req = fidl::new_empty!(
6988 fidl::encoding::EmptyPayload,
6989 fidl::encoding::DefaultFuchsiaResourceDialect
6990 );
6991 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6992 let control_handle =
6993 PayloadStreamControlHandle { inner: this.inner.clone() };
6994 Ok(PayloadStreamRequest::ReadData {
6995 responder: PayloadStreamReadDataResponder {
6996 control_handle: std::mem::ManuallyDrop::new(control_handle),
6997 tx_id: header.tx_id,
6998 },
6999 })
7000 }
7001 _ => Err(fidl::Error::UnknownOrdinal {
7002 ordinal: header.ordinal,
7003 protocol_name:
7004 <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7005 }),
7006 }))
7007 },
7008 )
7009 }
7010}
7011
7012#[derive(Debug)]
7014pub enum PayloadStreamRequest {
7015 RegisterVmo { vmo: fidl::Vmo, responder: PayloadStreamRegisterVmoResponder },
7020 ReadData { responder: PayloadStreamReadDataResponder },
7022}
7023
7024impl PayloadStreamRequest {
7025 #[allow(irrefutable_let_patterns)]
7026 pub fn into_register_vmo(self) -> Option<(fidl::Vmo, PayloadStreamRegisterVmoResponder)> {
7027 if let PayloadStreamRequest::RegisterVmo { vmo, responder } = self {
7028 Some((vmo, responder))
7029 } else {
7030 None
7031 }
7032 }
7033
7034 #[allow(irrefutable_let_patterns)]
7035 pub fn into_read_data(self) -> Option<(PayloadStreamReadDataResponder)> {
7036 if let PayloadStreamRequest::ReadData { responder } = self {
7037 Some((responder))
7038 } else {
7039 None
7040 }
7041 }
7042
7043 pub fn method_name(&self) -> &'static str {
7045 match *self {
7046 PayloadStreamRequest::RegisterVmo { .. } => "register_vmo",
7047 PayloadStreamRequest::ReadData { .. } => "read_data",
7048 }
7049 }
7050}
7051
7052#[derive(Debug, Clone)]
7053pub struct PayloadStreamControlHandle {
7054 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7055}
7056
7057impl fidl::endpoints::ControlHandle for PayloadStreamControlHandle {
7058 fn shutdown(&self) {
7059 self.inner.shutdown()
7060 }
7061
7062 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7063 self.inner.shutdown_with_epitaph(status)
7064 }
7065
7066 fn is_closed(&self) -> bool {
7067 self.inner.channel().is_closed()
7068 }
7069 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7070 self.inner.channel().on_closed()
7071 }
7072
7073 #[cfg(target_os = "fuchsia")]
7074 fn signal_peer(
7075 &self,
7076 clear_mask: zx::Signals,
7077 set_mask: zx::Signals,
7078 ) -> Result<(), zx_status::Status> {
7079 use fidl::Peered;
7080 self.inner.channel().signal_peer(clear_mask, set_mask)
7081 }
7082}
7083
7084impl PayloadStreamControlHandle {}
7085
7086#[must_use = "FIDL methods require a response to be sent"]
7087#[derive(Debug)]
7088pub struct PayloadStreamRegisterVmoResponder {
7089 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
7090 tx_id: u32,
7091}
7092
7093impl std::ops::Drop for PayloadStreamRegisterVmoResponder {
7097 fn drop(&mut self) {
7098 self.control_handle.shutdown();
7099 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7101 }
7102}
7103
7104impl fidl::endpoints::Responder for PayloadStreamRegisterVmoResponder {
7105 type ControlHandle = PayloadStreamControlHandle;
7106
7107 fn control_handle(&self) -> &PayloadStreamControlHandle {
7108 &self.control_handle
7109 }
7110
7111 fn drop_without_shutdown(mut self) {
7112 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7114 std::mem::forget(self);
7116 }
7117}
7118
7119impl PayloadStreamRegisterVmoResponder {
7120 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7124 let _result = self.send_raw(status);
7125 if _result.is_err() {
7126 self.control_handle.shutdown();
7127 }
7128 self.drop_without_shutdown();
7129 _result
7130 }
7131
7132 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
7134 let _result = self.send_raw(status);
7135 self.drop_without_shutdown();
7136 _result
7137 }
7138
7139 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
7140 self.control_handle.inner.send::<PayloadStreamRegisterVmoResponse>(
7141 (status,),
7142 self.tx_id,
7143 0x388d7fe44bcb4c,
7144 fidl::encoding::DynamicFlags::empty(),
7145 )
7146 }
7147}
7148
7149#[must_use = "FIDL methods require a response to be sent"]
7150#[derive(Debug)]
7151pub struct PayloadStreamReadDataResponder {
7152 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
7153 tx_id: u32,
7154}
7155
7156impl std::ops::Drop for PayloadStreamReadDataResponder {
7160 fn drop(&mut self) {
7161 self.control_handle.shutdown();
7162 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7164 }
7165}
7166
7167impl fidl::endpoints::Responder for PayloadStreamReadDataResponder {
7168 type ControlHandle = PayloadStreamControlHandle;
7169
7170 fn control_handle(&self) -> &PayloadStreamControlHandle {
7171 &self.control_handle
7172 }
7173
7174 fn drop_without_shutdown(mut self) {
7175 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7177 std::mem::forget(self);
7179 }
7180}
7181
7182impl PayloadStreamReadDataResponder {
7183 pub fn send(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7187 let _result = self.send_raw(result);
7188 if _result.is_err() {
7189 self.control_handle.shutdown();
7190 }
7191 self.drop_without_shutdown();
7192 _result
7193 }
7194
7195 pub fn send_no_shutdown_on_err(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7197 let _result = self.send_raw(result);
7198 self.drop_without_shutdown();
7199 _result
7200 }
7201
7202 fn send_raw(&self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7203 self.control_handle.inner.send::<PayloadStreamReadDataResponse>(
7204 (result,),
7205 self.tx_id,
7206 0x2ccde55366318afa,
7207 fidl::encoding::DynamicFlags::empty(),
7208 )
7209 }
7210}
7211
7212#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7213pub struct SysconfigMarker;
7214
7215impl fidl::endpoints::ProtocolMarker for SysconfigMarker {
7216 type Proxy = SysconfigProxy;
7217 type RequestStream = SysconfigRequestStream;
7218 #[cfg(target_os = "fuchsia")]
7219 type SynchronousProxy = SysconfigSynchronousProxy;
7220
7221 const DEBUG_NAME: &'static str = "(anonymous) Sysconfig";
7222}
7223pub type SysconfigReadResult = Result<fidl_fuchsia_mem::Buffer, i32>;
7224pub type SysconfigGetPartitionSizeResult = Result<u64, i32>;
7225
7226pub trait SysconfigProxyInterface: Send + Sync {
7227 type ReadResponseFut: std::future::Future<Output = Result<SysconfigReadResult, fidl::Error>>
7228 + Send;
7229 fn r#read(&self) -> Self::ReadResponseFut;
7230 type WriteResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7231 fn r#write(&self, payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut;
7232 type GetPartitionSizeResponseFut: std::future::Future<Output = Result<SysconfigGetPartitionSizeResult, fidl::Error>>
7233 + Send;
7234 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut;
7235 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7236 fn r#flush(&self) -> Self::FlushResponseFut;
7237 type WipeResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7238 fn r#wipe(&self) -> Self::WipeResponseFut;
7239}
7240#[derive(Debug)]
7241#[cfg(target_os = "fuchsia")]
7242pub struct SysconfigSynchronousProxy {
7243 client: fidl::client::sync::Client,
7244}
7245
7246#[cfg(target_os = "fuchsia")]
7247impl fidl::endpoints::SynchronousProxy for SysconfigSynchronousProxy {
7248 type Proxy = SysconfigProxy;
7249 type Protocol = SysconfigMarker;
7250
7251 fn from_channel(inner: fidl::Channel) -> Self {
7252 Self::new(inner)
7253 }
7254
7255 fn into_channel(self) -> fidl::Channel {
7256 self.client.into_channel()
7257 }
7258
7259 fn as_channel(&self) -> &fidl::Channel {
7260 self.client.as_channel()
7261 }
7262}
7263
7264#[cfg(target_os = "fuchsia")]
7265impl SysconfigSynchronousProxy {
7266 pub fn new(channel: fidl::Channel) -> Self {
7267 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7268 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7269 }
7270
7271 pub fn into_channel(self) -> fidl::Channel {
7272 self.client.into_channel()
7273 }
7274
7275 pub fn wait_for_event(
7278 &self,
7279 deadline: zx::MonotonicInstant,
7280 ) -> Result<SysconfigEvent, fidl::Error> {
7281 SysconfigEvent::decode(self.client.wait_for_event(deadline)?)
7282 }
7283
7284 pub fn r#read(
7286 &self,
7287 ___deadline: zx::MonotonicInstant,
7288 ) -> Result<SysconfigReadResult, fidl::Error> {
7289 let _response = self.client.send_query::<
7290 fidl::encoding::EmptyPayload,
7291 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7292 >(
7293 (),
7294 0x350c317c53c226fc,
7295 fidl::encoding::DynamicFlags::empty(),
7296 ___deadline,
7297 )?;
7298 Ok(_response.map(|x| x.data))
7299 }
7300
7301 pub fn r#write(
7303 &self,
7304 mut payload: fidl_fuchsia_mem::Buffer,
7305 ___deadline: zx::MonotonicInstant,
7306 ) -> Result<i32, fidl::Error> {
7307 let _response = self.client.send_query::<SysconfigWriteRequest, SysconfigWriteResponse>(
7308 (&mut payload,),
7309 0x393786c114caf171,
7310 fidl::encoding::DynamicFlags::empty(),
7311 ___deadline,
7312 )?;
7313 Ok(_response.status)
7314 }
7315
7316 pub fn r#get_partition_size(
7318 &self,
7319 ___deadline: zx::MonotonicInstant,
7320 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7321 let _response = self.client.send_query::<
7322 fidl::encoding::EmptyPayload,
7323 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7324 >(
7325 (),
7326 0x2570c58b74fb8957,
7327 fidl::encoding::DynamicFlags::empty(),
7328 ___deadline,
7329 )?;
7330 Ok(_response.map(|x| x.size))
7331 }
7332
7333 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7335 let _response =
7336 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigFlushResponse>(
7337 (),
7338 0xc6c1bb233d003c6,
7339 fidl::encoding::DynamicFlags::empty(),
7340 ___deadline,
7341 )?;
7342 Ok(_response.status)
7343 }
7344
7345 pub fn r#wipe(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7347 let _response =
7348 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigWipeResponse>(
7349 (),
7350 0x34a634965ebfb702,
7351 fidl::encoding::DynamicFlags::empty(),
7352 ___deadline,
7353 )?;
7354 Ok(_response.status)
7355 }
7356}
7357
7358#[cfg(target_os = "fuchsia")]
7359impl From<SysconfigSynchronousProxy> for zx::NullableHandle {
7360 fn from(value: SysconfigSynchronousProxy) -> Self {
7361 value.into_channel().into()
7362 }
7363}
7364
7365#[cfg(target_os = "fuchsia")]
7366impl From<fidl::Channel> for SysconfigSynchronousProxy {
7367 fn from(value: fidl::Channel) -> Self {
7368 Self::new(value)
7369 }
7370}
7371
7372#[cfg(target_os = "fuchsia")]
7373impl fidl::endpoints::FromClient for SysconfigSynchronousProxy {
7374 type Protocol = SysconfigMarker;
7375
7376 fn from_client(value: fidl::endpoints::ClientEnd<SysconfigMarker>) -> Self {
7377 Self::new(value.into_channel())
7378 }
7379}
7380
7381#[derive(Debug, Clone)]
7382pub struct SysconfigProxy {
7383 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7384}
7385
7386impl fidl::endpoints::Proxy for SysconfigProxy {
7387 type Protocol = SysconfigMarker;
7388
7389 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7390 Self::new(inner)
7391 }
7392
7393 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7394 self.client.into_channel().map_err(|client| Self { client })
7395 }
7396
7397 fn as_channel(&self) -> &::fidl::AsyncChannel {
7398 self.client.as_channel()
7399 }
7400}
7401
7402impl SysconfigProxy {
7403 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7405 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7406 Self { client: fidl::client::Client::new(channel, protocol_name) }
7407 }
7408
7409 pub fn take_event_stream(&self) -> SysconfigEventStream {
7415 SysconfigEventStream { event_receiver: self.client.take_event_receiver() }
7416 }
7417
7418 pub fn r#read(
7420 &self,
7421 ) -> fidl::client::QueryResponseFut<
7422 SysconfigReadResult,
7423 fidl::encoding::DefaultFuchsiaResourceDialect,
7424 > {
7425 SysconfigProxyInterface::r#read(self)
7426 }
7427
7428 pub fn r#write(
7430 &self,
7431 mut payload: fidl_fuchsia_mem::Buffer,
7432 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7433 SysconfigProxyInterface::r#write(self, payload)
7434 }
7435
7436 pub fn r#get_partition_size(
7438 &self,
7439 ) -> fidl::client::QueryResponseFut<
7440 SysconfigGetPartitionSizeResult,
7441 fidl::encoding::DefaultFuchsiaResourceDialect,
7442 > {
7443 SysconfigProxyInterface::r#get_partition_size(self)
7444 }
7445
7446 pub fn r#flush(
7448 &self,
7449 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7450 SysconfigProxyInterface::r#flush(self)
7451 }
7452
7453 pub fn r#wipe(
7455 &self,
7456 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7457 SysconfigProxyInterface::r#wipe(self)
7458 }
7459}
7460
7461impl SysconfigProxyInterface for SysconfigProxy {
7462 type ReadResponseFut = fidl::client::QueryResponseFut<
7463 SysconfigReadResult,
7464 fidl::encoding::DefaultFuchsiaResourceDialect,
7465 >;
7466 fn r#read(&self) -> Self::ReadResponseFut {
7467 fn _decode(
7468 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7469 ) -> Result<SysconfigReadResult, fidl::Error> {
7470 let _response = fidl::client::decode_transaction_body::<
7471 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7472 fidl::encoding::DefaultFuchsiaResourceDialect,
7473 0x350c317c53c226fc,
7474 >(_buf?)?;
7475 Ok(_response.map(|x| x.data))
7476 }
7477 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigReadResult>(
7478 (),
7479 0x350c317c53c226fc,
7480 fidl::encoding::DynamicFlags::empty(),
7481 _decode,
7482 )
7483 }
7484
7485 type WriteResponseFut =
7486 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7487 fn r#write(&self, mut payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut {
7488 fn _decode(
7489 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7490 ) -> Result<i32, fidl::Error> {
7491 let _response = fidl::client::decode_transaction_body::<
7492 SysconfigWriteResponse,
7493 fidl::encoding::DefaultFuchsiaResourceDialect,
7494 0x393786c114caf171,
7495 >(_buf?)?;
7496 Ok(_response.status)
7497 }
7498 self.client.send_query_and_decode::<SysconfigWriteRequest, i32>(
7499 (&mut payload,),
7500 0x393786c114caf171,
7501 fidl::encoding::DynamicFlags::empty(),
7502 _decode,
7503 )
7504 }
7505
7506 type GetPartitionSizeResponseFut = fidl::client::QueryResponseFut<
7507 SysconfigGetPartitionSizeResult,
7508 fidl::encoding::DefaultFuchsiaResourceDialect,
7509 >;
7510 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut {
7511 fn _decode(
7512 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7513 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7514 let _response = fidl::client::decode_transaction_body::<
7515 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7516 fidl::encoding::DefaultFuchsiaResourceDialect,
7517 0x2570c58b74fb8957,
7518 >(_buf?)?;
7519 Ok(_response.map(|x| x.size))
7520 }
7521 self.client
7522 .send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigGetPartitionSizeResult>(
7523 (),
7524 0x2570c58b74fb8957,
7525 fidl::encoding::DynamicFlags::empty(),
7526 _decode,
7527 )
7528 }
7529
7530 type FlushResponseFut =
7531 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7532 fn r#flush(&self) -> Self::FlushResponseFut {
7533 fn _decode(
7534 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7535 ) -> Result<i32, fidl::Error> {
7536 let _response = fidl::client::decode_transaction_body::<
7537 SysconfigFlushResponse,
7538 fidl::encoding::DefaultFuchsiaResourceDialect,
7539 0xc6c1bb233d003c6,
7540 >(_buf?)?;
7541 Ok(_response.status)
7542 }
7543 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7544 (),
7545 0xc6c1bb233d003c6,
7546 fidl::encoding::DynamicFlags::empty(),
7547 _decode,
7548 )
7549 }
7550
7551 type WipeResponseFut =
7552 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7553 fn r#wipe(&self) -> Self::WipeResponseFut {
7554 fn _decode(
7555 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7556 ) -> Result<i32, fidl::Error> {
7557 let _response = fidl::client::decode_transaction_body::<
7558 SysconfigWipeResponse,
7559 fidl::encoding::DefaultFuchsiaResourceDialect,
7560 0x34a634965ebfb702,
7561 >(_buf?)?;
7562 Ok(_response.status)
7563 }
7564 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7565 (),
7566 0x34a634965ebfb702,
7567 fidl::encoding::DynamicFlags::empty(),
7568 _decode,
7569 )
7570 }
7571}
7572
7573pub struct SysconfigEventStream {
7574 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7575}
7576
7577impl std::marker::Unpin for SysconfigEventStream {}
7578
7579impl futures::stream::FusedStream for SysconfigEventStream {
7580 fn is_terminated(&self) -> bool {
7581 self.event_receiver.is_terminated()
7582 }
7583}
7584
7585impl futures::Stream for SysconfigEventStream {
7586 type Item = Result<SysconfigEvent, fidl::Error>;
7587
7588 fn poll_next(
7589 mut self: std::pin::Pin<&mut Self>,
7590 cx: &mut std::task::Context<'_>,
7591 ) -> std::task::Poll<Option<Self::Item>> {
7592 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7593 &mut self.event_receiver,
7594 cx
7595 )?) {
7596 Some(buf) => std::task::Poll::Ready(Some(SysconfigEvent::decode(buf))),
7597 None => std::task::Poll::Ready(None),
7598 }
7599 }
7600}
7601
7602#[derive(Debug)]
7603pub enum SysconfigEvent {}
7604
7605impl SysconfigEvent {
7606 fn decode(
7608 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7609 ) -> Result<SysconfigEvent, fidl::Error> {
7610 let (bytes, _handles) = buf.split_mut();
7611 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7612 debug_assert_eq!(tx_header.tx_id, 0);
7613 match tx_header.ordinal {
7614 _ => Err(fidl::Error::UnknownOrdinal {
7615 ordinal: tx_header.ordinal,
7616 protocol_name: <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7617 }),
7618 }
7619 }
7620}
7621
7622pub struct SysconfigRequestStream {
7624 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7625 is_terminated: bool,
7626}
7627
7628impl std::marker::Unpin for SysconfigRequestStream {}
7629
7630impl futures::stream::FusedStream for SysconfigRequestStream {
7631 fn is_terminated(&self) -> bool {
7632 self.is_terminated
7633 }
7634}
7635
7636impl fidl::endpoints::RequestStream for SysconfigRequestStream {
7637 type Protocol = SysconfigMarker;
7638 type ControlHandle = SysconfigControlHandle;
7639
7640 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7641 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7642 }
7643
7644 fn control_handle(&self) -> Self::ControlHandle {
7645 SysconfigControlHandle { inner: self.inner.clone() }
7646 }
7647
7648 fn into_inner(
7649 self,
7650 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7651 {
7652 (self.inner, self.is_terminated)
7653 }
7654
7655 fn from_inner(
7656 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7657 is_terminated: bool,
7658 ) -> Self {
7659 Self { inner, is_terminated }
7660 }
7661}
7662
7663impl futures::Stream for SysconfigRequestStream {
7664 type Item = Result<SysconfigRequest, fidl::Error>;
7665
7666 fn poll_next(
7667 mut self: std::pin::Pin<&mut Self>,
7668 cx: &mut std::task::Context<'_>,
7669 ) -> std::task::Poll<Option<Self::Item>> {
7670 let this = &mut *self;
7671 if this.inner.check_shutdown(cx) {
7672 this.is_terminated = true;
7673 return std::task::Poll::Ready(None);
7674 }
7675 if this.is_terminated {
7676 panic!("polled SysconfigRequestStream after completion");
7677 }
7678 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7679 |bytes, handles| {
7680 match this.inner.channel().read_etc(cx, bytes, handles) {
7681 std::task::Poll::Ready(Ok(())) => {}
7682 std::task::Poll::Pending => return std::task::Poll::Pending,
7683 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7684 this.is_terminated = true;
7685 return std::task::Poll::Ready(None);
7686 }
7687 std::task::Poll::Ready(Err(e)) => {
7688 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7689 e.into(),
7690 ))));
7691 }
7692 }
7693
7694 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7696
7697 std::task::Poll::Ready(Some(match header.ordinal {
7698 0x350c317c53c226fc => {
7699 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7700 let mut req = fidl::new_empty!(
7701 fidl::encoding::EmptyPayload,
7702 fidl::encoding::DefaultFuchsiaResourceDialect
7703 );
7704 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7705 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7706 Ok(SysconfigRequest::Read {
7707 responder: SysconfigReadResponder {
7708 control_handle: std::mem::ManuallyDrop::new(control_handle),
7709 tx_id: header.tx_id,
7710 },
7711 })
7712 }
7713 0x393786c114caf171 => {
7714 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7715 let mut req = fidl::new_empty!(
7716 SysconfigWriteRequest,
7717 fidl::encoding::DefaultFuchsiaResourceDialect
7718 );
7719 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SysconfigWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7720 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7721 Ok(SysconfigRequest::Write {
7722 payload: req.payload,
7723
7724 responder: SysconfigWriteResponder {
7725 control_handle: std::mem::ManuallyDrop::new(control_handle),
7726 tx_id: header.tx_id,
7727 },
7728 })
7729 }
7730 0x2570c58b74fb8957 => {
7731 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7732 let mut req = fidl::new_empty!(
7733 fidl::encoding::EmptyPayload,
7734 fidl::encoding::DefaultFuchsiaResourceDialect
7735 );
7736 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7737 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7738 Ok(SysconfigRequest::GetPartitionSize {
7739 responder: SysconfigGetPartitionSizeResponder {
7740 control_handle: std::mem::ManuallyDrop::new(control_handle),
7741 tx_id: header.tx_id,
7742 },
7743 })
7744 }
7745 0xc6c1bb233d003c6 => {
7746 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7747 let mut req = fidl::new_empty!(
7748 fidl::encoding::EmptyPayload,
7749 fidl::encoding::DefaultFuchsiaResourceDialect
7750 );
7751 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7752 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7753 Ok(SysconfigRequest::Flush {
7754 responder: SysconfigFlushResponder {
7755 control_handle: std::mem::ManuallyDrop::new(control_handle),
7756 tx_id: header.tx_id,
7757 },
7758 })
7759 }
7760 0x34a634965ebfb702 => {
7761 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7762 let mut req = fidl::new_empty!(
7763 fidl::encoding::EmptyPayload,
7764 fidl::encoding::DefaultFuchsiaResourceDialect
7765 );
7766 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7767 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7768 Ok(SysconfigRequest::Wipe {
7769 responder: SysconfigWipeResponder {
7770 control_handle: std::mem::ManuallyDrop::new(control_handle),
7771 tx_id: header.tx_id,
7772 },
7773 })
7774 }
7775 _ => Err(fidl::Error::UnknownOrdinal {
7776 ordinal: header.ordinal,
7777 protocol_name:
7778 <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7779 }),
7780 }))
7781 },
7782 )
7783 }
7784}
7785
7786#[derive(Debug)]
7790pub enum SysconfigRequest {
7791 Read { responder: SysconfigReadResponder },
7793 Write { payload: fidl_fuchsia_mem::Buffer, responder: SysconfigWriteResponder },
7795 GetPartitionSize { responder: SysconfigGetPartitionSizeResponder },
7797 Flush { responder: SysconfigFlushResponder },
7799 Wipe { responder: SysconfigWipeResponder },
7801}
7802
7803impl SysconfigRequest {
7804 #[allow(irrefutable_let_patterns)]
7805 pub fn into_read(self) -> Option<(SysconfigReadResponder)> {
7806 if let SysconfigRequest::Read { responder } = self { Some((responder)) } else { None }
7807 }
7808
7809 #[allow(irrefutable_let_patterns)]
7810 pub fn into_write(self) -> Option<(fidl_fuchsia_mem::Buffer, SysconfigWriteResponder)> {
7811 if let SysconfigRequest::Write { payload, responder } = self {
7812 Some((payload, responder))
7813 } else {
7814 None
7815 }
7816 }
7817
7818 #[allow(irrefutable_let_patterns)]
7819 pub fn into_get_partition_size(self) -> Option<(SysconfigGetPartitionSizeResponder)> {
7820 if let SysconfigRequest::GetPartitionSize { responder } = self {
7821 Some((responder))
7822 } else {
7823 None
7824 }
7825 }
7826
7827 #[allow(irrefutable_let_patterns)]
7828 pub fn into_flush(self) -> Option<(SysconfigFlushResponder)> {
7829 if let SysconfigRequest::Flush { responder } = self { Some((responder)) } else { None }
7830 }
7831
7832 #[allow(irrefutable_let_patterns)]
7833 pub fn into_wipe(self) -> Option<(SysconfigWipeResponder)> {
7834 if let SysconfigRequest::Wipe { responder } = self { Some((responder)) } else { None }
7835 }
7836
7837 pub fn method_name(&self) -> &'static str {
7839 match *self {
7840 SysconfigRequest::Read { .. } => "read",
7841 SysconfigRequest::Write { .. } => "write",
7842 SysconfigRequest::GetPartitionSize { .. } => "get_partition_size",
7843 SysconfigRequest::Flush { .. } => "flush",
7844 SysconfigRequest::Wipe { .. } => "wipe",
7845 }
7846 }
7847}
7848
7849#[derive(Debug, Clone)]
7850pub struct SysconfigControlHandle {
7851 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7852}
7853
7854impl fidl::endpoints::ControlHandle for SysconfigControlHandle {
7855 fn shutdown(&self) {
7856 self.inner.shutdown()
7857 }
7858
7859 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7860 self.inner.shutdown_with_epitaph(status)
7861 }
7862
7863 fn is_closed(&self) -> bool {
7864 self.inner.channel().is_closed()
7865 }
7866 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7867 self.inner.channel().on_closed()
7868 }
7869
7870 #[cfg(target_os = "fuchsia")]
7871 fn signal_peer(
7872 &self,
7873 clear_mask: zx::Signals,
7874 set_mask: zx::Signals,
7875 ) -> Result<(), zx_status::Status> {
7876 use fidl::Peered;
7877 self.inner.channel().signal_peer(clear_mask, set_mask)
7878 }
7879}
7880
7881impl SysconfigControlHandle {}
7882
7883#[must_use = "FIDL methods require a response to be sent"]
7884#[derive(Debug)]
7885pub struct SysconfigReadResponder {
7886 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7887 tx_id: u32,
7888}
7889
7890impl std::ops::Drop for SysconfigReadResponder {
7894 fn drop(&mut self) {
7895 self.control_handle.shutdown();
7896 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7898 }
7899}
7900
7901impl fidl::endpoints::Responder for SysconfigReadResponder {
7902 type ControlHandle = SysconfigControlHandle;
7903
7904 fn control_handle(&self) -> &SysconfigControlHandle {
7905 &self.control_handle
7906 }
7907
7908 fn drop_without_shutdown(mut self) {
7909 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7911 std::mem::forget(self);
7913 }
7914}
7915
7916impl SysconfigReadResponder {
7917 pub fn send(
7921 self,
7922 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7923 ) -> Result<(), fidl::Error> {
7924 let _result = self.send_raw(result);
7925 if _result.is_err() {
7926 self.control_handle.shutdown();
7927 }
7928 self.drop_without_shutdown();
7929 _result
7930 }
7931
7932 pub fn send_no_shutdown_on_err(
7934 self,
7935 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7936 ) -> Result<(), fidl::Error> {
7937 let _result = self.send_raw(result);
7938 self.drop_without_shutdown();
7939 _result
7940 }
7941
7942 fn send_raw(
7943 &self,
7944 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7945 ) -> Result<(), fidl::Error> {
7946 self.control_handle.inner.send::<fidl::encoding::ResultType<SysconfigReadResponse, i32>>(
7947 result.as_mut().map_err(|e| *e).map(|data| (data,)),
7948 self.tx_id,
7949 0x350c317c53c226fc,
7950 fidl::encoding::DynamicFlags::empty(),
7951 )
7952 }
7953}
7954
7955#[must_use = "FIDL methods require a response to be sent"]
7956#[derive(Debug)]
7957pub struct SysconfigWriteResponder {
7958 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7959 tx_id: u32,
7960}
7961
7962impl std::ops::Drop for SysconfigWriteResponder {
7966 fn drop(&mut self) {
7967 self.control_handle.shutdown();
7968 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7970 }
7971}
7972
7973impl fidl::endpoints::Responder for SysconfigWriteResponder {
7974 type ControlHandle = SysconfigControlHandle;
7975
7976 fn control_handle(&self) -> &SysconfigControlHandle {
7977 &self.control_handle
7978 }
7979
7980 fn drop_without_shutdown(mut self) {
7981 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7983 std::mem::forget(self);
7985 }
7986}
7987
7988impl SysconfigWriteResponder {
7989 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7993 let _result = self.send_raw(status);
7994 if _result.is_err() {
7995 self.control_handle.shutdown();
7996 }
7997 self.drop_without_shutdown();
7998 _result
7999 }
8000
8001 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8003 let _result = self.send_raw(status);
8004 self.drop_without_shutdown();
8005 _result
8006 }
8007
8008 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8009 self.control_handle.inner.send::<SysconfigWriteResponse>(
8010 (status,),
8011 self.tx_id,
8012 0x393786c114caf171,
8013 fidl::encoding::DynamicFlags::empty(),
8014 )
8015 }
8016}
8017
8018#[must_use = "FIDL methods require a response to be sent"]
8019#[derive(Debug)]
8020pub struct SysconfigGetPartitionSizeResponder {
8021 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8022 tx_id: u32,
8023}
8024
8025impl std::ops::Drop for SysconfigGetPartitionSizeResponder {
8029 fn drop(&mut self) {
8030 self.control_handle.shutdown();
8031 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8033 }
8034}
8035
8036impl fidl::endpoints::Responder for SysconfigGetPartitionSizeResponder {
8037 type ControlHandle = SysconfigControlHandle;
8038
8039 fn control_handle(&self) -> &SysconfigControlHandle {
8040 &self.control_handle
8041 }
8042
8043 fn drop_without_shutdown(mut self) {
8044 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8046 std::mem::forget(self);
8048 }
8049}
8050
8051impl SysconfigGetPartitionSizeResponder {
8052 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8056 let _result = self.send_raw(result);
8057 if _result.is_err() {
8058 self.control_handle.shutdown();
8059 }
8060 self.drop_without_shutdown();
8061 _result
8062 }
8063
8064 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8066 let _result = self.send_raw(result);
8067 self.drop_without_shutdown();
8068 _result
8069 }
8070
8071 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8072 self.control_handle
8073 .inner
8074 .send::<fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>>(
8075 result.map(|size| (size,)),
8076 self.tx_id,
8077 0x2570c58b74fb8957,
8078 fidl::encoding::DynamicFlags::empty(),
8079 )
8080 }
8081}
8082
8083#[must_use = "FIDL methods require a response to be sent"]
8084#[derive(Debug)]
8085pub struct SysconfigFlushResponder {
8086 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8087 tx_id: u32,
8088}
8089
8090impl std::ops::Drop for SysconfigFlushResponder {
8094 fn drop(&mut self) {
8095 self.control_handle.shutdown();
8096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8098 }
8099}
8100
8101impl fidl::endpoints::Responder for SysconfigFlushResponder {
8102 type ControlHandle = SysconfigControlHandle;
8103
8104 fn control_handle(&self) -> &SysconfigControlHandle {
8105 &self.control_handle
8106 }
8107
8108 fn drop_without_shutdown(mut self) {
8109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8111 std::mem::forget(self);
8113 }
8114}
8115
8116impl SysconfigFlushResponder {
8117 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8121 let _result = self.send_raw(status);
8122 if _result.is_err() {
8123 self.control_handle.shutdown();
8124 }
8125 self.drop_without_shutdown();
8126 _result
8127 }
8128
8129 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8131 let _result = self.send_raw(status);
8132 self.drop_without_shutdown();
8133 _result
8134 }
8135
8136 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8137 self.control_handle.inner.send::<SysconfigFlushResponse>(
8138 (status,),
8139 self.tx_id,
8140 0xc6c1bb233d003c6,
8141 fidl::encoding::DynamicFlags::empty(),
8142 )
8143 }
8144}
8145
8146#[must_use = "FIDL methods require a response to be sent"]
8147#[derive(Debug)]
8148pub struct SysconfigWipeResponder {
8149 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8150 tx_id: u32,
8151}
8152
8153impl std::ops::Drop for SysconfigWipeResponder {
8157 fn drop(&mut self) {
8158 self.control_handle.shutdown();
8159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8161 }
8162}
8163
8164impl fidl::endpoints::Responder for SysconfigWipeResponder {
8165 type ControlHandle = SysconfigControlHandle;
8166
8167 fn control_handle(&self) -> &SysconfigControlHandle {
8168 &self.control_handle
8169 }
8170
8171 fn drop_without_shutdown(mut self) {
8172 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8174 std::mem::forget(self);
8176 }
8177}
8178
8179impl SysconfigWipeResponder {
8180 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8184 let _result = self.send_raw(status);
8185 if _result.is_err() {
8186 self.control_handle.shutdown();
8187 }
8188 self.drop_without_shutdown();
8189 _result
8190 }
8191
8192 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8194 let _result = self.send_raw(status);
8195 self.drop_without_shutdown();
8196 _result
8197 }
8198
8199 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8200 self.control_handle.inner.send::<SysconfigWipeResponse>(
8201 (status,),
8202 self.tx_id,
8203 0x34a634965ebfb702,
8204 fidl::encoding::DynamicFlags::empty(),
8205 )
8206 }
8207}
8208
8209mod internal {
8210 use super::*;
8211
8212 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareRequest {
8213 type Borrowed<'a> = &'a mut Self;
8214 fn take_or_borrow<'a>(
8215 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8216 ) -> Self::Borrowed<'a> {
8217 value
8218 }
8219 }
8220
8221 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareRequest {
8222 type Owned = Self;
8223
8224 #[inline(always)]
8225 fn inline_align(_context: fidl::encoding::Context) -> usize {
8226 8
8227 }
8228
8229 #[inline(always)]
8230 fn inline_size(_context: fidl::encoding::Context) -> usize {
8231 24
8232 }
8233 }
8234
8235 unsafe impl
8236 fidl::encoding::Encode<
8237 DataSinkReadFirmwareRequest,
8238 fidl::encoding::DefaultFuchsiaResourceDialect,
8239 > for &mut DataSinkReadFirmwareRequest
8240 {
8241 #[inline]
8242 unsafe fn encode(
8243 self,
8244 encoder: &mut fidl::encoding::Encoder<
8245 '_,
8246 fidl::encoding::DefaultFuchsiaResourceDialect,
8247 >,
8248 offset: usize,
8249 _depth: fidl::encoding::Depth,
8250 ) -> fidl::Result<()> {
8251 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8252 fidl::encoding::Encode::<
8254 DataSinkReadFirmwareRequest,
8255 fidl::encoding::DefaultFuchsiaResourceDialect,
8256 >::encode(
8257 (
8258 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8259 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(
8260 &self.type_,
8261 ),
8262 ),
8263 encoder,
8264 offset,
8265 _depth,
8266 )
8267 }
8268 }
8269 unsafe impl<
8270 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8271 T1: fidl::encoding::Encode<
8272 fidl::encoding::BoundedString<256>,
8273 fidl::encoding::DefaultFuchsiaResourceDialect,
8274 >,
8275 >
8276 fidl::encoding::Encode<
8277 DataSinkReadFirmwareRequest,
8278 fidl::encoding::DefaultFuchsiaResourceDialect,
8279 > for (T0, T1)
8280 {
8281 #[inline]
8282 unsafe fn encode(
8283 self,
8284 encoder: &mut fidl::encoding::Encoder<
8285 '_,
8286 fidl::encoding::DefaultFuchsiaResourceDialect,
8287 >,
8288 offset: usize,
8289 depth: fidl::encoding::Depth,
8290 ) -> fidl::Result<()> {
8291 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8292 unsafe {
8295 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8296 (ptr as *mut u64).write_unaligned(0);
8297 }
8298 self.0.encode(encoder, offset + 0, depth)?;
8300 self.1.encode(encoder, offset + 8, depth)?;
8301 Ok(())
8302 }
8303 }
8304
8305 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8306 for DataSinkReadFirmwareRequest
8307 {
8308 #[inline(always)]
8309 fn new_empty() -> Self {
8310 Self {
8311 configuration: fidl::new_empty!(
8312 Configuration,
8313 fidl::encoding::DefaultFuchsiaResourceDialect
8314 ),
8315 type_: fidl::new_empty!(
8316 fidl::encoding::BoundedString<256>,
8317 fidl::encoding::DefaultFuchsiaResourceDialect
8318 ),
8319 }
8320 }
8321
8322 #[inline]
8323 unsafe fn decode(
8324 &mut self,
8325 decoder: &mut fidl::encoding::Decoder<
8326 '_,
8327 fidl::encoding::DefaultFuchsiaResourceDialect,
8328 >,
8329 offset: usize,
8330 _depth: fidl::encoding::Depth,
8331 ) -> fidl::Result<()> {
8332 decoder.debug_check_bounds::<Self>(offset);
8333 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8335 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8336 let mask = 0xffffffff00000000u64;
8337 let maskedval = padval & mask;
8338 if maskedval != 0 {
8339 return Err(fidl::Error::NonZeroPadding {
8340 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8341 });
8342 }
8343 fidl::decode!(
8344 Configuration,
8345 fidl::encoding::DefaultFuchsiaResourceDialect,
8346 &mut self.configuration,
8347 decoder,
8348 offset + 0,
8349 _depth
8350 )?;
8351 fidl::decode!(
8352 fidl::encoding::BoundedString<256>,
8353 fidl::encoding::DefaultFuchsiaResourceDialect,
8354 &mut self.type_,
8355 decoder,
8356 offset + 8,
8357 _depth
8358 )?;
8359 Ok(())
8360 }
8361 }
8362
8363 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteAssetRequest {
8364 type Borrowed<'a> = &'a mut Self;
8365 fn take_or_borrow<'a>(
8366 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8367 ) -> Self::Borrowed<'a> {
8368 value
8369 }
8370 }
8371
8372 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteAssetRequest {
8373 type Owned = Self;
8374
8375 #[inline(always)]
8376 fn inline_align(_context: fidl::encoding::Context) -> usize {
8377 8
8378 }
8379
8380 #[inline(always)]
8381 fn inline_size(_context: fidl::encoding::Context) -> usize {
8382 24
8383 }
8384 }
8385
8386 unsafe impl
8387 fidl::encoding::Encode<
8388 DataSinkWriteAssetRequest,
8389 fidl::encoding::DefaultFuchsiaResourceDialect,
8390 > for &mut DataSinkWriteAssetRequest
8391 {
8392 #[inline]
8393 unsafe fn encode(
8394 self,
8395 encoder: &mut fidl::encoding::Encoder<
8396 '_,
8397 fidl::encoding::DefaultFuchsiaResourceDialect,
8398 >,
8399 offset: usize,
8400 _depth: fidl::encoding::Depth,
8401 ) -> fidl::Result<()> {
8402 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8403 fidl::encoding::Encode::<DataSinkWriteAssetRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8405 (
8406 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8407 <Asset as fidl::encoding::ValueTypeMarker>::borrow(&self.asset),
8408 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8409 ),
8410 encoder, offset, _depth
8411 )
8412 }
8413 }
8414 unsafe impl<
8415 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8416 T1: fidl::encoding::Encode<Asset, fidl::encoding::DefaultFuchsiaResourceDialect>,
8417 T2: fidl::encoding::Encode<
8418 fidl_fuchsia_mem::Buffer,
8419 fidl::encoding::DefaultFuchsiaResourceDialect,
8420 >,
8421 >
8422 fidl::encoding::Encode<
8423 DataSinkWriteAssetRequest,
8424 fidl::encoding::DefaultFuchsiaResourceDialect,
8425 > for (T0, T1, T2)
8426 {
8427 #[inline]
8428 unsafe fn encode(
8429 self,
8430 encoder: &mut fidl::encoding::Encoder<
8431 '_,
8432 fidl::encoding::DefaultFuchsiaResourceDialect,
8433 >,
8434 offset: usize,
8435 depth: fidl::encoding::Depth,
8436 ) -> fidl::Result<()> {
8437 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8438 self.0.encode(encoder, offset + 0, depth)?;
8442 self.1.encode(encoder, offset + 4, depth)?;
8443 self.2.encode(encoder, offset + 8, depth)?;
8444 Ok(())
8445 }
8446 }
8447
8448 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8449 for DataSinkWriteAssetRequest
8450 {
8451 #[inline(always)]
8452 fn new_empty() -> Self {
8453 Self {
8454 configuration: fidl::new_empty!(
8455 Configuration,
8456 fidl::encoding::DefaultFuchsiaResourceDialect
8457 ),
8458 asset: fidl::new_empty!(Asset, fidl::encoding::DefaultFuchsiaResourceDialect),
8459 payload: fidl::new_empty!(
8460 fidl_fuchsia_mem::Buffer,
8461 fidl::encoding::DefaultFuchsiaResourceDialect
8462 ),
8463 }
8464 }
8465
8466 #[inline]
8467 unsafe fn decode(
8468 &mut self,
8469 decoder: &mut fidl::encoding::Decoder<
8470 '_,
8471 fidl::encoding::DefaultFuchsiaResourceDialect,
8472 >,
8473 offset: usize,
8474 _depth: fidl::encoding::Depth,
8475 ) -> fidl::Result<()> {
8476 decoder.debug_check_bounds::<Self>(offset);
8477 fidl::decode!(
8479 Configuration,
8480 fidl::encoding::DefaultFuchsiaResourceDialect,
8481 &mut self.configuration,
8482 decoder,
8483 offset + 0,
8484 _depth
8485 )?;
8486 fidl::decode!(
8487 Asset,
8488 fidl::encoding::DefaultFuchsiaResourceDialect,
8489 &mut self.asset,
8490 decoder,
8491 offset + 4,
8492 _depth
8493 )?;
8494 fidl::decode!(
8495 fidl_fuchsia_mem::Buffer,
8496 fidl::encoding::DefaultFuchsiaResourceDialect,
8497 &mut self.payload,
8498 decoder,
8499 offset + 8,
8500 _depth
8501 )?;
8502 Ok(())
8503 }
8504 }
8505
8506 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteFirmwareRequest {
8507 type Borrowed<'a> = &'a mut Self;
8508 fn take_or_borrow<'a>(
8509 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8510 ) -> Self::Borrowed<'a> {
8511 value
8512 }
8513 }
8514
8515 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteFirmwareRequest {
8516 type Owned = Self;
8517
8518 #[inline(always)]
8519 fn inline_align(_context: fidl::encoding::Context) -> usize {
8520 8
8521 }
8522
8523 #[inline(always)]
8524 fn inline_size(_context: fidl::encoding::Context) -> usize {
8525 40
8526 }
8527 }
8528
8529 unsafe impl
8530 fidl::encoding::Encode<
8531 DataSinkWriteFirmwareRequest,
8532 fidl::encoding::DefaultFuchsiaResourceDialect,
8533 > for &mut DataSinkWriteFirmwareRequest
8534 {
8535 #[inline]
8536 unsafe fn encode(
8537 self,
8538 encoder: &mut fidl::encoding::Encoder<
8539 '_,
8540 fidl::encoding::DefaultFuchsiaResourceDialect,
8541 >,
8542 offset: usize,
8543 _depth: fidl::encoding::Depth,
8544 ) -> fidl::Result<()> {
8545 encoder.debug_check_bounds::<DataSinkWriteFirmwareRequest>(offset);
8546 fidl::encoding::Encode::<DataSinkWriteFirmwareRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8548 (
8549 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8550 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
8551 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8552 ),
8553 encoder, offset, _depth
8554 )
8555 }
8556 }
8557 unsafe impl<
8558 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8559 T1: fidl::encoding::Encode<
8560 fidl::encoding::BoundedString<256>,
8561 fidl::encoding::DefaultFuchsiaResourceDialect,
8562 >,
8563 T2: fidl::encoding::Encode<
8564 fidl_fuchsia_mem::Buffer,
8565 fidl::encoding::DefaultFuchsiaResourceDialect,
8566 >,
8567 >
8568 fidl::encoding::Encode<
8569 DataSinkWriteFirmwareRequest,
8570 fidl::encoding::DefaultFuchsiaResourceDialect,
8571 > for (T0, T1, T2)
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::<DataSinkWriteFirmwareRequest>(offset);
8584 unsafe {
8587 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8588 (ptr as *mut u64).write_unaligned(0);
8589 }
8590 self.0.encode(encoder, offset + 0, depth)?;
8592 self.1.encode(encoder, offset + 8, depth)?;
8593 self.2.encode(encoder, offset + 24, depth)?;
8594 Ok(())
8595 }
8596 }
8597
8598 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8599 for DataSinkWriteFirmwareRequest
8600 {
8601 #[inline(always)]
8602 fn new_empty() -> Self {
8603 Self {
8604 configuration: fidl::new_empty!(
8605 Configuration,
8606 fidl::encoding::DefaultFuchsiaResourceDialect
8607 ),
8608 type_: fidl::new_empty!(
8609 fidl::encoding::BoundedString<256>,
8610 fidl::encoding::DefaultFuchsiaResourceDialect
8611 ),
8612 payload: fidl::new_empty!(
8613 fidl_fuchsia_mem::Buffer,
8614 fidl::encoding::DefaultFuchsiaResourceDialect
8615 ),
8616 }
8617 }
8618
8619 #[inline]
8620 unsafe fn decode(
8621 &mut self,
8622 decoder: &mut fidl::encoding::Decoder<
8623 '_,
8624 fidl::encoding::DefaultFuchsiaResourceDialect,
8625 >,
8626 offset: usize,
8627 _depth: fidl::encoding::Depth,
8628 ) -> fidl::Result<()> {
8629 decoder.debug_check_bounds::<Self>(offset);
8630 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8632 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8633 let mask = 0xffffffff00000000u64;
8634 let maskedval = padval & mask;
8635 if maskedval != 0 {
8636 return Err(fidl::Error::NonZeroPadding {
8637 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8638 });
8639 }
8640 fidl::decode!(
8641 Configuration,
8642 fidl::encoding::DefaultFuchsiaResourceDialect,
8643 &mut self.configuration,
8644 decoder,
8645 offset + 0,
8646 _depth
8647 )?;
8648 fidl::decode!(
8649 fidl::encoding::BoundedString<256>,
8650 fidl::encoding::DefaultFuchsiaResourceDialect,
8651 &mut self.type_,
8652 decoder,
8653 offset + 8,
8654 _depth
8655 )?;
8656 fidl::decode!(
8657 fidl_fuchsia_mem::Buffer,
8658 fidl::encoding::DefaultFuchsiaResourceDialect,
8659 &mut self.payload,
8660 decoder,
8661 offset + 24,
8662 _depth
8663 )?;
8664 Ok(())
8665 }
8666 }
8667
8668 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteOpaqueVolumeRequest {
8669 type Borrowed<'a> = &'a mut Self;
8670 fn take_or_borrow<'a>(
8671 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8672 ) -> Self::Borrowed<'a> {
8673 value
8674 }
8675 }
8676
8677 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteOpaqueVolumeRequest {
8678 type Owned = Self;
8679
8680 #[inline(always)]
8681 fn inline_align(_context: fidl::encoding::Context) -> usize {
8682 8
8683 }
8684
8685 #[inline(always)]
8686 fn inline_size(_context: fidl::encoding::Context) -> usize {
8687 16
8688 }
8689 }
8690
8691 unsafe impl
8692 fidl::encoding::Encode<
8693 DataSinkWriteOpaqueVolumeRequest,
8694 fidl::encoding::DefaultFuchsiaResourceDialect,
8695 > for &mut DataSinkWriteOpaqueVolumeRequest
8696 {
8697 #[inline]
8698 unsafe fn encode(
8699 self,
8700 encoder: &mut fidl::encoding::Encoder<
8701 '_,
8702 fidl::encoding::DefaultFuchsiaResourceDialect,
8703 >,
8704 offset: usize,
8705 _depth: fidl::encoding::Depth,
8706 ) -> fidl::Result<()> {
8707 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8708 fidl::encoding::Encode::<
8710 DataSinkWriteOpaqueVolumeRequest,
8711 fidl::encoding::DefaultFuchsiaResourceDialect,
8712 >::encode(
8713 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8714 &mut self.payload,
8715 ),),
8716 encoder,
8717 offset,
8718 _depth,
8719 )
8720 }
8721 }
8722 unsafe impl<
8723 T0: fidl::encoding::Encode<
8724 fidl_fuchsia_mem::Buffer,
8725 fidl::encoding::DefaultFuchsiaResourceDialect,
8726 >,
8727 >
8728 fidl::encoding::Encode<
8729 DataSinkWriteOpaqueVolumeRequest,
8730 fidl::encoding::DefaultFuchsiaResourceDialect,
8731 > for (T0,)
8732 {
8733 #[inline]
8734 unsafe fn encode(
8735 self,
8736 encoder: &mut fidl::encoding::Encoder<
8737 '_,
8738 fidl::encoding::DefaultFuchsiaResourceDialect,
8739 >,
8740 offset: usize,
8741 depth: fidl::encoding::Depth,
8742 ) -> fidl::Result<()> {
8743 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8744 self.0.encode(encoder, offset + 0, depth)?;
8748 Ok(())
8749 }
8750 }
8751
8752 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8753 for DataSinkWriteOpaqueVolumeRequest
8754 {
8755 #[inline(always)]
8756 fn new_empty() -> Self {
8757 Self {
8758 payload: fidl::new_empty!(
8759 fidl_fuchsia_mem::Buffer,
8760 fidl::encoding::DefaultFuchsiaResourceDialect
8761 ),
8762 }
8763 }
8764
8765 #[inline]
8766 unsafe fn decode(
8767 &mut self,
8768 decoder: &mut fidl::encoding::Decoder<
8769 '_,
8770 fidl::encoding::DefaultFuchsiaResourceDialect,
8771 >,
8772 offset: usize,
8773 _depth: fidl::encoding::Depth,
8774 ) -> fidl::Result<()> {
8775 decoder.debug_check_bounds::<Self>(offset);
8776 fidl::decode!(
8778 fidl_fuchsia_mem::Buffer,
8779 fidl::encoding::DefaultFuchsiaResourceDialect,
8780 &mut self.payload,
8781 decoder,
8782 offset + 0,
8783 _depth
8784 )?;
8785 Ok(())
8786 }
8787 }
8788
8789 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteSparseVolumeRequest {
8790 type Borrowed<'a> = &'a mut Self;
8791 fn take_or_borrow<'a>(
8792 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8793 ) -> Self::Borrowed<'a> {
8794 value
8795 }
8796 }
8797
8798 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteSparseVolumeRequest {
8799 type Owned = Self;
8800
8801 #[inline(always)]
8802 fn inline_align(_context: fidl::encoding::Context) -> usize {
8803 8
8804 }
8805
8806 #[inline(always)]
8807 fn inline_size(_context: fidl::encoding::Context) -> usize {
8808 16
8809 }
8810 }
8811
8812 unsafe impl
8813 fidl::encoding::Encode<
8814 DataSinkWriteSparseVolumeRequest,
8815 fidl::encoding::DefaultFuchsiaResourceDialect,
8816 > for &mut DataSinkWriteSparseVolumeRequest
8817 {
8818 #[inline]
8819 unsafe fn encode(
8820 self,
8821 encoder: &mut fidl::encoding::Encoder<
8822 '_,
8823 fidl::encoding::DefaultFuchsiaResourceDialect,
8824 >,
8825 offset: usize,
8826 _depth: fidl::encoding::Depth,
8827 ) -> fidl::Result<()> {
8828 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8829 fidl::encoding::Encode::<
8831 DataSinkWriteSparseVolumeRequest,
8832 fidl::encoding::DefaultFuchsiaResourceDialect,
8833 >::encode(
8834 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8835 &mut self.payload,
8836 ),),
8837 encoder,
8838 offset,
8839 _depth,
8840 )
8841 }
8842 }
8843 unsafe impl<
8844 T0: fidl::encoding::Encode<
8845 fidl_fuchsia_mem::Buffer,
8846 fidl::encoding::DefaultFuchsiaResourceDialect,
8847 >,
8848 >
8849 fidl::encoding::Encode<
8850 DataSinkWriteSparseVolumeRequest,
8851 fidl::encoding::DefaultFuchsiaResourceDialect,
8852 > for (T0,)
8853 {
8854 #[inline]
8855 unsafe fn encode(
8856 self,
8857 encoder: &mut fidl::encoding::Encoder<
8858 '_,
8859 fidl::encoding::DefaultFuchsiaResourceDialect,
8860 >,
8861 offset: usize,
8862 depth: fidl::encoding::Depth,
8863 ) -> fidl::Result<()> {
8864 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8865 self.0.encode(encoder, offset + 0, depth)?;
8869 Ok(())
8870 }
8871 }
8872
8873 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8874 for DataSinkWriteSparseVolumeRequest
8875 {
8876 #[inline(always)]
8877 fn new_empty() -> Self {
8878 Self {
8879 payload: fidl::new_empty!(
8880 fidl_fuchsia_mem::Buffer,
8881 fidl::encoding::DefaultFuchsiaResourceDialect
8882 ),
8883 }
8884 }
8885
8886 #[inline]
8887 unsafe fn decode(
8888 &mut self,
8889 decoder: &mut fidl::encoding::Decoder<
8890 '_,
8891 fidl::encoding::DefaultFuchsiaResourceDialect,
8892 >,
8893 offset: usize,
8894 _depth: fidl::encoding::Depth,
8895 ) -> fidl::Result<()> {
8896 decoder.debug_check_bounds::<Self>(offset);
8897 fidl::decode!(
8899 fidl_fuchsia_mem::Buffer,
8900 fidl::encoding::DefaultFuchsiaResourceDialect,
8901 &mut self.payload,
8902 decoder,
8903 offset + 0,
8904 _depth
8905 )?;
8906 Ok(())
8907 }
8908 }
8909
8910 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteVolumesRequest {
8911 type Borrowed<'a> = &'a mut Self;
8912 fn take_or_borrow<'a>(
8913 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8914 ) -> Self::Borrowed<'a> {
8915 value
8916 }
8917 }
8918
8919 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteVolumesRequest {
8920 type Owned = Self;
8921
8922 #[inline(always)]
8923 fn inline_align(_context: fidl::encoding::Context) -> usize {
8924 4
8925 }
8926
8927 #[inline(always)]
8928 fn inline_size(_context: fidl::encoding::Context) -> usize {
8929 4
8930 }
8931 }
8932
8933 unsafe impl
8934 fidl::encoding::Encode<
8935 DataSinkWriteVolumesRequest,
8936 fidl::encoding::DefaultFuchsiaResourceDialect,
8937 > for &mut DataSinkWriteVolumesRequest
8938 {
8939 #[inline]
8940 unsafe fn encode(
8941 self,
8942 encoder: &mut fidl::encoding::Encoder<
8943 '_,
8944 fidl::encoding::DefaultFuchsiaResourceDialect,
8945 >,
8946 offset: usize,
8947 _depth: fidl::encoding::Depth,
8948 ) -> fidl::Result<()> {
8949 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8950 fidl::encoding::Encode::<DataSinkWriteVolumesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8952 (
8953 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8954 ),
8955 encoder, offset, _depth
8956 )
8957 }
8958 }
8959 unsafe impl<
8960 T0: fidl::encoding::Encode<
8961 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8962 fidl::encoding::DefaultFuchsiaResourceDialect,
8963 >,
8964 >
8965 fidl::encoding::Encode<
8966 DataSinkWriteVolumesRequest,
8967 fidl::encoding::DefaultFuchsiaResourceDialect,
8968 > for (T0,)
8969 {
8970 #[inline]
8971 unsafe fn encode(
8972 self,
8973 encoder: &mut fidl::encoding::Encoder<
8974 '_,
8975 fidl::encoding::DefaultFuchsiaResourceDialect,
8976 >,
8977 offset: usize,
8978 depth: fidl::encoding::Depth,
8979 ) -> fidl::Result<()> {
8980 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8981 self.0.encode(encoder, offset + 0, depth)?;
8985 Ok(())
8986 }
8987 }
8988
8989 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8990 for DataSinkWriteVolumesRequest
8991 {
8992 #[inline(always)]
8993 fn new_empty() -> Self {
8994 Self {
8995 payload: fidl::new_empty!(
8996 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8997 fidl::encoding::DefaultFuchsiaResourceDialect
8998 ),
8999 }
9000 }
9001
9002 #[inline]
9003 unsafe fn decode(
9004 &mut self,
9005 decoder: &mut fidl::encoding::Decoder<
9006 '_,
9007 fidl::encoding::DefaultFuchsiaResourceDialect,
9008 >,
9009 offset: usize,
9010 _depth: fidl::encoding::Depth,
9011 ) -> fidl::Result<()> {
9012 decoder.debug_check_bounds::<Self>(offset);
9013 fidl::decode!(
9015 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
9016 fidl::encoding::DefaultFuchsiaResourceDialect,
9017 &mut self.payload,
9018 decoder,
9019 offset + 0,
9020 _depth
9021 )?;
9022 Ok(())
9023 }
9024 }
9025
9026 impl fidl::encoding::ResourceTypeMarker for DataSinkReadAssetResponse {
9027 type Borrowed<'a> = &'a mut Self;
9028 fn take_or_borrow<'a>(
9029 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9030 ) -> Self::Borrowed<'a> {
9031 value
9032 }
9033 }
9034
9035 unsafe impl fidl::encoding::TypeMarker for DataSinkReadAssetResponse {
9036 type Owned = Self;
9037
9038 #[inline(always)]
9039 fn inline_align(_context: fidl::encoding::Context) -> usize {
9040 8
9041 }
9042
9043 #[inline(always)]
9044 fn inline_size(_context: fidl::encoding::Context) -> usize {
9045 16
9046 }
9047 }
9048
9049 unsafe impl
9050 fidl::encoding::Encode<
9051 DataSinkReadAssetResponse,
9052 fidl::encoding::DefaultFuchsiaResourceDialect,
9053 > for &mut DataSinkReadAssetResponse
9054 {
9055 #[inline]
9056 unsafe fn encode(
9057 self,
9058 encoder: &mut fidl::encoding::Encoder<
9059 '_,
9060 fidl::encoding::DefaultFuchsiaResourceDialect,
9061 >,
9062 offset: usize,
9063 _depth: fidl::encoding::Depth,
9064 ) -> fidl::Result<()> {
9065 encoder.debug_check_bounds::<DataSinkReadAssetResponse>(offset);
9066 fidl::encoding::Encode::<
9068 DataSinkReadAssetResponse,
9069 fidl::encoding::DefaultFuchsiaResourceDialect,
9070 >::encode(
9071 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9072 &mut self.asset,
9073 ),),
9074 encoder,
9075 offset,
9076 _depth,
9077 )
9078 }
9079 }
9080 unsafe impl<
9081 T0: fidl::encoding::Encode<
9082 fidl_fuchsia_mem::Buffer,
9083 fidl::encoding::DefaultFuchsiaResourceDialect,
9084 >,
9085 >
9086 fidl::encoding::Encode<
9087 DataSinkReadAssetResponse,
9088 fidl::encoding::DefaultFuchsiaResourceDialect,
9089 > for (T0,)
9090 {
9091 #[inline]
9092 unsafe fn encode(
9093 self,
9094 encoder: &mut fidl::encoding::Encoder<
9095 '_,
9096 fidl::encoding::DefaultFuchsiaResourceDialect,
9097 >,
9098 offset: usize,
9099 depth: fidl::encoding::Depth,
9100 ) -> fidl::Result<()> {
9101 encoder.debug_check_bounds::<DataSinkReadAssetResponse>(offset);
9102 self.0.encode(encoder, offset + 0, depth)?;
9106 Ok(())
9107 }
9108 }
9109
9110 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9111 for DataSinkReadAssetResponse
9112 {
9113 #[inline(always)]
9114 fn new_empty() -> Self {
9115 Self {
9116 asset: fidl::new_empty!(
9117 fidl_fuchsia_mem::Buffer,
9118 fidl::encoding::DefaultFuchsiaResourceDialect
9119 ),
9120 }
9121 }
9122
9123 #[inline]
9124 unsafe fn decode(
9125 &mut self,
9126 decoder: &mut fidl::encoding::Decoder<
9127 '_,
9128 fidl::encoding::DefaultFuchsiaResourceDialect,
9129 >,
9130 offset: usize,
9131 _depth: fidl::encoding::Depth,
9132 ) -> fidl::Result<()> {
9133 decoder.debug_check_bounds::<Self>(offset);
9134 fidl::decode!(
9136 fidl_fuchsia_mem::Buffer,
9137 fidl::encoding::DefaultFuchsiaResourceDialect,
9138 &mut self.asset,
9139 decoder,
9140 offset + 0,
9141 _depth
9142 )?;
9143 Ok(())
9144 }
9145 }
9146
9147 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareResponse {
9148 type Borrowed<'a> = &'a mut Self;
9149 fn take_or_borrow<'a>(
9150 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9151 ) -> Self::Borrowed<'a> {
9152 value
9153 }
9154 }
9155
9156 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareResponse {
9157 type Owned = Self;
9158
9159 #[inline(always)]
9160 fn inline_align(_context: fidl::encoding::Context) -> usize {
9161 8
9162 }
9163
9164 #[inline(always)]
9165 fn inline_size(_context: fidl::encoding::Context) -> usize {
9166 16
9167 }
9168 }
9169
9170 unsafe impl
9171 fidl::encoding::Encode<
9172 DataSinkReadFirmwareResponse,
9173 fidl::encoding::DefaultFuchsiaResourceDialect,
9174 > for &mut DataSinkReadFirmwareResponse
9175 {
9176 #[inline]
9177 unsafe fn encode(
9178 self,
9179 encoder: &mut fidl::encoding::Encoder<
9180 '_,
9181 fidl::encoding::DefaultFuchsiaResourceDialect,
9182 >,
9183 offset: usize,
9184 _depth: fidl::encoding::Depth,
9185 ) -> fidl::Result<()> {
9186 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9187 fidl::encoding::Encode::<
9189 DataSinkReadFirmwareResponse,
9190 fidl::encoding::DefaultFuchsiaResourceDialect,
9191 >::encode(
9192 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9193 &mut self.firmware,
9194 ),),
9195 encoder,
9196 offset,
9197 _depth,
9198 )
9199 }
9200 }
9201 unsafe impl<
9202 T0: fidl::encoding::Encode<
9203 fidl_fuchsia_mem::Buffer,
9204 fidl::encoding::DefaultFuchsiaResourceDialect,
9205 >,
9206 >
9207 fidl::encoding::Encode<
9208 DataSinkReadFirmwareResponse,
9209 fidl::encoding::DefaultFuchsiaResourceDialect,
9210 > for (T0,)
9211 {
9212 #[inline]
9213 unsafe fn encode(
9214 self,
9215 encoder: &mut fidl::encoding::Encoder<
9216 '_,
9217 fidl::encoding::DefaultFuchsiaResourceDialect,
9218 >,
9219 offset: usize,
9220 depth: fidl::encoding::Depth,
9221 ) -> fidl::Result<()> {
9222 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9223 self.0.encode(encoder, offset + 0, depth)?;
9227 Ok(())
9228 }
9229 }
9230
9231 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9232 for DataSinkReadFirmwareResponse
9233 {
9234 #[inline(always)]
9235 fn new_empty() -> Self {
9236 Self {
9237 firmware: fidl::new_empty!(
9238 fidl_fuchsia_mem::Buffer,
9239 fidl::encoding::DefaultFuchsiaResourceDialect
9240 ),
9241 }
9242 }
9243
9244 #[inline]
9245 unsafe fn decode(
9246 &mut self,
9247 decoder: &mut fidl::encoding::Decoder<
9248 '_,
9249 fidl::encoding::DefaultFuchsiaResourceDialect,
9250 >,
9251 offset: usize,
9252 _depth: fidl::encoding::Depth,
9253 ) -> fidl::Result<()> {
9254 decoder.debug_check_bounds::<Self>(offset);
9255 fidl::decode!(
9257 fidl_fuchsia_mem::Buffer,
9258 fidl::encoding::DefaultFuchsiaResourceDialect,
9259 &mut self.firmware,
9260 decoder,
9261 offset + 0,
9262 _depth
9263 )?;
9264 Ok(())
9265 }
9266 }
9267
9268 impl fidl::encoding::ResourceTypeMarker for PaverFindBootManagerRequest {
9269 type Borrowed<'a> = &'a mut Self;
9270 fn take_or_borrow<'a>(
9271 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9272 ) -> Self::Borrowed<'a> {
9273 value
9274 }
9275 }
9276
9277 unsafe impl fidl::encoding::TypeMarker for PaverFindBootManagerRequest {
9278 type Owned = Self;
9279
9280 #[inline(always)]
9281 fn inline_align(_context: fidl::encoding::Context) -> usize {
9282 4
9283 }
9284
9285 #[inline(always)]
9286 fn inline_size(_context: fidl::encoding::Context) -> usize {
9287 4
9288 }
9289 }
9290
9291 unsafe impl
9292 fidl::encoding::Encode<
9293 PaverFindBootManagerRequest,
9294 fidl::encoding::DefaultFuchsiaResourceDialect,
9295 > for &mut PaverFindBootManagerRequest
9296 {
9297 #[inline]
9298 unsafe fn encode(
9299 self,
9300 encoder: &mut fidl::encoding::Encoder<
9301 '_,
9302 fidl::encoding::DefaultFuchsiaResourceDialect,
9303 >,
9304 offset: usize,
9305 _depth: fidl::encoding::Depth,
9306 ) -> fidl::Result<()> {
9307 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9308 fidl::encoding::Encode::<PaverFindBootManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9310 (
9311 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.boot_manager),
9312 ),
9313 encoder, offset, _depth
9314 )
9315 }
9316 }
9317 unsafe impl<
9318 T0: fidl::encoding::Encode<
9319 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9320 fidl::encoding::DefaultFuchsiaResourceDialect,
9321 >,
9322 >
9323 fidl::encoding::Encode<
9324 PaverFindBootManagerRequest,
9325 fidl::encoding::DefaultFuchsiaResourceDialect,
9326 > for (T0,)
9327 {
9328 #[inline]
9329 unsafe fn encode(
9330 self,
9331 encoder: &mut fidl::encoding::Encoder<
9332 '_,
9333 fidl::encoding::DefaultFuchsiaResourceDialect,
9334 >,
9335 offset: usize,
9336 depth: fidl::encoding::Depth,
9337 ) -> fidl::Result<()> {
9338 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9339 self.0.encode(encoder, offset + 0, depth)?;
9343 Ok(())
9344 }
9345 }
9346
9347 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9348 for PaverFindBootManagerRequest
9349 {
9350 #[inline(always)]
9351 fn new_empty() -> Self {
9352 Self {
9353 boot_manager: fidl::new_empty!(
9354 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9355 fidl::encoding::DefaultFuchsiaResourceDialect
9356 ),
9357 }
9358 }
9359
9360 #[inline]
9361 unsafe fn decode(
9362 &mut self,
9363 decoder: &mut fidl::encoding::Decoder<
9364 '_,
9365 fidl::encoding::DefaultFuchsiaResourceDialect,
9366 >,
9367 offset: usize,
9368 _depth: fidl::encoding::Depth,
9369 ) -> fidl::Result<()> {
9370 decoder.debug_check_bounds::<Self>(offset);
9371 fidl::decode!(
9373 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9374 fidl::encoding::DefaultFuchsiaResourceDialect,
9375 &mut self.boot_manager,
9376 decoder,
9377 offset + 0,
9378 _depth
9379 )?;
9380 Ok(())
9381 }
9382 }
9383
9384 impl fidl::encoding::ResourceTypeMarker for PaverFindDataSinkRequest {
9385 type Borrowed<'a> = &'a mut Self;
9386 fn take_or_borrow<'a>(
9387 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9388 ) -> Self::Borrowed<'a> {
9389 value
9390 }
9391 }
9392
9393 unsafe impl fidl::encoding::TypeMarker for PaverFindDataSinkRequest {
9394 type Owned = Self;
9395
9396 #[inline(always)]
9397 fn inline_align(_context: fidl::encoding::Context) -> usize {
9398 4
9399 }
9400
9401 #[inline(always)]
9402 fn inline_size(_context: fidl::encoding::Context) -> usize {
9403 4
9404 }
9405 }
9406
9407 unsafe impl
9408 fidl::encoding::Encode<
9409 PaverFindDataSinkRequest,
9410 fidl::encoding::DefaultFuchsiaResourceDialect,
9411 > for &mut PaverFindDataSinkRequest
9412 {
9413 #[inline]
9414 unsafe fn encode(
9415 self,
9416 encoder: &mut fidl::encoding::Encoder<
9417 '_,
9418 fidl::encoding::DefaultFuchsiaResourceDialect,
9419 >,
9420 offset: usize,
9421 _depth: fidl::encoding::Depth,
9422 ) -> fidl::Result<()> {
9423 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9424 fidl::encoding::Encode::<PaverFindDataSinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9426 (
9427 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9428 ),
9429 encoder, offset, _depth
9430 )
9431 }
9432 }
9433 unsafe impl<
9434 T0: fidl::encoding::Encode<
9435 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9436 fidl::encoding::DefaultFuchsiaResourceDialect,
9437 >,
9438 >
9439 fidl::encoding::Encode<
9440 PaverFindDataSinkRequest,
9441 fidl::encoding::DefaultFuchsiaResourceDialect,
9442 > for (T0,)
9443 {
9444 #[inline]
9445 unsafe fn encode(
9446 self,
9447 encoder: &mut fidl::encoding::Encoder<
9448 '_,
9449 fidl::encoding::DefaultFuchsiaResourceDialect,
9450 >,
9451 offset: usize,
9452 depth: fidl::encoding::Depth,
9453 ) -> fidl::Result<()> {
9454 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9455 self.0.encode(encoder, offset + 0, depth)?;
9459 Ok(())
9460 }
9461 }
9462
9463 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9464 for PaverFindDataSinkRequest
9465 {
9466 #[inline(always)]
9467 fn new_empty() -> Self {
9468 Self {
9469 data_sink: fidl::new_empty!(
9470 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9471 fidl::encoding::DefaultFuchsiaResourceDialect
9472 ),
9473 }
9474 }
9475
9476 #[inline]
9477 unsafe fn decode(
9478 &mut self,
9479 decoder: &mut fidl::encoding::Decoder<
9480 '_,
9481 fidl::encoding::DefaultFuchsiaResourceDialect,
9482 >,
9483 offset: usize,
9484 _depth: fidl::encoding::Depth,
9485 ) -> fidl::Result<()> {
9486 decoder.debug_check_bounds::<Self>(offset);
9487 fidl::decode!(
9489 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9490 fidl::encoding::DefaultFuchsiaResourceDialect,
9491 &mut self.data_sink,
9492 decoder,
9493 offset + 0,
9494 _depth
9495 )?;
9496 Ok(())
9497 }
9498 }
9499
9500 impl fidl::encoding::ResourceTypeMarker for PaverFindPartitionTableManagerRequest {
9501 type Borrowed<'a> = &'a mut Self;
9502 fn take_or_borrow<'a>(
9503 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9504 ) -> Self::Borrowed<'a> {
9505 value
9506 }
9507 }
9508
9509 unsafe impl fidl::encoding::TypeMarker for PaverFindPartitionTableManagerRequest {
9510 type Owned = Self;
9511
9512 #[inline(always)]
9513 fn inline_align(_context: fidl::encoding::Context) -> usize {
9514 4
9515 }
9516
9517 #[inline(always)]
9518 fn inline_size(_context: fidl::encoding::Context) -> usize {
9519 4
9520 }
9521 }
9522
9523 unsafe impl
9524 fidl::encoding::Encode<
9525 PaverFindPartitionTableManagerRequest,
9526 fidl::encoding::DefaultFuchsiaResourceDialect,
9527 > for &mut PaverFindPartitionTableManagerRequest
9528 {
9529 #[inline]
9530 unsafe fn encode(
9531 self,
9532 encoder: &mut fidl::encoding::Encoder<
9533 '_,
9534 fidl::encoding::DefaultFuchsiaResourceDialect,
9535 >,
9536 offset: usize,
9537 _depth: fidl::encoding::Depth,
9538 ) -> fidl::Result<()> {
9539 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9540 fidl::encoding::Encode::<PaverFindPartitionTableManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9542 (
9543 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9544 ),
9545 encoder, offset, _depth
9546 )
9547 }
9548 }
9549 unsafe impl<
9550 T0: fidl::encoding::Encode<
9551 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9552 fidl::encoding::DefaultFuchsiaResourceDialect,
9553 >,
9554 >
9555 fidl::encoding::Encode<
9556 PaverFindPartitionTableManagerRequest,
9557 fidl::encoding::DefaultFuchsiaResourceDialect,
9558 > for (T0,)
9559 {
9560 #[inline]
9561 unsafe fn encode(
9562 self,
9563 encoder: &mut fidl::encoding::Encoder<
9564 '_,
9565 fidl::encoding::DefaultFuchsiaResourceDialect,
9566 >,
9567 offset: usize,
9568 depth: fidl::encoding::Depth,
9569 ) -> fidl::Result<()> {
9570 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9571 self.0.encode(encoder, offset + 0, depth)?;
9575 Ok(())
9576 }
9577 }
9578
9579 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9580 for PaverFindPartitionTableManagerRequest
9581 {
9582 #[inline(always)]
9583 fn new_empty() -> Self {
9584 Self {
9585 data_sink: fidl::new_empty!(
9586 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9587 fidl::encoding::DefaultFuchsiaResourceDialect
9588 ),
9589 }
9590 }
9591
9592 #[inline]
9593 unsafe fn decode(
9594 &mut self,
9595 decoder: &mut fidl::encoding::Decoder<
9596 '_,
9597 fidl::encoding::DefaultFuchsiaResourceDialect,
9598 >,
9599 offset: usize,
9600 _depth: fidl::encoding::Depth,
9601 ) -> fidl::Result<()> {
9602 decoder.debug_check_bounds::<Self>(offset);
9603 fidl::decode!(
9605 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9606 fidl::encoding::DefaultFuchsiaResourceDialect,
9607 &mut self.data_sink,
9608 decoder,
9609 offset + 0,
9610 _depth
9611 )?;
9612 Ok(())
9613 }
9614 }
9615
9616 impl fidl::encoding::ResourceTypeMarker for PaverFindSysconfigRequest {
9617 type Borrowed<'a> = &'a mut Self;
9618 fn take_or_borrow<'a>(
9619 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9620 ) -> Self::Borrowed<'a> {
9621 value
9622 }
9623 }
9624
9625 unsafe impl fidl::encoding::TypeMarker for PaverFindSysconfigRequest {
9626 type Owned = Self;
9627
9628 #[inline(always)]
9629 fn inline_align(_context: fidl::encoding::Context) -> usize {
9630 4
9631 }
9632
9633 #[inline(always)]
9634 fn inline_size(_context: fidl::encoding::Context) -> usize {
9635 4
9636 }
9637 }
9638
9639 unsafe impl
9640 fidl::encoding::Encode<
9641 PaverFindSysconfigRequest,
9642 fidl::encoding::DefaultFuchsiaResourceDialect,
9643 > for &mut PaverFindSysconfigRequest
9644 {
9645 #[inline]
9646 unsafe fn encode(
9647 self,
9648 encoder: &mut fidl::encoding::Encoder<
9649 '_,
9650 fidl::encoding::DefaultFuchsiaResourceDialect,
9651 >,
9652 offset: usize,
9653 _depth: fidl::encoding::Depth,
9654 ) -> fidl::Result<()> {
9655 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9656 fidl::encoding::Encode::<PaverFindSysconfigRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9658 (
9659 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sysconfig),
9660 ),
9661 encoder, offset, _depth
9662 )
9663 }
9664 }
9665 unsafe impl<
9666 T0: fidl::encoding::Encode<
9667 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9668 fidl::encoding::DefaultFuchsiaResourceDialect,
9669 >,
9670 >
9671 fidl::encoding::Encode<
9672 PaverFindSysconfigRequest,
9673 fidl::encoding::DefaultFuchsiaResourceDialect,
9674 > for (T0,)
9675 {
9676 #[inline]
9677 unsafe fn encode(
9678 self,
9679 encoder: &mut fidl::encoding::Encoder<
9680 '_,
9681 fidl::encoding::DefaultFuchsiaResourceDialect,
9682 >,
9683 offset: usize,
9684 depth: fidl::encoding::Depth,
9685 ) -> fidl::Result<()> {
9686 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9687 self.0.encode(encoder, offset + 0, depth)?;
9691 Ok(())
9692 }
9693 }
9694
9695 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9696 for PaverFindSysconfigRequest
9697 {
9698 #[inline(always)]
9699 fn new_empty() -> Self {
9700 Self {
9701 sysconfig: fidl::new_empty!(
9702 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9703 fidl::encoding::DefaultFuchsiaResourceDialect
9704 ),
9705 }
9706 }
9707
9708 #[inline]
9709 unsafe fn decode(
9710 &mut self,
9711 decoder: &mut fidl::encoding::Decoder<
9712 '_,
9713 fidl::encoding::DefaultFuchsiaResourceDialect,
9714 >,
9715 offset: usize,
9716 _depth: fidl::encoding::Depth,
9717 ) -> fidl::Result<()> {
9718 decoder.debug_check_bounds::<Self>(offset);
9719 fidl::decode!(
9721 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9722 fidl::encoding::DefaultFuchsiaResourceDialect,
9723 &mut self.sysconfig,
9724 decoder,
9725 offset + 0,
9726 _depth
9727 )?;
9728 Ok(())
9729 }
9730 }
9731
9732 impl fidl::encoding::ResourceTypeMarker for PayloadStreamRegisterVmoRequest {
9733 type Borrowed<'a> = &'a mut Self;
9734 fn take_or_borrow<'a>(
9735 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9736 ) -> Self::Borrowed<'a> {
9737 value
9738 }
9739 }
9740
9741 unsafe impl fidl::encoding::TypeMarker for PayloadStreamRegisterVmoRequest {
9742 type Owned = Self;
9743
9744 #[inline(always)]
9745 fn inline_align(_context: fidl::encoding::Context) -> usize {
9746 4
9747 }
9748
9749 #[inline(always)]
9750 fn inline_size(_context: fidl::encoding::Context) -> usize {
9751 4
9752 }
9753 }
9754
9755 unsafe impl
9756 fidl::encoding::Encode<
9757 PayloadStreamRegisterVmoRequest,
9758 fidl::encoding::DefaultFuchsiaResourceDialect,
9759 > for &mut PayloadStreamRegisterVmoRequest
9760 {
9761 #[inline]
9762 unsafe fn encode(
9763 self,
9764 encoder: &mut fidl::encoding::Encoder<
9765 '_,
9766 fidl::encoding::DefaultFuchsiaResourceDialect,
9767 >,
9768 offset: usize,
9769 _depth: fidl::encoding::Depth,
9770 ) -> fidl::Result<()> {
9771 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9772 fidl::encoding::Encode::<
9774 PayloadStreamRegisterVmoRequest,
9775 fidl::encoding::DefaultFuchsiaResourceDialect,
9776 >::encode(
9777 (<fidl::encoding::HandleType<
9778 fidl::Vmo,
9779 { fidl::ObjectType::VMO.into_raw() },
9780 2147483648,
9781 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9782 &mut self.vmo
9783 ),),
9784 encoder,
9785 offset,
9786 _depth,
9787 )
9788 }
9789 }
9790 unsafe impl<
9791 T0: fidl::encoding::Encode<
9792 fidl::encoding::HandleType<
9793 fidl::Vmo,
9794 { fidl::ObjectType::VMO.into_raw() },
9795 2147483648,
9796 >,
9797 fidl::encoding::DefaultFuchsiaResourceDialect,
9798 >,
9799 >
9800 fidl::encoding::Encode<
9801 PayloadStreamRegisterVmoRequest,
9802 fidl::encoding::DefaultFuchsiaResourceDialect,
9803 > for (T0,)
9804 {
9805 #[inline]
9806 unsafe fn encode(
9807 self,
9808 encoder: &mut fidl::encoding::Encoder<
9809 '_,
9810 fidl::encoding::DefaultFuchsiaResourceDialect,
9811 >,
9812 offset: usize,
9813 depth: fidl::encoding::Depth,
9814 ) -> fidl::Result<()> {
9815 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9816 self.0.encode(encoder, offset + 0, depth)?;
9820 Ok(())
9821 }
9822 }
9823
9824 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9825 for PayloadStreamRegisterVmoRequest
9826 {
9827 #[inline(always)]
9828 fn new_empty() -> Self {
9829 Self {
9830 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
9831 }
9832 }
9833
9834 #[inline]
9835 unsafe fn decode(
9836 &mut self,
9837 decoder: &mut fidl::encoding::Decoder<
9838 '_,
9839 fidl::encoding::DefaultFuchsiaResourceDialect,
9840 >,
9841 offset: usize,
9842 _depth: fidl::encoding::Depth,
9843 ) -> fidl::Result<()> {
9844 decoder.debug_check_bounds::<Self>(offset);
9845 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
9847 Ok(())
9848 }
9849 }
9850
9851 impl fidl::encoding::ResourceTypeMarker for SysconfigWriteRequest {
9852 type Borrowed<'a> = &'a mut Self;
9853 fn take_or_borrow<'a>(
9854 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9855 ) -> Self::Borrowed<'a> {
9856 value
9857 }
9858 }
9859
9860 unsafe impl fidl::encoding::TypeMarker for SysconfigWriteRequest {
9861 type Owned = Self;
9862
9863 #[inline(always)]
9864 fn inline_align(_context: fidl::encoding::Context) -> usize {
9865 8
9866 }
9867
9868 #[inline(always)]
9869 fn inline_size(_context: fidl::encoding::Context) -> usize {
9870 16
9871 }
9872 }
9873
9874 unsafe impl
9875 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9876 for &mut SysconfigWriteRequest
9877 {
9878 #[inline]
9879 unsafe fn encode(
9880 self,
9881 encoder: &mut fidl::encoding::Encoder<
9882 '_,
9883 fidl::encoding::DefaultFuchsiaResourceDialect,
9884 >,
9885 offset: usize,
9886 _depth: fidl::encoding::Depth,
9887 ) -> fidl::Result<()> {
9888 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9889 fidl::encoding::Encode::<
9891 SysconfigWriteRequest,
9892 fidl::encoding::DefaultFuchsiaResourceDialect,
9893 >::encode(
9894 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9895 &mut self.payload,
9896 ),),
9897 encoder,
9898 offset,
9899 _depth,
9900 )
9901 }
9902 }
9903 unsafe impl<
9904 T0: fidl::encoding::Encode<
9905 fidl_fuchsia_mem::Buffer,
9906 fidl::encoding::DefaultFuchsiaResourceDialect,
9907 >,
9908 >
9909 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9910 for (T0,)
9911 {
9912 #[inline]
9913 unsafe fn encode(
9914 self,
9915 encoder: &mut fidl::encoding::Encoder<
9916 '_,
9917 fidl::encoding::DefaultFuchsiaResourceDialect,
9918 >,
9919 offset: usize,
9920 depth: fidl::encoding::Depth,
9921 ) -> fidl::Result<()> {
9922 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9923 self.0.encode(encoder, offset + 0, depth)?;
9927 Ok(())
9928 }
9929 }
9930
9931 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9932 for SysconfigWriteRequest
9933 {
9934 #[inline(always)]
9935 fn new_empty() -> Self {
9936 Self {
9937 payload: fidl::new_empty!(
9938 fidl_fuchsia_mem::Buffer,
9939 fidl::encoding::DefaultFuchsiaResourceDialect
9940 ),
9941 }
9942 }
9943
9944 #[inline]
9945 unsafe fn decode(
9946 &mut self,
9947 decoder: &mut fidl::encoding::Decoder<
9948 '_,
9949 fidl::encoding::DefaultFuchsiaResourceDialect,
9950 >,
9951 offset: usize,
9952 _depth: fidl::encoding::Depth,
9953 ) -> fidl::Result<()> {
9954 decoder.debug_check_bounds::<Self>(offset);
9955 fidl::decode!(
9957 fidl_fuchsia_mem::Buffer,
9958 fidl::encoding::DefaultFuchsiaResourceDialect,
9959 &mut self.payload,
9960 decoder,
9961 offset + 0,
9962 _depth
9963 )?;
9964 Ok(())
9965 }
9966 }
9967
9968 impl fidl::encoding::ResourceTypeMarker for SysconfigReadResponse {
9969 type Borrowed<'a> = &'a mut Self;
9970 fn take_or_borrow<'a>(
9971 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9972 ) -> Self::Borrowed<'a> {
9973 value
9974 }
9975 }
9976
9977 unsafe impl fidl::encoding::TypeMarker for SysconfigReadResponse {
9978 type Owned = Self;
9979
9980 #[inline(always)]
9981 fn inline_align(_context: fidl::encoding::Context) -> usize {
9982 8
9983 }
9984
9985 #[inline(always)]
9986 fn inline_size(_context: fidl::encoding::Context) -> usize {
9987 16
9988 }
9989 }
9990
9991 unsafe impl
9992 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
9993 for &mut SysconfigReadResponse
9994 {
9995 #[inline]
9996 unsafe fn encode(
9997 self,
9998 encoder: &mut fidl::encoding::Encoder<
9999 '_,
10000 fidl::encoding::DefaultFuchsiaResourceDialect,
10001 >,
10002 offset: usize,
10003 _depth: fidl::encoding::Depth,
10004 ) -> fidl::Result<()> {
10005 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
10006 fidl::encoding::Encode::<
10008 SysconfigReadResponse,
10009 fidl::encoding::DefaultFuchsiaResourceDialect,
10010 >::encode(
10011 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10012 &mut self.data,
10013 ),),
10014 encoder,
10015 offset,
10016 _depth,
10017 )
10018 }
10019 }
10020 unsafe impl<
10021 T0: fidl::encoding::Encode<
10022 fidl_fuchsia_mem::Buffer,
10023 fidl::encoding::DefaultFuchsiaResourceDialect,
10024 >,
10025 >
10026 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
10027 for (T0,)
10028 {
10029 #[inline]
10030 unsafe fn encode(
10031 self,
10032 encoder: &mut fidl::encoding::Encoder<
10033 '_,
10034 fidl::encoding::DefaultFuchsiaResourceDialect,
10035 >,
10036 offset: usize,
10037 depth: fidl::encoding::Depth,
10038 ) -> fidl::Result<()> {
10039 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
10040 self.0.encode(encoder, offset + 0, depth)?;
10044 Ok(())
10045 }
10046 }
10047
10048 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10049 for SysconfigReadResponse
10050 {
10051 #[inline(always)]
10052 fn new_empty() -> Self {
10053 Self {
10054 data: fidl::new_empty!(
10055 fidl_fuchsia_mem::Buffer,
10056 fidl::encoding::DefaultFuchsiaResourceDialect
10057 ),
10058 }
10059 }
10060
10061 #[inline]
10062 unsafe fn decode(
10063 &mut self,
10064 decoder: &mut fidl::encoding::Decoder<
10065 '_,
10066 fidl::encoding::DefaultFuchsiaResourceDialect,
10067 >,
10068 offset: usize,
10069 _depth: fidl::encoding::Depth,
10070 ) -> fidl::Result<()> {
10071 decoder.debug_check_bounds::<Self>(offset);
10072 fidl::decode!(
10074 fidl_fuchsia_mem::Buffer,
10075 fidl::encoding::DefaultFuchsiaResourceDialect,
10076 &mut self.data,
10077 decoder,
10078 offset + 0,
10079 _depth
10080 )?;
10081 Ok(())
10082 }
10083 }
10084}