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::Handle {
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 {
1529 Some((responder))
1530 } else {
1531 None
1532 }
1533 }
1534
1535 pub fn method_name(&self) -> &'static str {
1537 match *self {
1538 BootManagerRequest::QueryCurrentConfiguration { .. } => "query_current_configuration",
1539 BootManagerRequest::QueryActiveConfiguration { .. } => "query_active_configuration",
1540 BootManagerRequest::QueryConfigurationLastSetActive { .. } => {
1541 "query_configuration_last_set_active"
1542 }
1543 BootManagerRequest::QueryConfigurationStatus { .. } => "query_configuration_status",
1544 BootManagerRequest::QueryConfigurationStatusAndBootAttempts { .. } => {
1545 "query_configuration_status_and_boot_attempts"
1546 }
1547 BootManagerRequest::SetConfigurationActive { .. } => "set_configuration_active",
1548 BootManagerRequest::SetConfigurationUnbootable { .. } => "set_configuration_unbootable",
1549 BootManagerRequest::SetConfigurationHealthy { .. } => "set_configuration_healthy",
1550 BootManagerRequest::SetOneShotRecovery { .. } => "set_one_shot_recovery",
1551 BootManagerRequest::Flush { .. } => "flush",
1552 }
1553 }
1554}
1555
1556#[derive(Debug, Clone)]
1557pub struct BootManagerControlHandle {
1558 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1559}
1560
1561impl fidl::endpoints::ControlHandle for BootManagerControlHandle {
1562 fn shutdown(&self) {
1563 self.inner.shutdown()
1564 }
1565 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1566 self.inner.shutdown_with_epitaph(status)
1567 }
1568
1569 fn is_closed(&self) -> bool {
1570 self.inner.channel().is_closed()
1571 }
1572 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1573 self.inner.channel().on_closed()
1574 }
1575
1576 #[cfg(target_os = "fuchsia")]
1577 fn signal_peer(
1578 &self,
1579 clear_mask: zx::Signals,
1580 set_mask: zx::Signals,
1581 ) -> Result<(), zx_status::Status> {
1582 use fidl::Peered;
1583 self.inner.channel().signal_peer(clear_mask, set_mask)
1584 }
1585}
1586
1587impl BootManagerControlHandle {}
1588
1589#[must_use = "FIDL methods require a response to be sent"]
1590#[derive(Debug)]
1591pub struct BootManagerQueryCurrentConfigurationResponder {
1592 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1593 tx_id: u32,
1594}
1595
1596impl std::ops::Drop for BootManagerQueryCurrentConfigurationResponder {
1600 fn drop(&mut self) {
1601 self.control_handle.shutdown();
1602 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1604 }
1605}
1606
1607impl fidl::endpoints::Responder for BootManagerQueryCurrentConfigurationResponder {
1608 type ControlHandle = BootManagerControlHandle;
1609
1610 fn control_handle(&self) -> &BootManagerControlHandle {
1611 &self.control_handle
1612 }
1613
1614 fn drop_without_shutdown(mut self) {
1615 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1617 std::mem::forget(self);
1619 }
1620}
1621
1622impl BootManagerQueryCurrentConfigurationResponder {
1623 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1627 let _result = self.send_raw(result);
1628 if _result.is_err() {
1629 self.control_handle.shutdown();
1630 }
1631 self.drop_without_shutdown();
1632 _result
1633 }
1634
1635 pub fn send_no_shutdown_on_err(
1637 self,
1638 mut result: Result<Configuration, i32>,
1639 ) -> Result<(), fidl::Error> {
1640 let _result = self.send_raw(result);
1641 self.drop_without_shutdown();
1642 _result
1643 }
1644
1645 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1646 self.control_handle.inner.send::<fidl::encoding::ResultType<
1647 BootManagerQueryCurrentConfigurationResponse,
1648 i32,
1649 >>(
1650 result.map(|configuration| (configuration,)),
1651 self.tx_id,
1652 0xc213298cbc9c371,
1653 fidl::encoding::DynamicFlags::empty(),
1654 )
1655 }
1656}
1657
1658#[must_use = "FIDL methods require a response to be sent"]
1659#[derive(Debug)]
1660pub struct BootManagerQueryActiveConfigurationResponder {
1661 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1662 tx_id: u32,
1663}
1664
1665impl std::ops::Drop for BootManagerQueryActiveConfigurationResponder {
1669 fn drop(&mut self) {
1670 self.control_handle.shutdown();
1671 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1673 }
1674}
1675
1676impl fidl::endpoints::Responder for BootManagerQueryActiveConfigurationResponder {
1677 type ControlHandle = BootManagerControlHandle;
1678
1679 fn control_handle(&self) -> &BootManagerControlHandle {
1680 &self.control_handle
1681 }
1682
1683 fn drop_without_shutdown(mut self) {
1684 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1686 std::mem::forget(self);
1688 }
1689}
1690
1691impl BootManagerQueryActiveConfigurationResponder {
1692 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1696 let _result = self.send_raw(result);
1697 if _result.is_err() {
1698 self.control_handle.shutdown();
1699 }
1700 self.drop_without_shutdown();
1701 _result
1702 }
1703
1704 pub fn send_no_shutdown_on_err(
1706 self,
1707 mut result: Result<Configuration, i32>,
1708 ) -> Result<(), fidl::Error> {
1709 let _result = self.send_raw(result);
1710 self.drop_without_shutdown();
1711 _result
1712 }
1713
1714 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1715 self.control_handle.inner.send::<fidl::encoding::ResultType<
1716 BootManagerQueryActiveConfigurationResponse,
1717 i32,
1718 >>(
1719 result.map(|configuration| (configuration,)),
1720 self.tx_id,
1721 0x71d52acdf59947a4,
1722 fidl::encoding::DynamicFlags::empty(),
1723 )
1724 }
1725}
1726
1727#[must_use = "FIDL methods require a response to be sent"]
1728#[derive(Debug)]
1729pub struct BootManagerQueryConfigurationLastSetActiveResponder {
1730 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1731 tx_id: u32,
1732}
1733
1734impl std::ops::Drop for BootManagerQueryConfigurationLastSetActiveResponder {
1738 fn drop(&mut self) {
1739 self.control_handle.shutdown();
1740 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1742 }
1743}
1744
1745impl fidl::endpoints::Responder for BootManagerQueryConfigurationLastSetActiveResponder {
1746 type ControlHandle = BootManagerControlHandle;
1747
1748 fn control_handle(&self) -> &BootManagerControlHandle {
1749 &self.control_handle
1750 }
1751
1752 fn drop_without_shutdown(mut self) {
1753 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1755 std::mem::forget(self);
1757 }
1758}
1759
1760impl BootManagerQueryConfigurationLastSetActiveResponder {
1761 pub fn send(self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1765 let _result = self.send_raw(result);
1766 if _result.is_err() {
1767 self.control_handle.shutdown();
1768 }
1769 self.drop_without_shutdown();
1770 _result
1771 }
1772
1773 pub fn send_no_shutdown_on_err(
1775 self,
1776 mut result: Result<Configuration, i32>,
1777 ) -> Result<(), fidl::Error> {
1778 let _result = self.send_raw(result);
1779 self.drop_without_shutdown();
1780 _result
1781 }
1782
1783 fn send_raw(&self, mut result: Result<Configuration, i32>) -> Result<(), fidl::Error> {
1784 self.control_handle.inner.send::<fidl::encoding::ResultType<
1785 BootManagerQueryConfigurationLastSetActiveResponse,
1786 i32,
1787 >>(
1788 result.map(|configuration| (configuration,)),
1789 self.tx_id,
1790 0x6bcad87311b3345,
1791 fidl::encoding::DynamicFlags::empty(),
1792 )
1793 }
1794}
1795
1796#[must_use = "FIDL methods require a response to be sent"]
1797#[derive(Debug)]
1798pub struct BootManagerQueryConfigurationStatusResponder {
1799 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1800 tx_id: u32,
1801}
1802
1803impl std::ops::Drop for BootManagerQueryConfigurationStatusResponder {
1807 fn drop(&mut self) {
1808 self.control_handle.shutdown();
1809 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1811 }
1812}
1813
1814impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusResponder {
1815 type ControlHandle = BootManagerControlHandle;
1816
1817 fn control_handle(&self) -> &BootManagerControlHandle {
1818 &self.control_handle
1819 }
1820
1821 fn drop_without_shutdown(mut self) {
1822 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1824 std::mem::forget(self);
1826 }
1827}
1828
1829impl BootManagerQueryConfigurationStatusResponder {
1830 pub fn send(self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1834 let _result = self.send_raw(result);
1835 if _result.is_err() {
1836 self.control_handle.shutdown();
1837 }
1838 self.drop_without_shutdown();
1839 _result
1840 }
1841
1842 pub fn send_no_shutdown_on_err(
1844 self,
1845 mut result: Result<ConfigurationStatus, i32>,
1846 ) -> Result<(), fidl::Error> {
1847 let _result = self.send_raw(result);
1848 self.drop_without_shutdown();
1849 _result
1850 }
1851
1852 fn send_raw(&self, mut result: Result<ConfigurationStatus, i32>) -> Result<(), fidl::Error> {
1853 self.control_handle.inner.send::<fidl::encoding::ResultType<
1854 BootManagerQueryConfigurationStatusResponse,
1855 i32,
1856 >>(
1857 result.map(|status| (status,)),
1858 self.tx_id,
1859 0x40822ca9ca68b19a,
1860 fidl::encoding::DynamicFlags::empty(),
1861 )
1862 }
1863}
1864
1865#[must_use = "FIDL methods require a response to be sent"]
1866#[derive(Debug)]
1867pub struct BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1868 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1869 tx_id: u32,
1870}
1871
1872impl std::ops::Drop for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1876 fn drop(&mut self) {
1877 self.control_handle.shutdown();
1878 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1880 }
1881}
1882
1883impl fidl::endpoints::Responder for BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1884 type ControlHandle = BootManagerControlHandle;
1885
1886 fn control_handle(&self) -> &BootManagerControlHandle {
1887 &self.control_handle
1888 }
1889
1890 fn drop_without_shutdown(mut self) {
1891 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1893 std::mem::forget(self);
1895 }
1896}
1897
1898impl BootManagerQueryConfigurationStatusAndBootAttemptsResponder {
1899 pub fn send(
1903 self,
1904 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1905 ) -> Result<(), fidl::Error> {
1906 let _result = self.send_raw(result);
1907 if _result.is_err() {
1908 self.control_handle.shutdown();
1909 }
1910 self.drop_without_shutdown();
1911 _result
1912 }
1913
1914 pub fn send_no_shutdown_on_err(
1916 self,
1917 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1918 ) -> Result<(), fidl::Error> {
1919 let _result = self.send_raw(result);
1920 self.drop_without_shutdown();
1921 _result
1922 }
1923
1924 fn send_raw(
1925 &self,
1926 mut result: Result<&BootManagerQueryConfigurationStatusAndBootAttemptsResponse, i32>,
1927 ) -> Result<(), fidl::Error> {
1928 self.control_handle.inner.send::<fidl::encoding::ResultType<
1929 BootManagerQueryConfigurationStatusAndBootAttemptsResponse,
1930 i32,
1931 >>(
1932 result,
1933 self.tx_id,
1934 0x27f851d5809cfb3d,
1935 fidl::encoding::DynamicFlags::empty(),
1936 )
1937 }
1938}
1939
1940#[must_use = "FIDL methods require a response to be sent"]
1941#[derive(Debug)]
1942pub struct BootManagerSetConfigurationActiveResponder {
1943 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
1944 tx_id: u32,
1945}
1946
1947impl std::ops::Drop for BootManagerSetConfigurationActiveResponder {
1951 fn drop(&mut self) {
1952 self.control_handle.shutdown();
1953 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1955 }
1956}
1957
1958impl fidl::endpoints::Responder for BootManagerSetConfigurationActiveResponder {
1959 type ControlHandle = BootManagerControlHandle;
1960
1961 fn control_handle(&self) -> &BootManagerControlHandle {
1962 &self.control_handle
1963 }
1964
1965 fn drop_without_shutdown(mut self) {
1966 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1968 std::mem::forget(self);
1970 }
1971}
1972
1973impl BootManagerSetConfigurationActiveResponder {
1974 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
1978 let _result = self.send_raw(status);
1979 if _result.is_err() {
1980 self.control_handle.shutdown();
1981 }
1982 self.drop_without_shutdown();
1983 _result
1984 }
1985
1986 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
1988 let _result = self.send_raw(status);
1989 self.drop_without_shutdown();
1990 _result
1991 }
1992
1993 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
1994 self.control_handle.inner.send::<BootManagerSetConfigurationActiveResponse>(
1995 (status,),
1996 self.tx_id,
1997 0x14c64074f81f9a7f,
1998 fidl::encoding::DynamicFlags::empty(),
1999 )
2000 }
2001}
2002
2003#[must_use = "FIDL methods require a response to be sent"]
2004#[derive(Debug)]
2005pub struct BootManagerSetConfigurationUnbootableResponder {
2006 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2007 tx_id: u32,
2008}
2009
2010impl std::ops::Drop for BootManagerSetConfigurationUnbootableResponder {
2014 fn drop(&mut self) {
2015 self.control_handle.shutdown();
2016 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2018 }
2019}
2020
2021impl fidl::endpoints::Responder for BootManagerSetConfigurationUnbootableResponder {
2022 type ControlHandle = BootManagerControlHandle;
2023
2024 fn control_handle(&self) -> &BootManagerControlHandle {
2025 &self.control_handle
2026 }
2027
2028 fn drop_without_shutdown(mut self) {
2029 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2031 std::mem::forget(self);
2033 }
2034}
2035
2036impl BootManagerSetConfigurationUnbootableResponder {
2037 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2041 let _result = self.send_raw(status);
2042 if _result.is_err() {
2043 self.control_handle.shutdown();
2044 }
2045 self.drop_without_shutdown();
2046 _result
2047 }
2048
2049 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2051 let _result = self.send_raw(status);
2052 self.drop_without_shutdown();
2053 _result
2054 }
2055
2056 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2057 self.control_handle.inner.send::<BootManagerSetConfigurationUnbootableResponse>(
2058 (status,),
2059 self.tx_id,
2060 0x6f8716bf306d197f,
2061 fidl::encoding::DynamicFlags::empty(),
2062 )
2063 }
2064}
2065
2066#[must_use = "FIDL methods require a response to be sent"]
2067#[derive(Debug)]
2068pub struct BootManagerSetConfigurationHealthyResponder {
2069 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2070 tx_id: u32,
2071}
2072
2073impl std::ops::Drop for BootManagerSetConfigurationHealthyResponder {
2077 fn drop(&mut self) {
2078 self.control_handle.shutdown();
2079 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2081 }
2082}
2083
2084impl fidl::endpoints::Responder for BootManagerSetConfigurationHealthyResponder {
2085 type ControlHandle = BootManagerControlHandle;
2086
2087 fn control_handle(&self) -> &BootManagerControlHandle {
2088 &self.control_handle
2089 }
2090
2091 fn drop_without_shutdown(mut self) {
2092 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2094 std::mem::forget(self);
2096 }
2097}
2098
2099impl BootManagerSetConfigurationHealthyResponder {
2100 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2104 let _result = self.send_raw(status);
2105 if _result.is_err() {
2106 self.control_handle.shutdown();
2107 }
2108 self.drop_without_shutdown();
2109 _result
2110 }
2111
2112 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2114 let _result = self.send_raw(status);
2115 self.drop_without_shutdown();
2116 _result
2117 }
2118
2119 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2120 self.control_handle.inner.send::<BootManagerSetConfigurationHealthyResponse>(
2121 (status,),
2122 self.tx_id,
2123 0x5dfe31714c8ec4be,
2124 fidl::encoding::DynamicFlags::empty(),
2125 )
2126 }
2127}
2128
2129#[must_use = "FIDL methods require a response to be sent"]
2130#[derive(Debug)]
2131pub struct BootManagerSetOneShotRecoveryResponder {
2132 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2133 tx_id: u32,
2134}
2135
2136impl std::ops::Drop for BootManagerSetOneShotRecoveryResponder {
2140 fn drop(&mut self) {
2141 self.control_handle.shutdown();
2142 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2144 }
2145}
2146
2147impl fidl::endpoints::Responder for BootManagerSetOneShotRecoveryResponder {
2148 type ControlHandle = BootManagerControlHandle;
2149
2150 fn control_handle(&self) -> &BootManagerControlHandle {
2151 &self.control_handle
2152 }
2153
2154 fn drop_without_shutdown(mut self) {
2155 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2157 std::mem::forget(self);
2159 }
2160}
2161
2162impl BootManagerSetOneShotRecoveryResponder {
2163 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2167 let _result = self.send_raw(result);
2168 if _result.is_err() {
2169 self.control_handle.shutdown();
2170 }
2171 self.drop_without_shutdown();
2172 _result
2173 }
2174
2175 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2177 let _result = self.send_raw(result);
2178 self.drop_without_shutdown();
2179 _result
2180 }
2181
2182 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
2183 self.control_handle
2184 .inner
2185 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
2186 result,
2187 self.tx_id,
2188 0x7a5af0a28354f24d,
2189 fidl::encoding::DynamicFlags::empty(),
2190 )
2191 }
2192}
2193
2194#[must_use = "FIDL methods require a response to be sent"]
2195#[derive(Debug)]
2196pub struct BootManagerFlushResponder {
2197 control_handle: std::mem::ManuallyDrop<BootManagerControlHandle>,
2198 tx_id: u32,
2199}
2200
2201impl std::ops::Drop for BootManagerFlushResponder {
2205 fn drop(&mut self) {
2206 self.control_handle.shutdown();
2207 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2209 }
2210}
2211
2212impl fidl::endpoints::Responder for BootManagerFlushResponder {
2213 type ControlHandle = BootManagerControlHandle;
2214
2215 fn control_handle(&self) -> &BootManagerControlHandle {
2216 &self.control_handle
2217 }
2218
2219 fn drop_without_shutdown(mut self) {
2220 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2222 std::mem::forget(self);
2224 }
2225}
2226
2227impl BootManagerFlushResponder {
2228 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
2232 let _result = self.send_raw(status);
2233 if _result.is_err() {
2234 self.control_handle.shutdown();
2235 }
2236 self.drop_without_shutdown();
2237 _result
2238 }
2239
2240 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
2242 let _result = self.send_raw(status);
2243 self.drop_without_shutdown();
2244 _result
2245 }
2246
2247 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
2248 self.control_handle.inner.send::<BootManagerFlushResponse>(
2249 (status,),
2250 self.tx_id,
2251 0x2f29ec2322d62d3e,
2252 fidl::encoding::DynamicFlags::empty(),
2253 )
2254 }
2255}
2256
2257#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2258pub struct DataSinkMarker;
2259
2260impl fidl::endpoints::ProtocolMarker for DataSinkMarker {
2261 type Proxy = DataSinkProxy;
2262 type RequestStream = DataSinkRequestStream;
2263 #[cfg(target_os = "fuchsia")]
2264 type SynchronousProxy = DataSinkSynchronousProxy;
2265
2266 const DEBUG_NAME: &'static str = "(anonymous) DataSink";
2267}
2268pub type DataSinkReadAssetResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2269pub type DataSinkReadFirmwareResult = Result<fidl_fuchsia_mem::Buffer, i32>;
2270pub type DataSinkWriteOpaqueVolumeResult = Result<(), i32>;
2271pub type DataSinkWriteSparseVolumeResult = Result<(), i32>;
2272
2273pub trait DataSinkProxyInterface: Send + Sync {
2274 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
2275 + Send;
2276 fn r#read_asset(
2277 &self,
2278 configuration: Configuration,
2279 asset: Asset,
2280 ) -> Self::ReadAssetResponseFut;
2281 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2282 fn r#write_asset(
2283 &self,
2284 configuration: Configuration,
2285 asset: Asset,
2286 payload: fidl_fuchsia_mem::Buffer,
2287 ) -> Self::WriteAssetResponseFut;
2288 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
2289 + Send;
2290 fn r#write_firmware(
2291 &self,
2292 configuration: Configuration,
2293 type_: &str,
2294 payload: fidl_fuchsia_mem::Buffer,
2295 ) -> Self::WriteFirmwareResponseFut;
2296 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
2297 + Send;
2298 fn r#read_firmware(
2299 &self,
2300 configuration: Configuration,
2301 type_: &str,
2302 ) -> Self::ReadFirmwareResponseFut;
2303 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2304 fn r#write_volumes(
2305 &self,
2306 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2307 ) -> Self::WriteVolumesResponseFut;
2308 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
2309 + Send;
2310 fn r#write_opaque_volume(
2311 &self,
2312 payload: fidl_fuchsia_mem::Buffer,
2313 ) -> Self::WriteOpaqueVolumeResponseFut;
2314 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
2315 + Send;
2316 fn r#write_sparse_volume(
2317 &self,
2318 payload: fidl_fuchsia_mem::Buffer,
2319 ) -> Self::WriteSparseVolumeResponseFut;
2320 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
2321 fn r#flush(&self) -> Self::FlushResponseFut;
2322}
2323#[derive(Debug)]
2324#[cfg(target_os = "fuchsia")]
2325pub struct DataSinkSynchronousProxy {
2326 client: fidl::client::sync::Client,
2327}
2328
2329#[cfg(target_os = "fuchsia")]
2330impl fidl::endpoints::SynchronousProxy for DataSinkSynchronousProxy {
2331 type Proxy = DataSinkProxy;
2332 type Protocol = DataSinkMarker;
2333
2334 fn from_channel(inner: fidl::Channel) -> Self {
2335 Self::new(inner)
2336 }
2337
2338 fn into_channel(self) -> fidl::Channel {
2339 self.client.into_channel()
2340 }
2341
2342 fn as_channel(&self) -> &fidl::Channel {
2343 self.client.as_channel()
2344 }
2345}
2346
2347#[cfg(target_os = "fuchsia")]
2348impl DataSinkSynchronousProxy {
2349 pub fn new(channel: fidl::Channel) -> Self {
2350 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2351 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2352 }
2353
2354 pub fn into_channel(self) -> fidl::Channel {
2355 self.client.into_channel()
2356 }
2357
2358 pub fn wait_for_event(
2361 &self,
2362 deadline: zx::MonotonicInstant,
2363 ) -> Result<DataSinkEvent, fidl::Error> {
2364 DataSinkEvent::decode(self.client.wait_for_event(deadline)?)
2365 }
2366
2367 pub fn r#read_asset(
2373 &self,
2374 mut configuration: Configuration,
2375 mut asset: Asset,
2376 ___deadline: zx::MonotonicInstant,
2377 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2378 let _response = self.client.send_query::<
2379 DataSinkReadAssetRequest,
2380 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2381 >(
2382 (configuration, asset,),
2383 0x125a23e561007898,
2384 fidl::encoding::DynamicFlags::empty(),
2385 ___deadline,
2386 )?;
2387 Ok(_response.map(|x| x.asset))
2388 }
2389
2390 pub fn r#write_asset(
2399 &self,
2400 mut configuration: Configuration,
2401 mut asset: Asset,
2402 mut payload: fidl_fuchsia_mem::Buffer,
2403 ___deadline: zx::MonotonicInstant,
2404 ) -> Result<i32, fidl::Error> {
2405 let _response =
2406 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
2407 (configuration, asset, &mut payload),
2408 0x516839ce76c4d0a9,
2409 fidl::encoding::DynamicFlags::empty(),
2410 ___deadline,
2411 )?;
2412 Ok(_response.status)
2413 }
2414
2415 pub fn r#write_firmware(
2430 &self,
2431 mut configuration: Configuration,
2432 mut type_: &str,
2433 mut payload: fidl_fuchsia_mem::Buffer,
2434 ___deadline: zx::MonotonicInstant,
2435 ) -> Result<WriteFirmwareResult, fidl::Error> {
2436 let _response =
2437 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
2438 (configuration, type_, &mut payload),
2439 0x514b93454ac0be97,
2440 fidl::encoding::DynamicFlags::empty(),
2441 ___deadline,
2442 )?;
2443 Ok(_response.result)
2444 }
2445
2446 pub fn r#read_firmware(
2453 &self,
2454 mut configuration: Configuration,
2455 mut type_: &str,
2456 ___deadline: zx::MonotonicInstant,
2457 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2458 let _response = self.client.send_query::<
2459 DataSinkReadFirmwareRequest,
2460 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2461 >(
2462 (configuration, type_,),
2463 0xcb67f9830cae9c3,
2464 fidl::encoding::DynamicFlags::empty(),
2465 ___deadline,
2466 )?;
2467 Ok(_response.map(|x| x.firmware))
2468 }
2469
2470 pub fn r#write_volumes(
2473 &self,
2474 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2475 ___deadline: zx::MonotonicInstant,
2476 ) -> Result<i32, fidl::Error> {
2477 let _response =
2478 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
2479 (payload,),
2480 0x5ee32c861d0259df,
2481 fidl::encoding::DynamicFlags::empty(),
2482 ___deadline,
2483 )?;
2484 Ok(_response.status)
2485 }
2486
2487 pub fn r#write_opaque_volume(
2496 &self,
2497 mut payload: fidl_fuchsia_mem::Buffer,
2498 ___deadline: zx::MonotonicInstant,
2499 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2500 let _response = self.client.send_query::<
2501 DataSinkWriteOpaqueVolumeRequest,
2502 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2503 >(
2504 (&mut payload,),
2505 0x4884b6ebaf660d79,
2506 fidl::encoding::DynamicFlags::empty(),
2507 ___deadline,
2508 )?;
2509 Ok(_response.map(|x| x))
2510 }
2511
2512 pub fn r#write_sparse_volume(
2516 &self,
2517 mut payload: fidl_fuchsia_mem::Buffer,
2518 ___deadline: zx::MonotonicInstant,
2519 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2520 let _response = self.client.send_query::<
2521 DataSinkWriteSparseVolumeRequest,
2522 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2523 >(
2524 (&mut payload,),
2525 0x340f5370c5b1e026,
2526 fidl::encoding::DynamicFlags::empty(),
2527 ___deadline,
2528 )?;
2529 Ok(_response.map(|x| x))
2530 }
2531
2532 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
2534 let _response =
2535 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
2536 (),
2537 0x3b59d3e2338e3139,
2538 fidl::encoding::DynamicFlags::empty(),
2539 ___deadline,
2540 )?;
2541 Ok(_response.status)
2542 }
2543}
2544
2545#[cfg(target_os = "fuchsia")]
2546impl From<DataSinkSynchronousProxy> for zx::Handle {
2547 fn from(value: DataSinkSynchronousProxy) -> Self {
2548 value.into_channel().into()
2549 }
2550}
2551
2552#[cfg(target_os = "fuchsia")]
2553impl From<fidl::Channel> for DataSinkSynchronousProxy {
2554 fn from(value: fidl::Channel) -> Self {
2555 Self::new(value)
2556 }
2557}
2558
2559#[cfg(target_os = "fuchsia")]
2560impl fidl::endpoints::FromClient for DataSinkSynchronousProxy {
2561 type Protocol = DataSinkMarker;
2562
2563 fn from_client(value: fidl::endpoints::ClientEnd<DataSinkMarker>) -> Self {
2564 Self::new(value.into_channel())
2565 }
2566}
2567
2568#[derive(Debug, Clone)]
2569pub struct DataSinkProxy {
2570 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2571}
2572
2573impl fidl::endpoints::Proxy for DataSinkProxy {
2574 type Protocol = DataSinkMarker;
2575
2576 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2577 Self::new(inner)
2578 }
2579
2580 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2581 self.client.into_channel().map_err(|client| Self { client })
2582 }
2583
2584 fn as_channel(&self) -> &::fidl::AsyncChannel {
2585 self.client.as_channel()
2586 }
2587}
2588
2589impl DataSinkProxy {
2590 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2592 let protocol_name = <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2593 Self { client: fidl::client::Client::new(channel, protocol_name) }
2594 }
2595
2596 pub fn take_event_stream(&self) -> DataSinkEventStream {
2602 DataSinkEventStream { event_receiver: self.client.take_event_receiver() }
2603 }
2604
2605 pub fn r#read_asset(
2611 &self,
2612 mut configuration: Configuration,
2613 mut asset: Asset,
2614 ) -> fidl::client::QueryResponseFut<
2615 DataSinkReadAssetResult,
2616 fidl::encoding::DefaultFuchsiaResourceDialect,
2617 > {
2618 DataSinkProxyInterface::r#read_asset(self, configuration, asset)
2619 }
2620
2621 pub fn r#write_asset(
2630 &self,
2631 mut configuration: Configuration,
2632 mut asset: Asset,
2633 mut payload: fidl_fuchsia_mem::Buffer,
2634 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2635 DataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
2636 }
2637
2638 pub fn r#write_firmware(
2653 &self,
2654 mut configuration: Configuration,
2655 mut type_: &str,
2656 mut payload: fidl_fuchsia_mem::Buffer,
2657 ) -> fidl::client::QueryResponseFut<
2658 WriteFirmwareResult,
2659 fidl::encoding::DefaultFuchsiaResourceDialect,
2660 > {
2661 DataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
2662 }
2663
2664 pub fn r#read_firmware(
2671 &self,
2672 mut configuration: Configuration,
2673 mut type_: &str,
2674 ) -> fidl::client::QueryResponseFut<
2675 DataSinkReadFirmwareResult,
2676 fidl::encoding::DefaultFuchsiaResourceDialect,
2677 > {
2678 DataSinkProxyInterface::r#read_firmware(self, configuration, type_)
2679 }
2680
2681 pub fn r#write_volumes(
2684 &self,
2685 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2686 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2687 DataSinkProxyInterface::r#write_volumes(self, payload)
2688 }
2689
2690 pub fn r#write_opaque_volume(
2699 &self,
2700 mut payload: fidl_fuchsia_mem::Buffer,
2701 ) -> fidl::client::QueryResponseFut<
2702 DataSinkWriteOpaqueVolumeResult,
2703 fidl::encoding::DefaultFuchsiaResourceDialect,
2704 > {
2705 DataSinkProxyInterface::r#write_opaque_volume(self, payload)
2706 }
2707
2708 pub fn r#write_sparse_volume(
2712 &self,
2713 mut payload: fidl_fuchsia_mem::Buffer,
2714 ) -> fidl::client::QueryResponseFut<
2715 DataSinkWriteSparseVolumeResult,
2716 fidl::encoding::DefaultFuchsiaResourceDialect,
2717 > {
2718 DataSinkProxyInterface::r#write_sparse_volume(self, payload)
2719 }
2720
2721 pub fn r#flush(
2723 &self,
2724 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
2725 DataSinkProxyInterface::r#flush(self)
2726 }
2727}
2728
2729impl DataSinkProxyInterface for DataSinkProxy {
2730 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
2731 DataSinkReadAssetResult,
2732 fidl::encoding::DefaultFuchsiaResourceDialect,
2733 >;
2734 fn r#read_asset(
2735 &self,
2736 mut configuration: Configuration,
2737 mut asset: Asset,
2738 ) -> Self::ReadAssetResponseFut {
2739 fn _decode(
2740 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2741 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
2742 let _response = fidl::client::decode_transaction_body::<
2743 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
2744 fidl::encoding::DefaultFuchsiaResourceDialect,
2745 0x125a23e561007898,
2746 >(_buf?)?;
2747 Ok(_response.map(|x| x.asset))
2748 }
2749 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
2750 (configuration, asset),
2751 0x125a23e561007898,
2752 fidl::encoding::DynamicFlags::empty(),
2753 _decode,
2754 )
2755 }
2756
2757 type WriteAssetResponseFut =
2758 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2759 fn r#write_asset(
2760 &self,
2761 mut configuration: Configuration,
2762 mut asset: Asset,
2763 mut payload: fidl_fuchsia_mem::Buffer,
2764 ) -> Self::WriteAssetResponseFut {
2765 fn _decode(
2766 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2767 ) -> Result<i32, fidl::Error> {
2768 let _response = fidl::client::decode_transaction_body::<
2769 DataSinkWriteAssetResponse,
2770 fidl::encoding::DefaultFuchsiaResourceDialect,
2771 0x516839ce76c4d0a9,
2772 >(_buf?)?;
2773 Ok(_response.status)
2774 }
2775 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
2776 (configuration, asset, &mut payload),
2777 0x516839ce76c4d0a9,
2778 fidl::encoding::DynamicFlags::empty(),
2779 _decode,
2780 )
2781 }
2782
2783 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
2784 WriteFirmwareResult,
2785 fidl::encoding::DefaultFuchsiaResourceDialect,
2786 >;
2787 fn r#write_firmware(
2788 &self,
2789 mut configuration: Configuration,
2790 mut type_: &str,
2791 mut payload: fidl_fuchsia_mem::Buffer,
2792 ) -> Self::WriteFirmwareResponseFut {
2793 fn _decode(
2794 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2795 ) -> Result<WriteFirmwareResult, fidl::Error> {
2796 let _response = fidl::client::decode_transaction_body::<
2797 DataSinkWriteFirmwareResponse,
2798 fidl::encoding::DefaultFuchsiaResourceDialect,
2799 0x514b93454ac0be97,
2800 >(_buf?)?;
2801 Ok(_response.result)
2802 }
2803 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
2804 (configuration, type_, &mut payload),
2805 0x514b93454ac0be97,
2806 fidl::encoding::DynamicFlags::empty(),
2807 _decode,
2808 )
2809 }
2810
2811 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
2812 DataSinkReadFirmwareResult,
2813 fidl::encoding::DefaultFuchsiaResourceDialect,
2814 >;
2815 fn r#read_firmware(
2816 &self,
2817 mut configuration: Configuration,
2818 mut type_: &str,
2819 ) -> Self::ReadFirmwareResponseFut {
2820 fn _decode(
2821 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2822 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
2823 let _response = fidl::client::decode_transaction_body::<
2824 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
2825 fidl::encoding::DefaultFuchsiaResourceDialect,
2826 0xcb67f9830cae9c3,
2827 >(_buf?)?;
2828 Ok(_response.map(|x| x.firmware))
2829 }
2830 self.client
2831 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
2832 (configuration, type_),
2833 0xcb67f9830cae9c3,
2834 fidl::encoding::DynamicFlags::empty(),
2835 _decode,
2836 )
2837 }
2838
2839 type WriteVolumesResponseFut =
2840 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2841 fn r#write_volumes(
2842 &self,
2843 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
2844 ) -> Self::WriteVolumesResponseFut {
2845 fn _decode(
2846 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2847 ) -> Result<i32, fidl::Error> {
2848 let _response = fidl::client::decode_transaction_body::<
2849 DataSinkWriteVolumesResponse,
2850 fidl::encoding::DefaultFuchsiaResourceDialect,
2851 0x5ee32c861d0259df,
2852 >(_buf?)?;
2853 Ok(_response.status)
2854 }
2855 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
2856 (payload,),
2857 0x5ee32c861d0259df,
2858 fidl::encoding::DynamicFlags::empty(),
2859 _decode,
2860 )
2861 }
2862
2863 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
2864 DataSinkWriteOpaqueVolumeResult,
2865 fidl::encoding::DefaultFuchsiaResourceDialect,
2866 >;
2867 fn r#write_opaque_volume(
2868 &self,
2869 mut payload: fidl_fuchsia_mem::Buffer,
2870 ) -> Self::WriteOpaqueVolumeResponseFut {
2871 fn _decode(
2872 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2873 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
2874 let _response = fidl::client::decode_transaction_body::<
2875 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2876 fidl::encoding::DefaultFuchsiaResourceDialect,
2877 0x4884b6ebaf660d79,
2878 >(_buf?)?;
2879 Ok(_response.map(|x| x))
2880 }
2881 self.client.send_query_and_decode::<
2882 DataSinkWriteOpaqueVolumeRequest,
2883 DataSinkWriteOpaqueVolumeResult,
2884 >(
2885 (&mut payload,),
2886 0x4884b6ebaf660d79,
2887 fidl::encoding::DynamicFlags::empty(),
2888 _decode,
2889 )
2890 }
2891
2892 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
2893 DataSinkWriteSparseVolumeResult,
2894 fidl::encoding::DefaultFuchsiaResourceDialect,
2895 >;
2896 fn r#write_sparse_volume(
2897 &self,
2898 mut payload: fidl_fuchsia_mem::Buffer,
2899 ) -> Self::WriteSparseVolumeResponseFut {
2900 fn _decode(
2901 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2902 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
2903 let _response = fidl::client::decode_transaction_body::<
2904 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
2905 fidl::encoding::DefaultFuchsiaResourceDialect,
2906 0x340f5370c5b1e026,
2907 >(_buf?)?;
2908 Ok(_response.map(|x| x))
2909 }
2910 self.client.send_query_and_decode::<
2911 DataSinkWriteSparseVolumeRequest,
2912 DataSinkWriteSparseVolumeResult,
2913 >(
2914 (&mut payload,),
2915 0x340f5370c5b1e026,
2916 fidl::encoding::DynamicFlags::empty(),
2917 _decode,
2918 )
2919 }
2920
2921 type FlushResponseFut =
2922 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
2923 fn r#flush(&self) -> Self::FlushResponseFut {
2924 fn _decode(
2925 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2926 ) -> Result<i32, fidl::Error> {
2927 let _response = fidl::client::decode_transaction_body::<
2928 DataSinkFlushResponse,
2929 fidl::encoding::DefaultFuchsiaResourceDialect,
2930 0x3b59d3e2338e3139,
2931 >(_buf?)?;
2932 Ok(_response.status)
2933 }
2934 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
2935 (),
2936 0x3b59d3e2338e3139,
2937 fidl::encoding::DynamicFlags::empty(),
2938 _decode,
2939 )
2940 }
2941}
2942
2943pub struct DataSinkEventStream {
2944 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2945}
2946
2947impl std::marker::Unpin for DataSinkEventStream {}
2948
2949impl futures::stream::FusedStream for DataSinkEventStream {
2950 fn is_terminated(&self) -> bool {
2951 self.event_receiver.is_terminated()
2952 }
2953}
2954
2955impl futures::Stream for DataSinkEventStream {
2956 type Item = Result<DataSinkEvent, fidl::Error>;
2957
2958 fn poll_next(
2959 mut self: std::pin::Pin<&mut Self>,
2960 cx: &mut std::task::Context<'_>,
2961 ) -> std::task::Poll<Option<Self::Item>> {
2962 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2963 &mut self.event_receiver,
2964 cx
2965 )?) {
2966 Some(buf) => std::task::Poll::Ready(Some(DataSinkEvent::decode(buf))),
2967 None => std::task::Poll::Ready(None),
2968 }
2969 }
2970}
2971
2972#[derive(Debug)]
2973pub enum DataSinkEvent {}
2974
2975impl DataSinkEvent {
2976 fn decode(
2978 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2979 ) -> Result<DataSinkEvent, fidl::Error> {
2980 let (bytes, _handles) = buf.split_mut();
2981 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2982 debug_assert_eq!(tx_header.tx_id, 0);
2983 match tx_header.ordinal {
2984 _ => Err(fidl::Error::UnknownOrdinal {
2985 ordinal: tx_header.ordinal,
2986 protocol_name: <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2987 }),
2988 }
2989 }
2990}
2991
2992pub struct DataSinkRequestStream {
2994 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2995 is_terminated: bool,
2996}
2997
2998impl std::marker::Unpin for DataSinkRequestStream {}
2999
3000impl futures::stream::FusedStream for DataSinkRequestStream {
3001 fn is_terminated(&self) -> bool {
3002 self.is_terminated
3003 }
3004}
3005
3006impl fidl::endpoints::RequestStream for DataSinkRequestStream {
3007 type Protocol = DataSinkMarker;
3008 type ControlHandle = DataSinkControlHandle;
3009
3010 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3011 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3012 }
3013
3014 fn control_handle(&self) -> Self::ControlHandle {
3015 DataSinkControlHandle { inner: self.inner.clone() }
3016 }
3017
3018 fn into_inner(
3019 self,
3020 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3021 {
3022 (self.inner, self.is_terminated)
3023 }
3024
3025 fn from_inner(
3026 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3027 is_terminated: bool,
3028 ) -> Self {
3029 Self { inner, is_terminated }
3030 }
3031}
3032
3033impl futures::Stream for DataSinkRequestStream {
3034 type Item = Result<DataSinkRequest, fidl::Error>;
3035
3036 fn poll_next(
3037 mut self: std::pin::Pin<&mut Self>,
3038 cx: &mut std::task::Context<'_>,
3039 ) -> std::task::Poll<Option<Self::Item>> {
3040 let this = &mut *self;
3041 if this.inner.check_shutdown(cx) {
3042 this.is_terminated = true;
3043 return std::task::Poll::Ready(None);
3044 }
3045 if this.is_terminated {
3046 panic!("polled DataSinkRequestStream after completion");
3047 }
3048 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3049 |bytes, handles| {
3050 match this.inner.channel().read_etc(cx, bytes, handles) {
3051 std::task::Poll::Ready(Ok(())) => {}
3052 std::task::Poll::Pending => return std::task::Poll::Pending,
3053 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3054 this.is_terminated = true;
3055 return std::task::Poll::Ready(None);
3056 }
3057 std::task::Poll::Ready(Err(e)) => {
3058 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3059 e.into(),
3060 ))))
3061 }
3062 }
3063
3064 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3066
3067 std::task::Poll::Ready(Some(match header.ordinal {
3068 0x125a23e561007898 => {
3069 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3070 let mut req = fidl::new_empty!(
3071 DataSinkReadAssetRequest,
3072 fidl::encoding::DefaultFuchsiaResourceDialect
3073 );
3074 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3075 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3076 Ok(DataSinkRequest::ReadAsset {
3077 configuration: req.configuration,
3078 asset: req.asset,
3079
3080 responder: DataSinkReadAssetResponder {
3081 control_handle: std::mem::ManuallyDrop::new(control_handle),
3082 tx_id: header.tx_id,
3083 },
3084 })
3085 }
3086 0x516839ce76c4d0a9 => {
3087 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3088 let mut req = fidl::new_empty!(
3089 DataSinkWriteAssetRequest,
3090 fidl::encoding::DefaultFuchsiaResourceDialect
3091 );
3092 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
3093 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3094 Ok(DataSinkRequest::WriteAsset {
3095 configuration: req.configuration,
3096 asset: req.asset,
3097 payload: req.payload,
3098
3099 responder: DataSinkWriteAssetResponder {
3100 control_handle: std::mem::ManuallyDrop::new(control_handle),
3101 tx_id: header.tx_id,
3102 },
3103 })
3104 }
3105 0x514b93454ac0be97 => {
3106 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3107 let mut req = fidl::new_empty!(
3108 DataSinkWriteFirmwareRequest,
3109 fidl::encoding::DefaultFuchsiaResourceDialect
3110 );
3111 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3112 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3113 Ok(DataSinkRequest::WriteFirmware {
3114 configuration: req.configuration,
3115 type_: req.type_,
3116 payload: req.payload,
3117
3118 responder: DataSinkWriteFirmwareResponder {
3119 control_handle: std::mem::ManuallyDrop::new(control_handle),
3120 tx_id: header.tx_id,
3121 },
3122 })
3123 }
3124 0xcb67f9830cae9c3 => {
3125 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3126 let mut req = fidl::new_empty!(
3127 DataSinkReadFirmwareRequest,
3128 fidl::encoding::DefaultFuchsiaResourceDialect
3129 );
3130 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
3131 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3132 Ok(DataSinkRequest::ReadFirmware {
3133 configuration: req.configuration,
3134 type_: req.type_,
3135
3136 responder: DataSinkReadFirmwareResponder {
3137 control_handle: std::mem::ManuallyDrop::new(control_handle),
3138 tx_id: header.tx_id,
3139 },
3140 })
3141 }
3142 0x5ee32c861d0259df => {
3143 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3144 let mut req = fidl::new_empty!(
3145 DataSinkWriteVolumesRequest,
3146 fidl::encoding::DefaultFuchsiaResourceDialect
3147 );
3148 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
3149 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3150 Ok(DataSinkRequest::WriteVolumes {
3151 payload: req.payload,
3152
3153 responder: DataSinkWriteVolumesResponder {
3154 control_handle: std::mem::ManuallyDrop::new(control_handle),
3155 tx_id: header.tx_id,
3156 },
3157 })
3158 }
3159 0x4884b6ebaf660d79 => {
3160 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3161 let mut req = fidl::new_empty!(
3162 DataSinkWriteOpaqueVolumeRequest,
3163 fidl::encoding::DefaultFuchsiaResourceDialect
3164 );
3165 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3166 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3167 Ok(DataSinkRequest::WriteOpaqueVolume {
3168 payload: req.payload,
3169
3170 responder: DataSinkWriteOpaqueVolumeResponder {
3171 control_handle: std::mem::ManuallyDrop::new(control_handle),
3172 tx_id: header.tx_id,
3173 },
3174 })
3175 }
3176 0x340f5370c5b1e026 => {
3177 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3178 let mut req = fidl::new_empty!(
3179 DataSinkWriteSparseVolumeRequest,
3180 fidl::encoding::DefaultFuchsiaResourceDialect
3181 );
3182 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
3183 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3184 Ok(DataSinkRequest::WriteSparseVolume {
3185 payload: req.payload,
3186
3187 responder: DataSinkWriteSparseVolumeResponder {
3188 control_handle: std::mem::ManuallyDrop::new(control_handle),
3189 tx_id: header.tx_id,
3190 },
3191 })
3192 }
3193 0x3b59d3e2338e3139 => {
3194 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3195 let mut req = fidl::new_empty!(
3196 fidl::encoding::EmptyPayload,
3197 fidl::encoding::DefaultFuchsiaResourceDialect
3198 );
3199 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3200 let control_handle = DataSinkControlHandle { inner: this.inner.clone() };
3201 Ok(DataSinkRequest::Flush {
3202 responder: DataSinkFlushResponder {
3203 control_handle: std::mem::ManuallyDrop::new(control_handle),
3204 tx_id: header.tx_id,
3205 },
3206 })
3207 }
3208 _ => Err(fidl::Error::UnknownOrdinal {
3209 ordinal: header.ordinal,
3210 protocol_name:
3211 <DataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3212 }),
3213 }))
3214 },
3215 )
3216 }
3217}
3218
3219#[derive(Debug)]
3238pub enum DataSinkRequest {
3239 ReadAsset { configuration: Configuration, asset: Asset, responder: DataSinkReadAssetResponder },
3245 WriteAsset {
3254 configuration: Configuration,
3255 asset: Asset,
3256 payload: fidl_fuchsia_mem::Buffer,
3257 responder: DataSinkWriteAssetResponder,
3258 },
3259 WriteFirmware {
3274 configuration: Configuration,
3275 type_: String,
3276 payload: fidl_fuchsia_mem::Buffer,
3277 responder: DataSinkWriteFirmwareResponder,
3278 },
3279 ReadFirmware {
3286 configuration: Configuration,
3287 type_: String,
3288 responder: DataSinkReadFirmwareResponder,
3289 },
3290 WriteVolumes {
3293 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
3294 responder: DataSinkWriteVolumesResponder,
3295 },
3296 WriteOpaqueVolume {
3305 payload: fidl_fuchsia_mem::Buffer,
3306 responder: DataSinkWriteOpaqueVolumeResponder,
3307 },
3308 WriteSparseVolume {
3312 payload: fidl_fuchsia_mem::Buffer,
3313 responder: DataSinkWriteSparseVolumeResponder,
3314 },
3315 Flush { responder: DataSinkFlushResponder },
3317}
3318
3319impl DataSinkRequest {
3320 #[allow(irrefutable_let_patterns)]
3321 pub fn into_read_asset(self) -> Option<(Configuration, Asset, DataSinkReadAssetResponder)> {
3322 if let DataSinkRequest::ReadAsset { configuration, asset, responder } = self {
3323 Some((configuration, asset, responder))
3324 } else {
3325 None
3326 }
3327 }
3328
3329 #[allow(irrefutable_let_patterns)]
3330 pub fn into_write_asset(
3331 self,
3332 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DataSinkWriteAssetResponder)> {
3333 if let DataSinkRequest::WriteAsset { configuration, asset, payload, responder } = self {
3334 Some((configuration, asset, payload, responder))
3335 } else {
3336 None
3337 }
3338 }
3339
3340 #[allow(irrefutable_let_patterns)]
3341 pub fn into_write_firmware(
3342 self,
3343 ) -> Option<(Configuration, String, fidl_fuchsia_mem::Buffer, DataSinkWriteFirmwareResponder)>
3344 {
3345 if let DataSinkRequest::WriteFirmware { configuration, type_, payload, responder } = self {
3346 Some((configuration, type_, payload, responder))
3347 } else {
3348 None
3349 }
3350 }
3351
3352 #[allow(irrefutable_let_patterns)]
3353 pub fn into_read_firmware(
3354 self,
3355 ) -> Option<(Configuration, String, DataSinkReadFirmwareResponder)> {
3356 if let DataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
3357 Some((configuration, type_, responder))
3358 } else {
3359 None
3360 }
3361 }
3362
3363 #[allow(irrefutable_let_patterns)]
3364 pub fn into_write_volumes(
3365 self,
3366 ) -> Option<(fidl::endpoints::ClientEnd<PayloadStreamMarker>, DataSinkWriteVolumesResponder)>
3367 {
3368 if let DataSinkRequest::WriteVolumes { payload, responder } = self {
3369 Some((payload, responder))
3370 } else {
3371 None
3372 }
3373 }
3374
3375 #[allow(irrefutable_let_patterns)]
3376 pub fn into_write_opaque_volume(
3377 self,
3378 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteOpaqueVolumeResponder)> {
3379 if let DataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
3380 Some((payload, responder))
3381 } else {
3382 None
3383 }
3384 }
3385
3386 #[allow(irrefutable_let_patterns)]
3387 pub fn into_write_sparse_volume(
3388 self,
3389 ) -> Option<(fidl_fuchsia_mem::Buffer, DataSinkWriteSparseVolumeResponder)> {
3390 if let DataSinkRequest::WriteSparseVolume { payload, responder } = self {
3391 Some((payload, responder))
3392 } else {
3393 None
3394 }
3395 }
3396
3397 #[allow(irrefutable_let_patterns)]
3398 pub fn into_flush(self) -> Option<(DataSinkFlushResponder)> {
3399 if let DataSinkRequest::Flush { responder } = self {
3400 Some((responder))
3401 } else {
3402 None
3403 }
3404 }
3405
3406 pub fn method_name(&self) -> &'static str {
3408 match *self {
3409 DataSinkRequest::ReadAsset { .. } => "read_asset",
3410 DataSinkRequest::WriteAsset { .. } => "write_asset",
3411 DataSinkRequest::WriteFirmware { .. } => "write_firmware",
3412 DataSinkRequest::ReadFirmware { .. } => "read_firmware",
3413 DataSinkRequest::WriteVolumes { .. } => "write_volumes",
3414 DataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
3415 DataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
3416 DataSinkRequest::Flush { .. } => "flush",
3417 }
3418 }
3419}
3420
3421#[derive(Debug, Clone)]
3422pub struct DataSinkControlHandle {
3423 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3424}
3425
3426impl fidl::endpoints::ControlHandle for DataSinkControlHandle {
3427 fn shutdown(&self) {
3428 self.inner.shutdown()
3429 }
3430 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3431 self.inner.shutdown_with_epitaph(status)
3432 }
3433
3434 fn is_closed(&self) -> bool {
3435 self.inner.channel().is_closed()
3436 }
3437 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3438 self.inner.channel().on_closed()
3439 }
3440
3441 #[cfg(target_os = "fuchsia")]
3442 fn signal_peer(
3443 &self,
3444 clear_mask: zx::Signals,
3445 set_mask: zx::Signals,
3446 ) -> Result<(), zx_status::Status> {
3447 use fidl::Peered;
3448 self.inner.channel().signal_peer(clear_mask, set_mask)
3449 }
3450}
3451
3452impl DataSinkControlHandle {}
3453
3454#[must_use = "FIDL methods require a response to be sent"]
3455#[derive(Debug)]
3456pub struct DataSinkReadAssetResponder {
3457 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3458 tx_id: u32,
3459}
3460
3461impl std::ops::Drop for DataSinkReadAssetResponder {
3465 fn drop(&mut self) {
3466 self.control_handle.shutdown();
3467 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3469 }
3470}
3471
3472impl fidl::endpoints::Responder for DataSinkReadAssetResponder {
3473 type ControlHandle = DataSinkControlHandle;
3474
3475 fn control_handle(&self) -> &DataSinkControlHandle {
3476 &self.control_handle
3477 }
3478
3479 fn drop_without_shutdown(mut self) {
3480 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3482 std::mem::forget(self);
3484 }
3485}
3486
3487impl DataSinkReadAssetResponder {
3488 pub fn send(
3492 self,
3493 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3494 ) -> Result<(), fidl::Error> {
3495 let _result = self.send_raw(result);
3496 if _result.is_err() {
3497 self.control_handle.shutdown();
3498 }
3499 self.drop_without_shutdown();
3500 _result
3501 }
3502
3503 pub fn send_no_shutdown_on_err(
3505 self,
3506 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3507 ) -> Result<(), fidl::Error> {
3508 let _result = self.send_raw(result);
3509 self.drop_without_shutdown();
3510 _result
3511 }
3512
3513 fn send_raw(
3514 &self,
3515 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3516 ) -> Result<(), fidl::Error> {
3517 self.control_handle
3518 .inner
3519 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
3520 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
3521 self.tx_id,
3522 0x125a23e561007898,
3523 fidl::encoding::DynamicFlags::empty(),
3524 )
3525 }
3526}
3527
3528#[must_use = "FIDL methods require a response to be sent"]
3529#[derive(Debug)]
3530pub struct DataSinkWriteAssetResponder {
3531 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3532 tx_id: u32,
3533}
3534
3535impl std::ops::Drop for DataSinkWriteAssetResponder {
3539 fn drop(&mut self) {
3540 self.control_handle.shutdown();
3541 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3543 }
3544}
3545
3546impl fidl::endpoints::Responder for DataSinkWriteAssetResponder {
3547 type ControlHandle = DataSinkControlHandle;
3548
3549 fn control_handle(&self) -> &DataSinkControlHandle {
3550 &self.control_handle
3551 }
3552
3553 fn drop_without_shutdown(mut self) {
3554 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3556 std::mem::forget(self);
3558 }
3559}
3560
3561impl DataSinkWriteAssetResponder {
3562 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3566 let _result = self.send_raw(status);
3567 if _result.is_err() {
3568 self.control_handle.shutdown();
3569 }
3570 self.drop_without_shutdown();
3571 _result
3572 }
3573
3574 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3576 let _result = self.send_raw(status);
3577 self.drop_without_shutdown();
3578 _result
3579 }
3580
3581 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3582 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
3583 (status,),
3584 self.tx_id,
3585 0x516839ce76c4d0a9,
3586 fidl::encoding::DynamicFlags::empty(),
3587 )
3588 }
3589}
3590
3591#[must_use = "FIDL methods require a response to be sent"]
3592#[derive(Debug)]
3593pub struct DataSinkWriteFirmwareResponder {
3594 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3595 tx_id: u32,
3596}
3597
3598impl std::ops::Drop for DataSinkWriteFirmwareResponder {
3602 fn drop(&mut self) {
3603 self.control_handle.shutdown();
3604 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3606 }
3607}
3608
3609impl fidl::endpoints::Responder for DataSinkWriteFirmwareResponder {
3610 type ControlHandle = DataSinkControlHandle;
3611
3612 fn control_handle(&self) -> &DataSinkControlHandle {
3613 &self.control_handle
3614 }
3615
3616 fn drop_without_shutdown(mut self) {
3617 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3619 std::mem::forget(self);
3621 }
3622}
3623
3624impl DataSinkWriteFirmwareResponder {
3625 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3629 let _result = self.send_raw(result);
3630 if _result.is_err() {
3631 self.control_handle.shutdown();
3632 }
3633 self.drop_without_shutdown();
3634 _result
3635 }
3636
3637 pub fn send_no_shutdown_on_err(
3639 self,
3640 mut result: &WriteFirmwareResult,
3641 ) -> Result<(), fidl::Error> {
3642 let _result = self.send_raw(result);
3643 self.drop_without_shutdown();
3644 _result
3645 }
3646
3647 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
3648 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
3649 (result,),
3650 self.tx_id,
3651 0x514b93454ac0be97,
3652 fidl::encoding::DynamicFlags::empty(),
3653 )
3654 }
3655}
3656
3657#[must_use = "FIDL methods require a response to be sent"]
3658#[derive(Debug)]
3659pub struct DataSinkReadFirmwareResponder {
3660 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3661 tx_id: u32,
3662}
3663
3664impl std::ops::Drop for DataSinkReadFirmwareResponder {
3668 fn drop(&mut self) {
3669 self.control_handle.shutdown();
3670 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3672 }
3673}
3674
3675impl fidl::endpoints::Responder for DataSinkReadFirmwareResponder {
3676 type ControlHandle = DataSinkControlHandle;
3677
3678 fn control_handle(&self) -> &DataSinkControlHandle {
3679 &self.control_handle
3680 }
3681
3682 fn drop_without_shutdown(mut self) {
3683 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3685 std::mem::forget(self);
3687 }
3688}
3689
3690impl DataSinkReadFirmwareResponder {
3691 pub fn send(
3695 self,
3696 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3697 ) -> Result<(), fidl::Error> {
3698 let _result = self.send_raw(result);
3699 if _result.is_err() {
3700 self.control_handle.shutdown();
3701 }
3702 self.drop_without_shutdown();
3703 _result
3704 }
3705
3706 pub fn send_no_shutdown_on_err(
3708 self,
3709 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3710 ) -> Result<(), fidl::Error> {
3711 let _result = self.send_raw(result);
3712 self.drop_without_shutdown();
3713 _result
3714 }
3715
3716 fn send_raw(
3717 &self,
3718 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
3719 ) -> Result<(), fidl::Error> {
3720 self.control_handle
3721 .inner
3722 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
3723 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
3724 self.tx_id,
3725 0xcb67f9830cae9c3,
3726 fidl::encoding::DynamicFlags::empty(),
3727 )
3728 }
3729}
3730
3731#[must_use = "FIDL methods require a response to be sent"]
3732#[derive(Debug)]
3733pub struct DataSinkWriteVolumesResponder {
3734 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3735 tx_id: u32,
3736}
3737
3738impl std::ops::Drop for DataSinkWriteVolumesResponder {
3742 fn drop(&mut self) {
3743 self.control_handle.shutdown();
3744 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3746 }
3747}
3748
3749impl fidl::endpoints::Responder for DataSinkWriteVolumesResponder {
3750 type ControlHandle = DataSinkControlHandle;
3751
3752 fn control_handle(&self) -> &DataSinkControlHandle {
3753 &self.control_handle
3754 }
3755
3756 fn drop_without_shutdown(mut self) {
3757 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3759 std::mem::forget(self);
3761 }
3762}
3763
3764impl DataSinkWriteVolumesResponder {
3765 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3769 let _result = self.send_raw(status);
3770 if _result.is_err() {
3771 self.control_handle.shutdown();
3772 }
3773 self.drop_without_shutdown();
3774 _result
3775 }
3776
3777 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3779 let _result = self.send_raw(status);
3780 self.drop_without_shutdown();
3781 _result
3782 }
3783
3784 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3785 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
3786 (status,),
3787 self.tx_id,
3788 0x5ee32c861d0259df,
3789 fidl::encoding::DynamicFlags::empty(),
3790 )
3791 }
3792}
3793
3794#[must_use = "FIDL methods require a response to be sent"]
3795#[derive(Debug)]
3796pub struct DataSinkWriteOpaqueVolumeResponder {
3797 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3798 tx_id: u32,
3799}
3800
3801impl std::ops::Drop for DataSinkWriteOpaqueVolumeResponder {
3805 fn drop(&mut self) {
3806 self.control_handle.shutdown();
3807 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3809 }
3810}
3811
3812impl fidl::endpoints::Responder for DataSinkWriteOpaqueVolumeResponder {
3813 type ControlHandle = DataSinkControlHandle;
3814
3815 fn control_handle(&self) -> &DataSinkControlHandle {
3816 &self.control_handle
3817 }
3818
3819 fn drop_without_shutdown(mut self) {
3820 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3822 std::mem::forget(self);
3824 }
3825}
3826
3827impl DataSinkWriteOpaqueVolumeResponder {
3828 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3832 let _result = self.send_raw(result);
3833 if _result.is_err() {
3834 self.control_handle.shutdown();
3835 }
3836 self.drop_without_shutdown();
3837 _result
3838 }
3839
3840 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3842 let _result = self.send_raw(result);
3843 self.drop_without_shutdown();
3844 _result
3845 }
3846
3847 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3848 self.control_handle
3849 .inner
3850 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3851 result,
3852 self.tx_id,
3853 0x4884b6ebaf660d79,
3854 fidl::encoding::DynamicFlags::empty(),
3855 )
3856 }
3857}
3858
3859#[must_use = "FIDL methods require a response to be sent"]
3860#[derive(Debug)]
3861pub struct DataSinkWriteSparseVolumeResponder {
3862 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3863 tx_id: u32,
3864}
3865
3866impl std::ops::Drop for DataSinkWriteSparseVolumeResponder {
3870 fn drop(&mut self) {
3871 self.control_handle.shutdown();
3872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3874 }
3875}
3876
3877impl fidl::endpoints::Responder for DataSinkWriteSparseVolumeResponder {
3878 type ControlHandle = DataSinkControlHandle;
3879
3880 fn control_handle(&self) -> &DataSinkControlHandle {
3881 &self.control_handle
3882 }
3883
3884 fn drop_without_shutdown(mut self) {
3885 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3887 std::mem::forget(self);
3889 }
3890}
3891
3892impl DataSinkWriteSparseVolumeResponder {
3893 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3897 let _result = self.send_raw(result);
3898 if _result.is_err() {
3899 self.control_handle.shutdown();
3900 }
3901 self.drop_without_shutdown();
3902 _result
3903 }
3904
3905 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3907 let _result = self.send_raw(result);
3908 self.drop_without_shutdown();
3909 _result
3910 }
3911
3912 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
3913 self.control_handle
3914 .inner
3915 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
3916 result,
3917 self.tx_id,
3918 0x340f5370c5b1e026,
3919 fidl::encoding::DynamicFlags::empty(),
3920 )
3921 }
3922}
3923
3924#[must_use = "FIDL methods require a response to be sent"]
3925#[derive(Debug)]
3926pub struct DataSinkFlushResponder {
3927 control_handle: std::mem::ManuallyDrop<DataSinkControlHandle>,
3928 tx_id: u32,
3929}
3930
3931impl std::ops::Drop for DataSinkFlushResponder {
3935 fn drop(&mut self) {
3936 self.control_handle.shutdown();
3937 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3939 }
3940}
3941
3942impl fidl::endpoints::Responder for DataSinkFlushResponder {
3943 type ControlHandle = DataSinkControlHandle;
3944
3945 fn control_handle(&self) -> &DataSinkControlHandle {
3946 &self.control_handle
3947 }
3948
3949 fn drop_without_shutdown(mut self) {
3950 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3952 std::mem::forget(self);
3954 }
3955}
3956
3957impl DataSinkFlushResponder {
3958 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
3962 let _result = self.send_raw(status);
3963 if _result.is_err() {
3964 self.control_handle.shutdown();
3965 }
3966 self.drop_without_shutdown();
3967 _result
3968 }
3969
3970 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
3972 let _result = self.send_raw(status);
3973 self.drop_without_shutdown();
3974 _result
3975 }
3976
3977 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
3978 self.control_handle.inner.send::<DataSinkFlushResponse>(
3979 (status,),
3980 self.tx_id,
3981 0x3b59d3e2338e3139,
3982 fidl::encoding::DynamicFlags::empty(),
3983 )
3984 }
3985}
3986
3987#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3988pub struct DynamicDataSinkMarker;
3989
3990impl fidl::endpoints::ProtocolMarker for DynamicDataSinkMarker {
3991 type Proxy = DynamicDataSinkProxy;
3992 type RequestStream = DynamicDataSinkRequestStream;
3993 #[cfg(target_os = "fuchsia")]
3994 type SynchronousProxy = DynamicDataSinkSynchronousProxy;
3995
3996 const DEBUG_NAME: &'static str = "(anonymous) DynamicDataSink";
3997}
3998
3999pub trait DynamicDataSinkProxyInterface: Send + Sync {
4000 type ReadAssetResponseFut: std::future::Future<Output = Result<DataSinkReadAssetResult, fidl::Error>>
4001 + Send;
4002 fn r#read_asset(
4003 &self,
4004 configuration: Configuration,
4005 asset: Asset,
4006 ) -> Self::ReadAssetResponseFut;
4007 type WriteAssetResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4008 fn r#write_asset(
4009 &self,
4010 configuration: Configuration,
4011 asset: Asset,
4012 payload: fidl_fuchsia_mem::Buffer,
4013 ) -> Self::WriteAssetResponseFut;
4014 type WriteFirmwareResponseFut: std::future::Future<Output = Result<WriteFirmwareResult, fidl::Error>>
4015 + Send;
4016 fn r#write_firmware(
4017 &self,
4018 configuration: Configuration,
4019 type_: &str,
4020 payload: fidl_fuchsia_mem::Buffer,
4021 ) -> Self::WriteFirmwareResponseFut;
4022 type ReadFirmwareResponseFut: std::future::Future<Output = Result<DataSinkReadFirmwareResult, fidl::Error>>
4023 + Send;
4024 fn r#read_firmware(
4025 &self,
4026 configuration: Configuration,
4027 type_: &str,
4028 ) -> Self::ReadFirmwareResponseFut;
4029 type WriteVolumesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4030 fn r#write_volumes(
4031 &self,
4032 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4033 ) -> Self::WriteVolumesResponseFut;
4034 type WriteOpaqueVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteOpaqueVolumeResult, fidl::Error>>
4035 + Send;
4036 fn r#write_opaque_volume(
4037 &self,
4038 payload: fidl_fuchsia_mem::Buffer,
4039 ) -> Self::WriteOpaqueVolumeResponseFut;
4040 type WriteSparseVolumeResponseFut: std::future::Future<Output = Result<DataSinkWriteSparseVolumeResult, fidl::Error>>
4041 + Send;
4042 fn r#write_sparse_volume(
4043 &self,
4044 payload: fidl_fuchsia_mem::Buffer,
4045 ) -> Self::WriteSparseVolumeResponseFut;
4046 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
4047 fn r#flush(&self) -> Self::FlushResponseFut;
4048 type InitializePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4049 + Send;
4050 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut;
4051 type WipePartitionTablesResponseFut: std::future::Future<Output = Result<i32, fidl::Error>>
4052 + Send;
4053 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut;
4054}
4055#[derive(Debug)]
4056#[cfg(target_os = "fuchsia")]
4057pub struct DynamicDataSinkSynchronousProxy {
4058 client: fidl::client::sync::Client,
4059}
4060
4061#[cfg(target_os = "fuchsia")]
4062impl fidl::endpoints::SynchronousProxy for DynamicDataSinkSynchronousProxy {
4063 type Proxy = DynamicDataSinkProxy;
4064 type Protocol = DynamicDataSinkMarker;
4065
4066 fn from_channel(inner: fidl::Channel) -> Self {
4067 Self::new(inner)
4068 }
4069
4070 fn into_channel(self) -> fidl::Channel {
4071 self.client.into_channel()
4072 }
4073
4074 fn as_channel(&self) -> &fidl::Channel {
4075 self.client.as_channel()
4076 }
4077}
4078
4079#[cfg(target_os = "fuchsia")]
4080impl DynamicDataSinkSynchronousProxy {
4081 pub fn new(channel: fidl::Channel) -> Self {
4082 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4083 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4084 }
4085
4086 pub fn into_channel(self) -> fidl::Channel {
4087 self.client.into_channel()
4088 }
4089
4090 pub fn wait_for_event(
4093 &self,
4094 deadline: zx::MonotonicInstant,
4095 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4096 DynamicDataSinkEvent::decode(self.client.wait_for_event(deadline)?)
4097 }
4098
4099 pub fn r#read_asset(
4105 &self,
4106 mut configuration: Configuration,
4107 mut asset: Asset,
4108 ___deadline: zx::MonotonicInstant,
4109 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4110 let _response = self.client.send_query::<
4111 DataSinkReadAssetRequest,
4112 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4113 >(
4114 (configuration, asset,),
4115 0x125a23e561007898,
4116 fidl::encoding::DynamicFlags::empty(),
4117 ___deadline,
4118 )?;
4119 Ok(_response.map(|x| x.asset))
4120 }
4121
4122 pub fn r#write_asset(
4131 &self,
4132 mut configuration: Configuration,
4133 mut asset: Asset,
4134 mut payload: fidl_fuchsia_mem::Buffer,
4135 ___deadline: zx::MonotonicInstant,
4136 ) -> Result<i32, fidl::Error> {
4137 let _response =
4138 self.client.send_query::<DataSinkWriteAssetRequest, DataSinkWriteAssetResponse>(
4139 (configuration, asset, &mut payload),
4140 0x516839ce76c4d0a9,
4141 fidl::encoding::DynamicFlags::empty(),
4142 ___deadline,
4143 )?;
4144 Ok(_response.status)
4145 }
4146
4147 pub fn r#write_firmware(
4162 &self,
4163 mut configuration: Configuration,
4164 mut type_: &str,
4165 mut payload: fidl_fuchsia_mem::Buffer,
4166 ___deadline: zx::MonotonicInstant,
4167 ) -> Result<WriteFirmwareResult, fidl::Error> {
4168 let _response =
4169 self.client.send_query::<DataSinkWriteFirmwareRequest, DataSinkWriteFirmwareResponse>(
4170 (configuration, type_, &mut payload),
4171 0x514b93454ac0be97,
4172 fidl::encoding::DynamicFlags::empty(),
4173 ___deadline,
4174 )?;
4175 Ok(_response.result)
4176 }
4177
4178 pub fn r#read_firmware(
4185 &self,
4186 mut configuration: Configuration,
4187 mut type_: &str,
4188 ___deadline: zx::MonotonicInstant,
4189 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4190 let _response = self.client.send_query::<
4191 DataSinkReadFirmwareRequest,
4192 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4193 >(
4194 (configuration, type_,),
4195 0xcb67f9830cae9c3,
4196 fidl::encoding::DynamicFlags::empty(),
4197 ___deadline,
4198 )?;
4199 Ok(_response.map(|x| x.firmware))
4200 }
4201
4202 pub fn r#write_volumes(
4205 &self,
4206 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4207 ___deadline: zx::MonotonicInstant,
4208 ) -> Result<i32, fidl::Error> {
4209 let _response =
4210 self.client.send_query::<DataSinkWriteVolumesRequest, DataSinkWriteVolumesResponse>(
4211 (payload,),
4212 0x5ee32c861d0259df,
4213 fidl::encoding::DynamicFlags::empty(),
4214 ___deadline,
4215 )?;
4216 Ok(_response.status)
4217 }
4218
4219 pub fn r#write_opaque_volume(
4228 &self,
4229 mut payload: fidl_fuchsia_mem::Buffer,
4230 ___deadline: zx::MonotonicInstant,
4231 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4232 let _response = self.client.send_query::<
4233 DataSinkWriteOpaqueVolumeRequest,
4234 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4235 >(
4236 (&mut payload,),
4237 0x4884b6ebaf660d79,
4238 fidl::encoding::DynamicFlags::empty(),
4239 ___deadline,
4240 )?;
4241 Ok(_response.map(|x| x))
4242 }
4243
4244 pub fn r#write_sparse_volume(
4248 &self,
4249 mut payload: fidl_fuchsia_mem::Buffer,
4250 ___deadline: zx::MonotonicInstant,
4251 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4252 let _response = self.client.send_query::<
4253 DataSinkWriteSparseVolumeRequest,
4254 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4255 >(
4256 (&mut payload,),
4257 0x340f5370c5b1e026,
4258 fidl::encoding::DynamicFlags::empty(),
4259 ___deadline,
4260 )?;
4261 Ok(_response.map(|x| x))
4262 }
4263
4264 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
4266 let _response =
4267 self.client.send_query::<fidl::encoding::EmptyPayload, DataSinkFlushResponse>(
4268 (),
4269 0x3b59d3e2338e3139,
4270 fidl::encoding::DynamicFlags::empty(),
4271 ___deadline,
4272 )?;
4273 Ok(_response.status)
4274 }
4275
4276 pub fn r#initialize_partition_tables(
4284 &self,
4285 ___deadline: zx::MonotonicInstant,
4286 ) -> Result<i32, fidl::Error> {
4287 let _response = self.client.send_query::<
4288 fidl::encoding::EmptyPayload,
4289 DynamicDataSinkInitializePartitionTablesResponse,
4290 >(
4291 (),
4292 0x4c798b3813ea9f7e,
4293 fidl::encoding::DynamicFlags::empty(),
4294 ___deadline,
4295 )?;
4296 Ok(_response.status)
4297 }
4298
4299 pub fn r#wipe_partition_tables(
4305 &self,
4306 ___deadline: zx::MonotonicInstant,
4307 ) -> Result<i32, fidl::Error> {
4308 let _response = self
4309 .client
4310 .send_query::<fidl::encoding::EmptyPayload, DynamicDataSinkWipePartitionTablesResponse>(
4311 (),
4312 0x797c0ebeedaf2cc,
4313 fidl::encoding::DynamicFlags::empty(),
4314 ___deadline,
4315 )?;
4316 Ok(_response.status)
4317 }
4318}
4319
4320#[cfg(target_os = "fuchsia")]
4321impl From<DynamicDataSinkSynchronousProxy> for zx::Handle {
4322 fn from(value: DynamicDataSinkSynchronousProxy) -> Self {
4323 value.into_channel().into()
4324 }
4325}
4326
4327#[cfg(target_os = "fuchsia")]
4328impl From<fidl::Channel> for DynamicDataSinkSynchronousProxy {
4329 fn from(value: fidl::Channel) -> Self {
4330 Self::new(value)
4331 }
4332}
4333
4334#[cfg(target_os = "fuchsia")]
4335impl fidl::endpoints::FromClient for DynamicDataSinkSynchronousProxy {
4336 type Protocol = DynamicDataSinkMarker;
4337
4338 fn from_client(value: fidl::endpoints::ClientEnd<DynamicDataSinkMarker>) -> Self {
4339 Self::new(value.into_channel())
4340 }
4341}
4342
4343#[derive(Debug, Clone)]
4344pub struct DynamicDataSinkProxy {
4345 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4346}
4347
4348impl fidl::endpoints::Proxy for DynamicDataSinkProxy {
4349 type Protocol = DynamicDataSinkMarker;
4350
4351 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4352 Self::new(inner)
4353 }
4354
4355 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4356 self.client.into_channel().map_err(|client| Self { client })
4357 }
4358
4359 fn as_channel(&self) -> &::fidl::AsyncChannel {
4360 self.client.as_channel()
4361 }
4362}
4363
4364impl DynamicDataSinkProxy {
4365 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4367 let protocol_name = <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4368 Self { client: fidl::client::Client::new(channel, protocol_name) }
4369 }
4370
4371 pub fn take_event_stream(&self) -> DynamicDataSinkEventStream {
4377 DynamicDataSinkEventStream { event_receiver: self.client.take_event_receiver() }
4378 }
4379
4380 pub fn r#read_asset(
4386 &self,
4387 mut configuration: Configuration,
4388 mut asset: Asset,
4389 ) -> fidl::client::QueryResponseFut<
4390 DataSinkReadAssetResult,
4391 fidl::encoding::DefaultFuchsiaResourceDialect,
4392 > {
4393 DynamicDataSinkProxyInterface::r#read_asset(self, configuration, asset)
4394 }
4395
4396 pub fn r#write_asset(
4405 &self,
4406 mut configuration: Configuration,
4407 mut asset: Asset,
4408 mut payload: fidl_fuchsia_mem::Buffer,
4409 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4410 DynamicDataSinkProxyInterface::r#write_asset(self, configuration, asset, payload)
4411 }
4412
4413 pub fn r#write_firmware(
4428 &self,
4429 mut configuration: Configuration,
4430 mut type_: &str,
4431 mut payload: fidl_fuchsia_mem::Buffer,
4432 ) -> fidl::client::QueryResponseFut<
4433 WriteFirmwareResult,
4434 fidl::encoding::DefaultFuchsiaResourceDialect,
4435 > {
4436 DynamicDataSinkProxyInterface::r#write_firmware(self, configuration, type_, payload)
4437 }
4438
4439 pub fn r#read_firmware(
4446 &self,
4447 mut configuration: Configuration,
4448 mut type_: &str,
4449 ) -> fidl::client::QueryResponseFut<
4450 DataSinkReadFirmwareResult,
4451 fidl::encoding::DefaultFuchsiaResourceDialect,
4452 > {
4453 DynamicDataSinkProxyInterface::r#read_firmware(self, configuration, type_)
4454 }
4455
4456 pub fn r#write_volumes(
4459 &self,
4460 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4461 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4462 DynamicDataSinkProxyInterface::r#write_volumes(self, payload)
4463 }
4464
4465 pub fn r#write_opaque_volume(
4474 &self,
4475 mut payload: fidl_fuchsia_mem::Buffer,
4476 ) -> fidl::client::QueryResponseFut<
4477 DataSinkWriteOpaqueVolumeResult,
4478 fidl::encoding::DefaultFuchsiaResourceDialect,
4479 > {
4480 DynamicDataSinkProxyInterface::r#write_opaque_volume(self, payload)
4481 }
4482
4483 pub fn r#write_sparse_volume(
4487 &self,
4488 mut payload: fidl_fuchsia_mem::Buffer,
4489 ) -> fidl::client::QueryResponseFut<
4490 DataSinkWriteSparseVolumeResult,
4491 fidl::encoding::DefaultFuchsiaResourceDialect,
4492 > {
4493 DynamicDataSinkProxyInterface::r#write_sparse_volume(self, payload)
4494 }
4495
4496 pub fn r#flush(
4498 &self,
4499 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4500 DynamicDataSinkProxyInterface::r#flush(self)
4501 }
4502
4503 pub fn r#initialize_partition_tables(
4511 &self,
4512 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4513 DynamicDataSinkProxyInterface::r#initialize_partition_tables(self)
4514 }
4515
4516 pub fn r#wipe_partition_tables(
4522 &self,
4523 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
4524 DynamicDataSinkProxyInterface::r#wipe_partition_tables(self)
4525 }
4526}
4527
4528impl DynamicDataSinkProxyInterface for DynamicDataSinkProxy {
4529 type ReadAssetResponseFut = fidl::client::QueryResponseFut<
4530 DataSinkReadAssetResult,
4531 fidl::encoding::DefaultFuchsiaResourceDialect,
4532 >;
4533 fn r#read_asset(
4534 &self,
4535 mut configuration: Configuration,
4536 mut asset: Asset,
4537 ) -> Self::ReadAssetResponseFut {
4538 fn _decode(
4539 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4540 ) -> Result<DataSinkReadAssetResult, fidl::Error> {
4541 let _response = fidl::client::decode_transaction_body::<
4542 fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>,
4543 fidl::encoding::DefaultFuchsiaResourceDialect,
4544 0x125a23e561007898,
4545 >(_buf?)?;
4546 Ok(_response.map(|x| x.asset))
4547 }
4548 self.client.send_query_and_decode::<DataSinkReadAssetRequest, DataSinkReadAssetResult>(
4549 (configuration, asset),
4550 0x125a23e561007898,
4551 fidl::encoding::DynamicFlags::empty(),
4552 _decode,
4553 )
4554 }
4555
4556 type WriteAssetResponseFut =
4557 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4558 fn r#write_asset(
4559 &self,
4560 mut configuration: Configuration,
4561 mut asset: Asset,
4562 mut payload: fidl_fuchsia_mem::Buffer,
4563 ) -> Self::WriteAssetResponseFut {
4564 fn _decode(
4565 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4566 ) -> Result<i32, fidl::Error> {
4567 let _response = fidl::client::decode_transaction_body::<
4568 DataSinkWriteAssetResponse,
4569 fidl::encoding::DefaultFuchsiaResourceDialect,
4570 0x516839ce76c4d0a9,
4571 >(_buf?)?;
4572 Ok(_response.status)
4573 }
4574 self.client.send_query_and_decode::<DataSinkWriteAssetRequest, i32>(
4575 (configuration, asset, &mut payload),
4576 0x516839ce76c4d0a9,
4577 fidl::encoding::DynamicFlags::empty(),
4578 _decode,
4579 )
4580 }
4581
4582 type WriteFirmwareResponseFut = fidl::client::QueryResponseFut<
4583 WriteFirmwareResult,
4584 fidl::encoding::DefaultFuchsiaResourceDialect,
4585 >;
4586 fn r#write_firmware(
4587 &self,
4588 mut configuration: Configuration,
4589 mut type_: &str,
4590 mut payload: fidl_fuchsia_mem::Buffer,
4591 ) -> Self::WriteFirmwareResponseFut {
4592 fn _decode(
4593 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4594 ) -> Result<WriteFirmwareResult, fidl::Error> {
4595 let _response = fidl::client::decode_transaction_body::<
4596 DataSinkWriteFirmwareResponse,
4597 fidl::encoding::DefaultFuchsiaResourceDialect,
4598 0x514b93454ac0be97,
4599 >(_buf?)?;
4600 Ok(_response.result)
4601 }
4602 self.client.send_query_and_decode::<DataSinkWriteFirmwareRequest, WriteFirmwareResult>(
4603 (configuration, type_, &mut payload),
4604 0x514b93454ac0be97,
4605 fidl::encoding::DynamicFlags::empty(),
4606 _decode,
4607 )
4608 }
4609
4610 type ReadFirmwareResponseFut = fidl::client::QueryResponseFut<
4611 DataSinkReadFirmwareResult,
4612 fidl::encoding::DefaultFuchsiaResourceDialect,
4613 >;
4614 fn r#read_firmware(
4615 &self,
4616 mut configuration: Configuration,
4617 mut type_: &str,
4618 ) -> Self::ReadFirmwareResponseFut {
4619 fn _decode(
4620 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4621 ) -> Result<DataSinkReadFirmwareResult, fidl::Error> {
4622 let _response = fidl::client::decode_transaction_body::<
4623 fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>,
4624 fidl::encoding::DefaultFuchsiaResourceDialect,
4625 0xcb67f9830cae9c3,
4626 >(_buf?)?;
4627 Ok(_response.map(|x| x.firmware))
4628 }
4629 self.client
4630 .send_query_and_decode::<DataSinkReadFirmwareRequest, DataSinkReadFirmwareResult>(
4631 (configuration, type_),
4632 0xcb67f9830cae9c3,
4633 fidl::encoding::DynamicFlags::empty(),
4634 _decode,
4635 )
4636 }
4637
4638 type WriteVolumesResponseFut =
4639 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4640 fn r#write_volumes(
4641 &self,
4642 mut payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
4643 ) -> Self::WriteVolumesResponseFut {
4644 fn _decode(
4645 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4646 ) -> Result<i32, fidl::Error> {
4647 let _response = fidl::client::decode_transaction_body::<
4648 DataSinkWriteVolumesResponse,
4649 fidl::encoding::DefaultFuchsiaResourceDialect,
4650 0x5ee32c861d0259df,
4651 >(_buf?)?;
4652 Ok(_response.status)
4653 }
4654 self.client.send_query_and_decode::<DataSinkWriteVolumesRequest, i32>(
4655 (payload,),
4656 0x5ee32c861d0259df,
4657 fidl::encoding::DynamicFlags::empty(),
4658 _decode,
4659 )
4660 }
4661
4662 type WriteOpaqueVolumeResponseFut = fidl::client::QueryResponseFut<
4663 DataSinkWriteOpaqueVolumeResult,
4664 fidl::encoding::DefaultFuchsiaResourceDialect,
4665 >;
4666 fn r#write_opaque_volume(
4667 &self,
4668 mut payload: fidl_fuchsia_mem::Buffer,
4669 ) -> Self::WriteOpaqueVolumeResponseFut {
4670 fn _decode(
4671 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4672 ) -> Result<DataSinkWriteOpaqueVolumeResult, fidl::Error> {
4673 let _response = fidl::client::decode_transaction_body::<
4674 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4675 fidl::encoding::DefaultFuchsiaResourceDialect,
4676 0x4884b6ebaf660d79,
4677 >(_buf?)?;
4678 Ok(_response.map(|x| x))
4679 }
4680 self.client.send_query_and_decode::<
4681 DataSinkWriteOpaqueVolumeRequest,
4682 DataSinkWriteOpaqueVolumeResult,
4683 >(
4684 (&mut payload,),
4685 0x4884b6ebaf660d79,
4686 fidl::encoding::DynamicFlags::empty(),
4687 _decode,
4688 )
4689 }
4690
4691 type WriteSparseVolumeResponseFut = fidl::client::QueryResponseFut<
4692 DataSinkWriteSparseVolumeResult,
4693 fidl::encoding::DefaultFuchsiaResourceDialect,
4694 >;
4695 fn r#write_sparse_volume(
4696 &self,
4697 mut payload: fidl_fuchsia_mem::Buffer,
4698 ) -> Self::WriteSparseVolumeResponseFut {
4699 fn _decode(
4700 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4701 ) -> Result<DataSinkWriteSparseVolumeResult, fidl::Error> {
4702 let _response = fidl::client::decode_transaction_body::<
4703 fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>,
4704 fidl::encoding::DefaultFuchsiaResourceDialect,
4705 0x340f5370c5b1e026,
4706 >(_buf?)?;
4707 Ok(_response.map(|x| x))
4708 }
4709 self.client.send_query_and_decode::<
4710 DataSinkWriteSparseVolumeRequest,
4711 DataSinkWriteSparseVolumeResult,
4712 >(
4713 (&mut payload,),
4714 0x340f5370c5b1e026,
4715 fidl::encoding::DynamicFlags::empty(),
4716 _decode,
4717 )
4718 }
4719
4720 type FlushResponseFut =
4721 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4722 fn r#flush(&self) -> Self::FlushResponseFut {
4723 fn _decode(
4724 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4725 ) -> Result<i32, fidl::Error> {
4726 let _response = fidl::client::decode_transaction_body::<
4727 DataSinkFlushResponse,
4728 fidl::encoding::DefaultFuchsiaResourceDialect,
4729 0x3b59d3e2338e3139,
4730 >(_buf?)?;
4731 Ok(_response.status)
4732 }
4733 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4734 (),
4735 0x3b59d3e2338e3139,
4736 fidl::encoding::DynamicFlags::empty(),
4737 _decode,
4738 )
4739 }
4740
4741 type InitializePartitionTablesResponseFut =
4742 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4743 fn r#initialize_partition_tables(&self) -> Self::InitializePartitionTablesResponseFut {
4744 fn _decode(
4745 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4746 ) -> Result<i32, fidl::Error> {
4747 let _response = fidl::client::decode_transaction_body::<
4748 DynamicDataSinkInitializePartitionTablesResponse,
4749 fidl::encoding::DefaultFuchsiaResourceDialect,
4750 0x4c798b3813ea9f7e,
4751 >(_buf?)?;
4752 Ok(_response.status)
4753 }
4754 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4755 (),
4756 0x4c798b3813ea9f7e,
4757 fidl::encoding::DynamicFlags::empty(),
4758 _decode,
4759 )
4760 }
4761
4762 type WipePartitionTablesResponseFut =
4763 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
4764 fn r#wipe_partition_tables(&self) -> Self::WipePartitionTablesResponseFut {
4765 fn _decode(
4766 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4767 ) -> Result<i32, fidl::Error> {
4768 let _response = fidl::client::decode_transaction_body::<
4769 DynamicDataSinkWipePartitionTablesResponse,
4770 fidl::encoding::DefaultFuchsiaResourceDialect,
4771 0x797c0ebeedaf2cc,
4772 >(_buf?)?;
4773 Ok(_response.status)
4774 }
4775 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
4776 (),
4777 0x797c0ebeedaf2cc,
4778 fidl::encoding::DynamicFlags::empty(),
4779 _decode,
4780 )
4781 }
4782}
4783
4784pub struct DynamicDataSinkEventStream {
4785 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4786}
4787
4788impl std::marker::Unpin for DynamicDataSinkEventStream {}
4789
4790impl futures::stream::FusedStream for DynamicDataSinkEventStream {
4791 fn is_terminated(&self) -> bool {
4792 self.event_receiver.is_terminated()
4793 }
4794}
4795
4796impl futures::Stream for DynamicDataSinkEventStream {
4797 type Item = Result<DynamicDataSinkEvent, fidl::Error>;
4798
4799 fn poll_next(
4800 mut self: std::pin::Pin<&mut Self>,
4801 cx: &mut std::task::Context<'_>,
4802 ) -> std::task::Poll<Option<Self::Item>> {
4803 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4804 &mut self.event_receiver,
4805 cx
4806 )?) {
4807 Some(buf) => std::task::Poll::Ready(Some(DynamicDataSinkEvent::decode(buf))),
4808 None => std::task::Poll::Ready(None),
4809 }
4810 }
4811}
4812
4813#[derive(Debug)]
4814pub enum DynamicDataSinkEvent {}
4815
4816impl DynamicDataSinkEvent {
4817 fn decode(
4819 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4820 ) -> Result<DynamicDataSinkEvent, fidl::Error> {
4821 let (bytes, _handles) = buf.split_mut();
4822 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4823 debug_assert_eq!(tx_header.tx_id, 0);
4824 match tx_header.ordinal {
4825 _ => Err(fidl::Error::UnknownOrdinal {
4826 ordinal: tx_header.ordinal,
4827 protocol_name:
4828 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4829 }),
4830 }
4831 }
4832}
4833
4834pub struct DynamicDataSinkRequestStream {
4836 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4837 is_terminated: bool,
4838}
4839
4840impl std::marker::Unpin for DynamicDataSinkRequestStream {}
4841
4842impl futures::stream::FusedStream for DynamicDataSinkRequestStream {
4843 fn is_terminated(&self) -> bool {
4844 self.is_terminated
4845 }
4846}
4847
4848impl fidl::endpoints::RequestStream for DynamicDataSinkRequestStream {
4849 type Protocol = DynamicDataSinkMarker;
4850 type ControlHandle = DynamicDataSinkControlHandle;
4851
4852 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4853 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4854 }
4855
4856 fn control_handle(&self) -> Self::ControlHandle {
4857 DynamicDataSinkControlHandle { inner: self.inner.clone() }
4858 }
4859
4860 fn into_inner(
4861 self,
4862 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4863 {
4864 (self.inner, self.is_terminated)
4865 }
4866
4867 fn from_inner(
4868 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4869 is_terminated: bool,
4870 ) -> Self {
4871 Self { inner, is_terminated }
4872 }
4873}
4874
4875impl futures::Stream for DynamicDataSinkRequestStream {
4876 type Item = Result<DynamicDataSinkRequest, fidl::Error>;
4877
4878 fn poll_next(
4879 mut self: std::pin::Pin<&mut Self>,
4880 cx: &mut std::task::Context<'_>,
4881 ) -> std::task::Poll<Option<Self::Item>> {
4882 let this = &mut *self;
4883 if this.inner.check_shutdown(cx) {
4884 this.is_terminated = true;
4885 return std::task::Poll::Ready(None);
4886 }
4887 if this.is_terminated {
4888 panic!("polled DynamicDataSinkRequestStream after completion");
4889 }
4890 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4891 |bytes, handles| {
4892 match this.inner.channel().read_etc(cx, bytes, handles) {
4893 std::task::Poll::Ready(Ok(())) => {}
4894 std::task::Poll::Pending => return std::task::Poll::Pending,
4895 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4896 this.is_terminated = true;
4897 return std::task::Poll::Ready(None);
4898 }
4899 std::task::Poll::Ready(Err(e)) => {
4900 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4901 e.into(),
4902 ))))
4903 }
4904 }
4905
4906 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4908
4909 std::task::Poll::Ready(Some(match header.ordinal {
4910 0x125a23e561007898 => {
4911 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4912 let mut req = fidl::new_empty!(
4913 DataSinkReadAssetRequest,
4914 fidl::encoding::DefaultFuchsiaResourceDialect
4915 );
4916 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4917 let control_handle =
4918 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4919 Ok(DynamicDataSinkRequest::ReadAsset {
4920 configuration: req.configuration,
4921 asset: req.asset,
4922
4923 responder: DynamicDataSinkReadAssetResponder {
4924 control_handle: std::mem::ManuallyDrop::new(control_handle),
4925 tx_id: header.tx_id,
4926 },
4927 })
4928 }
4929 0x516839ce76c4d0a9 => {
4930 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4931 let mut req = fidl::new_empty!(
4932 DataSinkWriteAssetRequest,
4933 fidl::encoding::DefaultFuchsiaResourceDialect
4934 );
4935 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteAssetRequest>(&header, _body_bytes, handles, &mut req)?;
4936 let control_handle =
4937 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4938 Ok(DynamicDataSinkRequest::WriteAsset {
4939 configuration: req.configuration,
4940 asset: req.asset,
4941 payload: req.payload,
4942
4943 responder: DynamicDataSinkWriteAssetResponder {
4944 control_handle: std::mem::ManuallyDrop::new(control_handle),
4945 tx_id: header.tx_id,
4946 },
4947 })
4948 }
4949 0x514b93454ac0be97 => {
4950 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4951 let mut req = fidl::new_empty!(
4952 DataSinkWriteFirmwareRequest,
4953 fidl::encoding::DefaultFuchsiaResourceDialect
4954 );
4955 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4956 let control_handle =
4957 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4958 Ok(DynamicDataSinkRequest::WriteFirmware {
4959 configuration: req.configuration,
4960 type_: req.type_,
4961 payload: req.payload,
4962
4963 responder: DynamicDataSinkWriteFirmwareResponder {
4964 control_handle: std::mem::ManuallyDrop::new(control_handle),
4965 tx_id: header.tx_id,
4966 },
4967 })
4968 }
4969 0xcb67f9830cae9c3 => {
4970 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4971 let mut req = fidl::new_empty!(
4972 DataSinkReadFirmwareRequest,
4973 fidl::encoding::DefaultFuchsiaResourceDialect
4974 );
4975 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkReadFirmwareRequest>(&header, _body_bytes, handles, &mut req)?;
4976 let control_handle =
4977 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4978 Ok(DynamicDataSinkRequest::ReadFirmware {
4979 configuration: req.configuration,
4980 type_: req.type_,
4981
4982 responder: DynamicDataSinkReadFirmwareResponder {
4983 control_handle: std::mem::ManuallyDrop::new(control_handle),
4984 tx_id: header.tx_id,
4985 },
4986 })
4987 }
4988 0x5ee32c861d0259df => {
4989 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4990 let mut req = fidl::new_empty!(
4991 DataSinkWriteVolumesRequest,
4992 fidl::encoding::DefaultFuchsiaResourceDialect
4993 );
4994 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteVolumesRequest>(&header, _body_bytes, handles, &mut req)?;
4995 let control_handle =
4996 DynamicDataSinkControlHandle { inner: this.inner.clone() };
4997 Ok(DynamicDataSinkRequest::WriteVolumes {
4998 payload: req.payload,
4999
5000 responder: DynamicDataSinkWriteVolumesResponder {
5001 control_handle: std::mem::ManuallyDrop::new(control_handle),
5002 tx_id: header.tx_id,
5003 },
5004 })
5005 }
5006 0x4884b6ebaf660d79 => {
5007 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5008 let mut req = fidl::new_empty!(
5009 DataSinkWriteOpaqueVolumeRequest,
5010 fidl::encoding::DefaultFuchsiaResourceDialect
5011 );
5012 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteOpaqueVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
5013 let control_handle =
5014 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5015 Ok(DynamicDataSinkRequest::WriteOpaqueVolume {
5016 payload: req.payload,
5017
5018 responder: DynamicDataSinkWriteOpaqueVolumeResponder {
5019 control_handle: std::mem::ManuallyDrop::new(control_handle),
5020 tx_id: header.tx_id,
5021 },
5022 })
5023 }
5024 0x340f5370c5b1e026 => {
5025 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5026 let mut req = fidl::new_empty!(
5027 DataSinkWriteSparseVolumeRequest,
5028 fidl::encoding::DefaultFuchsiaResourceDialect
5029 );
5030 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<DataSinkWriteSparseVolumeRequest>(&header, _body_bytes, handles, &mut req)?;
5031 let control_handle =
5032 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5033 Ok(DynamicDataSinkRequest::WriteSparseVolume {
5034 payload: req.payload,
5035
5036 responder: DynamicDataSinkWriteSparseVolumeResponder {
5037 control_handle: std::mem::ManuallyDrop::new(control_handle),
5038 tx_id: header.tx_id,
5039 },
5040 })
5041 }
5042 0x3b59d3e2338e3139 => {
5043 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5044 let mut req = fidl::new_empty!(
5045 fidl::encoding::EmptyPayload,
5046 fidl::encoding::DefaultFuchsiaResourceDialect
5047 );
5048 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5049 let control_handle =
5050 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5051 Ok(DynamicDataSinkRequest::Flush {
5052 responder: DynamicDataSinkFlushResponder {
5053 control_handle: std::mem::ManuallyDrop::new(control_handle),
5054 tx_id: header.tx_id,
5055 },
5056 })
5057 }
5058 0x4c798b3813ea9f7e => {
5059 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5060 let mut req = fidl::new_empty!(
5061 fidl::encoding::EmptyPayload,
5062 fidl::encoding::DefaultFuchsiaResourceDialect
5063 );
5064 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5065 let control_handle =
5066 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5067 Ok(DynamicDataSinkRequest::InitializePartitionTables {
5068 responder: DynamicDataSinkInitializePartitionTablesResponder {
5069 control_handle: std::mem::ManuallyDrop::new(control_handle),
5070 tx_id: header.tx_id,
5071 },
5072 })
5073 }
5074 0x797c0ebeedaf2cc => {
5075 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
5076 let mut req = fidl::new_empty!(
5077 fidl::encoding::EmptyPayload,
5078 fidl::encoding::DefaultFuchsiaResourceDialect
5079 );
5080 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
5081 let control_handle =
5082 DynamicDataSinkControlHandle { inner: this.inner.clone() };
5083 Ok(DynamicDataSinkRequest::WipePartitionTables {
5084 responder: DynamicDataSinkWipePartitionTablesResponder {
5085 control_handle: std::mem::ManuallyDrop::new(control_handle),
5086 tx_id: header.tx_id,
5087 },
5088 })
5089 }
5090 _ => Err(fidl::Error::UnknownOrdinal {
5091 ordinal: header.ordinal,
5092 protocol_name:
5093 <DynamicDataSinkMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
5094 }),
5095 }))
5096 },
5097 )
5098 }
5099}
5100
5101#[derive(Debug)]
5103pub enum DynamicDataSinkRequest {
5104 ReadAsset {
5110 configuration: Configuration,
5111 asset: Asset,
5112 responder: DynamicDataSinkReadAssetResponder,
5113 },
5114 WriteAsset {
5123 configuration: Configuration,
5124 asset: Asset,
5125 payload: fidl_fuchsia_mem::Buffer,
5126 responder: DynamicDataSinkWriteAssetResponder,
5127 },
5128 WriteFirmware {
5143 configuration: Configuration,
5144 type_: String,
5145 payload: fidl_fuchsia_mem::Buffer,
5146 responder: DynamicDataSinkWriteFirmwareResponder,
5147 },
5148 ReadFirmware {
5155 configuration: Configuration,
5156 type_: String,
5157 responder: DynamicDataSinkReadFirmwareResponder,
5158 },
5159 WriteVolumes {
5162 payload: fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5163 responder: DynamicDataSinkWriteVolumesResponder,
5164 },
5165 WriteOpaqueVolume {
5174 payload: fidl_fuchsia_mem::Buffer,
5175 responder: DynamicDataSinkWriteOpaqueVolumeResponder,
5176 },
5177 WriteSparseVolume {
5181 payload: fidl_fuchsia_mem::Buffer,
5182 responder: DynamicDataSinkWriteSparseVolumeResponder,
5183 },
5184 Flush { responder: DynamicDataSinkFlushResponder },
5186 InitializePartitionTables { responder: DynamicDataSinkInitializePartitionTablesResponder },
5194 WipePartitionTables { responder: DynamicDataSinkWipePartitionTablesResponder },
5200}
5201
5202impl DynamicDataSinkRequest {
5203 #[allow(irrefutable_let_patterns)]
5204 pub fn into_read_asset(
5205 self,
5206 ) -> Option<(Configuration, Asset, DynamicDataSinkReadAssetResponder)> {
5207 if let DynamicDataSinkRequest::ReadAsset { configuration, asset, responder } = self {
5208 Some((configuration, asset, responder))
5209 } else {
5210 None
5211 }
5212 }
5213
5214 #[allow(irrefutable_let_patterns)]
5215 pub fn into_write_asset(
5216 self,
5217 ) -> Option<(Configuration, Asset, fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteAssetResponder)>
5218 {
5219 if let DynamicDataSinkRequest::WriteAsset { configuration, asset, payload, responder } =
5220 self
5221 {
5222 Some((configuration, asset, payload, responder))
5223 } else {
5224 None
5225 }
5226 }
5227
5228 #[allow(irrefutable_let_patterns)]
5229 pub fn into_write_firmware(
5230 self,
5231 ) -> Option<(
5232 Configuration,
5233 String,
5234 fidl_fuchsia_mem::Buffer,
5235 DynamicDataSinkWriteFirmwareResponder,
5236 )> {
5237 if let DynamicDataSinkRequest::WriteFirmware { configuration, type_, payload, responder } =
5238 self
5239 {
5240 Some((configuration, type_, payload, responder))
5241 } else {
5242 None
5243 }
5244 }
5245
5246 #[allow(irrefutable_let_patterns)]
5247 pub fn into_read_firmware(
5248 self,
5249 ) -> Option<(Configuration, String, DynamicDataSinkReadFirmwareResponder)> {
5250 if let DynamicDataSinkRequest::ReadFirmware { configuration, type_, responder } = self {
5251 Some((configuration, type_, responder))
5252 } else {
5253 None
5254 }
5255 }
5256
5257 #[allow(irrefutable_let_patterns)]
5258 pub fn into_write_volumes(
5259 self,
5260 ) -> Option<(
5261 fidl::endpoints::ClientEnd<PayloadStreamMarker>,
5262 DynamicDataSinkWriteVolumesResponder,
5263 )> {
5264 if let DynamicDataSinkRequest::WriteVolumes { payload, responder } = self {
5265 Some((payload, responder))
5266 } else {
5267 None
5268 }
5269 }
5270
5271 #[allow(irrefutable_let_patterns)]
5272 pub fn into_write_opaque_volume(
5273 self,
5274 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteOpaqueVolumeResponder)> {
5275 if let DynamicDataSinkRequest::WriteOpaqueVolume { payload, responder } = self {
5276 Some((payload, responder))
5277 } else {
5278 None
5279 }
5280 }
5281
5282 #[allow(irrefutable_let_patterns)]
5283 pub fn into_write_sparse_volume(
5284 self,
5285 ) -> Option<(fidl_fuchsia_mem::Buffer, DynamicDataSinkWriteSparseVolumeResponder)> {
5286 if let DynamicDataSinkRequest::WriteSparseVolume { payload, responder } = self {
5287 Some((payload, responder))
5288 } else {
5289 None
5290 }
5291 }
5292
5293 #[allow(irrefutable_let_patterns)]
5294 pub fn into_flush(self) -> Option<(DynamicDataSinkFlushResponder)> {
5295 if let DynamicDataSinkRequest::Flush { responder } = self {
5296 Some((responder))
5297 } else {
5298 None
5299 }
5300 }
5301
5302 #[allow(irrefutable_let_patterns)]
5303 pub fn into_initialize_partition_tables(
5304 self,
5305 ) -> Option<(DynamicDataSinkInitializePartitionTablesResponder)> {
5306 if let DynamicDataSinkRequest::InitializePartitionTables { responder } = self {
5307 Some((responder))
5308 } else {
5309 None
5310 }
5311 }
5312
5313 #[allow(irrefutable_let_patterns)]
5314 pub fn into_wipe_partition_tables(
5315 self,
5316 ) -> Option<(DynamicDataSinkWipePartitionTablesResponder)> {
5317 if let DynamicDataSinkRequest::WipePartitionTables { responder } = self {
5318 Some((responder))
5319 } else {
5320 None
5321 }
5322 }
5323
5324 pub fn method_name(&self) -> &'static str {
5326 match *self {
5327 DynamicDataSinkRequest::ReadAsset { .. } => "read_asset",
5328 DynamicDataSinkRequest::WriteAsset { .. } => "write_asset",
5329 DynamicDataSinkRequest::WriteFirmware { .. } => "write_firmware",
5330 DynamicDataSinkRequest::ReadFirmware { .. } => "read_firmware",
5331 DynamicDataSinkRequest::WriteVolumes { .. } => "write_volumes",
5332 DynamicDataSinkRequest::WriteOpaqueVolume { .. } => "write_opaque_volume",
5333 DynamicDataSinkRequest::WriteSparseVolume { .. } => "write_sparse_volume",
5334 DynamicDataSinkRequest::Flush { .. } => "flush",
5335 DynamicDataSinkRequest::InitializePartitionTables { .. } => {
5336 "initialize_partition_tables"
5337 }
5338 DynamicDataSinkRequest::WipePartitionTables { .. } => "wipe_partition_tables",
5339 }
5340 }
5341}
5342
5343#[derive(Debug, Clone)]
5344pub struct DynamicDataSinkControlHandle {
5345 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
5346}
5347
5348impl fidl::endpoints::ControlHandle for DynamicDataSinkControlHandle {
5349 fn shutdown(&self) {
5350 self.inner.shutdown()
5351 }
5352 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
5353 self.inner.shutdown_with_epitaph(status)
5354 }
5355
5356 fn is_closed(&self) -> bool {
5357 self.inner.channel().is_closed()
5358 }
5359 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
5360 self.inner.channel().on_closed()
5361 }
5362
5363 #[cfg(target_os = "fuchsia")]
5364 fn signal_peer(
5365 &self,
5366 clear_mask: zx::Signals,
5367 set_mask: zx::Signals,
5368 ) -> Result<(), zx_status::Status> {
5369 use fidl::Peered;
5370 self.inner.channel().signal_peer(clear_mask, set_mask)
5371 }
5372}
5373
5374impl DynamicDataSinkControlHandle {}
5375
5376#[must_use = "FIDL methods require a response to be sent"]
5377#[derive(Debug)]
5378pub struct DynamicDataSinkReadAssetResponder {
5379 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5380 tx_id: u32,
5381}
5382
5383impl std::ops::Drop for DynamicDataSinkReadAssetResponder {
5387 fn drop(&mut self) {
5388 self.control_handle.shutdown();
5389 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5391 }
5392}
5393
5394impl fidl::endpoints::Responder for DynamicDataSinkReadAssetResponder {
5395 type ControlHandle = DynamicDataSinkControlHandle;
5396
5397 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5398 &self.control_handle
5399 }
5400
5401 fn drop_without_shutdown(mut self) {
5402 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5404 std::mem::forget(self);
5406 }
5407}
5408
5409impl DynamicDataSinkReadAssetResponder {
5410 pub fn send(
5414 self,
5415 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5416 ) -> Result<(), fidl::Error> {
5417 let _result = self.send_raw(result);
5418 if _result.is_err() {
5419 self.control_handle.shutdown();
5420 }
5421 self.drop_without_shutdown();
5422 _result
5423 }
5424
5425 pub fn send_no_shutdown_on_err(
5427 self,
5428 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5429 ) -> Result<(), fidl::Error> {
5430 let _result = self.send_raw(result);
5431 self.drop_without_shutdown();
5432 _result
5433 }
5434
5435 fn send_raw(
5436 &self,
5437 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5438 ) -> Result<(), fidl::Error> {
5439 self.control_handle
5440 .inner
5441 .send::<fidl::encoding::ResultType<DataSinkReadAssetResponse, i32>>(
5442 result.as_mut().map_err(|e| *e).map(|asset| (asset,)),
5443 self.tx_id,
5444 0x125a23e561007898,
5445 fidl::encoding::DynamicFlags::empty(),
5446 )
5447 }
5448}
5449
5450#[must_use = "FIDL methods require a response to be sent"]
5451#[derive(Debug)]
5452pub struct DynamicDataSinkWriteAssetResponder {
5453 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5454 tx_id: u32,
5455}
5456
5457impl std::ops::Drop for DynamicDataSinkWriteAssetResponder {
5461 fn drop(&mut self) {
5462 self.control_handle.shutdown();
5463 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5465 }
5466}
5467
5468impl fidl::endpoints::Responder for DynamicDataSinkWriteAssetResponder {
5469 type ControlHandle = DynamicDataSinkControlHandle;
5470
5471 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5472 &self.control_handle
5473 }
5474
5475 fn drop_without_shutdown(mut self) {
5476 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5478 std::mem::forget(self);
5480 }
5481}
5482
5483impl DynamicDataSinkWriteAssetResponder {
5484 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5488 let _result = self.send_raw(status);
5489 if _result.is_err() {
5490 self.control_handle.shutdown();
5491 }
5492 self.drop_without_shutdown();
5493 _result
5494 }
5495
5496 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5498 let _result = self.send_raw(status);
5499 self.drop_without_shutdown();
5500 _result
5501 }
5502
5503 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5504 self.control_handle.inner.send::<DataSinkWriteAssetResponse>(
5505 (status,),
5506 self.tx_id,
5507 0x516839ce76c4d0a9,
5508 fidl::encoding::DynamicFlags::empty(),
5509 )
5510 }
5511}
5512
5513#[must_use = "FIDL methods require a response to be sent"]
5514#[derive(Debug)]
5515pub struct DynamicDataSinkWriteFirmwareResponder {
5516 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5517 tx_id: u32,
5518}
5519
5520impl std::ops::Drop for DynamicDataSinkWriteFirmwareResponder {
5524 fn drop(&mut self) {
5525 self.control_handle.shutdown();
5526 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5528 }
5529}
5530
5531impl fidl::endpoints::Responder for DynamicDataSinkWriteFirmwareResponder {
5532 type ControlHandle = DynamicDataSinkControlHandle;
5533
5534 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5535 &self.control_handle
5536 }
5537
5538 fn drop_without_shutdown(mut self) {
5539 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5541 std::mem::forget(self);
5543 }
5544}
5545
5546impl DynamicDataSinkWriteFirmwareResponder {
5547 pub fn send(self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5551 let _result = self.send_raw(result);
5552 if _result.is_err() {
5553 self.control_handle.shutdown();
5554 }
5555 self.drop_without_shutdown();
5556 _result
5557 }
5558
5559 pub fn send_no_shutdown_on_err(
5561 self,
5562 mut result: &WriteFirmwareResult,
5563 ) -> Result<(), fidl::Error> {
5564 let _result = self.send_raw(result);
5565 self.drop_without_shutdown();
5566 _result
5567 }
5568
5569 fn send_raw(&self, mut result: &WriteFirmwareResult) -> Result<(), fidl::Error> {
5570 self.control_handle.inner.send::<DataSinkWriteFirmwareResponse>(
5571 (result,),
5572 self.tx_id,
5573 0x514b93454ac0be97,
5574 fidl::encoding::DynamicFlags::empty(),
5575 )
5576 }
5577}
5578
5579#[must_use = "FIDL methods require a response to be sent"]
5580#[derive(Debug)]
5581pub struct DynamicDataSinkReadFirmwareResponder {
5582 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5583 tx_id: u32,
5584}
5585
5586impl std::ops::Drop for DynamicDataSinkReadFirmwareResponder {
5590 fn drop(&mut self) {
5591 self.control_handle.shutdown();
5592 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5594 }
5595}
5596
5597impl fidl::endpoints::Responder for DynamicDataSinkReadFirmwareResponder {
5598 type ControlHandle = DynamicDataSinkControlHandle;
5599
5600 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5601 &self.control_handle
5602 }
5603
5604 fn drop_without_shutdown(mut self) {
5605 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5607 std::mem::forget(self);
5609 }
5610}
5611
5612impl DynamicDataSinkReadFirmwareResponder {
5613 pub fn send(
5617 self,
5618 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5619 ) -> Result<(), fidl::Error> {
5620 let _result = self.send_raw(result);
5621 if _result.is_err() {
5622 self.control_handle.shutdown();
5623 }
5624 self.drop_without_shutdown();
5625 _result
5626 }
5627
5628 pub fn send_no_shutdown_on_err(
5630 self,
5631 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5632 ) -> Result<(), fidl::Error> {
5633 let _result = self.send_raw(result);
5634 self.drop_without_shutdown();
5635 _result
5636 }
5637
5638 fn send_raw(
5639 &self,
5640 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
5641 ) -> Result<(), fidl::Error> {
5642 self.control_handle
5643 .inner
5644 .send::<fidl::encoding::ResultType<DataSinkReadFirmwareResponse, i32>>(
5645 result.as_mut().map_err(|e| *e).map(|firmware| (firmware,)),
5646 self.tx_id,
5647 0xcb67f9830cae9c3,
5648 fidl::encoding::DynamicFlags::empty(),
5649 )
5650 }
5651}
5652
5653#[must_use = "FIDL methods require a response to be sent"]
5654#[derive(Debug)]
5655pub struct DynamicDataSinkWriteVolumesResponder {
5656 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5657 tx_id: u32,
5658}
5659
5660impl std::ops::Drop for DynamicDataSinkWriteVolumesResponder {
5664 fn drop(&mut self) {
5665 self.control_handle.shutdown();
5666 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5668 }
5669}
5670
5671impl fidl::endpoints::Responder for DynamicDataSinkWriteVolumesResponder {
5672 type ControlHandle = DynamicDataSinkControlHandle;
5673
5674 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5675 &self.control_handle
5676 }
5677
5678 fn drop_without_shutdown(mut self) {
5679 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5681 std::mem::forget(self);
5683 }
5684}
5685
5686impl DynamicDataSinkWriteVolumesResponder {
5687 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5691 let _result = self.send_raw(status);
5692 if _result.is_err() {
5693 self.control_handle.shutdown();
5694 }
5695 self.drop_without_shutdown();
5696 _result
5697 }
5698
5699 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5701 let _result = self.send_raw(status);
5702 self.drop_without_shutdown();
5703 _result
5704 }
5705
5706 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5707 self.control_handle.inner.send::<DataSinkWriteVolumesResponse>(
5708 (status,),
5709 self.tx_id,
5710 0x5ee32c861d0259df,
5711 fidl::encoding::DynamicFlags::empty(),
5712 )
5713 }
5714}
5715
5716#[must_use = "FIDL methods require a response to be sent"]
5717#[derive(Debug)]
5718pub struct DynamicDataSinkWriteOpaqueVolumeResponder {
5719 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5720 tx_id: u32,
5721}
5722
5723impl std::ops::Drop for DynamicDataSinkWriteOpaqueVolumeResponder {
5727 fn drop(&mut self) {
5728 self.control_handle.shutdown();
5729 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5731 }
5732}
5733
5734impl fidl::endpoints::Responder for DynamicDataSinkWriteOpaqueVolumeResponder {
5735 type ControlHandle = DynamicDataSinkControlHandle;
5736
5737 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5738 &self.control_handle
5739 }
5740
5741 fn drop_without_shutdown(mut self) {
5742 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5744 std::mem::forget(self);
5746 }
5747}
5748
5749impl DynamicDataSinkWriteOpaqueVolumeResponder {
5750 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5754 let _result = self.send_raw(result);
5755 if _result.is_err() {
5756 self.control_handle.shutdown();
5757 }
5758 self.drop_without_shutdown();
5759 _result
5760 }
5761
5762 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5764 let _result = self.send_raw(result);
5765 self.drop_without_shutdown();
5766 _result
5767 }
5768
5769 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5770 self.control_handle
5771 .inner
5772 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5773 result,
5774 self.tx_id,
5775 0x4884b6ebaf660d79,
5776 fidl::encoding::DynamicFlags::empty(),
5777 )
5778 }
5779}
5780
5781#[must_use = "FIDL methods require a response to be sent"]
5782#[derive(Debug)]
5783pub struct DynamicDataSinkWriteSparseVolumeResponder {
5784 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5785 tx_id: u32,
5786}
5787
5788impl std::ops::Drop for DynamicDataSinkWriteSparseVolumeResponder {
5792 fn drop(&mut self) {
5793 self.control_handle.shutdown();
5794 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5796 }
5797}
5798
5799impl fidl::endpoints::Responder for DynamicDataSinkWriteSparseVolumeResponder {
5800 type ControlHandle = DynamicDataSinkControlHandle;
5801
5802 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5803 &self.control_handle
5804 }
5805
5806 fn drop_without_shutdown(mut self) {
5807 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5809 std::mem::forget(self);
5811 }
5812}
5813
5814impl DynamicDataSinkWriteSparseVolumeResponder {
5815 pub fn send(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5819 let _result = self.send_raw(result);
5820 if _result.is_err() {
5821 self.control_handle.shutdown();
5822 }
5823 self.drop_without_shutdown();
5824 _result
5825 }
5826
5827 pub fn send_no_shutdown_on_err(self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5829 let _result = self.send_raw(result);
5830 self.drop_without_shutdown();
5831 _result
5832 }
5833
5834 fn send_raw(&self, mut result: Result<(), i32>) -> Result<(), fidl::Error> {
5835 self.control_handle
5836 .inner
5837 .send::<fidl::encoding::ResultType<fidl::encoding::EmptyStruct, i32>>(
5838 result,
5839 self.tx_id,
5840 0x340f5370c5b1e026,
5841 fidl::encoding::DynamicFlags::empty(),
5842 )
5843 }
5844}
5845
5846#[must_use = "FIDL methods require a response to be sent"]
5847#[derive(Debug)]
5848pub struct DynamicDataSinkFlushResponder {
5849 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5850 tx_id: u32,
5851}
5852
5853impl std::ops::Drop for DynamicDataSinkFlushResponder {
5857 fn drop(&mut self) {
5858 self.control_handle.shutdown();
5859 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5861 }
5862}
5863
5864impl fidl::endpoints::Responder for DynamicDataSinkFlushResponder {
5865 type ControlHandle = DynamicDataSinkControlHandle;
5866
5867 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5868 &self.control_handle
5869 }
5870
5871 fn drop_without_shutdown(mut self) {
5872 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5874 std::mem::forget(self);
5876 }
5877}
5878
5879impl DynamicDataSinkFlushResponder {
5880 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5884 let _result = self.send_raw(status);
5885 if _result.is_err() {
5886 self.control_handle.shutdown();
5887 }
5888 self.drop_without_shutdown();
5889 _result
5890 }
5891
5892 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5894 let _result = self.send_raw(status);
5895 self.drop_without_shutdown();
5896 _result
5897 }
5898
5899 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5900 self.control_handle.inner.send::<DataSinkFlushResponse>(
5901 (status,),
5902 self.tx_id,
5903 0x3b59d3e2338e3139,
5904 fidl::encoding::DynamicFlags::empty(),
5905 )
5906 }
5907}
5908
5909#[must_use = "FIDL methods require a response to be sent"]
5910#[derive(Debug)]
5911pub struct DynamicDataSinkInitializePartitionTablesResponder {
5912 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5913 tx_id: u32,
5914}
5915
5916impl std::ops::Drop for DynamicDataSinkInitializePartitionTablesResponder {
5920 fn drop(&mut self) {
5921 self.control_handle.shutdown();
5922 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5924 }
5925}
5926
5927impl fidl::endpoints::Responder for DynamicDataSinkInitializePartitionTablesResponder {
5928 type ControlHandle = DynamicDataSinkControlHandle;
5929
5930 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5931 &self.control_handle
5932 }
5933
5934 fn drop_without_shutdown(mut self) {
5935 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5937 std::mem::forget(self);
5939 }
5940}
5941
5942impl DynamicDataSinkInitializePartitionTablesResponder {
5943 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
5947 let _result = self.send_raw(status);
5948 if _result.is_err() {
5949 self.control_handle.shutdown();
5950 }
5951 self.drop_without_shutdown();
5952 _result
5953 }
5954
5955 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
5957 let _result = self.send_raw(status);
5958 self.drop_without_shutdown();
5959 _result
5960 }
5961
5962 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
5963 self.control_handle.inner.send::<DynamicDataSinkInitializePartitionTablesResponse>(
5964 (status,),
5965 self.tx_id,
5966 0x4c798b3813ea9f7e,
5967 fidl::encoding::DynamicFlags::empty(),
5968 )
5969 }
5970}
5971
5972#[must_use = "FIDL methods require a response to be sent"]
5973#[derive(Debug)]
5974pub struct DynamicDataSinkWipePartitionTablesResponder {
5975 control_handle: std::mem::ManuallyDrop<DynamicDataSinkControlHandle>,
5976 tx_id: u32,
5977}
5978
5979impl std::ops::Drop for DynamicDataSinkWipePartitionTablesResponder {
5983 fn drop(&mut self) {
5984 self.control_handle.shutdown();
5985 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
5987 }
5988}
5989
5990impl fidl::endpoints::Responder for DynamicDataSinkWipePartitionTablesResponder {
5991 type ControlHandle = DynamicDataSinkControlHandle;
5992
5993 fn control_handle(&self) -> &DynamicDataSinkControlHandle {
5994 &self.control_handle
5995 }
5996
5997 fn drop_without_shutdown(mut self) {
5998 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
6000 std::mem::forget(self);
6002 }
6003}
6004
6005impl DynamicDataSinkWipePartitionTablesResponder {
6006 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
6010 let _result = self.send_raw(status);
6011 if _result.is_err() {
6012 self.control_handle.shutdown();
6013 }
6014 self.drop_without_shutdown();
6015 _result
6016 }
6017
6018 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
6020 let _result = self.send_raw(status);
6021 self.drop_without_shutdown();
6022 _result
6023 }
6024
6025 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
6026 self.control_handle.inner.send::<DynamicDataSinkWipePartitionTablesResponse>(
6027 (status,),
6028 self.tx_id,
6029 0x797c0ebeedaf2cc,
6030 fidl::encoding::DynamicFlags::empty(),
6031 )
6032 }
6033}
6034
6035#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6036pub struct PaverMarker;
6037
6038impl fidl::endpoints::ProtocolMarker for PaverMarker {
6039 type Proxy = PaverProxy;
6040 type RequestStream = PaverRequestStream;
6041 #[cfg(target_os = "fuchsia")]
6042 type SynchronousProxy = PaverSynchronousProxy;
6043
6044 const DEBUG_NAME: &'static str = "fuchsia.paver.Paver";
6045}
6046impl fidl::endpoints::DiscoverableProtocolMarker for PaverMarker {}
6047
6048pub trait PaverProxyInterface: Send + Sync {
6049 fn r#find_data_sink(
6050 &self,
6051 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6052 ) -> Result<(), fidl::Error>;
6053 fn r#find_partition_table_manager(
6054 &self,
6055 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6056 ) -> Result<(), fidl::Error>;
6057 fn r#find_boot_manager(
6058 &self,
6059 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6060 ) -> Result<(), fidl::Error>;
6061 fn r#find_sysconfig(
6062 &self,
6063 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6064 ) -> Result<(), fidl::Error>;
6065}
6066#[derive(Debug)]
6067#[cfg(target_os = "fuchsia")]
6068pub struct PaverSynchronousProxy {
6069 client: fidl::client::sync::Client,
6070}
6071
6072#[cfg(target_os = "fuchsia")]
6073impl fidl::endpoints::SynchronousProxy for PaverSynchronousProxy {
6074 type Proxy = PaverProxy;
6075 type Protocol = PaverMarker;
6076
6077 fn from_channel(inner: fidl::Channel) -> Self {
6078 Self::new(inner)
6079 }
6080
6081 fn into_channel(self) -> fidl::Channel {
6082 self.client.into_channel()
6083 }
6084
6085 fn as_channel(&self) -> &fidl::Channel {
6086 self.client.as_channel()
6087 }
6088}
6089
6090#[cfg(target_os = "fuchsia")]
6091impl PaverSynchronousProxy {
6092 pub fn new(channel: fidl::Channel) -> Self {
6093 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6094 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6095 }
6096
6097 pub fn into_channel(self) -> fidl::Channel {
6098 self.client.into_channel()
6099 }
6100
6101 pub fn wait_for_event(
6104 &self,
6105 deadline: zx::MonotonicInstant,
6106 ) -> Result<PaverEvent, fidl::Error> {
6107 PaverEvent::decode(self.client.wait_for_event(deadline)?)
6108 }
6109
6110 pub fn r#find_data_sink(
6116 &self,
6117 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6118 ) -> Result<(), fidl::Error> {
6119 self.client.send::<PaverFindDataSinkRequest>(
6120 (data_sink,),
6121 0x710a34c6f9c8a0e9,
6122 fidl::encoding::DynamicFlags::empty(),
6123 )
6124 }
6125
6126 pub fn r#find_partition_table_manager(
6131 &self,
6132 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6133 ) -> Result<(), fidl::Error> {
6134 self.client.send::<PaverFindPartitionTableManagerRequest>(
6135 (data_sink,),
6136 0x10991ecc6fb9f47b,
6137 fidl::encoding::DynamicFlags::empty(),
6138 )
6139 }
6140
6141 pub fn r#find_boot_manager(
6146 &self,
6147 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6148 ) -> Result<(), fidl::Error> {
6149 self.client.send::<PaverFindBootManagerRequest>(
6150 (boot_manager,),
6151 0x5d500b0633102443,
6152 fidl::encoding::DynamicFlags::empty(),
6153 )
6154 }
6155
6156 pub fn r#find_sysconfig(
6158 &self,
6159 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6160 ) -> Result<(), fidl::Error> {
6161 self.client.send::<PaverFindSysconfigRequest>(
6162 (sysconfig,),
6163 0x542cdb5be9b5c02d,
6164 fidl::encoding::DynamicFlags::empty(),
6165 )
6166 }
6167}
6168
6169#[cfg(target_os = "fuchsia")]
6170impl From<PaverSynchronousProxy> for zx::Handle {
6171 fn from(value: PaverSynchronousProxy) -> Self {
6172 value.into_channel().into()
6173 }
6174}
6175
6176#[cfg(target_os = "fuchsia")]
6177impl From<fidl::Channel> for PaverSynchronousProxy {
6178 fn from(value: fidl::Channel) -> Self {
6179 Self::new(value)
6180 }
6181}
6182
6183#[cfg(target_os = "fuchsia")]
6184impl fidl::endpoints::FromClient for PaverSynchronousProxy {
6185 type Protocol = PaverMarker;
6186
6187 fn from_client(value: fidl::endpoints::ClientEnd<PaverMarker>) -> Self {
6188 Self::new(value.into_channel())
6189 }
6190}
6191
6192#[derive(Debug, Clone)]
6193pub struct PaverProxy {
6194 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6195}
6196
6197impl fidl::endpoints::Proxy for PaverProxy {
6198 type Protocol = PaverMarker;
6199
6200 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6201 Self::new(inner)
6202 }
6203
6204 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6205 self.client.into_channel().map_err(|client| Self { client })
6206 }
6207
6208 fn as_channel(&self) -> &::fidl::AsyncChannel {
6209 self.client.as_channel()
6210 }
6211}
6212
6213impl PaverProxy {
6214 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6216 let protocol_name = <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6217 Self { client: fidl::client::Client::new(channel, protocol_name) }
6218 }
6219
6220 pub fn take_event_stream(&self) -> PaverEventStream {
6226 PaverEventStream { event_receiver: self.client.take_event_receiver() }
6227 }
6228
6229 pub fn r#find_data_sink(
6235 &self,
6236 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6237 ) -> Result<(), fidl::Error> {
6238 PaverProxyInterface::r#find_data_sink(self, data_sink)
6239 }
6240
6241 pub fn r#find_partition_table_manager(
6246 &self,
6247 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6248 ) -> Result<(), fidl::Error> {
6249 PaverProxyInterface::r#find_partition_table_manager(self, data_sink)
6250 }
6251
6252 pub fn r#find_boot_manager(
6257 &self,
6258 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6259 ) -> Result<(), fidl::Error> {
6260 PaverProxyInterface::r#find_boot_manager(self, boot_manager)
6261 }
6262
6263 pub fn r#find_sysconfig(
6265 &self,
6266 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6267 ) -> Result<(), fidl::Error> {
6268 PaverProxyInterface::r#find_sysconfig(self, sysconfig)
6269 }
6270}
6271
6272impl PaverProxyInterface for PaverProxy {
6273 fn r#find_data_sink(
6274 &self,
6275 mut data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6276 ) -> Result<(), fidl::Error> {
6277 self.client.send::<PaverFindDataSinkRequest>(
6278 (data_sink,),
6279 0x710a34c6f9c8a0e9,
6280 fidl::encoding::DynamicFlags::empty(),
6281 )
6282 }
6283
6284 fn r#find_partition_table_manager(
6285 &self,
6286 mut data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6287 ) -> Result<(), fidl::Error> {
6288 self.client.send::<PaverFindPartitionTableManagerRequest>(
6289 (data_sink,),
6290 0x10991ecc6fb9f47b,
6291 fidl::encoding::DynamicFlags::empty(),
6292 )
6293 }
6294
6295 fn r#find_boot_manager(
6296 &self,
6297 mut boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6298 ) -> Result<(), fidl::Error> {
6299 self.client.send::<PaverFindBootManagerRequest>(
6300 (boot_manager,),
6301 0x5d500b0633102443,
6302 fidl::encoding::DynamicFlags::empty(),
6303 )
6304 }
6305
6306 fn r#find_sysconfig(
6307 &self,
6308 mut sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6309 ) -> Result<(), fidl::Error> {
6310 self.client.send::<PaverFindSysconfigRequest>(
6311 (sysconfig,),
6312 0x542cdb5be9b5c02d,
6313 fidl::encoding::DynamicFlags::empty(),
6314 )
6315 }
6316}
6317
6318pub struct PaverEventStream {
6319 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6320}
6321
6322impl std::marker::Unpin for PaverEventStream {}
6323
6324impl futures::stream::FusedStream for PaverEventStream {
6325 fn is_terminated(&self) -> bool {
6326 self.event_receiver.is_terminated()
6327 }
6328}
6329
6330impl futures::Stream for PaverEventStream {
6331 type Item = Result<PaverEvent, fidl::Error>;
6332
6333 fn poll_next(
6334 mut self: std::pin::Pin<&mut Self>,
6335 cx: &mut std::task::Context<'_>,
6336 ) -> std::task::Poll<Option<Self::Item>> {
6337 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6338 &mut self.event_receiver,
6339 cx
6340 )?) {
6341 Some(buf) => std::task::Poll::Ready(Some(PaverEvent::decode(buf))),
6342 None => std::task::Poll::Ready(None),
6343 }
6344 }
6345}
6346
6347#[derive(Debug)]
6348pub enum PaverEvent {}
6349
6350impl PaverEvent {
6351 fn decode(
6353 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6354 ) -> Result<PaverEvent, fidl::Error> {
6355 let (bytes, _handles) = buf.split_mut();
6356 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6357 debug_assert_eq!(tx_header.tx_id, 0);
6358 match tx_header.ordinal {
6359 _ => Err(fidl::Error::UnknownOrdinal {
6360 ordinal: tx_header.ordinal,
6361 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6362 }),
6363 }
6364 }
6365}
6366
6367pub struct PaverRequestStream {
6369 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6370 is_terminated: bool,
6371}
6372
6373impl std::marker::Unpin for PaverRequestStream {}
6374
6375impl futures::stream::FusedStream for PaverRequestStream {
6376 fn is_terminated(&self) -> bool {
6377 self.is_terminated
6378 }
6379}
6380
6381impl fidl::endpoints::RequestStream for PaverRequestStream {
6382 type Protocol = PaverMarker;
6383 type ControlHandle = PaverControlHandle;
6384
6385 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6386 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6387 }
6388
6389 fn control_handle(&self) -> Self::ControlHandle {
6390 PaverControlHandle { inner: self.inner.clone() }
6391 }
6392
6393 fn into_inner(
6394 self,
6395 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6396 {
6397 (self.inner, self.is_terminated)
6398 }
6399
6400 fn from_inner(
6401 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6402 is_terminated: bool,
6403 ) -> Self {
6404 Self { inner, is_terminated }
6405 }
6406}
6407
6408impl futures::Stream for PaverRequestStream {
6409 type Item = Result<PaverRequest, fidl::Error>;
6410
6411 fn poll_next(
6412 mut self: std::pin::Pin<&mut Self>,
6413 cx: &mut std::task::Context<'_>,
6414 ) -> std::task::Poll<Option<Self::Item>> {
6415 let this = &mut *self;
6416 if this.inner.check_shutdown(cx) {
6417 this.is_terminated = true;
6418 return std::task::Poll::Ready(None);
6419 }
6420 if this.is_terminated {
6421 panic!("polled PaverRequestStream after completion");
6422 }
6423 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6424 |bytes, handles| {
6425 match this.inner.channel().read_etc(cx, bytes, handles) {
6426 std::task::Poll::Ready(Ok(())) => {}
6427 std::task::Poll::Pending => return std::task::Poll::Pending,
6428 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6429 this.is_terminated = true;
6430 return std::task::Poll::Ready(None);
6431 }
6432 std::task::Poll::Ready(Err(e)) => {
6433 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6434 e.into(),
6435 ))))
6436 }
6437 }
6438
6439 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6441
6442 std::task::Poll::Ready(Some(match header.ordinal {
6443 0x710a34c6f9c8a0e9 => {
6444 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6445 let mut req = fidl::new_empty!(
6446 PaverFindDataSinkRequest,
6447 fidl::encoding::DefaultFuchsiaResourceDialect
6448 );
6449 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindDataSinkRequest>(&header, _body_bytes, handles, &mut req)?;
6450 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6451 Ok(PaverRequest::FindDataSink { data_sink: req.data_sink, control_handle })
6452 }
6453 0x10991ecc6fb9f47b => {
6454 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6455 let mut req = fidl::new_empty!(
6456 PaverFindPartitionTableManagerRequest,
6457 fidl::encoding::DefaultFuchsiaResourceDialect
6458 );
6459 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindPartitionTableManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6460 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6461 Ok(PaverRequest::FindPartitionTableManager {
6462 data_sink: req.data_sink,
6463
6464 control_handle,
6465 })
6466 }
6467 0x5d500b0633102443 => {
6468 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6469 let mut req = fidl::new_empty!(
6470 PaverFindBootManagerRequest,
6471 fidl::encoding::DefaultFuchsiaResourceDialect
6472 );
6473 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindBootManagerRequest>(&header, _body_bytes, handles, &mut req)?;
6474 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6475 Ok(PaverRequest::FindBootManager {
6476 boot_manager: req.boot_manager,
6477
6478 control_handle,
6479 })
6480 }
6481 0x542cdb5be9b5c02d => {
6482 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
6483 let mut req = fidl::new_empty!(
6484 PaverFindSysconfigRequest,
6485 fidl::encoding::DefaultFuchsiaResourceDialect
6486 );
6487 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PaverFindSysconfigRequest>(&header, _body_bytes, handles, &mut req)?;
6488 let control_handle = PaverControlHandle { inner: this.inner.clone() };
6489 Ok(PaverRequest::FindSysconfig { sysconfig: req.sysconfig, control_handle })
6490 }
6491 _ => Err(fidl::Error::UnknownOrdinal {
6492 ordinal: header.ordinal,
6493 protocol_name: <PaverMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6494 }),
6495 }))
6496 },
6497 )
6498 }
6499}
6500
6501#[derive(Debug)]
6502pub enum PaverRequest {
6503 FindDataSink {
6509 data_sink: fidl::endpoints::ServerEnd<DataSinkMarker>,
6510 control_handle: PaverControlHandle,
6511 },
6512 FindPartitionTableManager {
6517 data_sink: fidl::endpoints::ServerEnd<DynamicDataSinkMarker>,
6518 control_handle: PaverControlHandle,
6519 },
6520 FindBootManager {
6525 boot_manager: fidl::endpoints::ServerEnd<BootManagerMarker>,
6526 control_handle: PaverControlHandle,
6527 },
6528 FindSysconfig {
6530 sysconfig: fidl::endpoints::ServerEnd<SysconfigMarker>,
6531 control_handle: PaverControlHandle,
6532 },
6533}
6534
6535impl PaverRequest {
6536 #[allow(irrefutable_let_patterns)]
6537 pub fn into_find_data_sink(
6538 self,
6539 ) -> Option<(fidl::endpoints::ServerEnd<DataSinkMarker>, PaverControlHandle)> {
6540 if let PaverRequest::FindDataSink { data_sink, control_handle } = self {
6541 Some((data_sink, control_handle))
6542 } else {
6543 None
6544 }
6545 }
6546
6547 #[allow(irrefutable_let_patterns)]
6548 pub fn into_find_partition_table_manager(
6549 self,
6550 ) -> Option<(fidl::endpoints::ServerEnd<DynamicDataSinkMarker>, PaverControlHandle)> {
6551 if let PaverRequest::FindPartitionTableManager { data_sink, control_handle } = self {
6552 Some((data_sink, control_handle))
6553 } else {
6554 None
6555 }
6556 }
6557
6558 #[allow(irrefutable_let_patterns)]
6559 pub fn into_find_boot_manager(
6560 self,
6561 ) -> Option<(fidl::endpoints::ServerEnd<BootManagerMarker>, PaverControlHandle)> {
6562 if let PaverRequest::FindBootManager { boot_manager, control_handle } = self {
6563 Some((boot_manager, control_handle))
6564 } else {
6565 None
6566 }
6567 }
6568
6569 #[allow(irrefutable_let_patterns)]
6570 pub fn into_find_sysconfig(
6571 self,
6572 ) -> Option<(fidl::endpoints::ServerEnd<SysconfigMarker>, PaverControlHandle)> {
6573 if let PaverRequest::FindSysconfig { sysconfig, control_handle } = self {
6574 Some((sysconfig, control_handle))
6575 } else {
6576 None
6577 }
6578 }
6579
6580 pub fn method_name(&self) -> &'static str {
6582 match *self {
6583 PaverRequest::FindDataSink { .. } => "find_data_sink",
6584 PaverRequest::FindPartitionTableManager { .. } => "find_partition_table_manager",
6585 PaverRequest::FindBootManager { .. } => "find_boot_manager",
6586 PaverRequest::FindSysconfig { .. } => "find_sysconfig",
6587 }
6588 }
6589}
6590
6591#[derive(Debug, Clone)]
6592pub struct PaverControlHandle {
6593 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6594}
6595
6596impl fidl::endpoints::ControlHandle for PaverControlHandle {
6597 fn shutdown(&self) {
6598 self.inner.shutdown()
6599 }
6600 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
6601 self.inner.shutdown_with_epitaph(status)
6602 }
6603
6604 fn is_closed(&self) -> bool {
6605 self.inner.channel().is_closed()
6606 }
6607 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
6608 self.inner.channel().on_closed()
6609 }
6610
6611 #[cfg(target_os = "fuchsia")]
6612 fn signal_peer(
6613 &self,
6614 clear_mask: zx::Signals,
6615 set_mask: zx::Signals,
6616 ) -> Result<(), zx_status::Status> {
6617 use fidl::Peered;
6618 self.inner.channel().signal_peer(clear_mask, set_mask)
6619 }
6620}
6621
6622impl PaverControlHandle {}
6623
6624#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
6625pub struct PayloadStreamMarker;
6626
6627impl fidl::endpoints::ProtocolMarker for PayloadStreamMarker {
6628 type Proxy = PayloadStreamProxy;
6629 type RequestStream = PayloadStreamRequestStream;
6630 #[cfg(target_os = "fuchsia")]
6631 type SynchronousProxy = PayloadStreamSynchronousProxy;
6632
6633 const DEBUG_NAME: &'static str = "(anonymous) PayloadStream";
6634}
6635
6636pub trait PayloadStreamProxyInterface: Send + Sync {
6637 type RegisterVmoResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
6638 fn r#register_vmo(&self, vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut;
6639 type ReadDataResponseFut: std::future::Future<Output = Result<ReadResult, fidl::Error>> + Send;
6640 fn r#read_data(&self) -> Self::ReadDataResponseFut;
6641}
6642#[derive(Debug)]
6643#[cfg(target_os = "fuchsia")]
6644pub struct PayloadStreamSynchronousProxy {
6645 client: fidl::client::sync::Client,
6646}
6647
6648#[cfg(target_os = "fuchsia")]
6649impl fidl::endpoints::SynchronousProxy for PayloadStreamSynchronousProxy {
6650 type Proxy = PayloadStreamProxy;
6651 type Protocol = PayloadStreamMarker;
6652
6653 fn from_channel(inner: fidl::Channel) -> Self {
6654 Self::new(inner)
6655 }
6656
6657 fn into_channel(self) -> fidl::Channel {
6658 self.client.into_channel()
6659 }
6660
6661 fn as_channel(&self) -> &fidl::Channel {
6662 self.client.as_channel()
6663 }
6664}
6665
6666#[cfg(target_os = "fuchsia")]
6667impl PayloadStreamSynchronousProxy {
6668 pub fn new(channel: fidl::Channel) -> Self {
6669 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6670 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
6671 }
6672
6673 pub fn into_channel(self) -> fidl::Channel {
6674 self.client.into_channel()
6675 }
6676
6677 pub fn wait_for_event(
6680 &self,
6681 deadline: zx::MonotonicInstant,
6682 ) -> Result<PayloadStreamEvent, fidl::Error> {
6683 PayloadStreamEvent::decode(self.client.wait_for_event(deadline)?)
6684 }
6685
6686 pub fn r#register_vmo(
6691 &self,
6692 mut vmo: fidl::Vmo,
6693 ___deadline: zx::MonotonicInstant,
6694 ) -> Result<i32, fidl::Error> {
6695 let _response = self
6696 .client
6697 .send_query::<PayloadStreamRegisterVmoRequest, PayloadStreamRegisterVmoResponse>(
6698 (vmo,),
6699 0x388d7fe44bcb4c,
6700 fidl::encoding::DynamicFlags::empty(),
6701 ___deadline,
6702 )?;
6703 Ok(_response.status)
6704 }
6705
6706 pub fn r#read_data(
6708 &self,
6709 ___deadline: zx::MonotonicInstant,
6710 ) -> Result<ReadResult, fidl::Error> {
6711 let _response =
6712 self.client.send_query::<fidl::encoding::EmptyPayload, PayloadStreamReadDataResponse>(
6713 (),
6714 0x2ccde55366318afa,
6715 fidl::encoding::DynamicFlags::empty(),
6716 ___deadline,
6717 )?;
6718 Ok(_response.result)
6719 }
6720}
6721
6722#[cfg(target_os = "fuchsia")]
6723impl From<PayloadStreamSynchronousProxy> for zx::Handle {
6724 fn from(value: PayloadStreamSynchronousProxy) -> Self {
6725 value.into_channel().into()
6726 }
6727}
6728
6729#[cfg(target_os = "fuchsia")]
6730impl From<fidl::Channel> for PayloadStreamSynchronousProxy {
6731 fn from(value: fidl::Channel) -> Self {
6732 Self::new(value)
6733 }
6734}
6735
6736#[cfg(target_os = "fuchsia")]
6737impl fidl::endpoints::FromClient for PayloadStreamSynchronousProxy {
6738 type Protocol = PayloadStreamMarker;
6739
6740 fn from_client(value: fidl::endpoints::ClientEnd<PayloadStreamMarker>) -> Self {
6741 Self::new(value.into_channel())
6742 }
6743}
6744
6745#[derive(Debug, Clone)]
6746pub struct PayloadStreamProxy {
6747 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
6748}
6749
6750impl fidl::endpoints::Proxy for PayloadStreamProxy {
6751 type Protocol = PayloadStreamMarker;
6752
6753 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
6754 Self::new(inner)
6755 }
6756
6757 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
6758 self.client.into_channel().map_err(|client| Self { client })
6759 }
6760
6761 fn as_channel(&self) -> &::fidl::AsyncChannel {
6762 self.client.as_channel()
6763 }
6764}
6765
6766impl PayloadStreamProxy {
6767 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
6769 let protocol_name = <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
6770 Self { client: fidl::client::Client::new(channel, protocol_name) }
6771 }
6772
6773 pub fn take_event_stream(&self) -> PayloadStreamEventStream {
6779 PayloadStreamEventStream { event_receiver: self.client.take_event_receiver() }
6780 }
6781
6782 pub fn r#register_vmo(
6787 &self,
6788 mut vmo: fidl::Vmo,
6789 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
6790 PayloadStreamProxyInterface::r#register_vmo(self, vmo)
6791 }
6792
6793 pub fn r#read_data(
6795 &self,
6796 ) -> fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>
6797 {
6798 PayloadStreamProxyInterface::r#read_data(self)
6799 }
6800}
6801
6802impl PayloadStreamProxyInterface for PayloadStreamProxy {
6803 type RegisterVmoResponseFut =
6804 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
6805 fn r#register_vmo(&self, mut vmo: fidl::Vmo) -> Self::RegisterVmoResponseFut {
6806 fn _decode(
6807 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6808 ) -> Result<i32, fidl::Error> {
6809 let _response = fidl::client::decode_transaction_body::<
6810 PayloadStreamRegisterVmoResponse,
6811 fidl::encoding::DefaultFuchsiaResourceDialect,
6812 0x388d7fe44bcb4c,
6813 >(_buf?)?;
6814 Ok(_response.status)
6815 }
6816 self.client.send_query_and_decode::<PayloadStreamRegisterVmoRequest, i32>(
6817 (vmo,),
6818 0x388d7fe44bcb4c,
6819 fidl::encoding::DynamicFlags::empty(),
6820 _decode,
6821 )
6822 }
6823
6824 type ReadDataResponseFut =
6825 fidl::client::QueryResponseFut<ReadResult, fidl::encoding::DefaultFuchsiaResourceDialect>;
6826 fn r#read_data(&self) -> Self::ReadDataResponseFut {
6827 fn _decode(
6828 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
6829 ) -> Result<ReadResult, fidl::Error> {
6830 let _response = fidl::client::decode_transaction_body::<
6831 PayloadStreamReadDataResponse,
6832 fidl::encoding::DefaultFuchsiaResourceDialect,
6833 0x2ccde55366318afa,
6834 >(_buf?)?;
6835 Ok(_response.result)
6836 }
6837 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, ReadResult>(
6838 (),
6839 0x2ccde55366318afa,
6840 fidl::encoding::DynamicFlags::empty(),
6841 _decode,
6842 )
6843 }
6844}
6845
6846pub struct PayloadStreamEventStream {
6847 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
6848}
6849
6850impl std::marker::Unpin for PayloadStreamEventStream {}
6851
6852impl futures::stream::FusedStream for PayloadStreamEventStream {
6853 fn is_terminated(&self) -> bool {
6854 self.event_receiver.is_terminated()
6855 }
6856}
6857
6858impl futures::Stream for PayloadStreamEventStream {
6859 type Item = Result<PayloadStreamEvent, fidl::Error>;
6860
6861 fn poll_next(
6862 mut self: std::pin::Pin<&mut Self>,
6863 cx: &mut std::task::Context<'_>,
6864 ) -> std::task::Poll<Option<Self::Item>> {
6865 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
6866 &mut self.event_receiver,
6867 cx
6868 )?) {
6869 Some(buf) => std::task::Poll::Ready(Some(PayloadStreamEvent::decode(buf))),
6870 None => std::task::Poll::Ready(None),
6871 }
6872 }
6873}
6874
6875#[derive(Debug)]
6876pub enum PayloadStreamEvent {}
6877
6878impl PayloadStreamEvent {
6879 fn decode(
6881 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
6882 ) -> Result<PayloadStreamEvent, fidl::Error> {
6883 let (bytes, _handles) = buf.split_mut();
6884 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6885 debug_assert_eq!(tx_header.tx_id, 0);
6886 match tx_header.ordinal {
6887 _ => Err(fidl::Error::UnknownOrdinal {
6888 ordinal: tx_header.ordinal,
6889 protocol_name: <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
6890 }),
6891 }
6892 }
6893}
6894
6895pub struct PayloadStreamRequestStream {
6897 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6898 is_terminated: bool,
6899}
6900
6901impl std::marker::Unpin for PayloadStreamRequestStream {}
6902
6903impl futures::stream::FusedStream for PayloadStreamRequestStream {
6904 fn is_terminated(&self) -> bool {
6905 self.is_terminated
6906 }
6907}
6908
6909impl fidl::endpoints::RequestStream for PayloadStreamRequestStream {
6910 type Protocol = PayloadStreamMarker;
6911 type ControlHandle = PayloadStreamControlHandle;
6912
6913 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
6914 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
6915 }
6916
6917 fn control_handle(&self) -> Self::ControlHandle {
6918 PayloadStreamControlHandle { inner: self.inner.clone() }
6919 }
6920
6921 fn into_inner(
6922 self,
6923 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
6924 {
6925 (self.inner, self.is_terminated)
6926 }
6927
6928 fn from_inner(
6929 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
6930 is_terminated: bool,
6931 ) -> Self {
6932 Self { inner, is_terminated }
6933 }
6934}
6935
6936impl futures::Stream for PayloadStreamRequestStream {
6937 type Item = Result<PayloadStreamRequest, fidl::Error>;
6938
6939 fn poll_next(
6940 mut self: std::pin::Pin<&mut Self>,
6941 cx: &mut std::task::Context<'_>,
6942 ) -> std::task::Poll<Option<Self::Item>> {
6943 let this = &mut *self;
6944 if this.inner.check_shutdown(cx) {
6945 this.is_terminated = true;
6946 return std::task::Poll::Ready(None);
6947 }
6948 if this.is_terminated {
6949 panic!("polled PayloadStreamRequestStream after completion");
6950 }
6951 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
6952 |bytes, handles| {
6953 match this.inner.channel().read_etc(cx, bytes, handles) {
6954 std::task::Poll::Ready(Ok(())) => {}
6955 std::task::Poll::Pending => return std::task::Poll::Pending,
6956 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
6957 this.is_terminated = true;
6958 return std::task::Poll::Ready(None);
6959 }
6960 std::task::Poll::Ready(Err(e)) => {
6961 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
6962 e.into(),
6963 ))))
6964 }
6965 }
6966
6967 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
6969
6970 std::task::Poll::Ready(Some(match header.ordinal {
6971 0x388d7fe44bcb4c => {
6972 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6973 let mut req = fidl::new_empty!(
6974 PayloadStreamRegisterVmoRequest,
6975 fidl::encoding::DefaultFuchsiaResourceDialect
6976 );
6977 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<PayloadStreamRegisterVmoRequest>(&header, _body_bytes, handles, &mut req)?;
6978 let control_handle =
6979 PayloadStreamControlHandle { inner: this.inner.clone() };
6980 Ok(PayloadStreamRequest::RegisterVmo {
6981 vmo: req.vmo,
6982
6983 responder: PayloadStreamRegisterVmoResponder {
6984 control_handle: std::mem::ManuallyDrop::new(control_handle),
6985 tx_id: header.tx_id,
6986 },
6987 })
6988 }
6989 0x2ccde55366318afa => {
6990 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
6991 let mut req = fidl::new_empty!(
6992 fidl::encoding::EmptyPayload,
6993 fidl::encoding::DefaultFuchsiaResourceDialect
6994 );
6995 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
6996 let control_handle =
6997 PayloadStreamControlHandle { inner: this.inner.clone() };
6998 Ok(PayloadStreamRequest::ReadData {
6999 responder: PayloadStreamReadDataResponder {
7000 control_handle: std::mem::ManuallyDrop::new(control_handle),
7001 tx_id: header.tx_id,
7002 },
7003 })
7004 }
7005 _ => Err(fidl::Error::UnknownOrdinal {
7006 ordinal: header.ordinal,
7007 protocol_name:
7008 <PayloadStreamMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7009 }),
7010 }))
7011 },
7012 )
7013 }
7014}
7015
7016#[derive(Debug)]
7018pub enum PayloadStreamRequest {
7019 RegisterVmo { vmo: fidl::Vmo, responder: PayloadStreamRegisterVmoResponder },
7024 ReadData { responder: PayloadStreamReadDataResponder },
7026}
7027
7028impl PayloadStreamRequest {
7029 #[allow(irrefutable_let_patterns)]
7030 pub fn into_register_vmo(self) -> Option<(fidl::Vmo, PayloadStreamRegisterVmoResponder)> {
7031 if let PayloadStreamRequest::RegisterVmo { vmo, responder } = self {
7032 Some((vmo, responder))
7033 } else {
7034 None
7035 }
7036 }
7037
7038 #[allow(irrefutable_let_patterns)]
7039 pub fn into_read_data(self) -> Option<(PayloadStreamReadDataResponder)> {
7040 if let PayloadStreamRequest::ReadData { responder } = self {
7041 Some((responder))
7042 } else {
7043 None
7044 }
7045 }
7046
7047 pub fn method_name(&self) -> &'static str {
7049 match *self {
7050 PayloadStreamRequest::RegisterVmo { .. } => "register_vmo",
7051 PayloadStreamRequest::ReadData { .. } => "read_data",
7052 }
7053 }
7054}
7055
7056#[derive(Debug, Clone)]
7057pub struct PayloadStreamControlHandle {
7058 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7059}
7060
7061impl fidl::endpoints::ControlHandle for PayloadStreamControlHandle {
7062 fn shutdown(&self) {
7063 self.inner.shutdown()
7064 }
7065 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7066 self.inner.shutdown_with_epitaph(status)
7067 }
7068
7069 fn is_closed(&self) -> bool {
7070 self.inner.channel().is_closed()
7071 }
7072 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7073 self.inner.channel().on_closed()
7074 }
7075
7076 #[cfg(target_os = "fuchsia")]
7077 fn signal_peer(
7078 &self,
7079 clear_mask: zx::Signals,
7080 set_mask: zx::Signals,
7081 ) -> Result<(), zx_status::Status> {
7082 use fidl::Peered;
7083 self.inner.channel().signal_peer(clear_mask, set_mask)
7084 }
7085}
7086
7087impl PayloadStreamControlHandle {}
7088
7089#[must_use = "FIDL methods require a response to be sent"]
7090#[derive(Debug)]
7091pub struct PayloadStreamRegisterVmoResponder {
7092 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
7093 tx_id: u32,
7094}
7095
7096impl std::ops::Drop for PayloadStreamRegisterVmoResponder {
7100 fn drop(&mut self) {
7101 self.control_handle.shutdown();
7102 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7104 }
7105}
7106
7107impl fidl::endpoints::Responder for PayloadStreamRegisterVmoResponder {
7108 type ControlHandle = PayloadStreamControlHandle;
7109
7110 fn control_handle(&self) -> &PayloadStreamControlHandle {
7111 &self.control_handle
7112 }
7113
7114 fn drop_without_shutdown(mut self) {
7115 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7117 std::mem::forget(self);
7119 }
7120}
7121
7122impl PayloadStreamRegisterVmoResponder {
7123 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
7127 let _result = self.send_raw(status);
7128 if _result.is_err() {
7129 self.control_handle.shutdown();
7130 }
7131 self.drop_without_shutdown();
7132 _result
7133 }
7134
7135 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
7137 let _result = self.send_raw(status);
7138 self.drop_without_shutdown();
7139 _result
7140 }
7141
7142 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
7143 self.control_handle.inner.send::<PayloadStreamRegisterVmoResponse>(
7144 (status,),
7145 self.tx_id,
7146 0x388d7fe44bcb4c,
7147 fidl::encoding::DynamicFlags::empty(),
7148 )
7149 }
7150}
7151
7152#[must_use = "FIDL methods require a response to be sent"]
7153#[derive(Debug)]
7154pub struct PayloadStreamReadDataResponder {
7155 control_handle: std::mem::ManuallyDrop<PayloadStreamControlHandle>,
7156 tx_id: u32,
7157}
7158
7159impl std::ops::Drop for PayloadStreamReadDataResponder {
7163 fn drop(&mut self) {
7164 self.control_handle.shutdown();
7165 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7167 }
7168}
7169
7170impl fidl::endpoints::Responder for PayloadStreamReadDataResponder {
7171 type ControlHandle = PayloadStreamControlHandle;
7172
7173 fn control_handle(&self) -> &PayloadStreamControlHandle {
7174 &self.control_handle
7175 }
7176
7177 fn drop_without_shutdown(mut self) {
7178 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7180 std::mem::forget(self);
7182 }
7183}
7184
7185impl PayloadStreamReadDataResponder {
7186 pub fn send(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7190 let _result = self.send_raw(result);
7191 if _result.is_err() {
7192 self.control_handle.shutdown();
7193 }
7194 self.drop_without_shutdown();
7195 _result
7196 }
7197
7198 pub fn send_no_shutdown_on_err(self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7200 let _result = self.send_raw(result);
7201 self.drop_without_shutdown();
7202 _result
7203 }
7204
7205 fn send_raw(&self, mut result: &ReadResult) -> Result<(), fidl::Error> {
7206 self.control_handle.inner.send::<PayloadStreamReadDataResponse>(
7207 (result,),
7208 self.tx_id,
7209 0x2ccde55366318afa,
7210 fidl::encoding::DynamicFlags::empty(),
7211 )
7212 }
7213}
7214
7215#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
7216pub struct SysconfigMarker;
7217
7218impl fidl::endpoints::ProtocolMarker for SysconfigMarker {
7219 type Proxy = SysconfigProxy;
7220 type RequestStream = SysconfigRequestStream;
7221 #[cfg(target_os = "fuchsia")]
7222 type SynchronousProxy = SysconfigSynchronousProxy;
7223
7224 const DEBUG_NAME: &'static str = "(anonymous) Sysconfig";
7225}
7226pub type SysconfigReadResult = Result<fidl_fuchsia_mem::Buffer, i32>;
7227pub type SysconfigGetPartitionSizeResult = Result<u64, i32>;
7228
7229pub trait SysconfigProxyInterface: Send + Sync {
7230 type ReadResponseFut: std::future::Future<Output = Result<SysconfigReadResult, fidl::Error>>
7231 + Send;
7232 fn r#read(&self) -> Self::ReadResponseFut;
7233 type WriteResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7234 fn r#write(&self, payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut;
7235 type GetPartitionSizeResponseFut: std::future::Future<Output = Result<SysconfigGetPartitionSizeResult, fidl::Error>>
7236 + Send;
7237 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut;
7238 type FlushResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7239 fn r#flush(&self) -> Self::FlushResponseFut;
7240 type WipeResponseFut: std::future::Future<Output = Result<i32, fidl::Error>> + Send;
7241 fn r#wipe(&self) -> Self::WipeResponseFut;
7242}
7243#[derive(Debug)]
7244#[cfg(target_os = "fuchsia")]
7245pub struct SysconfigSynchronousProxy {
7246 client: fidl::client::sync::Client,
7247}
7248
7249#[cfg(target_os = "fuchsia")]
7250impl fidl::endpoints::SynchronousProxy for SysconfigSynchronousProxy {
7251 type Proxy = SysconfigProxy;
7252 type Protocol = SysconfigMarker;
7253
7254 fn from_channel(inner: fidl::Channel) -> Self {
7255 Self::new(inner)
7256 }
7257
7258 fn into_channel(self) -> fidl::Channel {
7259 self.client.into_channel()
7260 }
7261
7262 fn as_channel(&self) -> &fidl::Channel {
7263 self.client.as_channel()
7264 }
7265}
7266
7267#[cfg(target_os = "fuchsia")]
7268impl SysconfigSynchronousProxy {
7269 pub fn new(channel: fidl::Channel) -> Self {
7270 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7271 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
7272 }
7273
7274 pub fn into_channel(self) -> fidl::Channel {
7275 self.client.into_channel()
7276 }
7277
7278 pub fn wait_for_event(
7281 &self,
7282 deadline: zx::MonotonicInstant,
7283 ) -> Result<SysconfigEvent, fidl::Error> {
7284 SysconfigEvent::decode(self.client.wait_for_event(deadline)?)
7285 }
7286
7287 pub fn r#read(
7289 &self,
7290 ___deadline: zx::MonotonicInstant,
7291 ) -> Result<SysconfigReadResult, fidl::Error> {
7292 let _response = self.client.send_query::<
7293 fidl::encoding::EmptyPayload,
7294 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7295 >(
7296 (),
7297 0x350c317c53c226fc,
7298 fidl::encoding::DynamicFlags::empty(),
7299 ___deadline,
7300 )?;
7301 Ok(_response.map(|x| x.data))
7302 }
7303
7304 pub fn r#write(
7306 &self,
7307 mut payload: fidl_fuchsia_mem::Buffer,
7308 ___deadline: zx::MonotonicInstant,
7309 ) -> Result<i32, fidl::Error> {
7310 let _response = self.client.send_query::<SysconfigWriteRequest, SysconfigWriteResponse>(
7311 (&mut payload,),
7312 0x393786c114caf171,
7313 fidl::encoding::DynamicFlags::empty(),
7314 ___deadline,
7315 )?;
7316 Ok(_response.status)
7317 }
7318
7319 pub fn r#get_partition_size(
7321 &self,
7322 ___deadline: zx::MonotonicInstant,
7323 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7324 let _response = self.client.send_query::<
7325 fidl::encoding::EmptyPayload,
7326 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7327 >(
7328 (),
7329 0x2570c58b74fb8957,
7330 fidl::encoding::DynamicFlags::empty(),
7331 ___deadline,
7332 )?;
7333 Ok(_response.map(|x| x.size))
7334 }
7335
7336 pub fn r#flush(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7338 let _response =
7339 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigFlushResponse>(
7340 (),
7341 0xc6c1bb233d003c6,
7342 fidl::encoding::DynamicFlags::empty(),
7343 ___deadline,
7344 )?;
7345 Ok(_response.status)
7346 }
7347
7348 pub fn r#wipe(&self, ___deadline: zx::MonotonicInstant) -> Result<i32, fidl::Error> {
7350 let _response =
7351 self.client.send_query::<fidl::encoding::EmptyPayload, SysconfigWipeResponse>(
7352 (),
7353 0x34a634965ebfb702,
7354 fidl::encoding::DynamicFlags::empty(),
7355 ___deadline,
7356 )?;
7357 Ok(_response.status)
7358 }
7359}
7360
7361#[cfg(target_os = "fuchsia")]
7362impl From<SysconfigSynchronousProxy> for zx::Handle {
7363 fn from(value: SysconfigSynchronousProxy) -> Self {
7364 value.into_channel().into()
7365 }
7366}
7367
7368#[cfg(target_os = "fuchsia")]
7369impl From<fidl::Channel> for SysconfigSynchronousProxy {
7370 fn from(value: fidl::Channel) -> Self {
7371 Self::new(value)
7372 }
7373}
7374
7375#[cfg(target_os = "fuchsia")]
7376impl fidl::endpoints::FromClient for SysconfigSynchronousProxy {
7377 type Protocol = SysconfigMarker;
7378
7379 fn from_client(value: fidl::endpoints::ClientEnd<SysconfigMarker>) -> Self {
7380 Self::new(value.into_channel())
7381 }
7382}
7383
7384#[derive(Debug, Clone)]
7385pub struct SysconfigProxy {
7386 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
7387}
7388
7389impl fidl::endpoints::Proxy for SysconfigProxy {
7390 type Protocol = SysconfigMarker;
7391
7392 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
7393 Self::new(inner)
7394 }
7395
7396 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
7397 self.client.into_channel().map_err(|client| Self { client })
7398 }
7399
7400 fn as_channel(&self) -> &::fidl::AsyncChannel {
7401 self.client.as_channel()
7402 }
7403}
7404
7405impl SysconfigProxy {
7406 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
7408 let protocol_name = <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
7409 Self { client: fidl::client::Client::new(channel, protocol_name) }
7410 }
7411
7412 pub fn take_event_stream(&self) -> SysconfigEventStream {
7418 SysconfigEventStream { event_receiver: self.client.take_event_receiver() }
7419 }
7420
7421 pub fn r#read(
7423 &self,
7424 ) -> fidl::client::QueryResponseFut<
7425 SysconfigReadResult,
7426 fidl::encoding::DefaultFuchsiaResourceDialect,
7427 > {
7428 SysconfigProxyInterface::r#read(self)
7429 }
7430
7431 pub fn r#write(
7433 &self,
7434 mut payload: fidl_fuchsia_mem::Buffer,
7435 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7436 SysconfigProxyInterface::r#write(self, payload)
7437 }
7438
7439 pub fn r#get_partition_size(
7441 &self,
7442 ) -> fidl::client::QueryResponseFut<
7443 SysconfigGetPartitionSizeResult,
7444 fidl::encoding::DefaultFuchsiaResourceDialect,
7445 > {
7446 SysconfigProxyInterface::r#get_partition_size(self)
7447 }
7448
7449 pub fn r#flush(
7451 &self,
7452 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7453 SysconfigProxyInterface::r#flush(self)
7454 }
7455
7456 pub fn r#wipe(
7458 &self,
7459 ) -> fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect> {
7460 SysconfigProxyInterface::r#wipe(self)
7461 }
7462}
7463
7464impl SysconfigProxyInterface for SysconfigProxy {
7465 type ReadResponseFut = fidl::client::QueryResponseFut<
7466 SysconfigReadResult,
7467 fidl::encoding::DefaultFuchsiaResourceDialect,
7468 >;
7469 fn r#read(&self) -> Self::ReadResponseFut {
7470 fn _decode(
7471 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7472 ) -> Result<SysconfigReadResult, fidl::Error> {
7473 let _response = fidl::client::decode_transaction_body::<
7474 fidl::encoding::ResultType<SysconfigReadResponse, i32>,
7475 fidl::encoding::DefaultFuchsiaResourceDialect,
7476 0x350c317c53c226fc,
7477 >(_buf?)?;
7478 Ok(_response.map(|x| x.data))
7479 }
7480 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigReadResult>(
7481 (),
7482 0x350c317c53c226fc,
7483 fidl::encoding::DynamicFlags::empty(),
7484 _decode,
7485 )
7486 }
7487
7488 type WriteResponseFut =
7489 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7490 fn r#write(&self, mut payload: fidl_fuchsia_mem::Buffer) -> Self::WriteResponseFut {
7491 fn _decode(
7492 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7493 ) -> Result<i32, fidl::Error> {
7494 let _response = fidl::client::decode_transaction_body::<
7495 SysconfigWriteResponse,
7496 fidl::encoding::DefaultFuchsiaResourceDialect,
7497 0x393786c114caf171,
7498 >(_buf?)?;
7499 Ok(_response.status)
7500 }
7501 self.client.send_query_and_decode::<SysconfigWriteRequest, i32>(
7502 (&mut payload,),
7503 0x393786c114caf171,
7504 fidl::encoding::DynamicFlags::empty(),
7505 _decode,
7506 )
7507 }
7508
7509 type GetPartitionSizeResponseFut = fidl::client::QueryResponseFut<
7510 SysconfigGetPartitionSizeResult,
7511 fidl::encoding::DefaultFuchsiaResourceDialect,
7512 >;
7513 fn r#get_partition_size(&self) -> Self::GetPartitionSizeResponseFut {
7514 fn _decode(
7515 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7516 ) -> Result<SysconfigGetPartitionSizeResult, fidl::Error> {
7517 let _response = fidl::client::decode_transaction_body::<
7518 fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>,
7519 fidl::encoding::DefaultFuchsiaResourceDialect,
7520 0x2570c58b74fb8957,
7521 >(_buf?)?;
7522 Ok(_response.map(|x| x.size))
7523 }
7524 self.client
7525 .send_query_and_decode::<fidl::encoding::EmptyPayload, SysconfigGetPartitionSizeResult>(
7526 (),
7527 0x2570c58b74fb8957,
7528 fidl::encoding::DynamicFlags::empty(),
7529 _decode,
7530 )
7531 }
7532
7533 type FlushResponseFut =
7534 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7535 fn r#flush(&self) -> Self::FlushResponseFut {
7536 fn _decode(
7537 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7538 ) -> Result<i32, fidl::Error> {
7539 let _response = fidl::client::decode_transaction_body::<
7540 SysconfigFlushResponse,
7541 fidl::encoding::DefaultFuchsiaResourceDialect,
7542 0xc6c1bb233d003c6,
7543 >(_buf?)?;
7544 Ok(_response.status)
7545 }
7546 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7547 (),
7548 0xc6c1bb233d003c6,
7549 fidl::encoding::DynamicFlags::empty(),
7550 _decode,
7551 )
7552 }
7553
7554 type WipeResponseFut =
7555 fidl::client::QueryResponseFut<i32, fidl::encoding::DefaultFuchsiaResourceDialect>;
7556 fn r#wipe(&self) -> Self::WipeResponseFut {
7557 fn _decode(
7558 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
7559 ) -> Result<i32, fidl::Error> {
7560 let _response = fidl::client::decode_transaction_body::<
7561 SysconfigWipeResponse,
7562 fidl::encoding::DefaultFuchsiaResourceDialect,
7563 0x34a634965ebfb702,
7564 >(_buf?)?;
7565 Ok(_response.status)
7566 }
7567 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, i32>(
7568 (),
7569 0x34a634965ebfb702,
7570 fidl::encoding::DynamicFlags::empty(),
7571 _decode,
7572 )
7573 }
7574}
7575
7576pub struct SysconfigEventStream {
7577 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
7578}
7579
7580impl std::marker::Unpin for SysconfigEventStream {}
7581
7582impl futures::stream::FusedStream for SysconfigEventStream {
7583 fn is_terminated(&self) -> bool {
7584 self.event_receiver.is_terminated()
7585 }
7586}
7587
7588impl futures::Stream for SysconfigEventStream {
7589 type Item = Result<SysconfigEvent, fidl::Error>;
7590
7591 fn poll_next(
7592 mut self: std::pin::Pin<&mut Self>,
7593 cx: &mut std::task::Context<'_>,
7594 ) -> std::task::Poll<Option<Self::Item>> {
7595 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
7596 &mut self.event_receiver,
7597 cx
7598 )?) {
7599 Some(buf) => std::task::Poll::Ready(Some(SysconfigEvent::decode(buf))),
7600 None => std::task::Poll::Ready(None),
7601 }
7602 }
7603}
7604
7605#[derive(Debug)]
7606pub enum SysconfigEvent {}
7607
7608impl SysconfigEvent {
7609 fn decode(
7611 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
7612 ) -> Result<SysconfigEvent, fidl::Error> {
7613 let (bytes, _handles) = buf.split_mut();
7614 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7615 debug_assert_eq!(tx_header.tx_id, 0);
7616 match tx_header.ordinal {
7617 _ => Err(fidl::Error::UnknownOrdinal {
7618 ordinal: tx_header.ordinal,
7619 protocol_name: <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7620 }),
7621 }
7622 }
7623}
7624
7625pub struct SysconfigRequestStream {
7627 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7628 is_terminated: bool,
7629}
7630
7631impl std::marker::Unpin for SysconfigRequestStream {}
7632
7633impl futures::stream::FusedStream for SysconfigRequestStream {
7634 fn is_terminated(&self) -> bool {
7635 self.is_terminated
7636 }
7637}
7638
7639impl fidl::endpoints::RequestStream for SysconfigRequestStream {
7640 type Protocol = SysconfigMarker;
7641 type ControlHandle = SysconfigControlHandle;
7642
7643 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
7644 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
7645 }
7646
7647 fn control_handle(&self) -> Self::ControlHandle {
7648 SysconfigControlHandle { inner: self.inner.clone() }
7649 }
7650
7651 fn into_inner(
7652 self,
7653 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
7654 {
7655 (self.inner, self.is_terminated)
7656 }
7657
7658 fn from_inner(
7659 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7660 is_terminated: bool,
7661 ) -> Self {
7662 Self { inner, is_terminated }
7663 }
7664}
7665
7666impl futures::Stream for SysconfigRequestStream {
7667 type Item = Result<SysconfigRequest, fidl::Error>;
7668
7669 fn poll_next(
7670 mut self: std::pin::Pin<&mut Self>,
7671 cx: &mut std::task::Context<'_>,
7672 ) -> std::task::Poll<Option<Self::Item>> {
7673 let this = &mut *self;
7674 if this.inner.check_shutdown(cx) {
7675 this.is_terminated = true;
7676 return std::task::Poll::Ready(None);
7677 }
7678 if this.is_terminated {
7679 panic!("polled SysconfigRequestStream after completion");
7680 }
7681 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
7682 |bytes, handles| {
7683 match this.inner.channel().read_etc(cx, bytes, handles) {
7684 std::task::Poll::Ready(Ok(())) => {}
7685 std::task::Poll::Pending => return std::task::Poll::Pending,
7686 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
7687 this.is_terminated = true;
7688 return std::task::Poll::Ready(None);
7689 }
7690 std::task::Poll::Ready(Err(e)) => {
7691 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
7692 e.into(),
7693 ))))
7694 }
7695 }
7696
7697 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
7699
7700 std::task::Poll::Ready(Some(match header.ordinal {
7701 0x350c317c53c226fc => {
7702 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7703 let mut req = fidl::new_empty!(
7704 fidl::encoding::EmptyPayload,
7705 fidl::encoding::DefaultFuchsiaResourceDialect
7706 );
7707 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7708 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7709 Ok(SysconfigRequest::Read {
7710 responder: SysconfigReadResponder {
7711 control_handle: std::mem::ManuallyDrop::new(control_handle),
7712 tx_id: header.tx_id,
7713 },
7714 })
7715 }
7716 0x393786c114caf171 => {
7717 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7718 let mut req = fidl::new_empty!(
7719 SysconfigWriteRequest,
7720 fidl::encoding::DefaultFuchsiaResourceDialect
7721 );
7722 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SysconfigWriteRequest>(&header, _body_bytes, handles, &mut req)?;
7723 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7724 Ok(SysconfigRequest::Write {
7725 payload: req.payload,
7726
7727 responder: SysconfigWriteResponder {
7728 control_handle: std::mem::ManuallyDrop::new(control_handle),
7729 tx_id: header.tx_id,
7730 },
7731 })
7732 }
7733 0x2570c58b74fb8957 => {
7734 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7735 let mut req = fidl::new_empty!(
7736 fidl::encoding::EmptyPayload,
7737 fidl::encoding::DefaultFuchsiaResourceDialect
7738 );
7739 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7740 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7741 Ok(SysconfigRequest::GetPartitionSize {
7742 responder: SysconfigGetPartitionSizeResponder {
7743 control_handle: std::mem::ManuallyDrop::new(control_handle),
7744 tx_id: header.tx_id,
7745 },
7746 })
7747 }
7748 0xc6c1bb233d003c6 => {
7749 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7750 let mut req = fidl::new_empty!(
7751 fidl::encoding::EmptyPayload,
7752 fidl::encoding::DefaultFuchsiaResourceDialect
7753 );
7754 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7755 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7756 Ok(SysconfigRequest::Flush {
7757 responder: SysconfigFlushResponder {
7758 control_handle: std::mem::ManuallyDrop::new(control_handle),
7759 tx_id: header.tx_id,
7760 },
7761 })
7762 }
7763 0x34a634965ebfb702 => {
7764 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
7765 let mut req = fidl::new_empty!(
7766 fidl::encoding::EmptyPayload,
7767 fidl::encoding::DefaultFuchsiaResourceDialect
7768 );
7769 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
7770 let control_handle = SysconfigControlHandle { inner: this.inner.clone() };
7771 Ok(SysconfigRequest::Wipe {
7772 responder: SysconfigWipeResponder {
7773 control_handle: std::mem::ManuallyDrop::new(control_handle),
7774 tx_id: header.tx_id,
7775 },
7776 })
7777 }
7778 _ => Err(fidl::Error::UnknownOrdinal {
7779 ordinal: header.ordinal,
7780 protocol_name:
7781 <SysconfigMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
7782 }),
7783 }))
7784 },
7785 )
7786 }
7787}
7788
7789#[derive(Debug)]
7793pub enum SysconfigRequest {
7794 Read { responder: SysconfigReadResponder },
7796 Write { payload: fidl_fuchsia_mem::Buffer, responder: SysconfigWriteResponder },
7798 GetPartitionSize { responder: SysconfigGetPartitionSizeResponder },
7800 Flush { responder: SysconfigFlushResponder },
7802 Wipe { responder: SysconfigWipeResponder },
7804}
7805
7806impl SysconfigRequest {
7807 #[allow(irrefutable_let_patterns)]
7808 pub fn into_read(self) -> Option<(SysconfigReadResponder)> {
7809 if let SysconfigRequest::Read { responder } = self {
7810 Some((responder))
7811 } else {
7812 None
7813 }
7814 }
7815
7816 #[allow(irrefutable_let_patterns)]
7817 pub fn into_write(self) -> Option<(fidl_fuchsia_mem::Buffer, SysconfigWriteResponder)> {
7818 if let SysconfigRequest::Write { payload, responder } = self {
7819 Some((payload, responder))
7820 } else {
7821 None
7822 }
7823 }
7824
7825 #[allow(irrefutable_let_patterns)]
7826 pub fn into_get_partition_size(self) -> Option<(SysconfigGetPartitionSizeResponder)> {
7827 if let SysconfigRequest::GetPartitionSize { responder } = self {
7828 Some((responder))
7829 } else {
7830 None
7831 }
7832 }
7833
7834 #[allow(irrefutable_let_patterns)]
7835 pub fn into_flush(self) -> Option<(SysconfigFlushResponder)> {
7836 if let SysconfigRequest::Flush { responder } = self {
7837 Some((responder))
7838 } else {
7839 None
7840 }
7841 }
7842
7843 #[allow(irrefutable_let_patterns)]
7844 pub fn into_wipe(self) -> Option<(SysconfigWipeResponder)> {
7845 if let SysconfigRequest::Wipe { responder } = self {
7846 Some((responder))
7847 } else {
7848 None
7849 }
7850 }
7851
7852 pub fn method_name(&self) -> &'static str {
7854 match *self {
7855 SysconfigRequest::Read { .. } => "read",
7856 SysconfigRequest::Write { .. } => "write",
7857 SysconfigRequest::GetPartitionSize { .. } => "get_partition_size",
7858 SysconfigRequest::Flush { .. } => "flush",
7859 SysconfigRequest::Wipe { .. } => "wipe",
7860 }
7861 }
7862}
7863
7864#[derive(Debug, Clone)]
7865pub struct SysconfigControlHandle {
7866 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
7867}
7868
7869impl fidl::endpoints::ControlHandle for SysconfigControlHandle {
7870 fn shutdown(&self) {
7871 self.inner.shutdown()
7872 }
7873 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
7874 self.inner.shutdown_with_epitaph(status)
7875 }
7876
7877 fn is_closed(&self) -> bool {
7878 self.inner.channel().is_closed()
7879 }
7880 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
7881 self.inner.channel().on_closed()
7882 }
7883
7884 #[cfg(target_os = "fuchsia")]
7885 fn signal_peer(
7886 &self,
7887 clear_mask: zx::Signals,
7888 set_mask: zx::Signals,
7889 ) -> Result<(), zx_status::Status> {
7890 use fidl::Peered;
7891 self.inner.channel().signal_peer(clear_mask, set_mask)
7892 }
7893}
7894
7895impl SysconfigControlHandle {}
7896
7897#[must_use = "FIDL methods require a response to be sent"]
7898#[derive(Debug)]
7899pub struct SysconfigReadResponder {
7900 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7901 tx_id: u32,
7902}
7903
7904impl std::ops::Drop for SysconfigReadResponder {
7908 fn drop(&mut self) {
7909 self.control_handle.shutdown();
7910 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7912 }
7913}
7914
7915impl fidl::endpoints::Responder for SysconfigReadResponder {
7916 type ControlHandle = SysconfigControlHandle;
7917
7918 fn control_handle(&self) -> &SysconfigControlHandle {
7919 &self.control_handle
7920 }
7921
7922 fn drop_without_shutdown(mut self) {
7923 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7925 std::mem::forget(self);
7927 }
7928}
7929
7930impl SysconfigReadResponder {
7931 pub fn send(
7935 self,
7936 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7937 ) -> Result<(), fidl::Error> {
7938 let _result = self.send_raw(result);
7939 if _result.is_err() {
7940 self.control_handle.shutdown();
7941 }
7942 self.drop_without_shutdown();
7943 _result
7944 }
7945
7946 pub fn send_no_shutdown_on_err(
7948 self,
7949 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7950 ) -> Result<(), fidl::Error> {
7951 let _result = self.send_raw(result);
7952 self.drop_without_shutdown();
7953 _result
7954 }
7955
7956 fn send_raw(
7957 &self,
7958 mut result: Result<fidl_fuchsia_mem::Buffer, i32>,
7959 ) -> Result<(), fidl::Error> {
7960 self.control_handle.inner.send::<fidl::encoding::ResultType<SysconfigReadResponse, i32>>(
7961 result.as_mut().map_err(|e| *e).map(|data| (data,)),
7962 self.tx_id,
7963 0x350c317c53c226fc,
7964 fidl::encoding::DynamicFlags::empty(),
7965 )
7966 }
7967}
7968
7969#[must_use = "FIDL methods require a response to be sent"]
7970#[derive(Debug)]
7971pub struct SysconfigWriteResponder {
7972 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
7973 tx_id: u32,
7974}
7975
7976impl std::ops::Drop for SysconfigWriteResponder {
7980 fn drop(&mut self) {
7981 self.control_handle.shutdown();
7982 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7984 }
7985}
7986
7987impl fidl::endpoints::Responder for SysconfigWriteResponder {
7988 type ControlHandle = SysconfigControlHandle;
7989
7990 fn control_handle(&self) -> &SysconfigControlHandle {
7991 &self.control_handle
7992 }
7993
7994 fn drop_without_shutdown(mut self) {
7995 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
7997 std::mem::forget(self);
7999 }
8000}
8001
8002impl SysconfigWriteResponder {
8003 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8007 let _result = self.send_raw(status);
8008 if _result.is_err() {
8009 self.control_handle.shutdown();
8010 }
8011 self.drop_without_shutdown();
8012 _result
8013 }
8014
8015 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8017 let _result = self.send_raw(status);
8018 self.drop_without_shutdown();
8019 _result
8020 }
8021
8022 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8023 self.control_handle.inner.send::<SysconfigWriteResponse>(
8024 (status,),
8025 self.tx_id,
8026 0x393786c114caf171,
8027 fidl::encoding::DynamicFlags::empty(),
8028 )
8029 }
8030}
8031
8032#[must_use = "FIDL methods require a response to be sent"]
8033#[derive(Debug)]
8034pub struct SysconfigGetPartitionSizeResponder {
8035 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8036 tx_id: u32,
8037}
8038
8039impl std::ops::Drop for SysconfigGetPartitionSizeResponder {
8043 fn drop(&mut self) {
8044 self.control_handle.shutdown();
8045 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8047 }
8048}
8049
8050impl fidl::endpoints::Responder for SysconfigGetPartitionSizeResponder {
8051 type ControlHandle = SysconfigControlHandle;
8052
8053 fn control_handle(&self) -> &SysconfigControlHandle {
8054 &self.control_handle
8055 }
8056
8057 fn drop_without_shutdown(mut self) {
8058 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8060 std::mem::forget(self);
8062 }
8063}
8064
8065impl SysconfigGetPartitionSizeResponder {
8066 pub fn send(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8070 let _result = self.send_raw(result);
8071 if _result.is_err() {
8072 self.control_handle.shutdown();
8073 }
8074 self.drop_without_shutdown();
8075 _result
8076 }
8077
8078 pub fn send_no_shutdown_on_err(self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8080 let _result = self.send_raw(result);
8081 self.drop_without_shutdown();
8082 _result
8083 }
8084
8085 fn send_raw(&self, mut result: Result<u64, i32>) -> Result<(), fidl::Error> {
8086 self.control_handle
8087 .inner
8088 .send::<fidl::encoding::ResultType<SysconfigGetPartitionSizeResponse, i32>>(
8089 result.map(|size| (size,)),
8090 self.tx_id,
8091 0x2570c58b74fb8957,
8092 fidl::encoding::DynamicFlags::empty(),
8093 )
8094 }
8095}
8096
8097#[must_use = "FIDL methods require a response to be sent"]
8098#[derive(Debug)]
8099pub struct SysconfigFlushResponder {
8100 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8101 tx_id: u32,
8102}
8103
8104impl std::ops::Drop for SysconfigFlushResponder {
8108 fn drop(&mut self) {
8109 self.control_handle.shutdown();
8110 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8112 }
8113}
8114
8115impl fidl::endpoints::Responder for SysconfigFlushResponder {
8116 type ControlHandle = SysconfigControlHandle;
8117
8118 fn control_handle(&self) -> &SysconfigControlHandle {
8119 &self.control_handle
8120 }
8121
8122 fn drop_without_shutdown(mut self) {
8123 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8125 std::mem::forget(self);
8127 }
8128}
8129
8130impl SysconfigFlushResponder {
8131 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8135 let _result = self.send_raw(status);
8136 if _result.is_err() {
8137 self.control_handle.shutdown();
8138 }
8139 self.drop_without_shutdown();
8140 _result
8141 }
8142
8143 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8145 let _result = self.send_raw(status);
8146 self.drop_without_shutdown();
8147 _result
8148 }
8149
8150 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8151 self.control_handle.inner.send::<SysconfigFlushResponse>(
8152 (status,),
8153 self.tx_id,
8154 0xc6c1bb233d003c6,
8155 fidl::encoding::DynamicFlags::empty(),
8156 )
8157 }
8158}
8159
8160#[must_use = "FIDL methods require a response to be sent"]
8161#[derive(Debug)]
8162pub struct SysconfigWipeResponder {
8163 control_handle: std::mem::ManuallyDrop<SysconfigControlHandle>,
8164 tx_id: u32,
8165}
8166
8167impl std::ops::Drop for SysconfigWipeResponder {
8171 fn drop(&mut self) {
8172 self.control_handle.shutdown();
8173 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8175 }
8176}
8177
8178impl fidl::endpoints::Responder for SysconfigWipeResponder {
8179 type ControlHandle = SysconfigControlHandle;
8180
8181 fn control_handle(&self) -> &SysconfigControlHandle {
8182 &self.control_handle
8183 }
8184
8185 fn drop_without_shutdown(mut self) {
8186 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
8188 std::mem::forget(self);
8190 }
8191}
8192
8193impl SysconfigWipeResponder {
8194 pub fn send(self, mut status: i32) -> Result<(), fidl::Error> {
8198 let _result = self.send_raw(status);
8199 if _result.is_err() {
8200 self.control_handle.shutdown();
8201 }
8202 self.drop_without_shutdown();
8203 _result
8204 }
8205
8206 pub fn send_no_shutdown_on_err(self, mut status: i32) -> Result<(), fidl::Error> {
8208 let _result = self.send_raw(status);
8209 self.drop_without_shutdown();
8210 _result
8211 }
8212
8213 fn send_raw(&self, mut status: i32) -> Result<(), fidl::Error> {
8214 self.control_handle.inner.send::<SysconfigWipeResponse>(
8215 (status,),
8216 self.tx_id,
8217 0x34a634965ebfb702,
8218 fidl::encoding::DynamicFlags::empty(),
8219 )
8220 }
8221}
8222
8223mod internal {
8224 use super::*;
8225
8226 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareRequest {
8227 type Borrowed<'a> = &'a mut Self;
8228 fn take_or_borrow<'a>(
8229 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8230 ) -> Self::Borrowed<'a> {
8231 value
8232 }
8233 }
8234
8235 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareRequest {
8236 type Owned = Self;
8237
8238 #[inline(always)]
8239 fn inline_align(_context: fidl::encoding::Context) -> usize {
8240 8
8241 }
8242
8243 #[inline(always)]
8244 fn inline_size(_context: fidl::encoding::Context) -> usize {
8245 24
8246 }
8247 }
8248
8249 unsafe impl
8250 fidl::encoding::Encode<
8251 DataSinkReadFirmwareRequest,
8252 fidl::encoding::DefaultFuchsiaResourceDialect,
8253 > for &mut DataSinkReadFirmwareRequest
8254 {
8255 #[inline]
8256 unsafe fn encode(
8257 self,
8258 encoder: &mut fidl::encoding::Encoder<
8259 '_,
8260 fidl::encoding::DefaultFuchsiaResourceDialect,
8261 >,
8262 offset: usize,
8263 _depth: fidl::encoding::Depth,
8264 ) -> fidl::Result<()> {
8265 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8266 fidl::encoding::Encode::<
8268 DataSinkReadFirmwareRequest,
8269 fidl::encoding::DefaultFuchsiaResourceDialect,
8270 >::encode(
8271 (
8272 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8273 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(
8274 &self.type_,
8275 ),
8276 ),
8277 encoder,
8278 offset,
8279 _depth,
8280 )
8281 }
8282 }
8283 unsafe impl<
8284 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8285 T1: fidl::encoding::Encode<
8286 fidl::encoding::BoundedString<256>,
8287 fidl::encoding::DefaultFuchsiaResourceDialect,
8288 >,
8289 >
8290 fidl::encoding::Encode<
8291 DataSinkReadFirmwareRequest,
8292 fidl::encoding::DefaultFuchsiaResourceDialect,
8293 > for (T0, T1)
8294 {
8295 #[inline]
8296 unsafe fn encode(
8297 self,
8298 encoder: &mut fidl::encoding::Encoder<
8299 '_,
8300 fidl::encoding::DefaultFuchsiaResourceDialect,
8301 >,
8302 offset: usize,
8303 depth: fidl::encoding::Depth,
8304 ) -> fidl::Result<()> {
8305 encoder.debug_check_bounds::<DataSinkReadFirmwareRequest>(offset);
8306 unsafe {
8309 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8310 (ptr as *mut u64).write_unaligned(0);
8311 }
8312 self.0.encode(encoder, offset + 0, depth)?;
8314 self.1.encode(encoder, offset + 8, depth)?;
8315 Ok(())
8316 }
8317 }
8318
8319 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8320 for DataSinkReadFirmwareRequest
8321 {
8322 #[inline(always)]
8323 fn new_empty() -> Self {
8324 Self {
8325 configuration: fidl::new_empty!(
8326 Configuration,
8327 fidl::encoding::DefaultFuchsiaResourceDialect
8328 ),
8329 type_: fidl::new_empty!(
8330 fidl::encoding::BoundedString<256>,
8331 fidl::encoding::DefaultFuchsiaResourceDialect
8332 ),
8333 }
8334 }
8335
8336 #[inline]
8337 unsafe fn decode(
8338 &mut self,
8339 decoder: &mut fidl::encoding::Decoder<
8340 '_,
8341 fidl::encoding::DefaultFuchsiaResourceDialect,
8342 >,
8343 offset: usize,
8344 _depth: fidl::encoding::Depth,
8345 ) -> fidl::Result<()> {
8346 decoder.debug_check_bounds::<Self>(offset);
8347 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8349 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8350 let mask = 0xffffffff00000000u64;
8351 let maskedval = padval & mask;
8352 if maskedval != 0 {
8353 return Err(fidl::Error::NonZeroPadding {
8354 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8355 });
8356 }
8357 fidl::decode!(
8358 Configuration,
8359 fidl::encoding::DefaultFuchsiaResourceDialect,
8360 &mut self.configuration,
8361 decoder,
8362 offset + 0,
8363 _depth
8364 )?;
8365 fidl::decode!(
8366 fidl::encoding::BoundedString<256>,
8367 fidl::encoding::DefaultFuchsiaResourceDialect,
8368 &mut self.type_,
8369 decoder,
8370 offset + 8,
8371 _depth
8372 )?;
8373 Ok(())
8374 }
8375 }
8376
8377 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteAssetRequest {
8378 type Borrowed<'a> = &'a mut Self;
8379 fn take_or_borrow<'a>(
8380 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8381 ) -> Self::Borrowed<'a> {
8382 value
8383 }
8384 }
8385
8386 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteAssetRequest {
8387 type Owned = Self;
8388
8389 #[inline(always)]
8390 fn inline_align(_context: fidl::encoding::Context) -> usize {
8391 8
8392 }
8393
8394 #[inline(always)]
8395 fn inline_size(_context: fidl::encoding::Context) -> usize {
8396 24
8397 }
8398 }
8399
8400 unsafe impl
8401 fidl::encoding::Encode<
8402 DataSinkWriteAssetRequest,
8403 fidl::encoding::DefaultFuchsiaResourceDialect,
8404 > for &mut DataSinkWriteAssetRequest
8405 {
8406 #[inline]
8407 unsafe fn encode(
8408 self,
8409 encoder: &mut fidl::encoding::Encoder<
8410 '_,
8411 fidl::encoding::DefaultFuchsiaResourceDialect,
8412 >,
8413 offset: usize,
8414 _depth: fidl::encoding::Depth,
8415 ) -> fidl::Result<()> {
8416 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8417 fidl::encoding::Encode::<DataSinkWriteAssetRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8419 (
8420 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8421 <Asset as fidl::encoding::ValueTypeMarker>::borrow(&self.asset),
8422 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8423 ),
8424 encoder, offset, _depth
8425 )
8426 }
8427 }
8428 unsafe impl<
8429 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8430 T1: fidl::encoding::Encode<Asset, fidl::encoding::DefaultFuchsiaResourceDialect>,
8431 T2: fidl::encoding::Encode<
8432 fidl_fuchsia_mem::Buffer,
8433 fidl::encoding::DefaultFuchsiaResourceDialect,
8434 >,
8435 >
8436 fidl::encoding::Encode<
8437 DataSinkWriteAssetRequest,
8438 fidl::encoding::DefaultFuchsiaResourceDialect,
8439 > for (T0, T1, T2)
8440 {
8441 #[inline]
8442 unsafe fn encode(
8443 self,
8444 encoder: &mut fidl::encoding::Encoder<
8445 '_,
8446 fidl::encoding::DefaultFuchsiaResourceDialect,
8447 >,
8448 offset: usize,
8449 depth: fidl::encoding::Depth,
8450 ) -> fidl::Result<()> {
8451 encoder.debug_check_bounds::<DataSinkWriteAssetRequest>(offset);
8452 self.0.encode(encoder, offset + 0, depth)?;
8456 self.1.encode(encoder, offset + 4, depth)?;
8457 self.2.encode(encoder, offset + 8, depth)?;
8458 Ok(())
8459 }
8460 }
8461
8462 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8463 for DataSinkWriteAssetRequest
8464 {
8465 #[inline(always)]
8466 fn new_empty() -> Self {
8467 Self {
8468 configuration: fidl::new_empty!(
8469 Configuration,
8470 fidl::encoding::DefaultFuchsiaResourceDialect
8471 ),
8472 asset: fidl::new_empty!(Asset, fidl::encoding::DefaultFuchsiaResourceDialect),
8473 payload: fidl::new_empty!(
8474 fidl_fuchsia_mem::Buffer,
8475 fidl::encoding::DefaultFuchsiaResourceDialect
8476 ),
8477 }
8478 }
8479
8480 #[inline]
8481 unsafe fn decode(
8482 &mut self,
8483 decoder: &mut fidl::encoding::Decoder<
8484 '_,
8485 fidl::encoding::DefaultFuchsiaResourceDialect,
8486 >,
8487 offset: usize,
8488 _depth: fidl::encoding::Depth,
8489 ) -> fidl::Result<()> {
8490 decoder.debug_check_bounds::<Self>(offset);
8491 fidl::decode!(
8493 Configuration,
8494 fidl::encoding::DefaultFuchsiaResourceDialect,
8495 &mut self.configuration,
8496 decoder,
8497 offset + 0,
8498 _depth
8499 )?;
8500 fidl::decode!(
8501 Asset,
8502 fidl::encoding::DefaultFuchsiaResourceDialect,
8503 &mut self.asset,
8504 decoder,
8505 offset + 4,
8506 _depth
8507 )?;
8508 fidl::decode!(
8509 fidl_fuchsia_mem::Buffer,
8510 fidl::encoding::DefaultFuchsiaResourceDialect,
8511 &mut self.payload,
8512 decoder,
8513 offset + 8,
8514 _depth
8515 )?;
8516 Ok(())
8517 }
8518 }
8519
8520 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteFirmwareRequest {
8521 type Borrowed<'a> = &'a mut Self;
8522 fn take_or_borrow<'a>(
8523 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8524 ) -> Self::Borrowed<'a> {
8525 value
8526 }
8527 }
8528
8529 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteFirmwareRequest {
8530 type Owned = Self;
8531
8532 #[inline(always)]
8533 fn inline_align(_context: fidl::encoding::Context) -> usize {
8534 8
8535 }
8536
8537 #[inline(always)]
8538 fn inline_size(_context: fidl::encoding::Context) -> usize {
8539 40
8540 }
8541 }
8542
8543 unsafe impl
8544 fidl::encoding::Encode<
8545 DataSinkWriteFirmwareRequest,
8546 fidl::encoding::DefaultFuchsiaResourceDialect,
8547 > for &mut DataSinkWriteFirmwareRequest
8548 {
8549 #[inline]
8550 unsafe fn encode(
8551 self,
8552 encoder: &mut fidl::encoding::Encoder<
8553 '_,
8554 fidl::encoding::DefaultFuchsiaResourceDialect,
8555 >,
8556 offset: usize,
8557 _depth: fidl::encoding::Depth,
8558 ) -> fidl::Result<()> {
8559 encoder.debug_check_bounds::<DataSinkWriteFirmwareRequest>(offset);
8560 fidl::encoding::Encode::<DataSinkWriteFirmwareRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8562 (
8563 <Configuration as fidl::encoding::ValueTypeMarker>::borrow(&self.configuration),
8564 <fidl::encoding::BoundedString<256> as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
8565 <fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8566 ),
8567 encoder, offset, _depth
8568 )
8569 }
8570 }
8571 unsafe impl<
8572 T0: fidl::encoding::Encode<Configuration, fidl::encoding::DefaultFuchsiaResourceDialect>,
8573 T1: fidl::encoding::Encode<
8574 fidl::encoding::BoundedString<256>,
8575 fidl::encoding::DefaultFuchsiaResourceDialect,
8576 >,
8577 T2: fidl::encoding::Encode<
8578 fidl_fuchsia_mem::Buffer,
8579 fidl::encoding::DefaultFuchsiaResourceDialect,
8580 >,
8581 >
8582 fidl::encoding::Encode<
8583 DataSinkWriteFirmwareRequest,
8584 fidl::encoding::DefaultFuchsiaResourceDialect,
8585 > for (T0, T1, T2)
8586 {
8587 #[inline]
8588 unsafe fn encode(
8589 self,
8590 encoder: &mut fidl::encoding::Encoder<
8591 '_,
8592 fidl::encoding::DefaultFuchsiaResourceDialect,
8593 >,
8594 offset: usize,
8595 depth: fidl::encoding::Depth,
8596 ) -> fidl::Result<()> {
8597 encoder.debug_check_bounds::<DataSinkWriteFirmwareRequest>(offset);
8598 unsafe {
8601 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
8602 (ptr as *mut u64).write_unaligned(0);
8603 }
8604 self.0.encode(encoder, offset + 0, depth)?;
8606 self.1.encode(encoder, offset + 8, depth)?;
8607 self.2.encode(encoder, offset + 24, depth)?;
8608 Ok(())
8609 }
8610 }
8611
8612 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8613 for DataSinkWriteFirmwareRequest
8614 {
8615 #[inline(always)]
8616 fn new_empty() -> Self {
8617 Self {
8618 configuration: fidl::new_empty!(
8619 Configuration,
8620 fidl::encoding::DefaultFuchsiaResourceDialect
8621 ),
8622 type_: fidl::new_empty!(
8623 fidl::encoding::BoundedString<256>,
8624 fidl::encoding::DefaultFuchsiaResourceDialect
8625 ),
8626 payload: fidl::new_empty!(
8627 fidl_fuchsia_mem::Buffer,
8628 fidl::encoding::DefaultFuchsiaResourceDialect
8629 ),
8630 }
8631 }
8632
8633 #[inline]
8634 unsafe fn decode(
8635 &mut self,
8636 decoder: &mut fidl::encoding::Decoder<
8637 '_,
8638 fidl::encoding::DefaultFuchsiaResourceDialect,
8639 >,
8640 offset: usize,
8641 _depth: fidl::encoding::Depth,
8642 ) -> fidl::Result<()> {
8643 decoder.debug_check_bounds::<Self>(offset);
8644 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
8646 let padval = unsafe { (ptr as *const u64).read_unaligned() };
8647 let mask = 0xffffffff00000000u64;
8648 let maskedval = padval & mask;
8649 if maskedval != 0 {
8650 return Err(fidl::Error::NonZeroPadding {
8651 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
8652 });
8653 }
8654 fidl::decode!(
8655 Configuration,
8656 fidl::encoding::DefaultFuchsiaResourceDialect,
8657 &mut self.configuration,
8658 decoder,
8659 offset + 0,
8660 _depth
8661 )?;
8662 fidl::decode!(
8663 fidl::encoding::BoundedString<256>,
8664 fidl::encoding::DefaultFuchsiaResourceDialect,
8665 &mut self.type_,
8666 decoder,
8667 offset + 8,
8668 _depth
8669 )?;
8670 fidl::decode!(
8671 fidl_fuchsia_mem::Buffer,
8672 fidl::encoding::DefaultFuchsiaResourceDialect,
8673 &mut self.payload,
8674 decoder,
8675 offset + 24,
8676 _depth
8677 )?;
8678 Ok(())
8679 }
8680 }
8681
8682 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteOpaqueVolumeRequest {
8683 type Borrowed<'a> = &'a mut Self;
8684 fn take_or_borrow<'a>(
8685 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8686 ) -> Self::Borrowed<'a> {
8687 value
8688 }
8689 }
8690
8691 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteOpaqueVolumeRequest {
8692 type Owned = Self;
8693
8694 #[inline(always)]
8695 fn inline_align(_context: fidl::encoding::Context) -> usize {
8696 8
8697 }
8698
8699 #[inline(always)]
8700 fn inline_size(_context: fidl::encoding::Context) -> usize {
8701 16
8702 }
8703 }
8704
8705 unsafe impl
8706 fidl::encoding::Encode<
8707 DataSinkWriteOpaqueVolumeRequest,
8708 fidl::encoding::DefaultFuchsiaResourceDialect,
8709 > for &mut DataSinkWriteOpaqueVolumeRequest
8710 {
8711 #[inline]
8712 unsafe fn encode(
8713 self,
8714 encoder: &mut fidl::encoding::Encoder<
8715 '_,
8716 fidl::encoding::DefaultFuchsiaResourceDialect,
8717 >,
8718 offset: usize,
8719 _depth: fidl::encoding::Depth,
8720 ) -> fidl::Result<()> {
8721 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8722 fidl::encoding::Encode::<
8724 DataSinkWriteOpaqueVolumeRequest,
8725 fidl::encoding::DefaultFuchsiaResourceDialect,
8726 >::encode(
8727 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8728 &mut self.payload,
8729 ),),
8730 encoder,
8731 offset,
8732 _depth,
8733 )
8734 }
8735 }
8736 unsafe impl<
8737 T0: fidl::encoding::Encode<
8738 fidl_fuchsia_mem::Buffer,
8739 fidl::encoding::DefaultFuchsiaResourceDialect,
8740 >,
8741 >
8742 fidl::encoding::Encode<
8743 DataSinkWriteOpaqueVolumeRequest,
8744 fidl::encoding::DefaultFuchsiaResourceDialect,
8745 > for (T0,)
8746 {
8747 #[inline]
8748 unsafe fn encode(
8749 self,
8750 encoder: &mut fidl::encoding::Encoder<
8751 '_,
8752 fidl::encoding::DefaultFuchsiaResourceDialect,
8753 >,
8754 offset: usize,
8755 depth: fidl::encoding::Depth,
8756 ) -> fidl::Result<()> {
8757 encoder.debug_check_bounds::<DataSinkWriteOpaqueVolumeRequest>(offset);
8758 self.0.encode(encoder, offset + 0, depth)?;
8762 Ok(())
8763 }
8764 }
8765
8766 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8767 for DataSinkWriteOpaqueVolumeRequest
8768 {
8769 #[inline(always)]
8770 fn new_empty() -> Self {
8771 Self {
8772 payload: fidl::new_empty!(
8773 fidl_fuchsia_mem::Buffer,
8774 fidl::encoding::DefaultFuchsiaResourceDialect
8775 ),
8776 }
8777 }
8778
8779 #[inline]
8780 unsafe fn decode(
8781 &mut self,
8782 decoder: &mut fidl::encoding::Decoder<
8783 '_,
8784 fidl::encoding::DefaultFuchsiaResourceDialect,
8785 >,
8786 offset: usize,
8787 _depth: fidl::encoding::Depth,
8788 ) -> fidl::Result<()> {
8789 decoder.debug_check_bounds::<Self>(offset);
8790 fidl::decode!(
8792 fidl_fuchsia_mem::Buffer,
8793 fidl::encoding::DefaultFuchsiaResourceDialect,
8794 &mut self.payload,
8795 decoder,
8796 offset + 0,
8797 _depth
8798 )?;
8799 Ok(())
8800 }
8801 }
8802
8803 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteSparseVolumeRequest {
8804 type Borrowed<'a> = &'a mut Self;
8805 fn take_or_borrow<'a>(
8806 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8807 ) -> Self::Borrowed<'a> {
8808 value
8809 }
8810 }
8811
8812 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteSparseVolumeRequest {
8813 type Owned = Self;
8814
8815 #[inline(always)]
8816 fn inline_align(_context: fidl::encoding::Context) -> usize {
8817 8
8818 }
8819
8820 #[inline(always)]
8821 fn inline_size(_context: fidl::encoding::Context) -> usize {
8822 16
8823 }
8824 }
8825
8826 unsafe impl
8827 fidl::encoding::Encode<
8828 DataSinkWriteSparseVolumeRequest,
8829 fidl::encoding::DefaultFuchsiaResourceDialect,
8830 > for &mut DataSinkWriteSparseVolumeRequest
8831 {
8832 #[inline]
8833 unsafe fn encode(
8834 self,
8835 encoder: &mut fidl::encoding::Encoder<
8836 '_,
8837 fidl::encoding::DefaultFuchsiaResourceDialect,
8838 >,
8839 offset: usize,
8840 _depth: fidl::encoding::Depth,
8841 ) -> fidl::Result<()> {
8842 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8843 fidl::encoding::Encode::<
8845 DataSinkWriteSparseVolumeRequest,
8846 fidl::encoding::DefaultFuchsiaResourceDialect,
8847 >::encode(
8848 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
8849 &mut self.payload,
8850 ),),
8851 encoder,
8852 offset,
8853 _depth,
8854 )
8855 }
8856 }
8857 unsafe impl<
8858 T0: fidl::encoding::Encode<
8859 fidl_fuchsia_mem::Buffer,
8860 fidl::encoding::DefaultFuchsiaResourceDialect,
8861 >,
8862 >
8863 fidl::encoding::Encode<
8864 DataSinkWriteSparseVolumeRequest,
8865 fidl::encoding::DefaultFuchsiaResourceDialect,
8866 > for (T0,)
8867 {
8868 #[inline]
8869 unsafe fn encode(
8870 self,
8871 encoder: &mut fidl::encoding::Encoder<
8872 '_,
8873 fidl::encoding::DefaultFuchsiaResourceDialect,
8874 >,
8875 offset: usize,
8876 depth: fidl::encoding::Depth,
8877 ) -> fidl::Result<()> {
8878 encoder.debug_check_bounds::<DataSinkWriteSparseVolumeRequest>(offset);
8879 self.0.encode(encoder, offset + 0, depth)?;
8883 Ok(())
8884 }
8885 }
8886
8887 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
8888 for DataSinkWriteSparseVolumeRequest
8889 {
8890 #[inline(always)]
8891 fn new_empty() -> Self {
8892 Self {
8893 payload: fidl::new_empty!(
8894 fidl_fuchsia_mem::Buffer,
8895 fidl::encoding::DefaultFuchsiaResourceDialect
8896 ),
8897 }
8898 }
8899
8900 #[inline]
8901 unsafe fn decode(
8902 &mut self,
8903 decoder: &mut fidl::encoding::Decoder<
8904 '_,
8905 fidl::encoding::DefaultFuchsiaResourceDialect,
8906 >,
8907 offset: usize,
8908 _depth: fidl::encoding::Depth,
8909 ) -> fidl::Result<()> {
8910 decoder.debug_check_bounds::<Self>(offset);
8911 fidl::decode!(
8913 fidl_fuchsia_mem::Buffer,
8914 fidl::encoding::DefaultFuchsiaResourceDialect,
8915 &mut self.payload,
8916 decoder,
8917 offset + 0,
8918 _depth
8919 )?;
8920 Ok(())
8921 }
8922 }
8923
8924 impl fidl::encoding::ResourceTypeMarker for DataSinkWriteVolumesRequest {
8925 type Borrowed<'a> = &'a mut Self;
8926 fn take_or_borrow<'a>(
8927 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
8928 ) -> Self::Borrowed<'a> {
8929 value
8930 }
8931 }
8932
8933 unsafe impl fidl::encoding::TypeMarker for DataSinkWriteVolumesRequest {
8934 type Owned = Self;
8935
8936 #[inline(always)]
8937 fn inline_align(_context: fidl::encoding::Context) -> usize {
8938 4
8939 }
8940
8941 #[inline(always)]
8942 fn inline_size(_context: fidl::encoding::Context) -> usize {
8943 4
8944 }
8945 }
8946
8947 unsafe impl
8948 fidl::encoding::Encode<
8949 DataSinkWriteVolumesRequest,
8950 fidl::encoding::DefaultFuchsiaResourceDialect,
8951 > for &mut DataSinkWriteVolumesRequest
8952 {
8953 #[inline]
8954 unsafe fn encode(
8955 self,
8956 encoder: &mut fidl::encoding::Encoder<
8957 '_,
8958 fidl::encoding::DefaultFuchsiaResourceDialect,
8959 >,
8960 offset: usize,
8961 _depth: fidl::encoding::Depth,
8962 ) -> fidl::Result<()> {
8963 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8964 fidl::encoding::Encode::<DataSinkWriteVolumesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
8966 (
8967 <fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
8968 ),
8969 encoder, offset, _depth
8970 )
8971 }
8972 }
8973 unsafe impl<
8974 T0: fidl::encoding::Encode<
8975 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
8976 fidl::encoding::DefaultFuchsiaResourceDialect,
8977 >,
8978 >
8979 fidl::encoding::Encode<
8980 DataSinkWriteVolumesRequest,
8981 fidl::encoding::DefaultFuchsiaResourceDialect,
8982 > for (T0,)
8983 {
8984 #[inline]
8985 unsafe fn encode(
8986 self,
8987 encoder: &mut fidl::encoding::Encoder<
8988 '_,
8989 fidl::encoding::DefaultFuchsiaResourceDialect,
8990 >,
8991 offset: usize,
8992 depth: fidl::encoding::Depth,
8993 ) -> fidl::Result<()> {
8994 encoder.debug_check_bounds::<DataSinkWriteVolumesRequest>(offset);
8995 self.0.encode(encoder, offset + 0, depth)?;
8999 Ok(())
9000 }
9001 }
9002
9003 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9004 for DataSinkWriteVolumesRequest
9005 {
9006 #[inline(always)]
9007 fn new_empty() -> Self {
9008 Self {
9009 payload: fidl::new_empty!(
9010 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
9011 fidl::encoding::DefaultFuchsiaResourceDialect
9012 ),
9013 }
9014 }
9015
9016 #[inline]
9017 unsafe fn decode(
9018 &mut self,
9019 decoder: &mut fidl::encoding::Decoder<
9020 '_,
9021 fidl::encoding::DefaultFuchsiaResourceDialect,
9022 >,
9023 offset: usize,
9024 _depth: fidl::encoding::Depth,
9025 ) -> fidl::Result<()> {
9026 decoder.debug_check_bounds::<Self>(offset);
9027 fidl::decode!(
9029 fidl::encoding::Endpoint<fidl::endpoints::ClientEnd<PayloadStreamMarker>>,
9030 fidl::encoding::DefaultFuchsiaResourceDialect,
9031 &mut self.payload,
9032 decoder,
9033 offset + 0,
9034 _depth
9035 )?;
9036 Ok(())
9037 }
9038 }
9039
9040 impl fidl::encoding::ResourceTypeMarker for DataSinkReadAssetResponse {
9041 type Borrowed<'a> = &'a mut Self;
9042 fn take_or_borrow<'a>(
9043 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9044 ) -> Self::Borrowed<'a> {
9045 value
9046 }
9047 }
9048
9049 unsafe impl fidl::encoding::TypeMarker for DataSinkReadAssetResponse {
9050 type Owned = Self;
9051
9052 #[inline(always)]
9053 fn inline_align(_context: fidl::encoding::Context) -> usize {
9054 8
9055 }
9056
9057 #[inline(always)]
9058 fn inline_size(_context: fidl::encoding::Context) -> usize {
9059 16
9060 }
9061 }
9062
9063 unsafe impl
9064 fidl::encoding::Encode<
9065 DataSinkReadAssetResponse,
9066 fidl::encoding::DefaultFuchsiaResourceDialect,
9067 > for &mut DataSinkReadAssetResponse
9068 {
9069 #[inline]
9070 unsafe fn encode(
9071 self,
9072 encoder: &mut fidl::encoding::Encoder<
9073 '_,
9074 fidl::encoding::DefaultFuchsiaResourceDialect,
9075 >,
9076 offset: usize,
9077 _depth: fidl::encoding::Depth,
9078 ) -> fidl::Result<()> {
9079 encoder.debug_check_bounds::<DataSinkReadAssetResponse>(offset);
9080 fidl::encoding::Encode::<
9082 DataSinkReadAssetResponse,
9083 fidl::encoding::DefaultFuchsiaResourceDialect,
9084 >::encode(
9085 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9086 &mut self.asset,
9087 ),),
9088 encoder,
9089 offset,
9090 _depth,
9091 )
9092 }
9093 }
9094 unsafe impl<
9095 T0: fidl::encoding::Encode<
9096 fidl_fuchsia_mem::Buffer,
9097 fidl::encoding::DefaultFuchsiaResourceDialect,
9098 >,
9099 >
9100 fidl::encoding::Encode<
9101 DataSinkReadAssetResponse,
9102 fidl::encoding::DefaultFuchsiaResourceDialect,
9103 > for (T0,)
9104 {
9105 #[inline]
9106 unsafe fn encode(
9107 self,
9108 encoder: &mut fidl::encoding::Encoder<
9109 '_,
9110 fidl::encoding::DefaultFuchsiaResourceDialect,
9111 >,
9112 offset: usize,
9113 depth: fidl::encoding::Depth,
9114 ) -> fidl::Result<()> {
9115 encoder.debug_check_bounds::<DataSinkReadAssetResponse>(offset);
9116 self.0.encode(encoder, offset + 0, depth)?;
9120 Ok(())
9121 }
9122 }
9123
9124 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9125 for DataSinkReadAssetResponse
9126 {
9127 #[inline(always)]
9128 fn new_empty() -> Self {
9129 Self {
9130 asset: fidl::new_empty!(
9131 fidl_fuchsia_mem::Buffer,
9132 fidl::encoding::DefaultFuchsiaResourceDialect
9133 ),
9134 }
9135 }
9136
9137 #[inline]
9138 unsafe fn decode(
9139 &mut self,
9140 decoder: &mut fidl::encoding::Decoder<
9141 '_,
9142 fidl::encoding::DefaultFuchsiaResourceDialect,
9143 >,
9144 offset: usize,
9145 _depth: fidl::encoding::Depth,
9146 ) -> fidl::Result<()> {
9147 decoder.debug_check_bounds::<Self>(offset);
9148 fidl::decode!(
9150 fidl_fuchsia_mem::Buffer,
9151 fidl::encoding::DefaultFuchsiaResourceDialect,
9152 &mut self.asset,
9153 decoder,
9154 offset + 0,
9155 _depth
9156 )?;
9157 Ok(())
9158 }
9159 }
9160
9161 impl fidl::encoding::ResourceTypeMarker for DataSinkReadFirmwareResponse {
9162 type Borrowed<'a> = &'a mut Self;
9163 fn take_or_borrow<'a>(
9164 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9165 ) -> Self::Borrowed<'a> {
9166 value
9167 }
9168 }
9169
9170 unsafe impl fidl::encoding::TypeMarker for DataSinkReadFirmwareResponse {
9171 type Owned = Self;
9172
9173 #[inline(always)]
9174 fn inline_align(_context: fidl::encoding::Context) -> usize {
9175 8
9176 }
9177
9178 #[inline(always)]
9179 fn inline_size(_context: fidl::encoding::Context) -> usize {
9180 16
9181 }
9182 }
9183
9184 unsafe impl
9185 fidl::encoding::Encode<
9186 DataSinkReadFirmwareResponse,
9187 fidl::encoding::DefaultFuchsiaResourceDialect,
9188 > for &mut DataSinkReadFirmwareResponse
9189 {
9190 #[inline]
9191 unsafe fn encode(
9192 self,
9193 encoder: &mut fidl::encoding::Encoder<
9194 '_,
9195 fidl::encoding::DefaultFuchsiaResourceDialect,
9196 >,
9197 offset: usize,
9198 _depth: fidl::encoding::Depth,
9199 ) -> fidl::Result<()> {
9200 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9201 fidl::encoding::Encode::<
9203 DataSinkReadFirmwareResponse,
9204 fidl::encoding::DefaultFuchsiaResourceDialect,
9205 >::encode(
9206 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9207 &mut self.firmware,
9208 ),),
9209 encoder,
9210 offset,
9211 _depth,
9212 )
9213 }
9214 }
9215 unsafe impl<
9216 T0: fidl::encoding::Encode<
9217 fidl_fuchsia_mem::Buffer,
9218 fidl::encoding::DefaultFuchsiaResourceDialect,
9219 >,
9220 >
9221 fidl::encoding::Encode<
9222 DataSinkReadFirmwareResponse,
9223 fidl::encoding::DefaultFuchsiaResourceDialect,
9224 > for (T0,)
9225 {
9226 #[inline]
9227 unsafe fn encode(
9228 self,
9229 encoder: &mut fidl::encoding::Encoder<
9230 '_,
9231 fidl::encoding::DefaultFuchsiaResourceDialect,
9232 >,
9233 offset: usize,
9234 depth: fidl::encoding::Depth,
9235 ) -> fidl::Result<()> {
9236 encoder.debug_check_bounds::<DataSinkReadFirmwareResponse>(offset);
9237 self.0.encode(encoder, offset + 0, depth)?;
9241 Ok(())
9242 }
9243 }
9244
9245 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9246 for DataSinkReadFirmwareResponse
9247 {
9248 #[inline(always)]
9249 fn new_empty() -> Self {
9250 Self {
9251 firmware: fidl::new_empty!(
9252 fidl_fuchsia_mem::Buffer,
9253 fidl::encoding::DefaultFuchsiaResourceDialect
9254 ),
9255 }
9256 }
9257
9258 #[inline]
9259 unsafe fn decode(
9260 &mut self,
9261 decoder: &mut fidl::encoding::Decoder<
9262 '_,
9263 fidl::encoding::DefaultFuchsiaResourceDialect,
9264 >,
9265 offset: usize,
9266 _depth: fidl::encoding::Depth,
9267 ) -> fidl::Result<()> {
9268 decoder.debug_check_bounds::<Self>(offset);
9269 fidl::decode!(
9271 fidl_fuchsia_mem::Buffer,
9272 fidl::encoding::DefaultFuchsiaResourceDialect,
9273 &mut self.firmware,
9274 decoder,
9275 offset + 0,
9276 _depth
9277 )?;
9278 Ok(())
9279 }
9280 }
9281
9282 impl fidl::encoding::ResourceTypeMarker for PaverFindBootManagerRequest {
9283 type Borrowed<'a> = &'a mut Self;
9284 fn take_or_borrow<'a>(
9285 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9286 ) -> Self::Borrowed<'a> {
9287 value
9288 }
9289 }
9290
9291 unsafe impl fidl::encoding::TypeMarker for PaverFindBootManagerRequest {
9292 type Owned = Self;
9293
9294 #[inline(always)]
9295 fn inline_align(_context: fidl::encoding::Context) -> usize {
9296 4
9297 }
9298
9299 #[inline(always)]
9300 fn inline_size(_context: fidl::encoding::Context) -> usize {
9301 4
9302 }
9303 }
9304
9305 unsafe impl
9306 fidl::encoding::Encode<
9307 PaverFindBootManagerRequest,
9308 fidl::encoding::DefaultFuchsiaResourceDialect,
9309 > for &mut PaverFindBootManagerRequest
9310 {
9311 #[inline]
9312 unsafe fn encode(
9313 self,
9314 encoder: &mut fidl::encoding::Encoder<
9315 '_,
9316 fidl::encoding::DefaultFuchsiaResourceDialect,
9317 >,
9318 offset: usize,
9319 _depth: fidl::encoding::Depth,
9320 ) -> fidl::Result<()> {
9321 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9322 fidl::encoding::Encode::<PaverFindBootManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9324 (
9325 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.boot_manager),
9326 ),
9327 encoder, offset, _depth
9328 )
9329 }
9330 }
9331 unsafe impl<
9332 T0: fidl::encoding::Encode<
9333 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9334 fidl::encoding::DefaultFuchsiaResourceDialect,
9335 >,
9336 >
9337 fidl::encoding::Encode<
9338 PaverFindBootManagerRequest,
9339 fidl::encoding::DefaultFuchsiaResourceDialect,
9340 > for (T0,)
9341 {
9342 #[inline]
9343 unsafe fn encode(
9344 self,
9345 encoder: &mut fidl::encoding::Encoder<
9346 '_,
9347 fidl::encoding::DefaultFuchsiaResourceDialect,
9348 >,
9349 offset: usize,
9350 depth: fidl::encoding::Depth,
9351 ) -> fidl::Result<()> {
9352 encoder.debug_check_bounds::<PaverFindBootManagerRequest>(offset);
9353 self.0.encode(encoder, offset + 0, depth)?;
9357 Ok(())
9358 }
9359 }
9360
9361 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9362 for PaverFindBootManagerRequest
9363 {
9364 #[inline(always)]
9365 fn new_empty() -> Self {
9366 Self {
9367 boot_manager: fidl::new_empty!(
9368 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9369 fidl::encoding::DefaultFuchsiaResourceDialect
9370 ),
9371 }
9372 }
9373
9374 #[inline]
9375 unsafe fn decode(
9376 &mut self,
9377 decoder: &mut fidl::encoding::Decoder<
9378 '_,
9379 fidl::encoding::DefaultFuchsiaResourceDialect,
9380 >,
9381 offset: usize,
9382 _depth: fidl::encoding::Depth,
9383 ) -> fidl::Result<()> {
9384 decoder.debug_check_bounds::<Self>(offset);
9385 fidl::decode!(
9387 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<BootManagerMarker>>,
9388 fidl::encoding::DefaultFuchsiaResourceDialect,
9389 &mut self.boot_manager,
9390 decoder,
9391 offset + 0,
9392 _depth
9393 )?;
9394 Ok(())
9395 }
9396 }
9397
9398 impl fidl::encoding::ResourceTypeMarker for PaverFindDataSinkRequest {
9399 type Borrowed<'a> = &'a mut Self;
9400 fn take_or_borrow<'a>(
9401 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9402 ) -> Self::Borrowed<'a> {
9403 value
9404 }
9405 }
9406
9407 unsafe impl fidl::encoding::TypeMarker for PaverFindDataSinkRequest {
9408 type Owned = Self;
9409
9410 #[inline(always)]
9411 fn inline_align(_context: fidl::encoding::Context) -> usize {
9412 4
9413 }
9414
9415 #[inline(always)]
9416 fn inline_size(_context: fidl::encoding::Context) -> usize {
9417 4
9418 }
9419 }
9420
9421 unsafe impl
9422 fidl::encoding::Encode<
9423 PaverFindDataSinkRequest,
9424 fidl::encoding::DefaultFuchsiaResourceDialect,
9425 > for &mut PaverFindDataSinkRequest
9426 {
9427 #[inline]
9428 unsafe fn encode(
9429 self,
9430 encoder: &mut fidl::encoding::Encoder<
9431 '_,
9432 fidl::encoding::DefaultFuchsiaResourceDialect,
9433 >,
9434 offset: usize,
9435 _depth: fidl::encoding::Depth,
9436 ) -> fidl::Result<()> {
9437 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9438 fidl::encoding::Encode::<PaverFindDataSinkRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9440 (
9441 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9442 ),
9443 encoder, offset, _depth
9444 )
9445 }
9446 }
9447 unsafe impl<
9448 T0: fidl::encoding::Encode<
9449 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9450 fidl::encoding::DefaultFuchsiaResourceDialect,
9451 >,
9452 >
9453 fidl::encoding::Encode<
9454 PaverFindDataSinkRequest,
9455 fidl::encoding::DefaultFuchsiaResourceDialect,
9456 > for (T0,)
9457 {
9458 #[inline]
9459 unsafe fn encode(
9460 self,
9461 encoder: &mut fidl::encoding::Encoder<
9462 '_,
9463 fidl::encoding::DefaultFuchsiaResourceDialect,
9464 >,
9465 offset: usize,
9466 depth: fidl::encoding::Depth,
9467 ) -> fidl::Result<()> {
9468 encoder.debug_check_bounds::<PaverFindDataSinkRequest>(offset);
9469 self.0.encode(encoder, offset + 0, depth)?;
9473 Ok(())
9474 }
9475 }
9476
9477 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9478 for PaverFindDataSinkRequest
9479 {
9480 #[inline(always)]
9481 fn new_empty() -> Self {
9482 Self {
9483 data_sink: fidl::new_empty!(
9484 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9485 fidl::encoding::DefaultFuchsiaResourceDialect
9486 ),
9487 }
9488 }
9489
9490 #[inline]
9491 unsafe fn decode(
9492 &mut self,
9493 decoder: &mut fidl::encoding::Decoder<
9494 '_,
9495 fidl::encoding::DefaultFuchsiaResourceDialect,
9496 >,
9497 offset: usize,
9498 _depth: fidl::encoding::Depth,
9499 ) -> fidl::Result<()> {
9500 decoder.debug_check_bounds::<Self>(offset);
9501 fidl::decode!(
9503 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DataSinkMarker>>,
9504 fidl::encoding::DefaultFuchsiaResourceDialect,
9505 &mut self.data_sink,
9506 decoder,
9507 offset + 0,
9508 _depth
9509 )?;
9510 Ok(())
9511 }
9512 }
9513
9514 impl fidl::encoding::ResourceTypeMarker for PaverFindPartitionTableManagerRequest {
9515 type Borrowed<'a> = &'a mut Self;
9516 fn take_or_borrow<'a>(
9517 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9518 ) -> Self::Borrowed<'a> {
9519 value
9520 }
9521 }
9522
9523 unsafe impl fidl::encoding::TypeMarker for PaverFindPartitionTableManagerRequest {
9524 type Owned = Self;
9525
9526 #[inline(always)]
9527 fn inline_align(_context: fidl::encoding::Context) -> usize {
9528 4
9529 }
9530
9531 #[inline(always)]
9532 fn inline_size(_context: fidl::encoding::Context) -> usize {
9533 4
9534 }
9535 }
9536
9537 unsafe impl
9538 fidl::encoding::Encode<
9539 PaverFindPartitionTableManagerRequest,
9540 fidl::encoding::DefaultFuchsiaResourceDialect,
9541 > for &mut PaverFindPartitionTableManagerRequest
9542 {
9543 #[inline]
9544 unsafe fn encode(
9545 self,
9546 encoder: &mut fidl::encoding::Encoder<
9547 '_,
9548 fidl::encoding::DefaultFuchsiaResourceDialect,
9549 >,
9550 offset: usize,
9551 _depth: fidl::encoding::Depth,
9552 ) -> fidl::Result<()> {
9553 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9554 fidl::encoding::Encode::<PaverFindPartitionTableManagerRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9556 (
9557 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.data_sink),
9558 ),
9559 encoder, offset, _depth
9560 )
9561 }
9562 }
9563 unsafe impl<
9564 T0: fidl::encoding::Encode<
9565 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9566 fidl::encoding::DefaultFuchsiaResourceDialect,
9567 >,
9568 >
9569 fidl::encoding::Encode<
9570 PaverFindPartitionTableManagerRequest,
9571 fidl::encoding::DefaultFuchsiaResourceDialect,
9572 > for (T0,)
9573 {
9574 #[inline]
9575 unsafe fn encode(
9576 self,
9577 encoder: &mut fidl::encoding::Encoder<
9578 '_,
9579 fidl::encoding::DefaultFuchsiaResourceDialect,
9580 >,
9581 offset: usize,
9582 depth: fidl::encoding::Depth,
9583 ) -> fidl::Result<()> {
9584 encoder.debug_check_bounds::<PaverFindPartitionTableManagerRequest>(offset);
9585 self.0.encode(encoder, offset + 0, depth)?;
9589 Ok(())
9590 }
9591 }
9592
9593 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9594 for PaverFindPartitionTableManagerRequest
9595 {
9596 #[inline(always)]
9597 fn new_empty() -> Self {
9598 Self {
9599 data_sink: fidl::new_empty!(
9600 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9601 fidl::encoding::DefaultFuchsiaResourceDialect
9602 ),
9603 }
9604 }
9605
9606 #[inline]
9607 unsafe fn decode(
9608 &mut self,
9609 decoder: &mut fidl::encoding::Decoder<
9610 '_,
9611 fidl::encoding::DefaultFuchsiaResourceDialect,
9612 >,
9613 offset: usize,
9614 _depth: fidl::encoding::Depth,
9615 ) -> fidl::Result<()> {
9616 decoder.debug_check_bounds::<Self>(offset);
9617 fidl::decode!(
9619 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<DynamicDataSinkMarker>>,
9620 fidl::encoding::DefaultFuchsiaResourceDialect,
9621 &mut self.data_sink,
9622 decoder,
9623 offset + 0,
9624 _depth
9625 )?;
9626 Ok(())
9627 }
9628 }
9629
9630 impl fidl::encoding::ResourceTypeMarker for PaverFindSysconfigRequest {
9631 type Borrowed<'a> = &'a mut Self;
9632 fn take_or_borrow<'a>(
9633 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9634 ) -> Self::Borrowed<'a> {
9635 value
9636 }
9637 }
9638
9639 unsafe impl fidl::encoding::TypeMarker for PaverFindSysconfigRequest {
9640 type Owned = Self;
9641
9642 #[inline(always)]
9643 fn inline_align(_context: fidl::encoding::Context) -> usize {
9644 4
9645 }
9646
9647 #[inline(always)]
9648 fn inline_size(_context: fidl::encoding::Context) -> usize {
9649 4
9650 }
9651 }
9652
9653 unsafe impl
9654 fidl::encoding::Encode<
9655 PaverFindSysconfigRequest,
9656 fidl::encoding::DefaultFuchsiaResourceDialect,
9657 > for &mut PaverFindSysconfigRequest
9658 {
9659 #[inline]
9660 unsafe fn encode(
9661 self,
9662 encoder: &mut fidl::encoding::Encoder<
9663 '_,
9664 fidl::encoding::DefaultFuchsiaResourceDialect,
9665 >,
9666 offset: usize,
9667 _depth: fidl::encoding::Depth,
9668 ) -> fidl::Result<()> {
9669 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9670 fidl::encoding::Encode::<PaverFindSysconfigRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
9672 (
9673 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.sysconfig),
9674 ),
9675 encoder, offset, _depth
9676 )
9677 }
9678 }
9679 unsafe impl<
9680 T0: fidl::encoding::Encode<
9681 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9682 fidl::encoding::DefaultFuchsiaResourceDialect,
9683 >,
9684 >
9685 fidl::encoding::Encode<
9686 PaverFindSysconfigRequest,
9687 fidl::encoding::DefaultFuchsiaResourceDialect,
9688 > for (T0,)
9689 {
9690 #[inline]
9691 unsafe fn encode(
9692 self,
9693 encoder: &mut fidl::encoding::Encoder<
9694 '_,
9695 fidl::encoding::DefaultFuchsiaResourceDialect,
9696 >,
9697 offset: usize,
9698 depth: fidl::encoding::Depth,
9699 ) -> fidl::Result<()> {
9700 encoder.debug_check_bounds::<PaverFindSysconfigRequest>(offset);
9701 self.0.encode(encoder, offset + 0, depth)?;
9705 Ok(())
9706 }
9707 }
9708
9709 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9710 for PaverFindSysconfigRequest
9711 {
9712 #[inline(always)]
9713 fn new_empty() -> Self {
9714 Self {
9715 sysconfig: fidl::new_empty!(
9716 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9717 fidl::encoding::DefaultFuchsiaResourceDialect
9718 ),
9719 }
9720 }
9721
9722 #[inline]
9723 unsafe fn decode(
9724 &mut self,
9725 decoder: &mut fidl::encoding::Decoder<
9726 '_,
9727 fidl::encoding::DefaultFuchsiaResourceDialect,
9728 >,
9729 offset: usize,
9730 _depth: fidl::encoding::Depth,
9731 ) -> fidl::Result<()> {
9732 decoder.debug_check_bounds::<Self>(offset);
9733 fidl::decode!(
9735 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SysconfigMarker>>,
9736 fidl::encoding::DefaultFuchsiaResourceDialect,
9737 &mut self.sysconfig,
9738 decoder,
9739 offset + 0,
9740 _depth
9741 )?;
9742 Ok(())
9743 }
9744 }
9745
9746 impl fidl::encoding::ResourceTypeMarker for PayloadStreamRegisterVmoRequest {
9747 type Borrowed<'a> = &'a mut Self;
9748 fn take_or_borrow<'a>(
9749 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9750 ) -> Self::Borrowed<'a> {
9751 value
9752 }
9753 }
9754
9755 unsafe impl fidl::encoding::TypeMarker for PayloadStreamRegisterVmoRequest {
9756 type Owned = Self;
9757
9758 #[inline(always)]
9759 fn inline_align(_context: fidl::encoding::Context) -> usize {
9760 4
9761 }
9762
9763 #[inline(always)]
9764 fn inline_size(_context: fidl::encoding::Context) -> usize {
9765 4
9766 }
9767 }
9768
9769 unsafe impl
9770 fidl::encoding::Encode<
9771 PayloadStreamRegisterVmoRequest,
9772 fidl::encoding::DefaultFuchsiaResourceDialect,
9773 > for &mut PayloadStreamRegisterVmoRequest
9774 {
9775 #[inline]
9776 unsafe fn encode(
9777 self,
9778 encoder: &mut fidl::encoding::Encoder<
9779 '_,
9780 fidl::encoding::DefaultFuchsiaResourceDialect,
9781 >,
9782 offset: usize,
9783 _depth: fidl::encoding::Depth,
9784 ) -> fidl::Result<()> {
9785 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9786 fidl::encoding::Encode::<
9788 PayloadStreamRegisterVmoRequest,
9789 fidl::encoding::DefaultFuchsiaResourceDialect,
9790 >::encode(
9791 (<fidl::encoding::HandleType<
9792 fidl::Vmo,
9793 { fidl::ObjectType::VMO.into_raw() },
9794 2147483648,
9795 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9796 &mut self.vmo
9797 ),),
9798 encoder,
9799 offset,
9800 _depth,
9801 )
9802 }
9803 }
9804 unsafe impl<
9805 T0: fidl::encoding::Encode<
9806 fidl::encoding::HandleType<
9807 fidl::Vmo,
9808 { fidl::ObjectType::VMO.into_raw() },
9809 2147483648,
9810 >,
9811 fidl::encoding::DefaultFuchsiaResourceDialect,
9812 >,
9813 >
9814 fidl::encoding::Encode<
9815 PayloadStreamRegisterVmoRequest,
9816 fidl::encoding::DefaultFuchsiaResourceDialect,
9817 > for (T0,)
9818 {
9819 #[inline]
9820 unsafe fn encode(
9821 self,
9822 encoder: &mut fidl::encoding::Encoder<
9823 '_,
9824 fidl::encoding::DefaultFuchsiaResourceDialect,
9825 >,
9826 offset: usize,
9827 depth: fidl::encoding::Depth,
9828 ) -> fidl::Result<()> {
9829 encoder.debug_check_bounds::<PayloadStreamRegisterVmoRequest>(offset);
9830 self.0.encode(encoder, offset + 0, depth)?;
9834 Ok(())
9835 }
9836 }
9837
9838 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9839 for PayloadStreamRegisterVmoRequest
9840 {
9841 #[inline(always)]
9842 fn new_empty() -> Self {
9843 Self {
9844 vmo: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
9845 }
9846 }
9847
9848 #[inline]
9849 unsafe fn decode(
9850 &mut self,
9851 decoder: &mut fidl::encoding::Decoder<
9852 '_,
9853 fidl::encoding::DefaultFuchsiaResourceDialect,
9854 >,
9855 offset: usize,
9856 _depth: fidl::encoding::Depth,
9857 ) -> fidl::Result<()> {
9858 decoder.debug_check_bounds::<Self>(offset);
9859 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.vmo, decoder, offset + 0, _depth)?;
9861 Ok(())
9862 }
9863 }
9864
9865 impl fidl::encoding::ResourceTypeMarker for SysconfigWriteRequest {
9866 type Borrowed<'a> = &'a mut Self;
9867 fn take_or_borrow<'a>(
9868 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9869 ) -> Self::Borrowed<'a> {
9870 value
9871 }
9872 }
9873
9874 unsafe impl fidl::encoding::TypeMarker for SysconfigWriteRequest {
9875 type Owned = Self;
9876
9877 #[inline(always)]
9878 fn inline_align(_context: fidl::encoding::Context) -> usize {
9879 8
9880 }
9881
9882 #[inline(always)]
9883 fn inline_size(_context: fidl::encoding::Context) -> usize {
9884 16
9885 }
9886 }
9887
9888 unsafe impl
9889 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9890 for &mut SysconfigWriteRequest
9891 {
9892 #[inline]
9893 unsafe fn encode(
9894 self,
9895 encoder: &mut fidl::encoding::Encoder<
9896 '_,
9897 fidl::encoding::DefaultFuchsiaResourceDialect,
9898 >,
9899 offset: usize,
9900 _depth: fidl::encoding::Depth,
9901 ) -> fidl::Result<()> {
9902 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9903 fidl::encoding::Encode::<
9905 SysconfigWriteRequest,
9906 fidl::encoding::DefaultFuchsiaResourceDialect,
9907 >::encode(
9908 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
9909 &mut self.payload,
9910 ),),
9911 encoder,
9912 offset,
9913 _depth,
9914 )
9915 }
9916 }
9917 unsafe impl<
9918 T0: fidl::encoding::Encode<
9919 fidl_fuchsia_mem::Buffer,
9920 fidl::encoding::DefaultFuchsiaResourceDialect,
9921 >,
9922 >
9923 fidl::encoding::Encode<SysconfigWriteRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
9924 for (T0,)
9925 {
9926 #[inline]
9927 unsafe fn encode(
9928 self,
9929 encoder: &mut fidl::encoding::Encoder<
9930 '_,
9931 fidl::encoding::DefaultFuchsiaResourceDialect,
9932 >,
9933 offset: usize,
9934 depth: fidl::encoding::Depth,
9935 ) -> fidl::Result<()> {
9936 encoder.debug_check_bounds::<SysconfigWriteRequest>(offset);
9937 self.0.encode(encoder, offset + 0, depth)?;
9941 Ok(())
9942 }
9943 }
9944
9945 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
9946 for SysconfigWriteRequest
9947 {
9948 #[inline(always)]
9949 fn new_empty() -> Self {
9950 Self {
9951 payload: fidl::new_empty!(
9952 fidl_fuchsia_mem::Buffer,
9953 fidl::encoding::DefaultFuchsiaResourceDialect
9954 ),
9955 }
9956 }
9957
9958 #[inline]
9959 unsafe fn decode(
9960 &mut self,
9961 decoder: &mut fidl::encoding::Decoder<
9962 '_,
9963 fidl::encoding::DefaultFuchsiaResourceDialect,
9964 >,
9965 offset: usize,
9966 _depth: fidl::encoding::Depth,
9967 ) -> fidl::Result<()> {
9968 decoder.debug_check_bounds::<Self>(offset);
9969 fidl::decode!(
9971 fidl_fuchsia_mem::Buffer,
9972 fidl::encoding::DefaultFuchsiaResourceDialect,
9973 &mut self.payload,
9974 decoder,
9975 offset + 0,
9976 _depth
9977 )?;
9978 Ok(())
9979 }
9980 }
9981
9982 impl fidl::encoding::ResourceTypeMarker for SysconfigReadResponse {
9983 type Borrowed<'a> = &'a mut Self;
9984 fn take_or_borrow<'a>(
9985 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
9986 ) -> Self::Borrowed<'a> {
9987 value
9988 }
9989 }
9990
9991 unsafe impl fidl::encoding::TypeMarker for SysconfigReadResponse {
9992 type Owned = Self;
9993
9994 #[inline(always)]
9995 fn inline_align(_context: fidl::encoding::Context) -> usize {
9996 8
9997 }
9998
9999 #[inline(always)]
10000 fn inline_size(_context: fidl::encoding::Context) -> usize {
10001 16
10002 }
10003 }
10004
10005 unsafe impl
10006 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
10007 for &mut SysconfigReadResponse
10008 {
10009 #[inline]
10010 unsafe fn encode(
10011 self,
10012 encoder: &mut fidl::encoding::Encoder<
10013 '_,
10014 fidl::encoding::DefaultFuchsiaResourceDialect,
10015 >,
10016 offset: usize,
10017 _depth: fidl::encoding::Depth,
10018 ) -> fidl::Result<()> {
10019 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
10020 fidl::encoding::Encode::<
10022 SysconfigReadResponse,
10023 fidl::encoding::DefaultFuchsiaResourceDialect,
10024 >::encode(
10025 (<fidl_fuchsia_mem::Buffer as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
10026 &mut self.data,
10027 ),),
10028 encoder,
10029 offset,
10030 _depth,
10031 )
10032 }
10033 }
10034 unsafe impl<
10035 T0: fidl::encoding::Encode<
10036 fidl_fuchsia_mem::Buffer,
10037 fidl::encoding::DefaultFuchsiaResourceDialect,
10038 >,
10039 >
10040 fidl::encoding::Encode<SysconfigReadResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
10041 for (T0,)
10042 {
10043 #[inline]
10044 unsafe fn encode(
10045 self,
10046 encoder: &mut fidl::encoding::Encoder<
10047 '_,
10048 fidl::encoding::DefaultFuchsiaResourceDialect,
10049 >,
10050 offset: usize,
10051 depth: fidl::encoding::Depth,
10052 ) -> fidl::Result<()> {
10053 encoder.debug_check_bounds::<SysconfigReadResponse>(offset);
10054 self.0.encode(encoder, offset + 0, depth)?;
10058 Ok(())
10059 }
10060 }
10061
10062 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
10063 for SysconfigReadResponse
10064 {
10065 #[inline(always)]
10066 fn new_empty() -> Self {
10067 Self {
10068 data: fidl::new_empty!(
10069 fidl_fuchsia_mem::Buffer,
10070 fidl::encoding::DefaultFuchsiaResourceDialect
10071 ),
10072 }
10073 }
10074
10075 #[inline]
10076 unsafe fn decode(
10077 &mut self,
10078 decoder: &mut fidl::encoding::Decoder<
10079 '_,
10080 fidl::encoding::DefaultFuchsiaResourceDialect,
10081 >,
10082 offset: usize,
10083 _depth: fidl::encoding::Depth,
10084 ) -> fidl::Result<()> {
10085 decoder.debug_check_bounds::<Self>(offset);
10086 fidl::decode!(
10088 fidl_fuchsia_mem::Buffer,
10089 fidl::encoding::DefaultFuchsiaResourceDialect,
10090 &mut self.data,
10091 decoder,
10092 offset + 0,
10093 _depth
10094 )?;
10095 Ok(())
10096 }
10097 }
10098}