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