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_boot__common::*;
11use futures::future::{self, MaybeDone, TryFutureExt};
12use zx_status;
13
14#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
16pub struct BootfsFileVmo {
17 pub offset: u32,
19 pub contents: fidl::Vmo,
21}
22
23impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BootfsFileVmo {}
24
25#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
26pub struct FactoryItemsGetResponse {
27 pub payload: Option<fidl::Vmo>,
28 pub length: u32,
29}
30
31impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FactoryItemsGetResponse {}
32
33#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
34pub struct ItemsGetBootloaderFileResponse {
35 pub payload: Option<fidl::Vmo>,
36}
37
38impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
39 for ItemsGetBootloaderFileResponse
40{
41}
42
43#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
44pub struct ItemsGetResponse {
45 pub payload: Option<fidl::Vmo>,
46 pub length: u32,
47}
48
49impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ItemsGetResponse {}
50
51#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
52pub struct ItemsGet2Response {
53 pub retrieved_items: Vec<RetrievedItems>,
54}
55
56impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ItemsGet2Response {}
57
58#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
59pub struct ReadOnlyLogGetResponse {
60 pub log: fidl::DebugLog,
61}
62
63impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ReadOnlyLogGetResponse {}
64
65#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
66pub struct RetrievedItems {
67 pub payload: fidl::Vmo,
68 pub length: u32,
69 pub extra: u32,
70}
71
72impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RetrievedItems {}
73
74#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
75pub struct SvcStashProviderGetResponse {
76 pub resource: fidl::endpoints::ServerEnd<SvcStashMarker>,
77}
78
79impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
80 for SvcStashProviderGetResponse
81{
82}
83
84#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
85pub struct SvcStashStoreRequest {
86 pub svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
87}
88
89impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SvcStashStoreRequest {}
90
91#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
92pub struct UserbootPostBootfsFilesRequest {
93 pub files: Vec<BootfsFileVmo>,
94}
95
96impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
97 for UserbootPostBootfsFilesRequest
98{
99}
100
101#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
102pub struct UserbootPostStashSvcRequest {
103 pub stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
104}
105
106impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
107 for UserbootPostStashSvcRequest
108{
109}
110
111#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
112pub struct WriteOnlyLogGetResponse {
113 pub log: fidl::DebugLog,
114}
115
116impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for WriteOnlyLogGetResponse {}
117
118#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
119pub struct ArgumentsMarker;
120
121impl fidl::endpoints::ProtocolMarker for ArgumentsMarker {
122 type Proxy = ArgumentsProxy;
123 type RequestStream = ArgumentsRequestStream;
124 #[cfg(target_os = "fuchsia")]
125 type SynchronousProxy = ArgumentsSynchronousProxy;
126
127 const DEBUG_NAME: &'static str = "fuchsia.boot.Arguments";
128}
129impl fidl::endpoints::DiscoverableProtocolMarker for ArgumentsMarker {}
130
131pub trait ArgumentsProxyInterface: Send + Sync {
132 type GetStringResponseFut: std::future::Future<Output = Result<Option<String>, fidl::Error>>
133 + Send;
134 fn r#get_string(&self, key: &str) -> Self::GetStringResponseFut;
135 type GetStringsResponseFut: std::future::Future<Output = Result<Vec<Option<String>>, fidl::Error>>
136 + Send;
137 fn r#get_strings(&self, keys: &[String]) -> Self::GetStringsResponseFut;
138 type GetBoolResponseFut: std::future::Future<Output = Result<bool, fidl::Error>> + Send;
139 fn r#get_bool(&self, key: &str, defaultval: bool) -> Self::GetBoolResponseFut;
140 type GetBoolsResponseFut: std::future::Future<Output = Result<Vec<bool>, fidl::Error>> + Send;
141 fn r#get_bools(&self, keys: &[BoolPair]) -> Self::GetBoolsResponseFut;
142 type CollectResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
143 fn r#collect(&self, prefix: &str) -> Self::CollectResponseFut;
144}
145#[derive(Debug)]
146#[cfg(target_os = "fuchsia")]
147pub struct ArgumentsSynchronousProxy {
148 client: fidl::client::sync::Client,
149}
150
151#[cfg(target_os = "fuchsia")]
152impl fidl::endpoints::SynchronousProxy for ArgumentsSynchronousProxy {
153 type Proxy = ArgumentsProxy;
154 type Protocol = ArgumentsMarker;
155
156 fn from_channel(inner: fidl::Channel) -> Self {
157 Self::new(inner)
158 }
159
160 fn into_channel(self) -> fidl::Channel {
161 self.client.into_channel()
162 }
163
164 fn as_channel(&self) -> &fidl::Channel {
165 self.client.as_channel()
166 }
167}
168
169#[cfg(target_os = "fuchsia")]
170impl ArgumentsSynchronousProxy {
171 pub fn new(channel: fidl::Channel) -> Self {
172 Self { client: fidl::client::sync::Client::new(channel) }
173 }
174
175 pub fn into_channel(self) -> fidl::Channel {
176 self.client.into_channel()
177 }
178
179 pub fn wait_for_event(
182 &self,
183 deadline: zx::MonotonicInstant,
184 ) -> Result<ArgumentsEvent, fidl::Error> {
185 ArgumentsEvent::decode(self.client.wait_for_event::<ArgumentsMarker>(deadline)?)
186 }
187
188 pub fn r#get_string(
190 &self,
191 mut key: &str,
192 ___deadline: zx::MonotonicInstant,
193 ) -> Result<Option<String>, fidl::Error> {
194 let _response = self
195 .client
196 .send_query::<ArgumentsGetStringRequest, ArgumentsGetStringResponse, ArgumentsMarker>(
197 (key,),
198 0x426c026d966f8fe,
199 fidl::encoding::DynamicFlags::empty(),
200 ___deadline,
201 )?;
202 Ok(_response.value)
203 }
204
205 pub fn r#get_strings(
207 &self,
208 mut keys: &[String],
209 ___deadline: zx::MonotonicInstant,
210 ) -> Result<Vec<Option<String>>, fidl::Error> {
211 let _response = self
212 .client
213 .send_query::<ArgumentsGetStringsRequest, ArgumentsGetStringsResponse, ArgumentsMarker>(
214 (keys,),
215 0x328fb6b545aa96f7,
216 fidl::encoding::DynamicFlags::empty(),
217 ___deadline,
218 )?;
219 Ok(_response.values)
220 }
221
222 pub fn r#get_bool(
228 &self,
229 mut key: &str,
230 mut defaultval: bool,
231 ___deadline: zx::MonotonicInstant,
232 ) -> Result<bool, fidl::Error> {
233 let _response = self
234 .client
235 .send_query::<ArgumentsGetBoolRequest, ArgumentsGetBoolResponse, ArgumentsMarker>(
236 (key, defaultval),
237 0x4c5dd3149815cccd,
238 fidl::encoding::DynamicFlags::empty(),
239 ___deadline,
240 )?;
241 Ok(_response.value)
242 }
243
244 pub fn r#get_bools(
247 &self,
248 mut keys: &[BoolPair],
249 ___deadline: zx::MonotonicInstant,
250 ) -> Result<Vec<bool>, fidl::Error> {
251 let _response = self
252 .client
253 .send_query::<ArgumentsGetBoolsRequest, ArgumentsGetBoolsResponse, ArgumentsMarker>(
254 (keys,),
255 0xfcc9fc9a0f22615,
256 fidl::encoding::DynamicFlags::empty(),
257 ___deadline,
258 )?;
259 Ok(_response.values)
260 }
261
262 pub fn r#collect(
266 &self,
267 mut prefix: &str,
268 ___deadline: zx::MonotonicInstant,
269 ) -> Result<Vec<String>, fidl::Error> {
270 let _response = self
271 .client
272 .send_query::<ArgumentsCollectRequest, ArgumentsCollectResponse, ArgumentsMarker>(
273 (prefix,),
274 0x24e5acd864546e30,
275 fidl::encoding::DynamicFlags::empty(),
276 ___deadline,
277 )?;
278 Ok(_response.results)
279 }
280}
281
282#[cfg(target_os = "fuchsia")]
283impl From<ArgumentsSynchronousProxy> for zx::NullableHandle {
284 fn from(value: ArgumentsSynchronousProxy) -> Self {
285 value.into_channel().into()
286 }
287}
288
289#[cfg(target_os = "fuchsia")]
290impl From<fidl::Channel> for ArgumentsSynchronousProxy {
291 fn from(value: fidl::Channel) -> Self {
292 Self::new(value)
293 }
294}
295
296#[cfg(target_os = "fuchsia")]
297impl fidl::endpoints::FromClient for ArgumentsSynchronousProxy {
298 type Protocol = ArgumentsMarker;
299
300 fn from_client(value: fidl::endpoints::ClientEnd<ArgumentsMarker>) -> Self {
301 Self::new(value.into_channel())
302 }
303}
304
305#[derive(Debug, Clone)]
306pub struct ArgumentsProxy {
307 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
308}
309
310impl fidl::endpoints::Proxy for ArgumentsProxy {
311 type Protocol = ArgumentsMarker;
312
313 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
314 Self::new(inner)
315 }
316
317 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
318 self.client.into_channel().map_err(|client| Self { client })
319 }
320
321 fn as_channel(&self) -> &::fidl::AsyncChannel {
322 self.client.as_channel()
323 }
324}
325
326impl ArgumentsProxy {
327 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
329 let protocol_name = <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
330 Self { client: fidl::client::Client::new(channel, protocol_name) }
331 }
332
333 pub fn take_event_stream(&self) -> ArgumentsEventStream {
339 ArgumentsEventStream { event_receiver: self.client.take_event_receiver() }
340 }
341
342 pub fn r#get_string(
344 &self,
345 mut key: &str,
346 ) -> fidl::client::QueryResponseFut<Option<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
347 {
348 ArgumentsProxyInterface::r#get_string(self, key)
349 }
350
351 pub fn r#get_strings(
353 &self,
354 mut keys: &[String],
355 ) -> fidl::client::QueryResponseFut<
356 Vec<Option<String>>,
357 fidl::encoding::DefaultFuchsiaResourceDialect,
358 > {
359 ArgumentsProxyInterface::r#get_strings(self, keys)
360 }
361
362 pub fn r#get_bool(
368 &self,
369 mut key: &str,
370 mut defaultval: bool,
371 ) -> fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect> {
372 ArgumentsProxyInterface::r#get_bool(self, key, defaultval)
373 }
374
375 pub fn r#get_bools(
378 &self,
379 mut keys: &[BoolPair],
380 ) -> fidl::client::QueryResponseFut<Vec<bool>, fidl::encoding::DefaultFuchsiaResourceDialect>
381 {
382 ArgumentsProxyInterface::r#get_bools(self, keys)
383 }
384
385 pub fn r#collect(
389 &self,
390 mut prefix: &str,
391 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
392 {
393 ArgumentsProxyInterface::r#collect(self, prefix)
394 }
395}
396
397impl ArgumentsProxyInterface for ArgumentsProxy {
398 type GetStringResponseFut = fidl::client::QueryResponseFut<
399 Option<String>,
400 fidl::encoding::DefaultFuchsiaResourceDialect,
401 >;
402 fn r#get_string(&self, mut key: &str) -> Self::GetStringResponseFut {
403 fn _decode(
404 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
405 ) -> Result<Option<String>, fidl::Error> {
406 let _response = fidl::client::decode_transaction_body::<
407 ArgumentsGetStringResponse,
408 fidl::encoding::DefaultFuchsiaResourceDialect,
409 0x426c026d966f8fe,
410 >(_buf?)?;
411 Ok(_response.value)
412 }
413 self.client.send_query_and_decode::<ArgumentsGetStringRequest, Option<String>>(
414 (key,),
415 0x426c026d966f8fe,
416 fidl::encoding::DynamicFlags::empty(),
417 _decode,
418 )
419 }
420
421 type GetStringsResponseFut = fidl::client::QueryResponseFut<
422 Vec<Option<String>>,
423 fidl::encoding::DefaultFuchsiaResourceDialect,
424 >;
425 fn r#get_strings(&self, mut keys: &[String]) -> Self::GetStringsResponseFut {
426 fn _decode(
427 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
428 ) -> Result<Vec<Option<String>>, fidl::Error> {
429 let _response = fidl::client::decode_transaction_body::<
430 ArgumentsGetStringsResponse,
431 fidl::encoding::DefaultFuchsiaResourceDialect,
432 0x328fb6b545aa96f7,
433 >(_buf?)?;
434 Ok(_response.values)
435 }
436 self.client.send_query_and_decode::<ArgumentsGetStringsRequest, Vec<Option<String>>>(
437 (keys,),
438 0x328fb6b545aa96f7,
439 fidl::encoding::DynamicFlags::empty(),
440 _decode,
441 )
442 }
443
444 type GetBoolResponseFut =
445 fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect>;
446 fn r#get_bool(&self, mut key: &str, mut defaultval: bool) -> Self::GetBoolResponseFut {
447 fn _decode(
448 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
449 ) -> Result<bool, fidl::Error> {
450 let _response = fidl::client::decode_transaction_body::<
451 ArgumentsGetBoolResponse,
452 fidl::encoding::DefaultFuchsiaResourceDialect,
453 0x4c5dd3149815cccd,
454 >(_buf?)?;
455 Ok(_response.value)
456 }
457 self.client.send_query_and_decode::<ArgumentsGetBoolRequest, bool>(
458 (key, defaultval),
459 0x4c5dd3149815cccd,
460 fidl::encoding::DynamicFlags::empty(),
461 _decode,
462 )
463 }
464
465 type GetBoolsResponseFut =
466 fidl::client::QueryResponseFut<Vec<bool>, fidl::encoding::DefaultFuchsiaResourceDialect>;
467 fn r#get_bools(&self, mut keys: &[BoolPair]) -> Self::GetBoolsResponseFut {
468 fn _decode(
469 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
470 ) -> Result<Vec<bool>, fidl::Error> {
471 let _response = fidl::client::decode_transaction_body::<
472 ArgumentsGetBoolsResponse,
473 fidl::encoding::DefaultFuchsiaResourceDialect,
474 0xfcc9fc9a0f22615,
475 >(_buf?)?;
476 Ok(_response.values)
477 }
478 self.client.send_query_and_decode::<ArgumentsGetBoolsRequest, Vec<bool>>(
479 (keys,),
480 0xfcc9fc9a0f22615,
481 fidl::encoding::DynamicFlags::empty(),
482 _decode,
483 )
484 }
485
486 type CollectResponseFut =
487 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
488 fn r#collect(&self, mut prefix: &str) -> Self::CollectResponseFut {
489 fn _decode(
490 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
491 ) -> Result<Vec<String>, fidl::Error> {
492 let _response = fidl::client::decode_transaction_body::<
493 ArgumentsCollectResponse,
494 fidl::encoding::DefaultFuchsiaResourceDialect,
495 0x24e5acd864546e30,
496 >(_buf?)?;
497 Ok(_response.results)
498 }
499 self.client.send_query_and_decode::<ArgumentsCollectRequest, Vec<String>>(
500 (prefix,),
501 0x24e5acd864546e30,
502 fidl::encoding::DynamicFlags::empty(),
503 _decode,
504 )
505 }
506}
507
508pub struct ArgumentsEventStream {
509 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
510}
511
512impl std::marker::Unpin for ArgumentsEventStream {}
513
514impl futures::stream::FusedStream for ArgumentsEventStream {
515 fn is_terminated(&self) -> bool {
516 self.event_receiver.is_terminated()
517 }
518}
519
520impl futures::Stream for ArgumentsEventStream {
521 type Item = Result<ArgumentsEvent, fidl::Error>;
522
523 fn poll_next(
524 mut self: std::pin::Pin<&mut Self>,
525 cx: &mut std::task::Context<'_>,
526 ) -> std::task::Poll<Option<Self::Item>> {
527 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
528 &mut self.event_receiver,
529 cx
530 )?) {
531 Some(buf) => std::task::Poll::Ready(Some(ArgumentsEvent::decode(buf))),
532 None => std::task::Poll::Ready(None),
533 }
534 }
535}
536
537#[derive(Debug)]
538pub enum ArgumentsEvent {}
539
540impl ArgumentsEvent {
541 fn decode(
543 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
544 ) -> Result<ArgumentsEvent, fidl::Error> {
545 let (bytes, _handles) = buf.split_mut();
546 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
547 debug_assert_eq!(tx_header.tx_id, 0);
548 match tx_header.ordinal {
549 _ => Err(fidl::Error::UnknownOrdinal {
550 ordinal: tx_header.ordinal,
551 protocol_name: <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
552 }),
553 }
554 }
555}
556
557pub struct ArgumentsRequestStream {
559 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
560 is_terminated: bool,
561}
562
563impl std::marker::Unpin for ArgumentsRequestStream {}
564
565impl futures::stream::FusedStream for ArgumentsRequestStream {
566 fn is_terminated(&self) -> bool {
567 self.is_terminated
568 }
569}
570
571impl fidl::endpoints::RequestStream for ArgumentsRequestStream {
572 type Protocol = ArgumentsMarker;
573 type ControlHandle = ArgumentsControlHandle;
574
575 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
576 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
577 }
578
579 fn control_handle(&self) -> Self::ControlHandle {
580 ArgumentsControlHandle { inner: self.inner.clone() }
581 }
582
583 fn into_inner(
584 self,
585 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
586 {
587 (self.inner, self.is_terminated)
588 }
589
590 fn from_inner(
591 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
592 is_terminated: bool,
593 ) -> Self {
594 Self { inner, is_terminated }
595 }
596}
597
598impl futures::Stream for ArgumentsRequestStream {
599 type Item = Result<ArgumentsRequest, fidl::Error>;
600
601 fn poll_next(
602 mut self: std::pin::Pin<&mut Self>,
603 cx: &mut std::task::Context<'_>,
604 ) -> std::task::Poll<Option<Self::Item>> {
605 let this = &mut *self;
606 if this.inner.check_shutdown(cx) {
607 this.is_terminated = true;
608 return std::task::Poll::Ready(None);
609 }
610 if this.is_terminated {
611 panic!("polled ArgumentsRequestStream after completion");
612 }
613 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
614 |bytes, handles| {
615 match this.inner.channel().read_etc(cx, bytes, handles) {
616 std::task::Poll::Ready(Ok(())) => {}
617 std::task::Poll::Pending => return std::task::Poll::Pending,
618 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
619 this.is_terminated = true;
620 return std::task::Poll::Ready(None);
621 }
622 std::task::Poll::Ready(Err(e)) => {
623 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
624 e.into(),
625 ))));
626 }
627 }
628
629 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
631
632 std::task::Poll::Ready(Some(match header.ordinal {
633 0x426c026d966f8fe => {
634 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
635 let mut req = fidl::new_empty!(
636 ArgumentsGetStringRequest,
637 fidl::encoding::DefaultFuchsiaResourceDialect
638 );
639 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetStringRequest>(&header, _body_bytes, handles, &mut req)?;
640 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
641 Ok(ArgumentsRequest::GetString {
642 key: req.key,
643
644 responder: ArgumentsGetStringResponder {
645 control_handle: std::mem::ManuallyDrop::new(control_handle),
646 tx_id: header.tx_id,
647 },
648 })
649 }
650 0x328fb6b545aa96f7 => {
651 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
652 let mut req = fidl::new_empty!(
653 ArgumentsGetStringsRequest,
654 fidl::encoding::DefaultFuchsiaResourceDialect
655 );
656 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetStringsRequest>(&header, _body_bytes, handles, &mut req)?;
657 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
658 Ok(ArgumentsRequest::GetStrings {
659 keys: req.keys,
660
661 responder: ArgumentsGetStringsResponder {
662 control_handle: std::mem::ManuallyDrop::new(control_handle),
663 tx_id: header.tx_id,
664 },
665 })
666 }
667 0x4c5dd3149815cccd => {
668 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
669 let mut req = fidl::new_empty!(
670 ArgumentsGetBoolRequest,
671 fidl::encoding::DefaultFuchsiaResourceDialect
672 );
673 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetBoolRequest>(&header, _body_bytes, handles, &mut req)?;
674 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
675 Ok(ArgumentsRequest::GetBool {
676 key: req.key,
677 defaultval: req.defaultval,
678
679 responder: ArgumentsGetBoolResponder {
680 control_handle: std::mem::ManuallyDrop::new(control_handle),
681 tx_id: header.tx_id,
682 },
683 })
684 }
685 0xfcc9fc9a0f22615 => {
686 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
687 let mut req = fidl::new_empty!(
688 ArgumentsGetBoolsRequest,
689 fidl::encoding::DefaultFuchsiaResourceDialect
690 );
691 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetBoolsRequest>(&header, _body_bytes, handles, &mut req)?;
692 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
693 Ok(ArgumentsRequest::GetBools {
694 keys: req.keys,
695
696 responder: ArgumentsGetBoolsResponder {
697 control_handle: std::mem::ManuallyDrop::new(control_handle),
698 tx_id: header.tx_id,
699 },
700 })
701 }
702 0x24e5acd864546e30 => {
703 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
704 let mut req = fidl::new_empty!(
705 ArgumentsCollectRequest,
706 fidl::encoding::DefaultFuchsiaResourceDialect
707 );
708 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsCollectRequest>(&header, _body_bytes, handles, &mut req)?;
709 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
710 Ok(ArgumentsRequest::Collect {
711 prefix: req.prefix,
712
713 responder: ArgumentsCollectResponder {
714 control_handle: std::mem::ManuallyDrop::new(control_handle),
715 tx_id: header.tx_id,
716 },
717 })
718 }
719 _ => Err(fidl::Error::UnknownOrdinal {
720 ordinal: header.ordinal,
721 protocol_name:
722 <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
723 }),
724 }))
725 },
726 )
727 }
728}
729
730#[derive(Debug)]
732pub enum ArgumentsRequest {
733 GetString { key: String, responder: ArgumentsGetStringResponder },
735 GetStrings { keys: Vec<String>, responder: ArgumentsGetStringsResponder },
737 GetBool { key: String, defaultval: bool, responder: ArgumentsGetBoolResponder },
743 GetBools { keys: Vec<BoolPair>, responder: ArgumentsGetBoolsResponder },
746 Collect { prefix: String, responder: ArgumentsCollectResponder },
750}
751
752impl ArgumentsRequest {
753 #[allow(irrefutable_let_patterns)]
754 pub fn into_get_string(self) -> Option<(String, ArgumentsGetStringResponder)> {
755 if let ArgumentsRequest::GetString { key, responder } = self {
756 Some((key, responder))
757 } else {
758 None
759 }
760 }
761
762 #[allow(irrefutable_let_patterns)]
763 pub fn into_get_strings(self) -> Option<(Vec<String>, ArgumentsGetStringsResponder)> {
764 if let ArgumentsRequest::GetStrings { keys, responder } = self {
765 Some((keys, responder))
766 } else {
767 None
768 }
769 }
770
771 #[allow(irrefutable_let_patterns)]
772 pub fn into_get_bool(self) -> Option<(String, bool, ArgumentsGetBoolResponder)> {
773 if let ArgumentsRequest::GetBool { key, defaultval, responder } = self {
774 Some((key, defaultval, responder))
775 } else {
776 None
777 }
778 }
779
780 #[allow(irrefutable_let_patterns)]
781 pub fn into_get_bools(self) -> Option<(Vec<BoolPair>, ArgumentsGetBoolsResponder)> {
782 if let ArgumentsRequest::GetBools { keys, responder } = self {
783 Some((keys, responder))
784 } else {
785 None
786 }
787 }
788
789 #[allow(irrefutable_let_patterns)]
790 pub fn into_collect(self) -> Option<(String, ArgumentsCollectResponder)> {
791 if let ArgumentsRequest::Collect { prefix, responder } = self {
792 Some((prefix, responder))
793 } else {
794 None
795 }
796 }
797
798 pub fn method_name(&self) -> &'static str {
800 match *self {
801 ArgumentsRequest::GetString { .. } => "get_string",
802 ArgumentsRequest::GetStrings { .. } => "get_strings",
803 ArgumentsRequest::GetBool { .. } => "get_bool",
804 ArgumentsRequest::GetBools { .. } => "get_bools",
805 ArgumentsRequest::Collect { .. } => "collect",
806 }
807 }
808}
809
810#[derive(Debug, Clone)]
811pub struct ArgumentsControlHandle {
812 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
813}
814
815impl fidl::endpoints::ControlHandle for ArgumentsControlHandle {
816 fn shutdown(&self) {
817 self.inner.shutdown()
818 }
819
820 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
821 self.inner.shutdown_with_epitaph(status)
822 }
823
824 fn is_closed(&self) -> bool {
825 self.inner.channel().is_closed()
826 }
827 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
828 self.inner.channel().on_closed()
829 }
830
831 #[cfg(target_os = "fuchsia")]
832 fn signal_peer(
833 &self,
834 clear_mask: zx::Signals,
835 set_mask: zx::Signals,
836 ) -> Result<(), zx_status::Status> {
837 use fidl::Peered;
838 self.inner.channel().signal_peer(clear_mask, set_mask)
839 }
840}
841
842impl ArgumentsControlHandle {}
843
844#[must_use = "FIDL methods require a response to be sent"]
845#[derive(Debug)]
846pub struct ArgumentsGetStringResponder {
847 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
848 tx_id: u32,
849}
850
851impl std::ops::Drop for ArgumentsGetStringResponder {
855 fn drop(&mut self) {
856 self.control_handle.shutdown();
857 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
859 }
860}
861
862impl fidl::endpoints::Responder for ArgumentsGetStringResponder {
863 type ControlHandle = ArgumentsControlHandle;
864
865 fn control_handle(&self) -> &ArgumentsControlHandle {
866 &self.control_handle
867 }
868
869 fn drop_without_shutdown(mut self) {
870 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
872 std::mem::forget(self);
874 }
875}
876
877impl ArgumentsGetStringResponder {
878 pub fn send(self, mut value: Option<&str>) -> Result<(), fidl::Error> {
882 let _result = self.send_raw(value);
883 if _result.is_err() {
884 self.control_handle.shutdown();
885 }
886 self.drop_without_shutdown();
887 _result
888 }
889
890 pub fn send_no_shutdown_on_err(self, mut value: Option<&str>) -> Result<(), fidl::Error> {
892 let _result = self.send_raw(value);
893 self.drop_without_shutdown();
894 _result
895 }
896
897 fn send_raw(&self, mut value: Option<&str>) -> Result<(), fidl::Error> {
898 self.control_handle.inner.send::<ArgumentsGetStringResponse>(
899 (value,),
900 self.tx_id,
901 0x426c026d966f8fe,
902 fidl::encoding::DynamicFlags::empty(),
903 )
904 }
905}
906
907#[must_use = "FIDL methods require a response to be sent"]
908#[derive(Debug)]
909pub struct ArgumentsGetStringsResponder {
910 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
911 tx_id: u32,
912}
913
914impl std::ops::Drop for ArgumentsGetStringsResponder {
918 fn drop(&mut self) {
919 self.control_handle.shutdown();
920 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
922 }
923}
924
925impl fidl::endpoints::Responder for ArgumentsGetStringsResponder {
926 type ControlHandle = ArgumentsControlHandle;
927
928 fn control_handle(&self) -> &ArgumentsControlHandle {
929 &self.control_handle
930 }
931
932 fn drop_without_shutdown(mut self) {
933 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
935 std::mem::forget(self);
937 }
938}
939
940impl ArgumentsGetStringsResponder {
941 pub fn send(self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
945 let _result = self.send_raw(values);
946 if _result.is_err() {
947 self.control_handle.shutdown();
948 }
949 self.drop_without_shutdown();
950 _result
951 }
952
953 pub fn send_no_shutdown_on_err(self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
955 let _result = self.send_raw(values);
956 self.drop_without_shutdown();
957 _result
958 }
959
960 fn send_raw(&self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
961 self.control_handle.inner.send::<ArgumentsGetStringsResponse>(
962 (values,),
963 self.tx_id,
964 0x328fb6b545aa96f7,
965 fidl::encoding::DynamicFlags::empty(),
966 )
967 }
968}
969
970#[must_use = "FIDL methods require a response to be sent"]
971#[derive(Debug)]
972pub struct ArgumentsGetBoolResponder {
973 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
974 tx_id: u32,
975}
976
977impl std::ops::Drop for ArgumentsGetBoolResponder {
981 fn drop(&mut self) {
982 self.control_handle.shutdown();
983 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
985 }
986}
987
988impl fidl::endpoints::Responder for ArgumentsGetBoolResponder {
989 type ControlHandle = ArgumentsControlHandle;
990
991 fn control_handle(&self) -> &ArgumentsControlHandle {
992 &self.control_handle
993 }
994
995 fn drop_without_shutdown(mut self) {
996 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
998 std::mem::forget(self);
1000 }
1001}
1002
1003impl ArgumentsGetBoolResponder {
1004 pub fn send(self, mut value: bool) -> Result<(), fidl::Error> {
1008 let _result = self.send_raw(value);
1009 if _result.is_err() {
1010 self.control_handle.shutdown();
1011 }
1012 self.drop_without_shutdown();
1013 _result
1014 }
1015
1016 pub fn send_no_shutdown_on_err(self, mut value: bool) -> Result<(), fidl::Error> {
1018 let _result = self.send_raw(value);
1019 self.drop_without_shutdown();
1020 _result
1021 }
1022
1023 fn send_raw(&self, mut value: bool) -> Result<(), fidl::Error> {
1024 self.control_handle.inner.send::<ArgumentsGetBoolResponse>(
1025 (value,),
1026 self.tx_id,
1027 0x4c5dd3149815cccd,
1028 fidl::encoding::DynamicFlags::empty(),
1029 )
1030 }
1031}
1032
1033#[must_use = "FIDL methods require a response to be sent"]
1034#[derive(Debug)]
1035pub struct ArgumentsGetBoolsResponder {
1036 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1037 tx_id: u32,
1038}
1039
1040impl std::ops::Drop for ArgumentsGetBoolsResponder {
1044 fn drop(&mut self) {
1045 self.control_handle.shutdown();
1046 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1048 }
1049}
1050
1051impl fidl::endpoints::Responder for ArgumentsGetBoolsResponder {
1052 type ControlHandle = ArgumentsControlHandle;
1053
1054 fn control_handle(&self) -> &ArgumentsControlHandle {
1055 &self.control_handle
1056 }
1057
1058 fn drop_without_shutdown(mut self) {
1059 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1061 std::mem::forget(self);
1063 }
1064}
1065
1066impl ArgumentsGetBoolsResponder {
1067 pub fn send(self, mut values: &[bool]) -> Result<(), fidl::Error> {
1071 let _result = self.send_raw(values);
1072 if _result.is_err() {
1073 self.control_handle.shutdown();
1074 }
1075 self.drop_without_shutdown();
1076 _result
1077 }
1078
1079 pub fn send_no_shutdown_on_err(self, mut values: &[bool]) -> Result<(), fidl::Error> {
1081 let _result = self.send_raw(values);
1082 self.drop_without_shutdown();
1083 _result
1084 }
1085
1086 fn send_raw(&self, mut values: &[bool]) -> Result<(), fidl::Error> {
1087 self.control_handle.inner.send::<ArgumentsGetBoolsResponse>(
1088 (values,),
1089 self.tx_id,
1090 0xfcc9fc9a0f22615,
1091 fidl::encoding::DynamicFlags::empty(),
1092 )
1093 }
1094}
1095
1096#[must_use = "FIDL methods require a response to be sent"]
1097#[derive(Debug)]
1098pub struct ArgumentsCollectResponder {
1099 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1100 tx_id: u32,
1101}
1102
1103impl std::ops::Drop for ArgumentsCollectResponder {
1107 fn drop(&mut self) {
1108 self.control_handle.shutdown();
1109 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1111 }
1112}
1113
1114impl fidl::endpoints::Responder for ArgumentsCollectResponder {
1115 type ControlHandle = ArgumentsControlHandle;
1116
1117 fn control_handle(&self) -> &ArgumentsControlHandle {
1118 &self.control_handle
1119 }
1120
1121 fn drop_without_shutdown(mut self) {
1122 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1124 std::mem::forget(self);
1126 }
1127}
1128
1129impl ArgumentsCollectResponder {
1130 pub fn send(self, mut results: &[String]) -> Result<(), fidl::Error> {
1134 let _result = self.send_raw(results);
1135 if _result.is_err() {
1136 self.control_handle.shutdown();
1137 }
1138 self.drop_without_shutdown();
1139 _result
1140 }
1141
1142 pub fn send_no_shutdown_on_err(self, mut results: &[String]) -> Result<(), fidl::Error> {
1144 let _result = self.send_raw(results);
1145 self.drop_without_shutdown();
1146 _result
1147 }
1148
1149 fn send_raw(&self, mut results: &[String]) -> Result<(), fidl::Error> {
1150 self.control_handle.inner.send::<ArgumentsCollectResponse>(
1151 (results,),
1152 self.tx_id,
1153 0x24e5acd864546e30,
1154 fidl::encoding::DynamicFlags::empty(),
1155 )
1156 }
1157}
1158
1159#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1160pub struct FactoryItemsMarker;
1161
1162impl fidl::endpoints::ProtocolMarker for FactoryItemsMarker {
1163 type Proxy = FactoryItemsProxy;
1164 type RequestStream = FactoryItemsRequestStream;
1165 #[cfg(target_os = "fuchsia")]
1166 type SynchronousProxy = FactoryItemsSynchronousProxy;
1167
1168 const DEBUG_NAME: &'static str = "fuchsia.boot.FactoryItems";
1169}
1170impl fidl::endpoints::DiscoverableProtocolMarker for FactoryItemsMarker {}
1171
1172pub trait FactoryItemsProxyInterface: Send + Sync {
1173 type GetResponseFut: std::future::Future<Output = Result<(Option<fidl::Vmo>, u32), fidl::Error>>
1174 + Send;
1175 fn r#get(&self, extra: u32) -> Self::GetResponseFut;
1176}
1177#[derive(Debug)]
1178#[cfg(target_os = "fuchsia")]
1179pub struct FactoryItemsSynchronousProxy {
1180 client: fidl::client::sync::Client,
1181}
1182
1183#[cfg(target_os = "fuchsia")]
1184impl fidl::endpoints::SynchronousProxy for FactoryItemsSynchronousProxy {
1185 type Proxy = FactoryItemsProxy;
1186 type Protocol = FactoryItemsMarker;
1187
1188 fn from_channel(inner: fidl::Channel) -> Self {
1189 Self::new(inner)
1190 }
1191
1192 fn into_channel(self) -> fidl::Channel {
1193 self.client.into_channel()
1194 }
1195
1196 fn as_channel(&self) -> &fidl::Channel {
1197 self.client.as_channel()
1198 }
1199}
1200
1201#[cfg(target_os = "fuchsia")]
1202impl FactoryItemsSynchronousProxy {
1203 pub fn new(channel: fidl::Channel) -> Self {
1204 Self { client: fidl::client::sync::Client::new(channel) }
1205 }
1206
1207 pub fn into_channel(self) -> fidl::Channel {
1208 self.client.into_channel()
1209 }
1210
1211 pub fn wait_for_event(
1214 &self,
1215 deadline: zx::MonotonicInstant,
1216 ) -> Result<FactoryItemsEvent, fidl::Error> {
1217 FactoryItemsEvent::decode(self.client.wait_for_event::<FactoryItemsMarker>(deadline)?)
1218 }
1219
1220 pub fn r#get(
1225 &self,
1226 mut extra: u32,
1227 ___deadline: zx::MonotonicInstant,
1228 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1229 let _response = self
1230 .client
1231 .send_query::<FactoryItemsGetRequest, FactoryItemsGetResponse, FactoryItemsMarker>(
1232 (extra,),
1233 0x2f0dcb1aba41b6d9,
1234 fidl::encoding::DynamicFlags::empty(),
1235 ___deadline,
1236 )?;
1237 Ok((_response.payload, _response.length))
1238 }
1239}
1240
1241#[cfg(target_os = "fuchsia")]
1242impl From<FactoryItemsSynchronousProxy> for zx::NullableHandle {
1243 fn from(value: FactoryItemsSynchronousProxy) -> Self {
1244 value.into_channel().into()
1245 }
1246}
1247
1248#[cfg(target_os = "fuchsia")]
1249impl From<fidl::Channel> for FactoryItemsSynchronousProxy {
1250 fn from(value: fidl::Channel) -> Self {
1251 Self::new(value)
1252 }
1253}
1254
1255#[cfg(target_os = "fuchsia")]
1256impl fidl::endpoints::FromClient for FactoryItemsSynchronousProxy {
1257 type Protocol = FactoryItemsMarker;
1258
1259 fn from_client(value: fidl::endpoints::ClientEnd<FactoryItemsMarker>) -> Self {
1260 Self::new(value.into_channel())
1261 }
1262}
1263
1264#[derive(Debug, Clone)]
1265pub struct FactoryItemsProxy {
1266 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1267}
1268
1269impl fidl::endpoints::Proxy for FactoryItemsProxy {
1270 type Protocol = FactoryItemsMarker;
1271
1272 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1273 Self::new(inner)
1274 }
1275
1276 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1277 self.client.into_channel().map_err(|client| Self { client })
1278 }
1279
1280 fn as_channel(&self) -> &::fidl::AsyncChannel {
1281 self.client.as_channel()
1282 }
1283}
1284
1285impl FactoryItemsProxy {
1286 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1288 let protocol_name = <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1289 Self { client: fidl::client::Client::new(channel, protocol_name) }
1290 }
1291
1292 pub fn take_event_stream(&self) -> FactoryItemsEventStream {
1298 FactoryItemsEventStream { event_receiver: self.client.take_event_receiver() }
1299 }
1300
1301 pub fn r#get(
1306 &self,
1307 mut extra: u32,
1308 ) -> fidl::client::QueryResponseFut<
1309 (Option<fidl::Vmo>, u32),
1310 fidl::encoding::DefaultFuchsiaResourceDialect,
1311 > {
1312 FactoryItemsProxyInterface::r#get(self, extra)
1313 }
1314}
1315
1316impl FactoryItemsProxyInterface for FactoryItemsProxy {
1317 type GetResponseFut = fidl::client::QueryResponseFut<
1318 (Option<fidl::Vmo>, u32),
1319 fidl::encoding::DefaultFuchsiaResourceDialect,
1320 >;
1321 fn r#get(&self, mut extra: u32) -> Self::GetResponseFut {
1322 fn _decode(
1323 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1324 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1325 let _response = fidl::client::decode_transaction_body::<
1326 FactoryItemsGetResponse,
1327 fidl::encoding::DefaultFuchsiaResourceDialect,
1328 0x2f0dcb1aba41b6d9,
1329 >(_buf?)?;
1330 Ok((_response.payload, _response.length))
1331 }
1332 self.client.send_query_and_decode::<FactoryItemsGetRequest, (Option<fidl::Vmo>, u32)>(
1333 (extra,),
1334 0x2f0dcb1aba41b6d9,
1335 fidl::encoding::DynamicFlags::empty(),
1336 _decode,
1337 )
1338 }
1339}
1340
1341pub struct FactoryItemsEventStream {
1342 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1343}
1344
1345impl std::marker::Unpin for FactoryItemsEventStream {}
1346
1347impl futures::stream::FusedStream for FactoryItemsEventStream {
1348 fn is_terminated(&self) -> bool {
1349 self.event_receiver.is_terminated()
1350 }
1351}
1352
1353impl futures::Stream for FactoryItemsEventStream {
1354 type Item = Result<FactoryItemsEvent, fidl::Error>;
1355
1356 fn poll_next(
1357 mut self: std::pin::Pin<&mut Self>,
1358 cx: &mut std::task::Context<'_>,
1359 ) -> std::task::Poll<Option<Self::Item>> {
1360 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1361 &mut self.event_receiver,
1362 cx
1363 )?) {
1364 Some(buf) => std::task::Poll::Ready(Some(FactoryItemsEvent::decode(buf))),
1365 None => std::task::Poll::Ready(None),
1366 }
1367 }
1368}
1369
1370#[derive(Debug)]
1371pub enum FactoryItemsEvent {}
1372
1373impl FactoryItemsEvent {
1374 fn decode(
1376 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1377 ) -> Result<FactoryItemsEvent, fidl::Error> {
1378 let (bytes, _handles) = buf.split_mut();
1379 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1380 debug_assert_eq!(tx_header.tx_id, 0);
1381 match tx_header.ordinal {
1382 _ => Err(fidl::Error::UnknownOrdinal {
1383 ordinal: tx_header.ordinal,
1384 protocol_name: <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1385 }),
1386 }
1387 }
1388}
1389
1390pub struct FactoryItemsRequestStream {
1392 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1393 is_terminated: bool,
1394}
1395
1396impl std::marker::Unpin for FactoryItemsRequestStream {}
1397
1398impl futures::stream::FusedStream for FactoryItemsRequestStream {
1399 fn is_terminated(&self) -> bool {
1400 self.is_terminated
1401 }
1402}
1403
1404impl fidl::endpoints::RequestStream for FactoryItemsRequestStream {
1405 type Protocol = FactoryItemsMarker;
1406 type ControlHandle = FactoryItemsControlHandle;
1407
1408 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1409 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1410 }
1411
1412 fn control_handle(&self) -> Self::ControlHandle {
1413 FactoryItemsControlHandle { inner: self.inner.clone() }
1414 }
1415
1416 fn into_inner(
1417 self,
1418 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1419 {
1420 (self.inner, self.is_terminated)
1421 }
1422
1423 fn from_inner(
1424 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1425 is_terminated: bool,
1426 ) -> Self {
1427 Self { inner, is_terminated }
1428 }
1429}
1430
1431impl futures::Stream for FactoryItemsRequestStream {
1432 type Item = Result<FactoryItemsRequest, fidl::Error>;
1433
1434 fn poll_next(
1435 mut self: std::pin::Pin<&mut Self>,
1436 cx: &mut std::task::Context<'_>,
1437 ) -> std::task::Poll<Option<Self::Item>> {
1438 let this = &mut *self;
1439 if this.inner.check_shutdown(cx) {
1440 this.is_terminated = true;
1441 return std::task::Poll::Ready(None);
1442 }
1443 if this.is_terminated {
1444 panic!("polled FactoryItemsRequestStream after completion");
1445 }
1446 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1447 |bytes, handles| {
1448 match this.inner.channel().read_etc(cx, bytes, handles) {
1449 std::task::Poll::Ready(Ok(())) => {}
1450 std::task::Poll::Pending => return std::task::Poll::Pending,
1451 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1452 this.is_terminated = true;
1453 return std::task::Poll::Ready(None);
1454 }
1455 std::task::Poll::Ready(Err(e)) => {
1456 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1457 e.into(),
1458 ))));
1459 }
1460 }
1461
1462 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1464
1465 std::task::Poll::Ready(Some(match header.ordinal {
1466 0x2f0dcb1aba41b6d9 => {
1467 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1468 let mut req = fidl::new_empty!(
1469 FactoryItemsGetRequest,
1470 fidl::encoding::DefaultFuchsiaResourceDialect
1471 );
1472 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryItemsGetRequest>(&header, _body_bytes, handles, &mut req)?;
1473 let control_handle =
1474 FactoryItemsControlHandle { inner: this.inner.clone() };
1475 Ok(FactoryItemsRequest::Get {
1476 extra: req.extra,
1477
1478 responder: FactoryItemsGetResponder {
1479 control_handle: std::mem::ManuallyDrop::new(control_handle),
1480 tx_id: header.tx_id,
1481 },
1482 })
1483 }
1484 _ => Err(fidl::Error::UnknownOrdinal {
1485 ordinal: header.ordinal,
1486 protocol_name:
1487 <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1488 }),
1489 }))
1490 },
1491 )
1492 }
1493}
1494
1495#[derive(Debug)]
1497pub enum FactoryItemsRequest {
1498 Get { extra: u32, responder: FactoryItemsGetResponder },
1503}
1504
1505impl FactoryItemsRequest {
1506 #[allow(irrefutable_let_patterns)]
1507 pub fn into_get(self) -> Option<(u32, FactoryItemsGetResponder)> {
1508 if let FactoryItemsRequest::Get { extra, responder } = self {
1509 Some((extra, responder))
1510 } else {
1511 None
1512 }
1513 }
1514
1515 pub fn method_name(&self) -> &'static str {
1517 match *self {
1518 FactoryItemsRequest::Get { .. } => "get",
1519 }
1520 }
1521}
1522
1523#[derive(Debug, Clone)]
1524pub struct FactoryItemsControlHandle {
1525 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1526}
1527
1528impl fidl::endpoints::ControlHandle for FactoryItemsControlHandle {
1529 fn shutdown(&self) {
1530 self.inner.shutdown()
1531 }
1532
1533 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1534 self.inner.shutdown_with_epitaph(status)
1535 }
1536
1537 fn is_closed(&self) -> bool {
1538 self.inner.channel().is_closed()
1539 }
1540 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1541 self.inner.channel().on_closed()
1542 }
1543
1544 #[cfg(target_os = "fuchsia")]
1545 fn signal_peer(
1546 &self,
1547 clear_mask: zx::Signals,
1548 set_mask: zx::Signals,
1549 ) -> Result<(), zx_status::Status> {
1550 use fidl::Peered;
1551 self.inner.channel().signal_peer(clear_mask, set_mask)
1552 }
1553}
1554
1555impl FactoryItemsControlHandle {}
1556
1557#[must_use = "FIDL methods require a response to be sent"]
1558#[derive(Debug)]
1559pub struct FactoryItemsGetResponder {
1560 control_handle: std::mem::ManuallyDrop<FactoryItemsControlHandle>,
1561 tx_id: u32,
1562}
1563
1564impl std::ops::Drop for FactoryItemsGetResponder {
1568 fn drop(&mut self) {
1569 self.control_handle.shutdown();
1570 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1572 }
1573}
1574
1575impl fidl::endpoints::Responder for FactoryItemsGetResponder {
1576 type ControlHandle = FactoryItemsControlHandle;
1577
1578 fn control_handle(&self) -> &FactoryItemsControlHandle {
1579 &self.control_handle
1580 }
1581
1582 fn drop_without_shutdown(mut self) {
1583 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1585 std::mem::forget(self);
1587 }
1588}
1589
1590impl FactoryItemsGetResponder {
1591 pub fn send(self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
1595 let _result = self.send_raw(payload, length);
1596 if _result.is_err() {
1597 self.control_handle.shutdown();
1598 }
1599 self.drop_without_shutdown();
1600 _result
1601 }
1602
1603 pub fn send_no_shutdown_on_err(
1605 self,
1606 mut payload: Option<fidl::Vmo>,
1607 mut length: u32,
1608 ) -> Result<(), fidl::Error> {
1609 let _result = self.send_raw(payload, length);
1610 self.drop_without_shutdown();
1611 _result
1612 }
1613
1614 fn send_raw(&self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
1615 self.control_handle.inner.send::<FactoryItemsGetResponse>(
1616 (payload, length),
1617 self.tx_id,
1618 0x2f0dcb1aba41b6d9,
1619 fidl::encoding::DynamicFlags::empty(),
1620 )
1621 }
1622}
1623
1624#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1625pub struct ItemsMarker;
1626
1627impl fidl::endpoints::ProtocolMarker for ItemsMarker {
1628 type Proxy = ItemsProxy;
1629 type RequestStream = ItemsRequestStream;
1630 #[cfg(target_os = "fuchsia")]
1631 type SynchronousProxy = ItemsSynchronousProxy;
1632
1633 const DEBUG_NAME: &'static str = "fuchsia.boot.Items";
1634}
1635impl fidl::endpoints::DiscoverableProtocolMarker for ItemsMarker {}
1636pub type ItemsGet2Result = Result<Vec<RetrievedItems>, i32>;
1637
1638pub trait ItemsProxyInterface: Send + Sync {
1639 type GetResponseFut: std::future::Future<Output = Result<(Option<fidl::Vmo>, u32), fidl::Error>>
1640 + Send;
1641 fn r#get(&self, type_: u32, extra: u32) -> Self::GetResponseFut;
1642 type Get2ResponseFut: std::future::Future<Output = Result<ItemsGet2Result, fidl::Error>> + Send;
1643 fn r#get2(&self, type_: u32, extra: Option<&Extra>) -> Self::Get2ResponseFut;
1644 type GetBootloaderFileResponseFut: std::future::Future<Output = Result<Option<fidl::Vmo>, fidl::Error>>
1645 + Send;
1646 fn r#get_bootloader_file(&self, filename: &str) -> Self::GetBootloaderFileResponseFut;
1647}
1648#[derive(Debug)]
1649#[cfg(target_os = "fuchsia")]
1650pub struct ItemsSynchronousProxy {
1651 client: fidl::client::sync::Client,
1652}
1653
1654#[cfg(target_os = "fuchsia")]
1655impl fidl::endpoints::SynchronousProxy for ItemsSynchronousProxy {
1656 type Proxy = ItemsProxy;
1657 type Protocol = ItemsMarker;
1658
1659 fn from_channel(inner: fidl::Channel) -> Self {
1660 Self::new(inner)
1661 }
1662
1663 fn into_channel(self) -> fidl::Channel {
1664 self.client.into_channel()
1665 }
1666
1667 fn as_channel(&self) -> &fidl::Channel {
1668 self.client.as_channel()
1669 }
1670}
1671
1672#[cfg(target_os = "fuchsia")]
1673impl ItemsSynchronousProxy {
1674 pub fn new(channel: fidl::Channel) -> Self {
1675 Self { client: fidl::client::sync::Client::new(channel) }
1676 }
1677
1678 pub fn into_channel(self) -> fidl::Channel {
1679 self.client.into_channel()
1680 }
1681
1682 pub fn wait_for_event(
1685 &self,
1686 deadline: zx::MonotonicInstant,
1687 ) -> Result<ItemsEvent, fidl::Error> {
1688 ItemsEvent::decode(self.client.wait_for_event::<ItemsMarker>(deadline)?)
1689 }
1690
1691 pub fn r#get(
1699 &self,
1700 mut type_: u32,
1701 mut extra: u32,
1702 ___deadline: zx::MonotonicInstant,
1703 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1704 let _response = self.client.send_query::<ItemsGetRequest, ItemsGetResponse, ItemsMarker>(
1705 (type_, extra),
1706 0x542db3f176641edc,
1707 fidl::encoding::DynamicFlags::empty(),
1708 ___deadline,
1709 )?;
1710 Ok((_response.payload, _response.length))
1711 }
1712
1713 pub fn r#get2(
1718 &self,
1719 mut type_: u32,
1720 mut extra: Option<&Extra>,
1721 ___deadline: zx::MonotonicInstant,
1722 ) -> Result<ItemsGet2Result, fidl::Error> {
1723 let _response = self.client.send_query::<
1724 ItemsGet2Request,
1725 fidl::encoding::ResultType<ItemsGet2Response, i32>,
1726 ItemsMarker,
1727 >(
1728 (type_, extra,),
1729 0x2a64bd32f9ba3f2e,
1730 fidl::encoding::DynamicFlags::empty(),
1731 ___deadline,
1732 )?;
1733 Ok(_response.map(|x| x.retrieved_items))
1734 }
1735
1736 pub fn r#get_bootloader_file(
1739 &self,
1740 mut filename: &str,
1741 ___deadline: zx::MonotonicInstant,
1742 ) -> Result<Option<fidl::Vmo>, fidl::Error> {
1743 let _response = self.client.send_query::<
1744 ItemsGetBootloaderFileRequest,
1745 ItemsGetBootloaderFileResponse,
1746 ItemsMarker,
1747 >(
1748 (filename,),
1749 0x5a004db3c9378e8c,
1750 fidl::encoding::DynamicFlags::empty(),
1751 ___deadline,
1752 )?;
1753 Ok(_response.payload)
1754 }
1755}
1756
1757#[cfg(target_os = "fuchsia")]
1758impl From<ItemsSynchronousProxy> for zx::NullableHandle {
1759 fn from(value: ItemsSynchronousProxy) -> Self {
1760 value.into_channel().into()
1761 }
1762}
1763
1764#[cfg(target_os = "fuchsia")]
1765impl From<fidl::Channel> for ItemsSynchronousProxy {
1766 fn from(value: fidl::Channel) -> Self {
1767 Self::new(value)
1768 }
1769}
1770
1771#[cfg(target_os = "fuchsia")]
1772impl fidl::endpoints::FromClient for ItemsSynchronousProxy {
1773 type Protocol = ItemsMarker;
1774
1775 fn from_client(value: fidl::endpoints::ClientEnd<ItemsMarker>) -> Self {
1776 Self::new(value.into_channel())
1777 }
1778}
1779
1780#[derive(Debug, Clone)]
1781pub struct ItemsProxy {
1782 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1783}
1784
1785impl fidl::endpoints::Proxy for ItemsProxy {
1786 type Protocol = ItemsMarker;
1787
1788 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1789 Self::new(inner)
1790 }
1791
1792 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1793 self.client.into_channel().map_err(|client| Self { client })
1794 }
1795
1796 fn as_channel(&self) -> &::fidl::AsyncChannel {
1797 self.client.as_channel()
1798 }
1799}
1800
1801impl ItemsProxy {
1802 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1804 let protocol_name = <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1805 Self { client: fidl::client::Client::new(channel, protocol_name) }
1806 }
1807
1808 pub fn take_event_stream(&self) -> ItemsEventStream {
1814 ItemsEventStream { event_receiver: self.client.take_event_receiver() }
1815 }
1816
1817 pub fn r#get(
1825 &self,
1826 mut type_: u32,
1827 mut extra: u32,
1828 ) -> fidl::client::QueryResponseFut<
1829 (Option<fidl::Vmo>, u32),
1830 fidl::encoding::DefaultFuchsiaResourceDialect,
1831 > {
1832 ItemsProxyInterface::r#get(self, type_, extra)
1833 }
1834
1835 pub fn r#get2(
1840 &self,
1841 mut type_: u32,
1842 mut extra: Option<&Extra>,
1843 ) -> fidl::client::QueryResponseFut<
1844 ItemsGet2Result,
1845 fidl::encoding::DefaultFuchsiaResourceDialect,
1846 > {
1847 ItemsProxyInterface::r#get2(self, type_, extra)
1848 }
1849
1850 pub fn r#get_bootloader_file(
1853 &self,
1854 mut filename: &str,
1855 ) -> fidl::client::QueryResponseFut<
1856 Option<fidl::Vmo>,
1857 fidl::encoding::DefaultFuchsiaResourceDialect,
1858 > {
1859 ItemsProxyInterface::r#get_bootloader_file(self, filename)
1860 }
1861}
1862
1863impl ItemsProxyInterface for ItemsProxy {
1864 type GetResponseFut = fidl::client::QueryResponseFut<
1865 (Option<fidl::Vmo>, u32),
1866 fidl::encoding::DefaultFuchsiaResourceDialect,
1867 >;
1868 fn r#get(&self, mut type_: u32, mut extra: u32) -> Self::GetResponseFut {
1869 fn _decode(
1870 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1871 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1872 let _response = fidl::client::decode_transaction_body::<
1873 ItemsGetResponse,
1874 fidl::encoding::DefaultFuchsiaResourceDialect,
1875 0x542db3f176641edc,
1876 >(_buf?)?;
1877 Ok((_response.payload, _response.length))
1878 }
1879 self.client.send_query_and_decode::<ItemsGetRequest, (Option<fidl::Vmo>, u32)>(
1880 (type_, extra),
1881 0x542db3f176641edc,
1882 fidl::encoding::DynamicFlags::empty(),
1883 _decode,
1884 )
1885 }
1886
1887 type Get2ResponseFut = fidl::client::QueryResponseFut<
1888 ItemsGet2Result,
1889 fidl::encoding::DefaultFuchsiaResourceDialect,
1890 >;
1891 fn r#get2(&self, mut type_: u32, mut extra: Option<&Extra>) -> Self::Get2ResponseFut {
1892 fn _decode(
1893 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1894 ) -> Result<ItemsGet2Result, fidl::Error> {
1895 let _response = fidl::client::decode_transaction_body::<
1896 fidl::encoding::ResultType<ItemsGet2Response, i32>,
1897 fidl::encoding::DefaultFuchsiaResourceDialect,
1898 0x2a64bd32f9ba3f2e,
1899 >(_buf?)?;
1900 Ok(_response.map(|x| x.retrieved_items))
1901 }
1902 self.client.send_query_and_decode::<ItemsGet2Request, ItemsGet2Result>(
1903 (type_, extra),
1904 0x2a64bd32f9ba3f2e,
1905 fidl::encoding::DynamicFlags::empty(),
1906 _decode,
1907 )
1908 }
1909
1910 type GetBootloaderFileResponseFut = fidl::client::QueryResponseFut<
1911 Option<fidl::Vmo>,
1912 fidl::encoding::DefaultFuchsiaResourceDialect,
1913 >;
1914 fn r#get_bootloader_file(&self, mut filename: &str) -> Self::GetBootloaderFileResponseFut {
1915 fn _decode(
1916 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1917 ) -> Result<Option<fidl::Vmo>, fidl::Error> {
1918 let _response = fidl::client::decode_transaction_body::<
1919 ItemsGetBootloaderFileResponse,
1920 fidl::encoding::DefaultFuchsiaResourceDialect,
1921 0x5a004db3c9378e8c,
1922 >(_buf?)?;
1923 Ok(_response.payload)
1924 }
1925 self.client.send_query_and_decode::<ItemsGetBootloaderFileRequest, Option<fidl::Vmo>>(
1926 (filename,),
1927 0x5a004db3c9378e8c,
1928 fidl::encoding::DynamicFlags::empty(),
1929 _decode,
1930 )
1931 }
1932}
1933
1934pub struct ItemsEventStream {
1935 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1936}
1937
1938impl std::marker::Unpin for ItemsEventStream {}
1939
1940impl futures::stream::FusedStream for ItemsEventStream {
1941 fn is_terminated(&self) -> bool {
1942 self.event_receiver.is_terminated()
1943 }
1944}
1945
1946impl futures::Stream for ItemsEventStream {
1947 type Item = Result<ItemsEvent, fidl::Error>;
1948
1949 fn poll_next(
1950 mut self: std::pin::Pin<&mut Self>,
1951 cx: &mut std::task::Context<'_>,
1952 ) -> std::task::Poll<Option<Self::Item>> {
1953 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1954 &mut self.event_receiver,
1955 cx
1956 )?) {
1957 Some(buf) => std::task::Poll::Ready(Some(ItemsEvent::decode(buf))),
1958 None => std::task::Poll::Ready(None),
1959 }
1960 }
1961}
1962
1963#[derive(Debug)]
1964pub enum ItemsEvent {}
1965
1966impl ItemsEvent {
1967 fn decode(
1969 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1970 ) -> Result<ItemsEvent, fidl::Error> {
1971 let (bytes, _handles) = buf.split_mut();
1972 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1973 debug_assert_eq!(tx_header.tx_id, 0);
1974 match tx_header.ordinal {
1975 _ => Err(fidl::Error::UnknownOrdinal {
1976 ordinal: tx_header.ordinal,
1977 protocol_name: <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1978 }),
1979 }
1980 }
1981}
1982
1983pub struct ItemsRequestStream {
1985 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1986 is_terminated: bool,
1987}
1988
1989impl std::marker::Unpin for ItemsRequestStream {}
1990
1991impl futures::stream::FusedStream for ItemsRequestStream {
1992 fn is_terminated(&self) -> bool {
1993 self.is_terminated
1994 }
1995}
1996
1997impl fidl::endpoints::RequestStream for ItemsRequestStream {
1998 type Protocol = ItemsMarker;
1999 type ControlHandle = ItemsControlHandle;
2000
2001 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2002 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2003 }
2004
2005 fn control_handle(&self) -> Self::ControlHandle {
2006 ItemsControlHandle { inner: self.inner.clone() }
2007 }
2008
2009 fn into_inner(
2010 self,
2011 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2012 {
2013 (self.inner, self.is_terminated)
2014 }
2015
2016 fn from_inner(
2017 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2018 is_terminated: bool,
2019 ) -> Self {
2020 Self { inner, is_terminated }
2021 }
2022}
2023
2024impl futures::Stream for ItemsRequestStream {
2025 type Item = Result<ItemsRequest, fidl::Error>;
2026
2027 fn poll_next(
2028 mut self: std::pin::Pin<&mut Self>,
2029 cx: &mut std::task::Context<'_>,
2030 ) -> std::task::Poll<Option<Self::Item>> {
2031 let this = &mut *self;
2032 if this.inner.check_shutdown(cx) {
2033 this.is_terminated = true;
2034 return std::task::Poll::Ready(None);
2035 }
2036 if this.is_terminated {
2037 panic!("polled ItemsRequestStream after completion");
2038 }
2039 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2040 |bytes, handles| {
2041 match this.inner.channel().read_etc(cx, bytes, handles) {
2042 std::task::Poll::Ready(Ok(())) => {}
2043 std::task::Poll::Pending => return std::task::Poll::Pending,
2044 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2045 this.is_terminated = true;
2046 return std::task::Poll::Ready(None);
2047 }
2048 std::task::Poll::Ready(Err(e)) => {
2049 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2050 e.into(),
2051 ))));
2052 }
2053 }
2054
2055 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2057
2058 std::task::Poll::Ready(Some(match header.ordinal {
2059 0x542db3f176641edc => {
2060 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2061 let mut req = fidl::new_empty!(
2062 ItemsGetRequest,
2063 fidl::encoding::DefaultFuchsiaResourceDialect
2064 );
2065 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGetRequest>(&header, _body_bytes, handles, &mut req)?;
2066 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2067 Ok(ItemsRequest::Get {
2068 type_: req.type_,
2069 extra: req.extra,
2070
2071 responder: ItemsGetResponder {
2072 control_handle: std::mem::ManuallyDrop::new(control_handle),
2073 tx_id: header.tx_id,
2074 },
2075 })
2076 }
2077 0x2a64bd32f9ba3f2e => {
2078 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2079 let mut req = fidl::new_empty!(
2080 ItemsGet2Request,
2081 fidl::encoding::DefaultFuchsiaResourceDialect
2082 );
2083 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGet2Request>(&header, _body_bytes, handles, &mut req)?;
2084 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2085 Ok(ItemsRequest::Get2 {
2086 type_: req.type_,
2087 extra: req.extra,
2088
2089 responder: ItemsGet2Responder {
2090 control_handle: std::mem::ManuallyDrop::new(control_handle),
2091 tx_id: header.tx_id,
2092 },
2093 })
2094 }
2095 0x5a004db3c9378e8c => {
2096 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2097 let mut req = fidl::new_empty!(
2098 ItemsGetBootloaderFileRequest,
2099 fidl::encoding::DefaultFuchsiaResourceDialect
2100 );
2101 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGetBootloaderFileRequest>(&header, _body_bytes, handles, &mut req)?;
2102 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2103 Ok(ItemsRequest::GetBootloaderFile {
2104 filename: req.filename,
2105
2106 responder: ItemsGetBootloaderFileResponder {
2107 control_handle: std::mem::ManuallyDrop::new(control_handle),
2108 tx_id: header.tx_id,
2109 },
2110 })
2111 }
2112 _ => Err(fidl::Error::UnknownOrdinal {
2113 ordinal: header.ordinal,
2114 protocol_name: <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2115 }),
2116 }))
2117 },
2118 )
2119 }
2120}
2121
2122#[derive(Debug)]
2124pub enum ItemsRequest {
2125 Get { type_: u32, extra: u32, responder: ItemsGetResponder },
2133 Get2 { type_: u32, extra: Option<Box<Extra>>, responder: ItemsGet2Responder },
2138 GetBootloaderFile { filename: String, responder: ItemsGetBootloaderFileResponder },
2141}
2142
2143impl ItemsRequest {
2144 #[allow(irrefutable_let_patterns)]
2145 pub fn into_get(self) -> Option<(u32, u32, ItemsGetResponder)> {
2146 if let ItemsRequest::Get { type_, extra, responder } = self {
2147 Some((type_, extra, responder))
2148 } else {
2149 None
2150 }
2151 }
2152
2153 #[allow(irrefutable_let_patterns)]
2154 pub fn into_get2(self) -> Option<(u32, Option<Box<Extra>>, ItemsGet2Responder)> {
2155 if let ItemsRequest::Get2 { type_, extra, responder } = self {
2156 Some((type_, extra, responder))
2157 } else {
2158 None
2159 }
2160 }
2161
2162 #[allow(irrefutable_let_patterns)]
2163 pub fn into_get_bootloader_file(self) -> Option<(String, ItemsGetBootloaderFileResponder)> {
2164 if let ItemsRequest::GetBootloaderFile { filename, responder } = self {
2165 Some((filename, responder))
2166 } else {
2167 None
2168 }
2169 }
2170
2171 pub fn method_name(&self) -> &'static str {
2173 match *self {
2174 ItemsRequest::Get { .. } => "get",
2175 ItemsRequest::Get2 { .. } => "get2",
2176 ItemsRequest::GetBootloaderFile { .. } => "get_bootloader_file",
2177 }
2178 }
2179}
2180
2181#[derive(Debug, Clone)]
2182pub struct ItemsControlHandle {
2183 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2184}
2185
2186impl fidl::endpoints::ControlHandle for ItemsControlHandle {
2187 fn shutdown(&self) {
2188 self.inner.shutdown()
2189 }
2190
2191 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2192 self.inner.shutdown_with_epitaph(status)
2193 }
2194
2195 fn is_closed(&self) -> bool {
2196 self.inner.channel().is_closed()
2197 }
2198 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2199 self.inner.channel().on_closed()
2200 }
2201
2202 #[cfg(target_os = "fuchsia")]
2203 fn signal_peer(
2204 &self,
2205 clear_mask: zx::Signals,
2206 set_mask: zx::Signals,
2207 ) -> Result<(), zx_status::Status> {
2208 use fidl::Peered;
2209 self.inner.channel().signal_peer(clear_mask, set_mask)
2210 }
2211}
2212
2213impl ItemsControlHandle {}
2214
2215#[must_use = "FIDL methods require a response to be sent"]
2216#[derive(Debug)]
2217pub struct ItemsGetResponder {
2218 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2219 tx_id: u32,
2220}
2221
2222impl std::ops::Drop for ItemsGetResponder {
2226 fn drop(&mut self) {
2227 self.control_handle.shutdown();
2228 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2230 }
2231}
2232
2233impl fidl::endpoints::Responder for ItemsGetResponder {
2234 type ControlHandle = ItemsControlHandle;
2235
2236 fn control_handle(&self) -> &ItemsControlHandle {
2237 &self.control_handle
2238 }
2239
2240 fn drop_without_shutdown(mut self) {
2241 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2243 std::mem::forget(self);
2245 }
2246}
2247
2248impl ItemsGetResponder {
2249 pub fn send(self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
2253 let _result = self.send_raw(payload, length);
2254 if _result.is_err() {
2255 self.control_handle.shutdown();
2256 }
2257 self.drop_without_shutdown();
2258 _result
2259 }
2260
2261 pub fn send_no_shutdown_on_err(
2263 self,
2264 mut payload: Option<fidl::Vmo>,
2265 mut length: u32,
2266 ) -> Result<(), fidl::Error> {
2267 let _result = self.send_raw(payload, length);
2268 self.drop_without_shutdown();
2269 _result
2270 }
2271
2272 fn send_raw(&self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
2273 self.control_handle.inner.send::<ItemsGetResponse>(
2274 (payload, length),
2275 self.tx_id,
2276 0x542db3f176641edc,
2277 fidl::encoding::DynamicFlags::empty(),
2278 )
2279 }
2280}
2281
2282#[must_use = "FIDL methods require a response to be sent"]
2283#[derive(Debug)]
2284pub struct ItemsGet2Responder {
2285 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2286 tx_id: u32,
2287}
2288
2289impl std::ops::Drop for ItemsGet2Responder {
2293 fn drop(&mut self) {
2294 self.control_handle.shutdown();
2295 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2297 }
2298}
2299
2300impl fidl::endpoints::Responder for ItemsGet2Responder {
2301 type ControlHandle = ItemsControlHandle;
2302
2303 fn control_handle(&self) -> &ItemsControlHandle {
2304 &self.control_handle
2305 }
2306
2307 fn drop_without_shutdown(mut self) {
2308 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2310 std::mem::forget(self);
2312 }
2313}
2314
2315impl ItemsGet2Responder {
2316 pub fn send(self, mut result: Result<Vec<RetrievedItems>, i32>) -> Result<(), fidl::Error> {
2320 let _result = self.send_raw(result);
2321 if _result.is_err() {
2322 self.control_handle.shutdown();
2323 }
2324 self.drop_without_shutdown();
2325 _result
2326 }
2327
2328 pub fn send_no_shutdown_on_err(
2330 self,
2331 mut result: Result<Vec<RetrievedItems>, i32>,
2332 ) -> Result<(), fidl::Error> {
2333 let _result = self.send_raw(result);
2334 self.drop_without_shutdown();
2335 _result
2336 }
2337
2338 fn send_raw(&self, mut result: Result<Vec<RetrievedItems>, i32>) -> Result<(), fidl::Error> {
2339 self.control_handle.inner.send::<fidl::encoding::ResultType<ItemsGet2Response, i32>>(
2340 result
2341 .as_mut()
2342 .map_err(|e| *e)
2343 .map(|retrieved_items| (retrieved_items.as_mut_slice(),)),
2344 self.tx_id,
2345 0x2a64bd32f9ba3f2e,
2346 fidl::encoding::DynamicFlags::empty(),
2347 )
2348 }
2349}
2350
2351#[must_use = "FIDL methods require a response to be sent"]
2352#[derive(Debug)]
2353pub struct ItemsGetBootloaderFileResponder {
2354 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2355 tx_id: u32,
2356}
2357
2358impl std::ops::Drop for ItemsGetBootloaderFileResponder {
2362 fn drop(&mut self) {
2363 self.control_handle.shutdown();
2364 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2366 }
2367}
2368
2369impl fidl::endpoints::Responder for ItemsGetBootloaderFileResponder {
2370 type ControlHandle = ItemsControlHandle;
2371
2372 fn control_handle(&self) -> &ItemsControlHandle {
2373 &self.control_handle
2374 }
2375
2376 fn drop_without_shutdown(mut self) {
2377 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2379 std::mem::forget(self);
2381 }
2382}
2383
2384impl ItemsGetBootloaderFileResponder {
2385 pub fn send(self, mut payload: Option<fidl::Vmo>) -> Result<(), fidl::Error> {
2389 let _result = self.send_raw(payload);
2390 if _result.is_err() {
2391 self.control_handle.shutdown();
2392 }
2393 self.drop_without_shutdown();
2394 _result
2395 }
2396
2397 pub fn send_no_shutdown_on_err(
2399 self,
2400 mut payload: Option<fidl::Vmo>,
2401 ) -> Result<(), fidl::Error> {
2402 let _result = self.send_raw(payload);
2403 self.drop_without_shutdown();
2404 _result
2405 }
2406
2407 fn send_raw(&self, mut payload: Option<fidl::Vmo>) -> Result<(), fidl::Error> {
2408 self.control_handle.inner.send::<ItemsGetBootloaderFileResponse>(
2409 (payload,),
2410 self.tx_id,
2411 0x5a004db3c9378e8c,
2412 fidl::encoding::DynamicFlags::empty(),
2413 )
2414 }
2415}
2416
2417#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2418pub struct ReadOnlyLogMarker;
2419
2420impl fidl::endpoints::ProtocolMarker for ReadOnlyLogMarker {
2421 type Proxy = ReadOnlyLogProxy;
2422 type RequestStream = ReadOnlyLogRequestStream;
2423 #[cfg(target_os = "fuchsia")]
2424 type SynchronousProxy = ReadOnlyLogSynchronousProxy;
2425
2426 const DEBUG_NAME: &'static str = "fuchsia.boot.ReadOnlyLog";
2427}
2428impl fidl::endpoints::DiscoverableProtocolMarker for ReadOnlyLogMarker {}
2429
2430pub trait ReadOnlyLogProxyInterface: Send + Sync {
2431 type GetResponseFut: std::future::Future<Output = Result<fidl::DebugLog, fidl::Error>> + Send;
2432 fn r#get(&self) -> Self::GetResponseFut;
2433}
2434#[derive(Debug)]
2435#[cfg(target_os = "fuchsia")]
2436pub struct ReadOnlyLogSynchronousProxy {
2437 client: fidl::client::sync::Client,
2438}
2439
2440#[cfg(target_os = "fuchsia")]
2441impl fidl::endpoints::SynchronousProxy for ReadOnlyLogSynchronousProxy {
2442 type Proxy = ReadOnlyLogProxy;
2443 type Protocol = ReadOnlyLogMarker;
2444
2445 fn from_channel(inner: fidl::Channel) -> Self {
2446 Self::new(inner)
2447 }
2448
2449 fn into_channel(self) -> fidl::Channel {
2450 self.client.into_channel()
2451 }
2452
2453 fn as_channel(&self) -> &fidl::Channel {
2454 self.client.as_channel()
2455 }
2456}
2457
2458#[cfg(target_os = "fuchsia")]
2459impl ReadOnlyLogSynchronousProxy {
2460 pub fn new(channel: fidl::Channel) -> Self {
2461 Self { client: fidl::client::sync::Client::new(channel) }
2462 }
2463
2464 pub fn into_channel(self) -> fidl::Channel {
2465 self.client.into_channel()
2466 }
2467
2468 pub fn wait_for_event(
2471 &self,
2472 deadline: zx::MonotonicInstant,
2473 ) -> Result<ReadOnlyLogEvent, fidl::Error> {
2474 ReadOnlyLogEvent::decode(self.client.wait_for_event::<ReadOnlyLogMarker>(deadline)?)
2475 }
2476
2477 pub fn r#get(&self, ___deadline: zx::MonotonicInstant) -> Result<fidl::DebugLog, fidl::Error> {
2479 let _response = self
2480 .client
2481 .send_query::<fidl::encoding::EmptyPayload, ReadOnlyLogGetResponse, ReadOnlyLogMarker>(
2482 (),
2483 0x6f3ceba5eca871ff,
2484 fidl::encoding::DynamicFlags::empty(),
2485 ___deadline,
2486 )?;
2487 Ok(_response.log)
2488 }
2489}
2490
2491#[cfg(target_os = "fuchsia")]
2492impl From<ReadOnlyLogSynchronousProxy> for zx::NullableHandle {
2493 fn from(value: ReadOnlyLogSynchronousProxy) -> Self {
2494 value.into_channel().into()
2495 }
2496}
2497
2498#[cfg(target_os = "fuchsia")]
2499impl From<fidl::Channel> for ReadOnlyLogSynchronousProxy {
2500 fn from(value: fidl::Channel) -> Self {
2501 Self::new(value)
2502 }
2503}
2504
2505#[cfg(target_os = "fuchsia")]
2506impl fidl::endpoints::FromClient for ReadOnlyLogSynchronousProxy {
2507 type Protocol = ReadOnlyLogMarker;
2508
2509 fn from_client(value: fidl::endpoints::ClientEnd<ReadOnlyLogMarker>) -> Self {
2510 Self::new(value.into_channel())
2511 }
2512}
2513
2514#[derive(Debug, Clone)]
2515pub struct ReadOnlyLogProxy {
2516 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2517}
2518
2519impl fidl::endpoints::Proxy for ReadOnlyLogProxy {
2520 type Protocol = ReadOnlyLogMarker;
2521
2522 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2523 Self::new(inner)
2524 }
2525
2526 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2527 self.client.into_channel().map_err(|client| Self { client })
2528 }
2529
2530 fn as_channel(&self) -> &::fidl::AsyncChannel {
2531 self.client.as_channel()
2532 }
2533}
2534
2535impl ReadOnlyLogProxy {
2536 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2538 let protocol_name = <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2539 Self { client: fidl::client::Client::new(channel, protocol_name) }
2540 }
2541
2542 pub fn take_event_stream(&self) -> ReadOnlyLogEventStream {
2548 ReadOnlyLogEventStream { event_receiver: self.client.take_event_receiver() }
2549 }
2550
2551 pub fn r#get(
2553 &self,
2554 ) -> fidl::client::QueryResponseFut<fidl::DebugLog, fidl::encoding::DefaultFuchsiaResourceDialect>
2555 {
2556 ReadOnlyLogProxyInterface::r#get(self)
2557 }
2558}
2559
2560impl ReadOnlyLogProxyInterface for ReadOnlyLogProxy {
2561 type GetResponseFut = fidl::client::QueryResponseFut<
2562 fidl::DebugLog,
2563 fidl::encoding::DefaultFuchsiaResourceDialect,
2564 >;
2565 fn r#get(&self) -> Self::GetResponseFut {
2566 fn _decode(
2567 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2568 ) -> Result<fidl::DebugLog, fidl::Error> {
2569 let _response = fidl::client::decode_transaction_body::<
2570 ReadOnlyLogGetResponse,
2571 fidl::encoding::DefaultFuchsiaResourceDialect,
2572 0x6f3ceba5eca871ff,
2573 >(_buf?)?;
2574 Ok(_response.log)
2575 }
2576 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::DebugLog>(
2577 (),
2578 0x6f3ceba5eca871ff,
2579 fidl::encoding::DynamicFlags::empty(),
2580 _decode,
2581 )
2582 }
2583}
2584
2585pub struct ReadOnlyLogEventStream {
2586 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2587}
2588
2589impl std::marker::Unpin for ReadOnlyLogEventStream {}
2590
2591impl futures::stream::FusedStream for ReadOnlyLogEventStream {
2592 fn is_terminated(&self) -> bool {
2593 self.event_receiver.is_terminated()
2594 }
2595}
2596
2597impl futures::Stream for ReadOnlyLogEventStream {
2598 type Item = Result<ReadOnlyLogEvent, fidl::Error>;
2599
2600 fn poll_next(
2601 mut self: std::pin::Pin<&mut Self>,
2602 cx: &mut std::task::Context<'_>,
2603 ) -> std::task::Poll<Option<Self::Item>> {
2604 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2605 &mut self.event_receiver,
2606 cx
2607 )?) {
2608 Some(buf) => std::task::Poll::Ready(Some(ReadOnlyLogEvent::decode(buf))),
2609 None => std::task::Poll::Ready(None),
2610 }
2611 }
2612}
2613
2614#[derive(Debug)]
2615pub enum ReadOnlyLogEvent {}
2616
2617impl ReadOnlyLogEvent {
2618 fn decode(
2620 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2621 ) -> Result<ReadOnlyLogEvent, fidl::Error> {
2622 let (bytes, _handles) = buf.split_mut();
2623 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2624 debug_assert_eq!(tx_header.tx_id, 0);
2625 match tx_header.ordinal {
2626 _ => Err(fidl::Error::UnknownOrdinal {
2627 ordinal: tx_header.ordinal,
2628 protocol_name: <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2629 }),
2630 }
2631 }
2632}
2633
2634pub struct ReadOnlyLogRequestStream {
2636 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2637 is_terminated: bool,
2638}
2639
2640impl std::marker::Unpin for ReadOnlyLogRequestStream {}
2641
2642impl futures::stream::FusedStream for ReadOnlyLogRequestStream {
2643 fn is_terminated(&self) -> bool {
2644 self.is_terminated
2645 }
2646}
2647
2648impl fidl::endpoints::RequestStream for ReadOnlyLogRequestStream {
2649 type Protocol = ReadOnlyLogMarker;
2650 type ControlHandle = ReadOnlyLogControlHandle;
2651
2652 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2653 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2654 }
2655
2656 fn control_handle(&self) -> Self::ControlHandle {
2657 ReadOnlyLogControlHandle { inner: self.inner.clone() }
2658 }
2659
2660 fn into_inner(
2661 self,
2662 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2663 {
2664 (self.inner, self.is_terminated)
2665 }
2666
2667 fn from_inner(
2668 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2669 is_terminated: bool,
2670 ) -> Self {
2671 Self { inner, is_terminated }
2672 }
2673}
2674
2675impl futures::Stream for ReadOnlyLogRequestStream {
2676 type Item = Result<ReadOnlyLogRequest, fidl::Error>;
2677
2678 fn poll_next(
2679 mut self: std::pin::Pin<&mut Self>,
2680 cx: &mut std::task::Context<'_>,
2681 ) -> std::task::Poll<Option<Self::Item>> {
2682 let this = &mut *self;
2683 if this.inner.check_shutdown(cx) {
2684 this.is_terminated = true;
2685 return std::task::Poll::Ready(None);
2686 }
2687 if this.is_terminated {
2688 panic!("polled ReadOnlyLogRequestStream after completion");
2689 }
2690 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2691 |bytes, handles| {
2692 match this.inner.channel().read_etc(cx, bytes, handles) {
2693 std::task::Poll::Ready(Ok(())) => {}
2694 std::task::Poll::Pending => return std::task::Poll::Pending,
2695 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2696 this.is_terminated = true;
2697 return std::task::Poll::Ready(None);
2698 }
2699 std::task::Poll::Ready(Err(e)) => {
2700 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2701 e.into(),
2702 ))));
2703 }
2704 }
2705
2706 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2708
2709 std::task::Poll::Ready(Some(match header.ordinal {
2710 0x6f3ceba5eca871ff => {
2711 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2712 let mut req = fidl::new_empty!(
2713 fidl::encoding::EmptyPayload,
2714 fidl::encoding::DefaultFuchsiaResourceDialect
2715 );
2716 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2717 let control_handle = ReadOnlyLogControlHandle { inner: this.inner.clone() };
2718 Ok(ReadOnlyLogRequest::Get {
2719 responder: ReadOnlyLogGetResponder {
2720 control_handle: std::mem::ManuallyDrop::new(control_handle),
2721 tx_id: header.tx_id,
2722 },
2723 })
2724 }
2725 _ => Err(fidl::Error::UnknownOrdinal {
2726 ordinal: header.ordinal,
2727 protocol_name:
2728 <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2729 }),
2730 }))
2731 },
2732 )
2733 }
2734}
2735
2736#[derive(Debug)]
2738pub enum ReadOnlyLogRequest {
2739 Get { responder: ReadOnlyLogGetResponder },
2741}
2742
2743impl ReadOnlyLogRequest {
2744 #[allow(irrefutable_let_patterns)]
2745 pub fn into_get(self) -> Option<(ReadOnlyLogGetResponder)> {
2746 if let ReadOnlyLogRequest::Get { responder } = self { Some((responder)) } else { None }
2747 }
2748
2749 pub fn method_name(&self) -> &'static str {
2751 match *self {
2752 ReadOnlyLogRequest::Get { .. } => "get",
2753 }
2754 }
2755}
2756
2757#[derive(Debug, Clone)]
2758pub struct ReadOnlyLogControlHandle {
2759 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2760}
2761
2762impl fidl::endpoints::ControlHandle for ReadOnlyLogControlHandle {
2763 fn shutdown(&self) {
2764 self.inner.shutdown()
2765 }
2766
2767 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2768 self.inner.shutdown_with_epitaph(status)
2769 }
2770
2771 fn is_closed(&self) -> bool {
2772 self.inner.channel().is_closed()
2773 }
2774 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2775 self.inner.channel().on_closed()
2776 }
2777
2778 #[cfg(target_os = "fuchsia")]
2779 fn signal_peer(
2780 &self,
2781 clear_mask: zx::Signals,
2782 set_mask: zx::Signals,
2783 ) -> Result<(), zx_status::Status> {
2784 use fidl::Peered;
2785 self.inner.channel().signal_peer(clear_mask, set_mask)
2786 }
2787}
2788
2789impl ReadOnlyLogControlHandle {}
2790
2791#[must_use = "FIDL methods require a response to be sent"]
2792#[derive(Debug)]
2793pub struct ReadOnlyLogGetResponder {
2794 control_handle: std::mem::ManuallyDrop<ReadOnlyLogControlHandle>,
2795 tx_id: u32,
2796}
2797
2798impl std::ops::Drop for ReadOnlyLogGetResponder {
2802 fn drop(&mut self) {
2803 self.control_handle.shutdown();
2804 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2806 }
2807}
2808
2809impl fidl::endpoints::Responder for ReadOnlyLogGetResponder {
2810 type ControlHandle = ReadOnlyLogControlHandle;
2811
2812 fn control_handle(&self) -> &ReadOnlyLogControlHandle {
2813 &self.control_handle
2814 }
2815
2816 fn drop_without_shutdown(mut self) {
2817 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2819 std::mem::forget(self);
2821 }
2822}
2823
2824impl ReadOnlyLogGetResponder {
2825 pub fn send(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2829 let _result = self.send_raw(log);
2830 if _result.is_err() {
2831 self.control_handle.shutdown();
2832 }
2833 self.drop_without_shutdown();
2834 _result
2835 }
2836
2837 pub fn send_no_shutdown_on_err(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2839 let _result = self.send_raw(log);
2840 self.drop_without_shutdown();
2841 _result
2842 }
2843
2844 fn send_raw(&self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2845 self.control_handle.inner.send::<ReadOnlyLogGetResponse>(
2846 (log,),
2847 self.tx_id,
2848 0x6f3ceba5eca871ff,
2849 fidl::encoding::DynamicFlags::empty(),
2850 )
2851 }
2852}
2853
2854#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2855pub struct SvcStashMarker;
2856
2857impl fidl::endpoints::ProtocolMarker for SvcStashMarker {
2858 type Proxy = SvcStashProxy;
2859 type RequestStream = SvcStashRequestStream;
2860 #[cfg(target_os = "fuchsia")]
2861 type SynchronousProxy = SvcStashSynchronousProxy;
2862
2863 const DEBUG_NAME: &'static str = "(anonymous) SvcStash";
2864}
2865
2866pub trait SvcStashProxyInterface: Send + Sync {
2867 fn r#store(
2868 &self,
2869 svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
2870 ) -> Result<(), fidl::Error>;
2871}
2872#[derive(Debug)]
2873#[cfg(target_os = "fuchsia")]
2874pub struct SvcStashSynchronousProxy {
2875 client: fidl::client::sync::Client,
2876}
2877
2878#[cfg(target_os = "fuchsia")]
2879impl fidl::endpoints::SynchronousProxy for SvcStashSynchronousProxy {
2880 type Proxy = SvcStashProxy;
2881 type Protocol = SvcStashMarker;
2882
2883 fn from_channel(inner: fidl::Channel) -> Self {
2884 Self::new(inner)
2885 }
2886
2887 fn into_channel(self) -> fidl::Channel {
2888 self.client.into_channel()
2889 }
2890
2891 fn as_channel(&self) -> &fidl::Channel {
2892 self.client.as_channel()
2893 }
2894}
2895
2896#[cfg(target_os = "fuchsia")]
2897impl SvcStashSynchronousProxy {
2898 pub fn new(channel: fidl::Channel) -> Self {
2899 Self { client: fidl::client::sync::Client::new(channel) }
2900 }
2901
2902 pub fn into_channel(self) -> fidl::Channel {
2903 self.client.into_channel()
2904 }
2905
2906 pub fn wait_for_event(
2909 &self,
2910 deadline: zx::MonotonicInstant,
2911 ) -> Result<SvcStashEvent, fidl::Error> {
2912 SvcStashEvent::decode(self.client.wait_for_event::<SvcStashMarker>(deadline)?)
2913 }
2914
2915 pub fn r#store(
2919 &self,
2920 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
2921 ) -> Result<(), fidl::Error> {
2922 self.client.send::<SvcStashStoreRequest>(
2923 (svc_endpoint,),
2924 0xc2648e356ca2870,
2925 fidl::encoding::DynamicFlags::empty(),
2926 )
2927 }
2928}
2929
2930#[cfg(target_os = "fuchsia")]
2931impl From<SvcStashSynchronousProxy> for zx::NullableHandle {
2932 fn from(value: SvcStashSynchronousProxy) -> Self {
2933 value.into_channel().into()
2934 }
2935}
2936
2937#[cfg(target_os = "fuchsia")]
2938impl From<fidl::Channel> for SvcStashSynchronousProxy {
2939 fn from(value: fidl::Channel) -> Self {
2940 Self::new(value)
2941 }
2942}
2943
2944#[cfg(target_os = "fuchsia")]
2945impl fidl::endpoints::FromClient for SvcStashSynchronousProxy {
2946 type Protocol = SvcStashMarker;
2947
2948 fn from_client(value: fidl::endpoints::ClientEnd<SvcStashMarker>) -> Self {
2949 Self::new(value.into_channel())
2950 }
2951}
2952
2953#[derive(Debug, Clone)]
2954pub struct SvcStashProxy {
2955 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2956}
2957
2958impl fidl::endpoints::Proxy for SvcStashProxy {
2959 type Protocol = SvcStashMarker;
2960
2961 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2962 Self::new(inner)
2963 }
2964
2965 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2966 self.client.into_channel().map_err(|client| Self { client })
2967 }
2968
2969 fn as_channel(&self) -> &::fidl::AsyncChannel {
2970 self.client.as_channel()
2971 }
2972}
2973
2974impl SvcStashProxy {
2975 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2977 let protocol_name = <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2978 Self { client: fidl::client::Client::new(channel, protocol_name) }
2979 }
2980
2981 pub fn take_event_stream(&self) -> SvcStashEventStream {
2987 SvcStashEventStream { event_receiver: self.client.take_event_receiver() }
2988 }
2989
2990 pub fn r#store(
2994 &self,
2995 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
2996 ) -> Result<(), fidl::Error> {
2997 SvcStashProxyInterface::r#store(self, svc_endpoint)
2998 }
2999}
3000
3001impl SvcStashProxyInterface for SvcStashProxy {
3002 fn r#store(
3003 &self,
3004 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
3005 ) -> Result<(), fidl::Error> {
3006 self.client.send::<SvcStashStoreRequest>(
3007 (svc_endpoint,),
3008 0xc2648e356ca2870,
3009 fidl::encoding::DynamicFlags::empty(),
3010 )
3011 }
3012}
3013
3014pub struct SvcStashEventStream {
3015 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3016}
3017
3018impl std::marker::Unpin for SvcStashEventStream {}
3019
3020impl futures::stream::FusedStream for SvcStashEventStream {
3021 fn is_terminated(&self) -> bool {
3022 self.event_receiver.is_terminated()
3023 }
3024}
3025
3026impl futures::Stream for SvcStashEventStream {
3027 type Item = Result<SvcStashEvent, fidl::Error>;
3028
3029 fn poll_next(
3030 mut self: std::pin::Pin<&mut Self>,
3031 cx: &mut std::task::Context<'_>,
3032 ) -> std::task::Poll<Option<Self::Item>> {
3033 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3034 &mut self.event_receiver,
3035 cx
3036 )?) {
3037 Some(buf) => std::task::Poll::Ready(Some(SvcStashEvent::decode(buf))),
3038 None => std::task::Poll::Ready(None),
3039 }
3040 }
3041}
3042
3043#[derive(Debug)]
3044pub enum SvcStashEvent {}
3045
3046impl SvcStashEvent {
3047 fn decode(
3049 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3050 ) -> Result<SvcStashEvent, fidl::Error> {
3051 let (bytes, _handles) = buf.split_mut();
3052 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3053 debug_assert_eq!(tx_header.tx_id, 0);
3054 match tx_header.ordinal {
3055 _ => Err(fidl::Error::UnknownOrdinal {
3056 ordinal: tx_header.ordinal,
3057 protocol_name: <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3058 }),
3059 }
3060 }
3061}
3062
3063pub struct SvcStashRequestStream {
3065 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3066 is_terminated: bool,
3067}
3068
3069impl std::marker::Unpin for SvcStashRequestStream {}
3070
3071impl futures::stream::FusedStream for SvcStashRequestStream {
3072 fn is_terminated(&self) -> bool {
3073 self.is_terminated
3074 }
3075}
3076
3077impl fidl::endpoints::RequestStream for SvcStashRequestStream {
3078 type Protocol = SvcStashMarker;
3079 type ControlHandle = SvcStashControlHandle;
3080
3081 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3082 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3083 }
3084
3085 fn control_handle(&self) -> Self::ControlHandle {
3086 SvcStashControlHandle { inner: self.inner.clone() }
3087 }
3088
3089 fn into_inner(
3090 self,
3091 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3092 {
3093 (self.inner, self.is_terminated)
3094 }
3095
3096 fn from_inner(
3097 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3098 is_terminated: bool,
3099 ) -> Self {
3100 Self { inner, is_terminated }
3101 }
3102}
3103
3104impl futures::Stream for SvcStashRequestStream {
3105 type Item = Result<SvcStashRequest, fidl::Error>;
3106
3107 fn poll_next(
3108 mut self: std::pin::Pin<&mut Self>,
3109 cx: &mut std::task::Context<'_>,
3110 ) -> std::task::Poll<Option<Self::Item>> {
3111 let this = &mut *self;
3112 if this.inner.check_shutdown(cx) {
3113 this.is_terminated = true;
3114 return std::task::Poll::Ready(None);
3115 }
3116 if this.is_terminated {
3117 panic!("polled SvcStashRequestStream after completion");
3118 }
3119 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3120 |bytes, handles| {
3121 match this.inner.channel().read_etc(cx, bytes, handles) {
3122 std::task::Poll::Ready(Ok(())) => {}
3123 std::task::Poll::Pending => return std::task::Poll::Pending,
3124 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3125 this.is_terminated = true;
3126 return std::task::Poll::Ready(None);
3127 }
3128 std::task::Poll::Ready(Err(e)) => {
3129 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3130 e.into(),
3131 ))));
3132 }
3133 }
3134
3135 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3137
3138 std::task::Poll::Ready(Some(match header.ordinal {
3139 0xc2648e356ca2870 => {
3140 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3141 let mut req = fidl::new_empty!(
3142 SvcStashStoreRequest,
3143 fidl::encoding::DefaultFuchsiaResourceDialect
3144 );
3145 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SvcStashStoreRequest>(&header, _body_bytes, handles, &mut req)?;
3146 let control_handle = SvcStashControlHandle { inner: this.inner.clone() };
3147 Ok(SvcStashRequest::Store {
3148 svc_endpoint: req.svc_endpoint,
3149
3150 control_handle,
3151 })
3152 }
3153 _ => Err(fidl::Error::UnknownOrdinal {
3154 ordinal: header.ordinal,
3155 protocol_name:
3156 <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3157 }),
3158 }))
3159 },
3160 )
3161 }
3162}
3163
3164#[derive(Debug)]
3166pub enum SvcStashRequest {
3167 Store {
3171 svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
3172 control_handle: SvcStashControlHandle,
3173 },
3174}
3175
3176impl SvcStashRequest {
3177 #[allow(irrefutable_let_patterns)]
3178 pub fn into_store(
3179 self,
3180 ) -> Option<(fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>, SvcStashControlHandle)>
3181 {
3182 if let SvcStashRequest::Store { svc_endpoint, control_handle } = self {
3183 Some((svc_endpoint, control_handle))
3184 } else {
3185 None
3186 }
3187 }
3188
3189 pub fn method_name(&self) -> &'static str {
3191 match *self {
3192 SvcStashRequest::Store { .. } => "store",
3193 }
3194 }
3195}
3196
3197#[derive(Debug, Clone)]
3198pub struct SvcStashControlHandle {
3199 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3200}
3201
3202impl fidl::endpoints::ControlHandle for SvcStashControlHandle {
3203 fn shutdown(&self) {
3204 self.inner.shutdown()
3205 }
3206
3207 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3208 self.inner.shutdown_with_epitaph(status)
3209 }
3210
3211 fn is_closed(&self) -> bool {
3212 self.inner.channel().is_closed()
3213 }
3214 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3215 self.inner.channel().on_closed()
3216 }
3217
3218 #[cfg(target_os = "fuchsia")]
3219 fn signal_peer(
3220 &self,
3221 clear_mask: zx::Signals,
3222 set_mask: zx::Signals,
3223 ) -> Result<(), zx_status::Status> {
3224 use fidl::Peered;
3225 self.inner.channel().signal_peer(clear_mask, set_mask)
3226 }
3227}
3228
3229impl SvcStashControlHandle {}
3230
3231#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3232pub struct SvcStashProviderMarker;
3233
3234impl fidl::endpoints::ProtocolMarker for SvcStashProviderMarker {
3235 type Proxy = SvcStashProviderProxy;
3236 type RequestStream = SvcStashProviderRequestStream;
3237 #[cfg(target_os = "fuchsia")]
3238 type SynchronousProxy = SvcStashProviderSynchronousProxy;
3239
3240 const DEBUG_NAME: &'static str = "fuchsia.boot.SvcStashProvider";
3241}
3242impl fidl::endpoints::DiscoverableProtocolMarker for SvcStashProviderMarker {}
3243pub type SvcStashProviderGetResult = Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>;
3244
3245pub trait SvcStashProviderProxyInterface: Send + Sync {
3246 type GetResponseFut: std::future::Future<Output = Result<SvcStashProviderGetResult, fidl::Error>>
3247 + Send;
3248 fn r#get(&self) -> Self::GetResponseFut;
3249}
3250#[derive(Debug)]
3251#[cfg(target_os = "fuchsia")]
3252pub struct SvcStashProviderSynchronousProxy {
3253 client: fidl::client::sync::Client,
3254}
3255
3256#[cfg(target_os = "fuchsia")]
3257impl fidl::endpoints::SynchronousProxy for SvcStashProviderSynchronousProxy {
3258 type Proxy = SvcStashProviderProxy;
3259 type Protocol = SvcStashProviderMarker;
3260
3261 fn from_channel(inner: fidl::Channel) -> Self {
3262 Self::new(inner)
3263 }
3264
3265 fn into_channel(self) -> fidl::Channel {
3266 self.client.into_channel()
3267 }
3268
3269 fn as_channel(&self) -> &fidl::Channel {
3270 self.client.as_channel()
3271 }
3272}
3273
3274#[cfg(target_os = "fuchsia")]
3275impl SvcStashProviderSynchronousProxy {
3276 pub fn new(channel: fidl::Channel) -> Self {
3277 Self { client: fidl::client::sync::Client::new(channel) }
3278 }
3279
3280 pub fn into_channel(self) -> fidl::Channel {
3281 self.client.into_channel()
3282 }
3283
3284 pub fn wait_for_event(
3287 &self,
3288 deadline: zx::MonotonicInstant,
3289 ) -> Result<SvcStashProviderEvent, fidl::Error> {
3290 SvcStashProviderEvent::decode(
3291 self.client.wait_for_event::<SvcStashProviderMarker>(deadline)?,
3292 )
3293 }
3294
3295 pub fn r#get(
3300 &self,
3301 ___deadline: zx::MonotonicInstant,
3302 ) -> Result<SvcStashProviderGetResult, fidl::Error> {
3303 let _response = self.client.send_query::<
3304 fidl::encoding::EmptyPayload,
3305 fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>,
3306 SvcStashProviderMarker,
3307 >(
3308 (),
3309 0x3885bad5b734f883,
3310 fidl::encoding::DynamicFlags::empty(),
3311 ___deadline,
3312 )?;
3313 Ok(_response.map(|x| x.resource))
3314 }
3315}
3316
3317#[cfg(target_os = "fuchsia")]
3318impl From<SvcStashProviderSynchronousProxy> for zx::NullableHandle {
3319 fn from(value: SvcStashProviderSynchronousProxy) -> Self {
3320 value.into_channel().into()
3321 }
3322}
3323
3324#[cfg(target_os = "fuchsia")]
3325impl From<fidl::Channel> for SvcStashProviderSynchronousProxy {
3326 fn from(value: fidl::Channel) -> Self {
3327 Self::new(value)
3328 }
3329}
3330
3331#[cfg(target_os = "fuchsia")]
3332impl fidl::endpoints::FromClient for SvcStashProviderSynchronousProxy {
3333 type Protocol = SvcStashProviderMarker;
3334
3335 fn from_client(value: fidl::endpoints::ClientEnd<SvcStashProviderMarker>) -> Self {
3336 Self::new(value.into_channel())
3337 }
3338}
3339
3340#[derive(Debug, Clone)]
3341pub struct SvcStashProviderProxy {
3342 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3343}
3344
3345impl fidl::endpoints::Proxy for SvcStashProviderProxy {
3346 type Protocol = SvcStashProviderMarker;
3347
3348 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3349 Self::new(inner)
3350 }
3351
3352 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3353 self.client.into_channel().map_err(|client| Self { client })
3354 }
3355
3356 fn as_channel(&self) -> &::fidl::AsyncChannel {
3357 self.client.as_channel()
3358 }
3359}
3360
3361impl SvcStashProviderProxy {
3362 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3364 let protocol_name = <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3365 Self { client: fidl::client::Client::new(channel, protocol_name) }
3366 }
3367
3368 pub fn take_event_stream(&self) -> SvcStashProviderEventStream {
3374 SvcStashProviderEventStream { event_receiver: self.client.take_event_receiver() }
3375 }
3376
3377 pub fn r#get(
3382 &self,
3383 ) -> fidl::client::QueryResponseFut<
3384 SvcStashProviderGetResult,
3385 fidl::encoding::DefaultFuchsiaResourceDialect,
3386 > {
3387 SvcStashProviderProxyInterface::r#get(self)
3388 }
3389}
3390
3391impl SvcStashProviderProxyInterface for SvcStashProviderProxy {
3392 type GetResponseFut = fidl::client::QueryResponseFut<
3393 SvcStashProviderGetResult,
3394 fidl::encoding::DefaultFuchsiaResourceDialect,
3395 >;
3396 fn r#get(&self) -> Self::GetResponseFut {
3397 fn _decode(
3398 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3399 ) -> Result<SvcStashProviderGetResult, fidl::Error> {
3400 let _response = fidl::client::decode_transaction_body::<
3401 fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>,
3402 fidl::encoding::DefaultFuchsiaResourceDialect,
3403 0x3885bad5b734f883,
3404 >(_buf?)?;
3405 Ok(_response.map(|x| x.resource))
3406 }
3407 self.client
3408 .send_query_and_decode::<fidl::encoding::EmptyPayload, SvcStashProviderGetResult>(
3409 (),
3410 0x3885bad5b734f883,
3411 fidl::encoding::DynamicFlags::empty(),
3412 _decode,
3413 )
3414 }
3415}
3416
3417pub struct SvcStashProviderEventStream {
3418 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3419}
3420
3421impl std::marker::Unpin for SvcStashProviderEventStream {}
3422
3423impl futures::stream::FusedStream for SvcStashProviderEventStream {
3424 fn is_terminated(&self) -> bool {
3425 self.event_receiver.is_terminated()
3426 }
3427}
3428
3429impl futures::Stream for SvcStashProviderEventStream {
3430 type Item = Result<SvcStashProviderEvent, fidl::Error>;
3431
3432 fn poll_next(
3433 mut self: std::pin::Pin<&mut Self>,
3434 cx: &mut std::task::Context<'_>,
3435 ) -> std::task::Poll<Option<Self::Item>> {
3436 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3437 &mut self.event_receiver,
3438 cx
3439 )?) {
3440 Some(buf) => std::task::Poll::Ready(Some(SvcStashProviderEvent::decode(buf))),
3441 None => std::task::Poll::Ready(None),
3442 }
3443 }
3444}
3445
3446#[derive(Debug)]
3447pub enum SvcStashProviderEvent {}
3448
3449impl SvcStashProviderEvent {
3450 fn decode(
3452 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3453 ) -> Result<SvcStashProviderEvent, fidl::Error> {
3454 let (bytes, _handles) = buf.split_mut();
3455 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3456 debug_assert_eq!(tx_header.tx_id, 0);
3457 match tx_header.ordinal {
3458 _ => Err(fidl::Error::UnknownOrdinal {
3459 ordinal: tx_header.ordinal,
3460 protocol_name:
3461 <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3462 }),
3463 }
3464 }
3465}
3466
3467pub struct SvcStashProviderRequestStream {
3469 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3470 is_terminated: bool,
3471}
3472
3473impl std::marker::Unpin for SvcStashProviderRequestStream {}
3474
3475impl futures::stream::FusedStream for SvcStashProviderRequestStream {
3476 fn is_terminated(&self) -> bool {
3477 self.is_terminated
3478 }
3479}
3480
3481impl fidl::endpoints::RequestStream for SvcStashProviderRequestStream {
3482 type Protocol = SvcStashProviderMarker;
3483 type ControlHandle = SvcStashProviderControlHandle;
3484
3485 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3486 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3487 }
3488
3489 fn control_handle(&self) -> Self::ControlHandle {
3490 SvcStashProviderControlHandle { inner: self.inner.clone() }
3491 }
3492
3493 fn into_inner(
3494 self,
3495 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3496 {
3497 (self.inner, self.is_terminated)
3498 }
3499
3500 fn from_inner(
3501 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3502 is_terminated: bool,
3503 ) -> Self {
3504 Self { inner, is_terminated }
3505 }
3506}
3507
3508impl futures::Stream for SvcStashProviderRequestStream {
3509 type Item = Result<SvcStashProviderRequest, fidl::Error>;
3510
3511 fn poll_next(
3512 mut self: std::pin::Pin<&mut Self>,
3513 cx: &mut std::task::Context<'_>,
3514 ) -> std::task::Poll<Option<Self::Item>> {
3515 let this = &mut *self;
3516 if this.inner.check_shutdown(cx) {
3517 this.is_terminated = true;
3518 return std::task::Poll::Ready(None);
3519 }
3520 if this.is_terminated {
3521 panic!("polled SvcStashProviderRequestStream after completion");
3522 }
3523 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3524 |bytes, handles| {
3525 match this.inner.channel().read_etc(cx, bytes, handles) {
3526 std::task::Poll::Ready(Ok(())) => {}
3527 std::task::Poll::Pending => return std::task::Poll::Pending,
3528 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3529 this.is_terminated = true;
3530 return std::task::Poll::Ready(None);
3531 }
3532 std::task::Poll::Ready(Err(e)) => {
3533 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3534 e.into(),
3535 ))));
3536 }
3537 }
3538
3539 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3541
3542 std::task::Poll::Ready(Some(match header.ordinal {
3543 0x3885bad5b734f883 => {
3544 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3545 let mut req = fidl::new_empty!(
3546 fidl::encoding::EmptyPayload,
3547 fidl::encoding::DefaultFuchsiaResourceDialect
3548 );
3549 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3550 let control_handle =
3551 SvcStashProviderControlHandle { inner: this.inner.clone() };
3552 Ok(SvcStashProviderRequest::Get {
3553 responder: SvcStashProviderGetResponder {
3554 control_handle: std::mem::ManuallyDrop::new(control_handle),
3555 tx_id: header.tx_id,
3556 },
3557 })
3558 }
3559 _ => Err(fidl::Error::UnknownOrdinal {
3560 ordinal: header.ordinal,
3561 protocol_name:
3562 <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3563 }),
3564 }))
3565 },
3566 )
3567 }
3568}
3569
3570#[derive(Debug)]
3572pub enum SvcStashProviderRequest {
3573 Get { responder: SvcStashProviderGetResponder },
3578}
3579
3580impl SvcStashProviderRequest {
3581 #[allow(irrefutable_let_patterns)]
3582 pub fn into_get(self) -> Option<(SvcStashProviderGetResponder)> {
3583 if let SvcStashProviderRequest::Get { responder } = self { Some((responder)) } else { None }
3584 }
3585
3586 pub fn method_name(&self) -> &'static str {
3588 match *self {
3589 SvcStashProviderRequest::Get { .. } => "get",
3590 }
3591 }
3592}
3593
3594#[derive(Debug, Clone)]
3595pub struct SvcStashProviderControlHandle {
3596 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3597}
3598
3599impl fidl::endpoints::ControlHandle for SvcStashProviderControlHandle {
3600 fn shutdown(&self) {
3601 self.inner.shutdown()
3602 }
3603
3604 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3605 self.inner.shutdown_with_epitaph(status)
3606 }
3607
3608 fn is_closed(&self) -> bool {
3609 self.inner.channel().is_closed()
3610 }
3611 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3612 self.inner.channel().on_closed()
3613 }
3614
3615 #[cfg(target_os = "fuchsia")]
3616 fn signal_peer(
3617 &self,
3618 clear_mask: zx::Signals,
3619 set_mask: zx::Signals,
3620 ) -> Result<(), zx_status::Status> {
3621 use fidl::Peered;
3622 self.inner.channel().signal_peer(clear_mask, set_mask)
3623 }
3624}
3625
3626impl SvcStashProviderControlHandle {}
3627
3628#[must_use = "FIDL methods require a response to be sent"]
3629#[derive(Debug)]
3630pub struct SvcStashProviderGetResponder {
3631 control_handle: std::mem::ManuallyDrop<SvcStashProviderControlHandle>,
3632 tx_id: u32,
3633}
3634
3635impl std::ops::Drop for SvcStashProviderGetResponder {
3639 fn drop(&mut self) {
3640 self.control_handle.shutdown();
3641 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3643 }
3644}
3645
3646impl fidl::endpoints::Responder for SvcStashProviderGetResponder {
3647 type ControlHandle = SvcStashProviderControlHandle;
3648
3649 fn control_handle(&self) -> &SvcStashProviderControlHandle {
3650 &self.control_handle
3651 }
3652
3653 fn drop_without_shutdown(mut self) {
3654 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3656 std::mem::forget(self);
3658 }
3659}
3660
3661impl SvcStashProviderGetResponder {
3662 pub fn send(
3666 self,
3667 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3668 ) -> Result<(), fidl::Error> {
3669 let _result = self.send_raw(result);
3670 if _result.is_err() {
3671 self.control_handle.shutdown();
3672 }
3673 self.drop_without_shutdown();
3674 _result
3675 }
3676
3677 pub fn send_no_shutdown_on_err(
3679 self,
3680 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3681 ) -> Result<(), fidl::Error> {
3682 let _result = self.send_raw(result);
3683 self.drop_without_shutdown();
3684 _result
3685 }
3686
3687 fn send_raw(
3688 &self,
3689 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3690 ) -> Result<(), fidl::Error> {
3691 self.control_handle
3692 .inner
3693 .send::<fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>>(
3694 result.map(|resource| (resource,)),
3695 self.tx_id,
3696 0x3885bad5b734f883,
3697 fidl::encoding::DynamicFlags::empty(),
3698 )
3699 }
3700}
3701
3702#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3703pub struct UserbootMarker;
3704
3705impl fidl::endpoints::ProtocolMarker for UserbootMarker {
3706 type Proxy = UserbootProxy;
3707 type RequestStream = UserbootRequestStream;
3708 #[cfg(target_os = "fuchsia")]
3709 type SynchronousProxy = UserbootSynchronousProxy;
3710
3711 const DEBUG_NAME: &'static str = "(anonymous) Userboot";
3712}
3713
3714pub trait UserbootProxyInterface: Send + Sync {
3715 fn r#post_bootfs_files(&self, files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error>;
3716 fn r#post_stash_svc(
3717 &self,
3718 stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3719 ) -> Result<(), fidl::Error>;
3720}
3721#[derive(Debug)]
3722#[cfg(target_os = "fuchsia")]
3723pub struct UserbootSynchronousProxy {
3724 client: fidl::client::sync::Client,
3725}
3726
3727#[cfg(target_os = "fuchsia")]
3728impl fidl::endpoints::SynchronousProxy for UserbootSynchronousProxy {
3729 type Proxy = UserbootProxy;
3730 type Protocol = UserbootMarker;
3731
3732 fn from_channel(inner: fidl::Channel) -> Self {
3733 Self::new(inner)
3734 }
3735
3736 fn into_channel(self) -> fidl::Channel {
3737 self.client.into_channel()
3738 }
3739
3740 fn as_channel(&self) -> &fidl::Channel {
3741 self.client.as_channel()
3742 }
3743}
3744
3745#[cfg(target_os = "fuchsia")]
3746impl UserbootSynchronousProxy {
3747 pub fn new(channel: fidl::Channel) -> Self {
3748 Self { client: fidl::client::sync::Client::new(channel) }
3749 }
3750
3751 pub fn into_channel(self) -> fidl::Channel {
3752 self.client.into_channel()
3753 }
3754
3755 pub fn wait_for_event(
3758 &self,
3759 deadline: zx::MonotonicInstant,
3760 ) -> Result<UserbootEvent, fidl::Error> {
3761 UserbootEvent::decode(self.client.wait_for_event::<UserbootMarker>(deadline)?)
3762 }
3763
3764 pub fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3770 self.client.send::<UserbootPostBootfsFilesRequest>(
3771 (files.as_mut(),),
3772 0x296d4420db7cc694,
3773 fidl::encoding::DynamicFlags::empty(),
3774 )
3775 }
3776
3777 pub fn r#post_stash_svc(
3779 &self,
3780 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3781 ) -> Result<(), fidl::Error> {
3782 self.client.send::<UserbootPostStashSvcRequest>(
3783 (stash_svc_endpoint,),
3784 0x506ecf7db01adeac,
3785 fidl::encoding::DynamicFlags::empty(),
3786 )
3787 }
3788}
3789
3790#[cfg(target_os = "fuchsia")]
3791impl From<UserbootSynchronousProxy> for zx::NullableHandle {
3792 fn from(value: UserbootSynchronousProxy) -> Self {
3793 value.into_channel().into()
3794 }
3795}
3796
3797#[cfg(target_os = "fuchsia")]
3798impl From<fidl::Channel> for UserbootSynchronousProxy {
3799 fn from(value: fidl::Channel) -> Self {
3800 Self::new(value)
3801 }
3802}
3803
3804#[cfg(target_os = "fuchsia")]
3805impl fidl::endpoints::FromClient for UserbootSynchronousProxy {
3806 type Protocol = UserbootMarker;
3807
3808 fn from_client(value: fidl::endpoints::ClientEnd<UserbootMarker>) -> Self {
3809 Self::new(value.into_channel())
3810 }
3811}
3812
3813#[derive(Debug, Clone)]
3814pub struct UserbootProxy {
3815 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3816}
3817
3818impl fidl::endpoints::Proxy for UserbootProxy {
3819 type Protocol = UserbootMarker;
3820
3821 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3822 Self::new(inner)
3823 }
3824
3825 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3826 self.client.into_channel().map_err(|client| Self { client })
3827 }
3828
3829 fn as_channel(&self) -> &::fidl::AsyncChannel {
3830 self.client.as_channel()
3831 }
3832}
3833
3834impl UserbootProxy {
3835 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3837 let protocol_name = <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3838 Self { client: fidl::client::Client::new(channel, protocol_name) }
3839 }
3840
3841 pub fn take_event_stream(&self) -> UserbootEventStream {
3847 UserbootEventStream { event_receiver: self.client.take_event_receiver() }
3848 }
3849
3850 pub fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3856 UserbootProxyInterface::r#post_bootfs_files(self, files)
3857 }
3858
3859 pub fn r#post_stash_svc(
3861 &self,
3862 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3863 ) -> Result<(), fidl::Error> {
3864 UserbootProxyInterface::r#post_stash_svc(self, stash_svc_endpoint)
3865 }
3866}
3867
3868impl UserbootProxyInterface for UserbootProxy {
3869 fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3870 self.client.send::<UserbootPostBootfsFilesRequest>(
3871 (files.as_mut(),),
3872 0x296d4420db7cc694,
3873 fidl::encoding::DynamicFlags::empty(),
3874 )
3875 }
3876
3877 fn r#post_stash_svc(
3878 &self,
3879 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3880 ) -> Result<(), fidl::Error> {
3881 self.client.send::<UserbootPostStashSvcRequest>(
3882 (stash_svc_endpoint,),
3883 0x506ecf7db01adeac,
3884 fidl::encoding::DynamicFlags::empty(),
3885 )
3886 }
3887}
3888
3889pub struct UserbootEventStream {
3890 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3891}
3892
3893impl std::marker::Unpin for UserbootEventStream {}
3894
3895impl futures::stream::FusedStream for UserbootEventStream {
3896 fn is_terminated(&self) -> bool {
3897 self.event_receiver.is_terminated()
3898 }
3899}
3900
3901impl futures::Stream for UserbootEventStream {
3902 type Item = Result<UserbootEvent, fidl::Error>;
3903
3904 fn poll_next(
3905 mut self: std::pin::Pin<&mut Self>,
3906 cx: &mut std::task::Context<'_>,
3907 ) -> std::task::Poll<Option<Self::Item>> {
3908 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3909 &mut self.event_receiver,
3910 cx
3911 )?) {
3912 Some(buf) => std::task::Poll::Ready(Some(UserbootEvent::decode(buf))),
3913 None => std::task::Poll::Ready(None),
3914 }
3915 }
3916}
3917
3918#[derive(Debug)]
3919pub enum UserbootEvent {}
3920
3921impl UserbootEvent {
3922 fn decode(
3924 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3925 ) -> Result<UserbootEvent, fidl::Error> {
3926 let (bytes, _handles) = buf.split_mut();
3927 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3928 debug_assert_eq!(tx_header.tx_id, 0);
3929 match tx_header.ordinal {
3930 _ => Err(fidl::Error::UnknownOrdinal {
3931 ordinal: tx_header.ordinal,
3932 protocol_name: <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3933 }),
3934 }
3935 }
3936}
3937
3938pub struct UserbootRequestStream {
3940 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3941 is_terminated: bool,
3942}
3943
3944impl std::marker::Unpin for UserbootRequestStream {}
3945
3946impl futures::stream::FusedStream for UserbootRequestStream {
3947 fn is_terminated(&self) -> bool {
3948 self.is_terminated
3949 }
3950}
3951
3952impl fidl::endpoints::RequestStream for UserbootRequestStream {
3953 type Protocol = UserbootMarker;
3954 type ControlHandle = UserbootControlHandle;
3955
3956 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3957 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3958 }
3959
3960 fn control_handle(&self) -> Self::ControlHandle {
3961 UserbootControlHandle { inner: self.inner.clone() }
3962 }
3963
3964 fn into_inner(
3965 self,
3966 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3967 {
3968 (self.inner, self.is_terminated)
3969 }
3970
3971 fn from_inner(
3972 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3973 is_terminated: bool,
3974 ) -> Self {
3975 Self { inner, is_terminated }
3976 }
3977}
3978
3979impl futures::Stream for UserbootRequestStream {
3980 type Item = Result<UserbootRequest, fidl::Error>;
3981
3982 fn poll_next(
3983 mut self: std::pin::Pin<&mut Self>,
3984 cx: &mut std::task::Context<'_>,
3985 ) -> std::task::Poll<Option<Self::Item>> {
3986 let this = &mut *self;
3987 if this.inner.check_shutdown(cx) {
3988 this.is_terminated = true;
3989 return std::task::Poll::Ready(None);
3990 }
3991 if this.is_terminated {
3992 panic!("polled UserbootRequestStream after completion");
3993 }
3994 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3995 |bytes, handles| {
3996 match this.inner.channel().read_etc(cx, bytes, handles) {
3997 std::task::Poll::Ready(Ok(())) => {}
3998 std::task::Poll::Pending => return std::task::Poll::Pending,
3999 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4000 this.is_terminated = true;
4001 return std::task::Poll::Ready(None);
4002 }
4003 std::task::Poll::Ready(Err(e)) => {
4004 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4005 e.into(),
4006 ))));
4007 }
4008 }
4009
4010 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4012
4013 std::task::Poll::Ready(Some(match header.ordinal {
4014 0x296d4420db7cc694 => {
4015 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4016 let mut req = fidl::new_empty!(
4017 UserbootPostBootfsFilesRequest,
4018 fidl::encoding::DefaultFuchsiaResourceDialect
4019 );
4020 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UserbootPostBootfsFilesRequest>(&header, _body_bytes, handles, &mut req)?;
4021 let control_handle = UserbootControlHandle { inner: this.inner.clone() };
4022 Ok(UserbootRequest::PostBootfsFiles { files: req.files, control_handle })
4023 }
4024 0x506ecf7db01adeac => {
4025 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
4026 let mut req = fidl::new_empty!(
4027 UserbootPostStashSvcRequest,
4028 fidl::encoding::DefaultFuchsiaResourceDialect
4029 );
4030 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UserbootPostStashSvcRequest>(&header, _body_bytes, handles, &mut req)?;
4031 let control_handle = UserbootControlHandle { inner: this.inner.clone() };
4032 Ok(UserbootRequest::PostStashSvc {
4033 stash_svc_endpoint: req.stash_svc_endpoint,
4034
4035 control_handle,
4036 })
4037 }
4038 _ => Err(fidl::Error::UnknownOrdinal {
4039 ordinal: header.ordinal,
4040 protocol_name:
4041 <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4042 }),
4043 }))
4044 },
4045 )
4046 }
4047}
4048
4049#[derive(Debug)]
4057pub enum UserbootRequest {
4058 PostBootfsFiles { files: Vec<BootfsFileVmo>, control_handle: UserbootControlHandle },
4064 PostStashSvc {
4066 stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
4067 control_handle: UserbootControlHandle,
4068 },
4069}
4070
4071impl UserbootRequest {
4072 #[allow(irrefutable_let_patterns)]
4073 pub fn into_post_bootfs_files(self) -> Option<(Vec<BootfsFileVmo>, UserbootControlHandle)> {
4074 if let UserbootRequest::PostBootfsFiles { files, control_handle } = self {
4075 Some((files, control_handle))
4076 } else {
4077 None
4078 }
4079 }
4080
4081 #[allow(irrefutable_let_patterns)]
4082 pub fn into_post_stash_svc(
4083 self,
4084 ) -> Option<(fidl::endpoints::ServerEnd<SvcStashMarker>, UserbootControlHandle)> {
4085 if let UserbootRequest::PostStashSvc { stash_svc_endpoint, control_handle } = self {
4086 Some((stash_svc_endpoint, control_handle))
4087 } else {
4088 None
4089 }
4090 }
4091
4092 pub fn method_name(&self) -> &'static str {
4094 match *self {
4095 UserbootRequest::PostBootfsFiles { .. } => "post_bootfs_files",
4096 UserbootRequest::PostStashSvc { .. } => "post_stash_svc",
4097 }
4098 }
4099}
4100
4101#[derive(Debug, Clone)]
4102pub struct UserbootControlHandle {
4103 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4104}
4105
4106impl fidl::endpoints::ControlHandle for UserbootControlHandle {
4107 fn shutdown(&self) {
4108 self.inner.shutdown()
4109 }
4110
4111 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4112 self.inner.shutdown_with_epitaph(status)
4113 }
4114
4115 fn is_closed(&self) -> bool {
4116 self.inner.channel().is_closed()
4117 }
4118 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4119 self.inner.channel().on_closed()
4120 }
4121
4122 #[cfg(target_os = "fuchsia")]
4123 fn signal_peer(
4124 &self,
4125 clear_mask: zx::Signals,
4126 set_mask: zx::Signals,
4127 ) -> Result<(), zx_status::Status> {
4128 use fidl::Peered;
4129 self.inner.channel().signal_peer(clear_mask, set_mask)
4130 }
4131}
4132
4133impl UserbootControlHandle {}
4134
4135#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4136pub struct WriteOnlyLogMarker;
4137
4138impl fidl::endpoints::ProtocolMarker for WriteOnlyLogMarker {
4139 type Proxy = WriteOnlyLogProxy;
4140 type RequestStream = WriteOnlyLogRequestStream;
4141 #[cfg(target_os = "fuchsia")]
4142 type SynchronousProxy = WriteOnlyLogSynchronousProxy;
4143
4144 const DEBUG_NAME: &'static str = "fuchsia.boot.WriteOnlyLog";
4145}
4146impl fidl::endpoints::DiscoverableProtocolMarker for WriteOnlyLogMarker {}
4147
4148pub trait WriteOnlyLogProxyInterface: Send + Sync {
4149 type GetResponseFut: std::future::Future<Output = Result<fidl::DebugLog, fidl::Error>> + Send;
4150 fn r#get(&self) -> Self::GetResponseFut;
4151}
4152#[derive(Debug)]
4153#[cfg(target_os = "fuchsia")]
4154pub struct WriteOnlyLogSynchronousProxy {
4155 client: fidl::client::sync::Client,
4156}
4157
4158#[cfg(target_os = "fuchsia")]
4159impl fidl::endpoints::SynchronousProxy for WriteOnlyLogSynchronousProxy {
4160 type Proxy = WriteOnlyLogProxy;
4161 type Protocol = WriteOnlyLogMarker;
4162
4163 fn from_channel(inner: fidl::Channel) -> Self {
4164 Self::new(inner)
4165 }
4166
4167 fn into_channel(self) -> fidl::Channel {
4168 self.client.into_channel()
4169 }
4170
4171 fn as_channel(&self) -> &fidl::Channel {
4172 self.client.as_channel()
4173 }
4174}
4175
4176#[cfg(target_os = "fuchsia")]
4177impl WriteOnlyLogSynchronousProxy {
4178 pub fn new(channel: fidl::Channel) -> Self {
4179 Self { client: fidl::client::sync::Client::new(channel) }
4180 }
4181
4182 pub fn into_channel(self) -> fidl::Channel {
4183 self.client.into_channel()
4184 }
4185
4186 pub fn wait_for_event(
4189 &self,
4190 deadline: zx::MonotonicInstant,
4191 ) -> Result<WriteOnlyLogEvent, fidl::Error> {
4192 WriteOnlyLogEvent::decode(self.client.wait_for_event::<WriteOnlyLogMarker>(deadline)?)
4193 }
4194
4195 pub fn r#get(&self, ___deadline: zx::MonotonicInstant) -> Result<fidl::DebugLog, fidl::Error> {
4197 let _response = self.client.send_query::<
4198 fidl::encoding::EmptyPayload,
4199 WriteOnlyLogGetResponse,
4200 WriteOnlyLogMarker,
4201 >(
4202 (),
4203 0x4579dac289d3007,
4204 fidl::encoding::DynamicFlags::empty(),
4205 ___deadline,
4206 )?;
4207 Ok(_response.log)
4208 }
4209}
4210
4211#[cfg(target_os = "fuchsia")]
4212impl From<WriteOnlyLogSynchronousProxy> for zx::NullableHandle {
4213 fn from(value: WriteOnlyLogSynchronousProxy) -> Self {
4214 value.into_channel().into()
4215 }
4216}
4217
4218#[cfg(target_os = "fuchsia")]
4219impl From<fidl::Channel> for WriteOnlyLogSynchronousProxy {
4220 fn from(value: fidl::Channel) -> Self {
4221 Self::new(value)
4222 }
4223}
4224
4225#[cfg(target_os = "fuchsia")]
4226impl fidl::endpoints::FromClient for WriteOnlyLogSynchronousProxy {
4227 type Protocol = WriteOnlyLogMarker;
4228
4229 fn from_client(value: fidl::endpoints::ClientEnd<WriteOnlyLogMarker>) -> Self {
4230 Self::new(value.into_channel())
4231 }
4232}
4233
4234#[derive(Debug, Clone)]
4235pub struct WriteOnlyLogProxy {
4236 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4237}
4238
4239impl fidl::endpoints::Proxy for WriteOnlyLogProxy {
4240 type Protocol = WriteOnlyLogMarker;
4241
4242 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4243 Self::new(inner)
4244 }
4245
4246 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4247 self.client.into_channel().map_err(|client| Self { client })
4248 }
4249
4250 fn as_channel(&self) -> &::fidl::AsyncChannel {
4251 self.client.as_channel()
4252 }
4253}
4254
4255impl WriteOnlyLogProxy {
4256 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4258 let protocol_name = <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4259 Self { client: fidl::client::Client::new(channel, protocol_name) }
4260 }
4261
4262 pub fn take_event_stream(&self) -> WriteOnlyLogEventStream {
4268 WriteOnlyLogEventStream { event_receiver: self.client.take_event_receiver() }
4269 }
4270
4271 pub fn r#get(
4273 &self,
4274 ) -> fidl::client::QueryResponseFut<fidl::DebugLog, fidl::encoding::DefaultFuchsiaResourceDialect>
4275 {
4276 WriteOnlyLogProxyInterface::r#get(self)
4277 }
4278}
4279
4280impl WriteOnlyLogProxyInterface for WriteOnlyLogProxy {
4281 type GetResponseFut = fidl::client::QueryResponseFut<
4282 fidl::DebugLog,
4283 fidl::encoding::DefaultFuchsiaResourceDialect,
4284 >;
4285 fn r#get(&self) -> Self::GetResponseFut {
4286 fn _decode(
4287 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4288 ) -> Result<fidl::DebugLog, fidl::Error> {
4289 let _response = fidl::client::decode_transaction_body::<
4290 WriteOnlyLogGetResponse,
4291 fidl::encoding::DefaultFuchsiaResourceDialect,
4292 0x4579dac289d3007,
4293 >(_buf?)?;
4294 Ok(_response.log)
4295 }
4296 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::DebugLog>(
4297 (),
4298 0x4579dac289d3007,
4299 fidl::encoding::DynamicFlags::empty(),
4300 _decode,
4301 )
4302 }
4303}
4304
4305pub struct WriteOnlyLogEventStream {
4306 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4307}
4308
4309impl std::marker::Unpin for WriteOnlyLogEventStream {}
4310
4311impl futures::stream::FusedStream for WriteOnlyLogEventStream {
4312 fn is_terminated(&self) -> bool {
4313 self.event_receiver.is_terminated()
4314 }
4315}
4316
4317impl futures::Stream for WriteOnlyLogEventStream {
4318 type Item = Result<WriteOnlyLogEvent, fidl::Error>;
4319
4320 fn poll_next(
4321 mut self: std::pin::Pin<&mut Self>,
4322 cx: &mut std::task::Context<'_>,
4323 ) -> std::task::Poll<Option<Self::Item>> {
4324 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4325 &mut self.event_receiver,
4326 cx
4327 )?) {
4328 Some(buf) => std::task::Poll::Ready(Some(WriteOnlyLogEvent::decode(buf))),
4329 None => std::task::Poll::Ready(None),
4330 }
4331 }
4332}
4333
4334#[derive(Debug)]
4335pub enum WriteOnlyLogEvent {}
4336
4337impl WriteOnlyLogEvent {
4338 fn decode(
4340 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4341 ) -> Result<WriteOnlyLogEvent, fidl::Error> {
4342 let (bytes, _handles) = buf.split_mut();
4343 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4344 debug_assert_eq!(tx_header.tx_id, 0);
4345 match tx_header.ordinal {
4346 _ => Err(fidl::Error::UnknownOrdinal {
4347 ordinal: tx_header.ordinal,
4348 protocol_name: <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4349 }),
4350 }
4351 }
4352}
4353
4354pub struct WriteOnlyLogRequestStream {
4356 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4357 is_terminated: bool,
4358}
4359
4360impl std::marker::Unpin for WriteOnlyLogRequestStream {}
4361
4362impl futures::stream::FusedStream for WriteOnlyLogRequestStream {
4363 fn is_terminated(&self) -> bool {
4364 self.is_terminated
4365 }
4366}
4367
4368impl fidl::endpoints::RequestStream for WriteOnlyLogRequestStream {
4369 type Protocol = WriteOnlyLogMarker;
4370 type ControlHandle = WriteOnlyLogControlHandle;
4371
4372 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4373 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4374 }
4375
4376 fn control_handle(&self) -> Self::ControlHandle {
4377 WriteOnlyLogControlHandle { inner: self.inner.clone() }
4378 }
4379
4380 fn into_inner(
4381 self,
4382 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4383 {
4384 (self.inner, self.is_terminated)
4385 }
4386
4387 fn from_inner(
4388 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4389 is_terminated: bool,
4390 ) -> Self {
4391 Self { inner, is_terminated }
4392 }
4393}
4394
4395impl futures::Stream for WriteOnlyLogRequestStream {
4396 type Item = Result<WriteOnlyLogRequest, fidl::Error>;
4397
4398 fn poll_next(
4399 mut self: std::pin::Pin<&mut Self>,
4400 cx: &mut std::task::Context<'_>,
4401 ) -> std::task::Poll<Option<Self::Item>> {
4402 let this = &mut *self;
4403 if this.inner.check_shutdown(cx) {
4404 this.is_terminated = true;
4405 return std::task::Poll::Ready(None);
4406 }
4407 if this.is_terminated {
4408 panic!("polled WriteOnlyLogRequestStream after completion");
4409 }
4410 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4411 |bytes, handles| {
4412 match this.inner.channel().read_etc(cx, bytes, handles) {
4413 std::task::Poll::Ready(Ok(())) => {}
4414 std::task::Poll::Pending => return std::task::Poll::Pending,
4415 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4416 this.is_terminated = true;
4417 return std::task::Poll::Ready(None);
4418 }
4419 std::task::Poll::Ready(Err(e)) => {
4420 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4421 e.into(),
4422 ))));
4423 }
4424 }
4425
4426 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4428
4429 std::task::Poll::Ready(Some(match header.ordinal {
4430 0x4579dac289d3007 => {
4431 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4432 let mut req = fidl::new_empty!(
4433 fidl::encoding::EmptyPayload,
4434 fidl::encoding::DefaultFuchsiaResourceDialect
4435 );
4436 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4437 let control_handle =
4438 WriteOnlyLogControlHandle { inner: this.inner.clone() };
4439 Ok(WriteOnlyLogRequest::Get {
4440 responder: WriteOnlyLogGetResponder {
4441 control_handle: std::mem::ManuallyDrop::new(control_handle),
4442 tx_id: header.tx_id,
4443 },
4444 })
4445 }
4446 _ => Err(fidl::Error::UnknownOrdinal {
4447 ordinal: header.ordinal,
4448 protocol_name:
4449 <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4450 }),
4451 }))
4452 },
4453 )
4454 }
4455}
4456
4457#[derive(Debug)]
4459pub enum WriteOnlyLogRequest {
4460 Get { responder: WriteOnlyLogGetResponder },
4462}
4463
4464impl WriteOnlyLogRequest {
4465 #[allow(irrefutable_let_patterns)]
4466 pub fn into_get(self) -> Option<(WriteOnlyLogGetResponder)> {
4467 if let WriteOnlyLogRequest::Get { responder } = self { Some((responder)) } else { None }
4468 }
4469
4470 pub fn method_name(&self) -> &'static str {
4472 match *self {
4473 WriteOnlyLogRequest::Get { .. } => "get",
4474 }
4475 }
4476}
4477
4478#[derive(Debug, Clone)]
4479pub struct WriteOnlyLogControlHandle {
4480 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4481}
4482
4483impl fidl::endpoints::ControlHandle for WriteOnlyLogControlHandle {
4484 fn shutdown(&self) {
4485 self.inner.shutdown()
4486 }
4487
4488 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4489 self.inner.shutdown_with_epitaph(status)
4490 }
4491
4492 fn is_closed(&self) -> bool {
4493 self.inner.channel().is_closed()
4494 }
4495 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4496 self.inner.channel().on_closed()
4497 }
4498
4499 #[cfg(target_os = "fuchsia")]
4500 fn signal_peer(
4501 &self,
4502 clear_mask: zx::Signals,
4503 set_mask: zx::Signals,
4504 ) -> Result<(), zx_status::Status> {
4505 use fidl::Peered;
4506 self.inner.channel().signal_peer(clear_mask, set_mask)
4507 }
4508}
4509
4510impl WriteOnlyLogControlHandle {}
4511
4512#[must_use = "FIDL methods require a response to be sent"]
4513#[derive(Debug)]
4514pub struct WriteOnlyLogGetResponder {
4515 control_handle: std::mem::ManuallyDrop<WriteOnlyLogControlHandle>,
4516 tx_id: u32,
4517}
4518
4519impl std::ops::Drop for WriteOnlyLogGetResponder {
4523 fn drop(&mut self) {
4524 self.control_handle.shutdown();
4525 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4527 }
4528}
4529
4530impl fidl::endpoints::Responder for WriteOnlyLogGetResponder {
4531 type ControlHandle = WriteOnlyLogControlHandle;
4532
4533 fn control_handle(&self) -> &WriteOnlyLogControlHandle {
4534 &self.control_handle
4535 }
4536
4537 fn drop_without_shutdown(mut self) {
4538 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4540 std::mem::forget(self);
4542 }
4543}
4544
4545impl WriteOnlyLogGetResponder {
4546 pub fn send(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4550 let _result = self.send_raw(log);
4551 if _result.is_err() {
4552 self.control_handle.shutdown();
4553 }
4554 self.drop_without_shutdown();
4555 _result
4556 }
4557
4558 pub fn send_no_shutdown_on_err(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4560 let _result = self.send_raw(log);
4561 self.drop_without_shutdown();
4562 _result
4563 }
4564
4565 fn send_raw(&self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4566 self.control_handle.inner.send::<WriteOnlyLogGetResponse>(
4567 (log,),
4568 self.tx_id,
4569 0x4579dac289d3007,
4570 fidl::encoding::DynamicFlags::empty(),
4571 )
4572 }
4573}
4574
4575mod internal {
4576 use super::*;
4577
4578 impl fidl::encoding::ResourceTypeMarker for BootfsFileVmo {
4579 type Borrowed<'a> = &'a mut Self;
4580 fn take_or_borrow<'a>(
4581 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4582 ) -> Self::Borrowed<'a> {
4583 value
4584 }
4585 }
4586
4587 unsafe impl fidl::encoding::TypeMarker for BootfsFileVmo {
4588 type Owned = Self;
4589
4590 #[inline(always)]
4591 fn inline_align(_context: fidl::encoding::Context) -> usize {
4592 4
4593 }
4594
4595 #[inline(always)]
4596 fn inline_size(_context: fidl::encoding::Context) -> usize {
4597 8
4598 }
4599 }
4600
4601 unsafe impl fidl::encoding::Encode<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>
4602 for &mut BootfsFileVmo
4603 {
4604 #[inline]
4605 unsafe fn encode(
4606 self,
4607 encoder: &mut fidl::encoding::Encoder<
4608 '_,
4609 fidl::encoding::DefaultFuchsiaResourceDialect,
4610 >,
4611 offset: usize,
4612 _depth: fidl::encoding::Depth,
4613 ) -> fidl::Result<()> {
4614 encoder.debug_check_bounds::<BootfsFileVmo>(offset);
4615 fidl::encoding::Encode::<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
4617 (
4618 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
4619 <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.contents),
4620 ),
4621 encoder, offset, _depth
4622 )
4623 }
4624 }
4625 unsafe impl<
4626 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4627 T1: fidl::encoding::Encode<
4628 fidl::encoding::HandleType<
4629 fidl::Vmo,
4630 { fidl::ObjectType::VMO.into_raw() },
4631 2147483648,
4632 >,
4633 fidl::encoding::DefaultFuchsiaResourceDialect,
4634 >,
4635 > fidl::encoding::Encode<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>
4636 for (T0, T1)
4637 {
4638 #[inline]
4639 unsafe fn encode(
4640 self,
4641 encoder: &mut fidl::encoding::Encoder<
4642 '_,
4643 fidl::encoding::DefaultFuchsiaResourceDialect,
4644 >,
4645 offset: usize,
4646 depth: fidl::encoding::Depth,
4647 ) -> fidl::Result<()> {
4648 encoder.debug_check_bounds::<BootfsFileVmo>(offset);
4649 self.0.encode(encoder, offset + 0, depth)?;
4653 self.1.encode(encoder, offset + 4, depth)?;
4654 Ok(())
4655 }
4656 }
4657
4658 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for BootfsFileVmo {
4659 #[inline(always)]
4660 fn new_empty() -> Self {
4661 Self {
4662 offset: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4663 contents: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
4664 }
4665 }
4666
4667 #[inline]
4668 unsafe fn decode(
4669 &mut self,
4670 decoder: &mut fidl::encoding::Decoder<
4671 '_,
4672 fidl::encoding::DefaultFuchsiaResourceDialect,
4673 >,
4674 offset: usize,
4675 _depth: fidl::encoding::Depth,
4676 ) -> fidl::Result<()> {
4677 decoder.debug_check_bounds::<Self>(offset);
4678 fidl::decode!(
4680 u32,
4681 fidl::encoding::DefaultFuchsiaResourceDialect,
4682 &mut self.offset,
4683 decoder,
4684 offset + 0,
4685 _depth
4686 )?;
4687 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.contents, decoder, offset + 4, _depth)?;
4688 Ok(())
4689 }
4690 }
4691
4692 impl fidl::encoding::ResourceTypeMarker for FactoryItemsGetResponse {
4693 type Borrowed<'a> = &'a mut Self;
4694 fn take_or_borrow<'a>(
4695 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4696 ) -> Self::Borrowed<'a> {
4697 value
4698 }
4699 }
4700
4701 unsafe impl fidl::encoding::TypeMarker for FactoryItemsGetResponse {
4702 type Owned = Self;
4703
4704 #[inline(always)]
4705 fn inline_align(_context: fidl::encoding::Context) -> usize {
4706 4
4707 }
4708
4709 #[inline(always)]
4710 fn inline_size(_context: fidl::encoding::Context) -> usize {
4711 8
4712 }
4713 }
4714
4715 unsafe impl
4716 fidl::encoding::Encode<
4717 FactoryItemsGetResponse,
4718 fidl::encoding::DefaultFuchsiaResourceDialect,
4719 > for &mut FactoryItemsGetResponse
4720 {
4721 #[inline]
4722 unsafe fn encode(
4723 self,
4724 encoder: &mut fidl::encoding::Encoder<
4725 '_,
4726 fidl::encoding::DefaultFuchsiaResourceDialect,
4727 >,
4728 offset: usize,
4729 _depth: fidl::encoding::Depth,
4730 ) -> fidl::Result<()> {
4731 encoder.debug_check_bounds::<FactoryItemsGetResponse>(offset);
4732 fidl::encoding::Encode::<
4734 FactoryItemsGetResponse,
4735 fidl::encoding::DefaultFuchsiaResourceDialect,
4736 >::encode(
4737 (
4738 <fidl::encoding::Optional<
4739 fidl::encoding::HandleType<
4740 fidl::Vmo,
4741 { fidl::ObjectType::VMO.into_raw() },
4742 2147483648,
4743 >,
4744 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4745 &mut self.payload
4746 ),
4747 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
4748 ),
4749 encoder,
4750 offset,
4751 _depth,
4752 )
4753 }
4754 }
4755 unsafe impl<
4756 T0: fidl::encoding::Encode<
4757 fidl::encoding::Optional<
4758 fidl::encoding::HandleType<
4759 fidl::Vmo,
4760 { fidl::ObjectType::VMO.into_raw() },
4761 2147483648,
4762 >,
4763 >,
4764 fidl::encoding::DefaultFuchsiaResourceDialect,
4765 >,
4766 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
4767 >
4768 fidl::encoding::Encode<
4769 FactoryItemsGetResponse,
4770 fidl::encoding::DefaultFuchsiaResourceDialect,
4771 > for (T0, T1)
4772 {
4773 #[inline]
4774 unsafe fn encode(
4775 self,
4776 encoder: &mut fidl::encoding::Encoder<
4777 '_,
4778 fidl::encoding::DefaultFuchsiaResourceDialect,
4779 >,
4780 offset: usize,
4781 depth: fidl::encoding::Depth,
4782 ) -> fidl::Result<()> {
4783 encoder.debug_check_bounds::<FactoryItemsGetResponse>(offset);
4784 self.0.encode(encoder, offset + 0, depth)?;
4788 self.1.encode(encoder, offset + 4, depth)?;
4789 Ok(())
4790 }
4791 }
4792
4793 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4794 for FactoryItemsGetResponse
4795 {
4796 #[inline(always)]
4797 fn new_empty() -> Self {
4798 Self {
4799 payload: fidl::new_empty!(
4800 fidl::encoding::Optional<
4801 fidl::encoding::HandleType<
4802 fidl::Vmo,
4803 { fidl::ObjectType::VMO.into_raw() },
4804 2147483648,
4805 >,
4806 >,
4807 fidl::encoding::DefaultFuchsiaResourceDialect
4808 ),
4809 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
4810 }
4811 }
4812
4813 #[inline]
4814 unsafe fn decode(
4815 &mut self,
4816 decoder: &mut fidl::encoding::Decoder<
4817 '_,
4818 fidl::encoding::DefaultFuchsiaResourceDialect,
4819 >,
4820 offset: usize,
4821 _depth: fidl::encoding::Depth,
4822 ) -> fidl::Result<()> {
4823 decoder.debug_check_bounds::<Self>(offset);
4824 fidl::decode!(
4826 fidl::encoding::Optional<
4827 fidl::encoding::HandleType<
4828 fidl::Vmo,
4829 { fidl::ObjectType::VMO.into_raw() },
4830 2147483648,
4831 >,
4832 >,
4833 fidl::encoding::DefaultFuchsiaResourceDialect,
4834 &mut self.payload,
4835 decoder,
4836 offset + 0,
4837 _depth
4838 )?;
4839 fidl::decode!(
4840 u32,
4841 fidl::encoding::DefaultFuchsiaResourceDialect,
4842 &mut self.length,
4843 decoder,
4844 offset + 4,
4845 _depth
4846 )?;
4847 Ok(())
4848 }
4849 }
4850
4851 impl fidl::encoding::ResourceTypeMarker for ItemsGetBootloaderFileResponse {
4852 type Borrowed<'a> = &'a mut Self;
4853 fn take_or_borrow<'a>(
4854 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
4855 ) -> Self::Borrowed<'a> {
4856 value
4857 }
4858 }
4859
4860 unsafe impl fidl::encoding::TypeMarker for ItemsGetBootloaderFileResponse {
4861 type Owned = Self;
4862
4863 #[inline(always)]
4864 fn inline_align(_context: fidl::encoding::Context) -> usize {
4865 4
4866 }
4867
4868 #[inline(always)]
4869 fn inline_size(_context: fidl::encoding::Context) -> usize {
4870 4
4871 }
4872 }
4873
4874 unsafe impl
4875 fidl::encoding::Encode<
4876 ItemsGetBootloaderFileResponse,
4877 fidl::encoding::DefaultFuchsiaResourceDialect,
4878 > for &mut ItemsGetBootloaderFileResponse
4879 {
4880 #[inline]
4881 unsafe fn encode(
4882 self,
4883 encoder: &mut fidl::encoding::Encoder<
4884 '_,
4885 fidl::encoding::DefaultFuchsiaResourceDialect,
4886 >,
4887 offset: usize,
4888 _depth: fidl::encoding::Depth,
4889 ) -> fidl::Result<()> {
4890 encoder.debug_check_bounds::<ItemsGetBootloaderFileResponse>(offset);
4891 fidl::encoding::Encode::<
4893 ItemsGetBootloaderFileResponse,
4894 fidl::encoding::DefaultFuchsiaResourceDialect,
4895 >::encode(
4896 (<fidl::encoding::Optional<
4897 fidl::encoding::HandleType<
4898 fidl::Vmo,
4899 { fidl::ObjectType::VMO.into_raw() },
4900 2147483648,
4901 >,
4902 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
4903 &mut self.payload
4904 ),),
4905 encoder,
4906 offset,
4907 _depth,
4908 )
4909 }
4910 }
4911 unsafe impl<
4912 T0: fidl::encoding::Encode<
4913 fidl::encoding::Optional<
4914 fidl::encoding::HandleType<
4915 fidl::Vmo,
4916 { fidl::ObjectType::VMO.into_raw() },
4917 2147483648,
4918 >,
4919 >,
4920 fidl::encoding::DefaultFuchsiaResourceDialect,
4921 >,
4922 >
4923 fidl::encoding::Encode<
4924 ItemsGetBootloaderFileResponse,
4925 fidl::encoding::DefaultFuchsiaResourceDialect,
4926 > for (T0,)
4927 {
4928 #[inline]
4929 unsafe fn encode(
4930 self,
4931 encoder: &mut fidl::encoding::Encoder<
4932 '_,
4933 fidl::encoding::DefaultFuchsiaResourceDialect,
4934 >,
4935 offset: usize,
4936 depth: fidl::encoding::Depth,
4937 ) -> fidl::Result<()> {
4938 encoder.debug_check_bounds::<ItemsGetBootloaderFileResponse>(offset);
4939 self.0.encode(encoder, offset + 0, depth)?;
4943 Ok(())
4944 }
4945 }
4946
4947 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
4948 for ItemsGetBootloaderFileResponse
4949 {
4950 #[inline(always)]
4951 fn new_empty() -> Self {
4952 Self {
4953 payload: fidl::new_empty!(
4954 fidl::encoding::Optional<
4955 fidl::encoding::HandleType<
4956 fidl::Vmo,
4957 { fidl::ObjectType::VMO.into_raw() },
4958 2147483648,
4959 >,
4960 >,
4961 fidl::encoding::DefaultFuchsiaResourceDialect
4962 ),
4963 }
4964 }
4965
4966 #[inline]
4967 unsafe fn decode(
4968 &mut self,
4969 decoder: &mut fidl::encoding::Decoder<
4970 '_,
4971 fidl::encoding::DefaultFuchsiaResourceDialect,
4972 >,
4973 offset: usize,
4974 _depth: fidl::encoding::Depth,
4975 ) -> fidl::Result<()> {
4976 decoder.debug_check_bounds::<Self>(offset);
4977 fidl::decode!(
4979 fidl::encoding::Optional<
4980 fidl::encoding::HandleType<
4981 fidl::Vmo,
4982 { fidl::ObjectType::VMO.into_raw() },
4983 2147483648,
4984 >,
4985 >,
4986 fidl::encoding::DefaultFuchsiaResourceDialect,
4987 &mut self.payload,
4988 decoder,
4989 offset + 0,
4990 _depth
4991 )?;
4992 Ok(())
4993 }
4994 }
4995
4996 impl fidl::encoding::ResourceTypeMarker for ItemsGetResponse {
4997 type Borrowed<'a> = &'a mut Self;
4998 fn take_or_borrow<'a>(
4999 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5000 ) -> Self::Borrowed<'a> {
5001 value
5002 }
5003 }
5004
5005 unsafe impl fidl::encoding::TypeMarker for ItemsGetResponse {
5006 type Owned = Self;
5007
5008 #[inline(always)]
5009 fn inline_align(_context: fidl::encoding::Context) -> usize {
5010 4
5011 }
5012
5013 #[inline(always)]
5014 fn inline_size(_context: fidl::encoding::Context) -> usize {
5015 8
5016 }
5017 }
5018
5019 unsafe impl
5020 fidl::encoding::Encode<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5021 for &mut ItemsGetResponse
5022 {
5023 #[inline]
5024 unsafe fn encode(
5025 self,
5026 encoder: &mut fidl::encoding::Encoder<
5027 '_,
5028 fidl::encoding::DefaultFuchsiaResourceDialect,
5029 >,
5030 offset: usize,
5031 _depth: fidl::encoding::Depth,
5032 ) -> fidl::Result<()> {
5033 encoder.debug_check_bounds::<ItemsGetResponse>(offset);
5034 fidl::encoding::Encode::<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5036 (
5037 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
5038 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
5039 ),
5040 encoder, offset, _depth
5041 )
5042 }
5043 }
5044 unsafe impl<
5045 T0: fidl::encoding::Encode<
5046 fidl::encoding::Optional<
5047 fidl::encoding::HandleType<
5048 fidl::Vmo,
5049 { fidl::ObjectType::VMO.into_raw() },
5050 2147483648,
5051 >,
5052 >,
5053 fidl::encoding::DefaultFuchsiaResourceDialect,
5054 >,
5055 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5056 > fidl::encoding::Encode<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
5057 for (T0, T1)
5058 {
5059 #[inline]
5060 unsafe fn encode(
5061 self,
5062 encoder: &mut fidl::encoding::Encoder<
5063 '_,
5064 fidl::encoding::DefaultFuchsiaResourceDialect,
5065 >,
5066 offset: usize,
5067 depth: fidl::encoding::Depth,
5068 ) -> fidl::Result<()> {
5069 encoder.debug_check_bounds::<ItemsGetResponse>(offset);
5070 self.0.encode(encoder, offset + 0, depth)?;
5074 self.1.encode(encoder, offset + 4, depth)?;
5075 Ok(())
5076 }
5077 }
5078
5079 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5080 for ItemsGetResponse
5081 {
5082 #[inline(always)]
5083 fn new_empty() -> Self {
5084 Self {
5085 payload: fidl::new_empty!(
5086 fidl::encoding::Optional<
5087 fidl::encoding::HandleType<
5088 fidl::Vmo,
5089 { fidl::ObjectType::VMO.into_raw() },
5090 2147483648,
5091 >,
5092 >,
5093 fidl::encoding::DefaultFuchsiaResourceDialect
5094 ),
5095 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
5096 }
5097 }
5098
5099 #[inline]
5100 unsafe fn decode(
5101 &mut self,
5102 decoder: &mut fidl::encoding::Decoder<
5103 '_,
5104 fidl::encoding::DefaultFuchsiaResourceDialect,
5105 >,
5106 offset: usize,
5107 _depth: fidl::encoding::Depth,
5108 ) -> fidl::Result<()> {
5109 decoder.debug_check_bounds::<Self>(offset);
5110 fidl::decode!(
5112 fidl::encoding::Optional<
5113 fidl::encoding::HandleType<
5114 fidl::Vmo,
5115 { fidl::ObjectType::VMO.into_raw() },
5116 2147483648,
5117 >,
5118 >,
5119 fidl::encoding::DefaultFuchsiaResourceDialect,
5120 &mut self.payload,
5121 decoder,
5122 offset + 0,
5123 _depth
5124 )?;
5125 fidl::decode!(
5126 u32,
5127 fidl::encoding::DefaultFuchsiaResourceDialect,
5128 &mut self.length,
5129 decoder,
5130 offset + 4,
5131 _depth
5132 )?;
5133 Ok(())
5134 }
5135 }
5136
5137 impl fidl::encoding::ResourceTypeMarker for ItemsGet2Response {
5138 type Borrowed<'a> = &'a mut Self;
5139 fn take_or_borrow<'a>(
5140 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5141 ) -> Self::Borrowed<'a> {
5142 value
5143 }
5144 }
5145
5146 unsafe impl fidl::encoding::TypeMarker for ItemsGet2Response {
5147 type Owned = Self;
5148
5149 #[inline(always)]
5150 fn inline_align(_context: fidl::encoding::Context) -> usize {
5151 8
5152 }
5153
5154 #[inline(always)]
5155 fn inline_size(_context: fidl::encoding::Context) -> usize {
5156 16
5157 }
5158 }
5159
5160 unsafe impl
5161 fidl::encoding::Encode<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>
5162 for &mut ItemsGet2Response
5163 {
5164 #[inline]
5165 unsafe fn encode(
5166 self,
5167 encoder: &mut fidl::encoding::Encoder<
5168 '_,
5169 fidl::encoding::DefaultFuchsiaResourceDialect,
5170 >,
5171 offset: usize,
5172 _depth: fidl::encoding::Depth,
5173 ) -> fidl::Result<()> {
5174 encoder.debug_check_bounds::<ItemsGet2Response>(offset);
5175 fidl::encoding::Encode::<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5177 (
5178 <fidl::encoding::UnboundedVector<RetrievedItems> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.retrieved_items),
5179 ),
5180 encoder, offset, _depth
5181 )
5182 }
5183 }
5184 unsafe impl<
5185 T0: fidl::encoding::Encode<
5186 fidl::encoding::UnboundedVector<RetrievedItems>,
5187 fidl::encoding::DefaultFuchsiaResourceDialect,
5188 >,
5189 > fidl::encoding::Encode<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>
5190 for (T0,)
5191 {
5192 #[inline]
5193 unsafe fn encode(
5194 self,
5195 encoder: &mut fidl::encoding::Encoder<
5196 '_,
5197 fidl::encoding::DefaultFuchsiaResourceDialect,
5198 >,
5199 offset: usize,
5200 depth: fidl::encoding::Depth,
5201 ) -> fidl::Result<()> {
5202 encoder.debug_check_bounds::<ItemsGet2Response>(offset);
5203 self.0.encode(encoder, offset + 0, depth)?;
5207 Ok(())
5208 }
5209 }
5210
5211 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5212 for ItemsGet2Response
5213 {
5214 #[inline(always)]
5215 fn new_empty() -> Self {
5216 Self {
5217 retrieved_items: fidl::new_empty!(
5218 fidl::encoding::UnboundedVector<RetrievedItems>,
5219 fidl::encoding::DefaultFuchsiaResourceDialect
5220 ),
5221 }
5222 }
5223
5224 #[inline]
5225 unsafe fn decode(
5226 &mut self,
5227 decoder: &mut fidl::encoding::Decoder<
5228 '_,
5229 fidl::encoding::DefaultFuchsiaResourceDialect,
5230 >,
5231 offset: usize,
5232 _depth: fidl::encoding::Depth,
5233 ) -> fidl::Result<()> {
5234 decoder.debug_check_bounds::<Self>(offset);
5235 fidl::decode!(
5237 fidl::encoding::UnboundedVector<RetrievedItems>,
5238 fidl::encoding::DefaultFuchsiaResourceDialect,
5239 &mut self.retrieved_items,
5240 decoder,
5241 offset + 0,
5242 _depth
5243 )?;
5244 Ok(())
5245 }
5246 }
5247
5248 impl fidl::encoding::ResourceTypeMarker for ReadOnlyLogGetResponse {
5249 type Borrowed<'a> = &'a mut Self;
5250 fn take_or_borrow<'a>(
5251 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5252 ) -> Self::Borrowed<'a> {
5253 value
5254 }
5255 }
5256
5257 unsafe impl fidl::encoding::TypeMarker for ReadOnlyLogGetResponse {
5258 type Owned = Self;
5259
5260 #[inline(always)]
5261 fn inline_align(_context: fidl::encoding::Context) -> usize {
5262 4
5263 }
5264
5265 #[inline(always)]
5266 fn inline_size(_context: fidl::encoding::Context) -> usize {
5267 4
5268 }
5269 }
5270
5271 unsafe impl
5272 fidl::encoding::Encode<
5273 ReadOnlyLogGetResponse,
5274 fidl::encoding::DefaultFuchsiaResourceDialect,
5275 > for &mut ReadOnlyLogGetResponse
5276 {
5277 #[inline]
5278 unsafe fn encode(
5279 self,
5280 encoder: &mut fidl::encoding::Encoder<
5281 '_,
5282 fidl::encoding::DefaultFuchsiaResourceDialect,
5283 >,
5284 offset: usize,
5285 _depth: fidl::encoding::Depth,
5286 ) -> fidl::Result<()> {
5287 encoder.debug_check_bounds::<ReadOnlyLogGetResponse>(offset);
5288 fidl::encoding::Encode::<
5290 ReadOnlyLogGetResponse,
5291 fidl::encoding::DefaultFuchsiaResourceDialect,
5292 >::encode(
5293 (<fidl::encoding::HandleType<
5294 fidl::DebugLog,
5295 { fidl::ObjectType::DEBUGLOG.into_raw() },
5296 2147483648,
5297 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5298 &mut self.log
5299 ),),
5300 encoder,
5301 offset,
5302 _depth,
5303 )
5304 }
5305 }
5306 unsafe impl<
5307 T0: fidl::encoding::Encode<
5308 fidl::encoding::HandleType<
5309 fidl::DebugLog,
5310 { fidl::ObjectType::DEBUGLOG.into_raw() },
5311 2147483648,
5312 >,
5313 fidl::encoding::DefaultFuchsiaResourceDialect,
5314 >,
5315 >
5316 fidl::encoding::Encode<
5317 ReadOnlyLogGetResponse,
5318 fidl::encoding::DefaultFuchsiaResourceDialect,
5319 > for (T0,)
5320 {
5321 #[inline]
5322 unsafe fn encode(
5323 self,
5324 encoder: &mut fidl::encoding::Encoder<
5325 '_,
5326 fidl::encoding::DefaultFuchsiaResourceDialect,
5327 >,
5328 offset: usize,
5329 depth: fidl::encoding::Depth,
5330 ) -> fidl::Result<()> {
5331 encoder.debug_check_bounds::<ReadOnlyLogGetResponse>(offset);
5332 self.0.encode(encoder, offset + 0, depth)?;
5336 Ok(())
5337 }
5338 }
5339
5340 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5341 for ReadOnlyLogGetResponse
5342 {
5343 #[inline(always)]
5344 fn new_empty() -> Self {
5345 Self {
5346 log: fidl::new_empty!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5347 }
5348 }
5349
5350 #[inline]
5351 unsafe fn decode(
5352 &mut self,
5353 decoder: &mut fidl::encoding::Decoder<
5354 '_,
5355 fidl::encoding::DefaultFuchsiaResourceDialect,
5356 >,
5357 offset: usize,
5358 _depth: fidl::encoding::Depth,
5359 ) -> fidl::Result<()> {
5360 decoder.debug_check_bounds::<Self>(offset);
5361 fidl::decode!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.log, decoder, offset + 0, _depth)?;
5363 Ok(())
5364 }
5365 }
5366
5367 impl fidl::encoding::ResourceTypeMarker for RetrievedItems {
5368 type Borrowed<'a> = &'a mut Self;
5369 fn take_or_borrow<'a>(
5370 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5371 ) -> Self::Borrowed<'a> {
5372 value
5373 }
5374 }
5375
5376 unsafe impl fidl::encoding::TypeMarker for RetrievedItems {
5377 type Owned = Self;
5378
5379 #[inline(always)]
5380 fn inline_align(_context: fidl::encoding::Context) -> usize {
5381 4
5382 }
5383
5384 #[inline(always)]
5385 fn inline_size(_context: fidl::encoding::Context) -> usize {
5386 12
5387 }
5388 }
5389
5390 unsafe impl
5391 fidl::encoding::Encode<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>
5392 for &mut RetrievedItems
5393 {
5394 #[inline]
5395 unsafe fn encode(
5396 self,
5397 encoder: &mut fidl::encoding::Encoder<
5398 '_,
5399 fidl::encoding::DefaultFuchsiaResourceDialect,
5400 >,
5401 offset: usize,
5402 _depth: fidl::encoding::Depth,
5403 ) -> fidl::Result<()> {
5404 encoder.debug_check_bounds::<RetrievedItems>(offset);
5405 fidl::encoding::Encode::<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5407 (
5408 <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
5409 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
5410 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.extra),
5411 ),
5412 encoder, offset, _depth
5413 )
5414 }
5415 }
5416 unsafe impl<
5417 T0: fidl::encoding::Encode<
5418 fidl::encoding::HandleType<
5419 fidl::Vmo,
5420 { fidl::ObjectType::VMO.into_raw() },
5421 2147483648,
5422 >,
5423 fidl::encoding::DefaultFuchsiaResourceDialect,
5424 >,
5425 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5426 T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5427 > fidl::encoding::Encode<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>
5428 for (T0, T1, T2)
5429 {
5430 #[inline]
5431 unsafe fn encode(
5432 self,
5433 encoder: &mut fidl::encoding::Encoder<
5434 '_,
5435 fidl::encoding::DefaultFuchsiaResourceDialect,
5436 >,
5437 offset: usize,
5438 depth: fidl::encoding::Depth,
5439 ) -> fidl::Result<()> {
5440 encoder.debug_check_bounds::<RetrievedItems>(offset);
5441 self.0.encode(encoder, offset + 0, depth)?;
5445 self.1.encode(encoder, offset + 4, depth)?;
5446 self.2.encode(encoder, offset + 8, depth)?;
5447 Ok(())
5448 }
5449 }
5450
5451 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5452 for RetrievedItems
5453 {
5454 #[inline(always)]
5455 fn new_empty() -> Self {
5456 Self {
5457 payload: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5458 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
5459 extra: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
5460 }
5461 }
5462
5463 #[inline]
5464 unsafe fn decode(
5465 &mut self,
5466 decoder: &mut fidl::encoding::Decoder<
5467 '_,
5468 fidl::encoding::DefaultFuchsiaResourceDialect,
5469 >,
5470 offset: usize,
5471 _depth: fidl::encoding::Depth,
5472 ) -> fidl::Result<()> {
5473 decoder.debug_check_bounds::<Self>(offset);
5474 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.payload, decoder, offset + 0, _depth)?;
5476 fidl::decode!(
5477 u32,
5478 fidl::encoding::DefaultFuchsiaResourceDialect,
5479 &mut self.length,
5480 decoder,
5481 offset + 4,
5482 _depth
5483 )?;
5484 fidl::decode!(
5485 u32,
5486 fidl::encoding::DefaultFuchsiaResourceDialect,
5487 &mut self.extra,
5488 decoder,
5489 offset + 8,
5490 _depth
5491 )?;
5492 Ok(())
5493 }
5494 }
5495
5496 impl fidl::encoding::ResourceTypeMarker for SvcStashProviderGetResponse {
5497 type Borrowed<'a> = &'a mut Self;
5498 fn take_or_borrow<'a>(
5499 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5500 ) -> Self::Borrowed<'a> {
5501 value
5502 }
5503 }
5504
5505 unsafe impl fidl::encoding::TypeMarker for SvcStashProviderGetResponse {
5506 type Owned = Self;
5507
5508 #[inline(always)]
5509 fn inline_align(_context: fidl::encoding::Context) -> usize {
5510 4
5511 }
5512
5513 #[inline(always)]
5514 fn inline_size(_context: fidl::encoding::Context) -> usize {
5515 4
5516 }
5517 }
5518
5519 unsafe impl
5520 fidl::encoding::Encode<
5521 SvcStashProviderGetResponse,
5522 fidl::encoding::DefaultFuchsiaResourceDialect,
5523 > for &mut SvcStashProviderGetResponse
5524 {
5525 #[inline]
5526 unsafe fn encode(
5527 self,
5528 encoder: &mut fidl::encoding::Encoder<
5529 '_,
5530 fidl::encoding::DefaultFuchsiaResourceDialect,
5531 >,
5532 offset: usize,
5533 _depth: fidl::encoding::Depth,
5534 ) -> fidl::Result<()> {
5535 encoder.debug_check_bounds::<SvcStashProviderGetResponse>(offset);
5536 fidl::encoding::Encode::<SvcStashProviderGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5538 (
5539 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.resource),
5540 ),
5541 encoder, offset, _depth
5542 )
5543 }
5544 }
5545 unsafe impl<
5546 T0: fidl::encoding::Encode<
5547 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5548 fidl::encoding::DefaultFuchsiaResourceDialect,
5549 >,
5550 >
5551 fidl::encoding::Encode<
5552 SvcStashProviderGetResponse,
5553 fidl::encoding::DefaultFuchsiaResourceDialect,
5554 > for (T0,)
5555 {
5556 #[inline]
5557 unsafe fn encode(
5558 self,
5559 encoder: &mut fidl::encoding::Encoder<
5560 '_,
5561 fidl::encoding::DefaultFuchsiaResourceDialect,
5562 >,
5563 offset: usize,
5564 depth: fidl::encoding::Depth,
5565 ) -> fidl::Result<()> {
5566 encoder.debug_check_bounds::<SvcStashProviderGetResponse>(offset);
5567 self.0.encode(encoder, offset + 0, depth)?;
5571 Ok(())
5572 }
5573 }
5574
5575 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5576 for SvcStashProviderGetResponse
5577 {
5578 #[inline(always)]
5579 fn new_empty() -> Self {
5580 Self {
5581 resource: fidl::new_empty!(
5582 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5583 fidl::encoding::DefaultFuchsiaResourceDialect
5584 ),
5585 }
5586 }
5587
5588 #[inline]
5589 unsafe fn decode(
5590 &mut self,
5591 decoder: &mut fidl::encoding::Decoder<
5592 '_,
5593 fidl::encoding::DefaultFuchsiaResourceDialect,
5594 >,
5595 offset: usize,
5596 _depth: fidl::encoding::Depth,
5597 ) -> fidl::Result<()> {
5598 decoder.debug_check_bounds::<Self>(offset);
5599 fidl::decode!(
5601 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5602 fidl::encoding::DefaultFuchsiaResourceDialect,
5603 &mut self.resource,
5604 decoder,
5605 offset + 0,
5606 _depth
5607 )?;
5608 Ok(())
5609 }
5610 }
5611
5612 impl fidl::encoding::ResourceTypeMarker for SvcStashStoreRequest {
5613 type Borrowed<'a> = &'a mut Self;
5614 fn take_or_borrow<'a>(
5615 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5616 ) -> Self::Borrowed<'a> {
5617 value
5618 }
5619 }
5620
5621 unsafe impl fidl::encoding::TypeMarker for SvcStashStoreRequest {
5622 type Owned = Self;
5623
5624 #[inline(always)]
5625 fn inline_align(_context: fidl::encoding::Context) -> usize {
5626 4
5627 }
5628
5629 #[inline(always)]
5630 fn inline_size(_context: fidl::encoding::Context) -> usize {
5631 4
5632 }
5633 }
5634
5635 unsafe impl
5636 fidl::encoding::Encode<SvcStashStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5637 for &mut SvcStashStoreRequest
5638 {
5639 #[inline]
5640 unsafe fn encode(
5641 self,
5642 encoder: &mut fidl::encoding::Encoder<
5643 '_,
5644 fidl::encoding::DefaultFuchsiaResourceDialect,
5645 >,
5646 offset: usize,
5647 _depth: fidl::encoding::Depth,
5648 ) -> fidl::Result<()> {
5649 encoder.debug_check_bounds::<SvcStashStoreRequest>(offset);
5650 fidl::encoding::Encode::<
5652 SvcStashStoreRequest,
5653 fidl::encoding::DefaultFuchsiaResourceDialect,
5654 >::encode(
5655 (<fidl::encoding::Endpoint<
5656 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
5657 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5658 &mut self.svc_endpoint
5659 ),),
5660 encoder,
5661 offset,
5662 _depth,
5663 )
5664 }
5665 }
5666 unsafe impl<
5667 T0: fidl::encoding::Encode<
5668 fidl::encoding::Endpoint<
5669 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
5670 >,
5671 fidl::encoding::DefaultFuchsiaResourceDialect,
5672 >,
5673 >
5674 fidl::encoding::Encode<SvcStashStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
5675 for (T0,)
5676 {
5677 #[inline]
5678 unsafe fn encode(
5679 self,
5680 encoder: &mut fidl::encoding::Encoder<
5681 '_,
5682 fidl::encoding::DefaultFuchsiaResourceDialect,
5683 >,
5684 offset: usize,
5685 depth: fidl::encoding::Depth,
5686 ) -> fidl::Result<()> {
5687 encoder.debug_check_bounds::<SvcStashStoreRequest>(offset);
5688 self.0.encode(encoder, offset + 0, depth)?;
5692 Ok(())
5693 }
5694 }
5695
5696 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5697 for SvcStashStoreRequest
5698 {
5699 #[inline(always)]
5700 fn new_empty() -> Self {
5701 Self {
5702 svc_endpoint: fidl::new_empty!(
5703 fidl::encoding::Endpoint<
5704 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
5705 >,
5706 fidl::encoding::DefaultFuchsiaResourceDialect
5707 ),
5708 }
5709 }
5710
5711 #[inline]
5712 unsafe fn decode(
5713 &mut self,
5714 decoder: &mut fidl::encoding::Decoder<
5715 '_,
5716 fidl::encoding::DefaultFuchsiaResourceDialect,
5717 >,
5718 offset: usize,
5719 _depth: fidl::encoding::Depth,
5720 ) -> fidl::Result<()> {
5721 decoder.debug_check_bounds::<Self>(offset);
5722 fidl::decode!(
5724 fidl::encoding::Endpoint<
5725 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
5726 >,
5727 fidl::encoding::DefaultFuchsiaResourceDialect,
5728 &mut self.svc_endpoint,
5729 decoder,
5730 offset + 0,
5731 _depth
5732 )?;
5733 Ok(())
5734 }
5735 }
5736
5737 impl fidl::encoding::ResourceTypeMarker for UserbootPostBootfsFilesRequest {
5738 type Borrowed<'a> = &'a mut Self;
5739 fn take_or_borrow<'a>(
5740 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5741 ) -> Self::Borrowed<'a> {
5742 value
5743 }
5744 }
5745
5746 unsafe impl fidl::encoding::TypeMarker for UserbootPostBootfsFilesRequest {
5747 type Owned = Self;
5748
5749 #[inline(always)]
5750 fn inline_align(_context: fidl::encoding::Context) -> usize {
5751 8
5752 }
5753
5754 #[inline(always)]
5755 fn inline_size(_context: fidl::encoding::Context) -> usize {
5756 16
5757 }
5758 }
5759
5760 unsafe impl
5761 fidl::encoding::Encode<
5762 UserbootPostBootfsFilesRequest,
5763 fidl::encoding::DefaultFuchsiaResourceDialect,
5764 > for &mut UserbootPostBootfsFilesRequest
5765 {
5766 #[inline]
5767 unsafe fn encode(
5768 self,
5769 encoder: &mut fidl::encoding::Encoder<
5770 '_,
5771 fidl::encoding::DefaultFuchsiaResourceDialect,
5772 >,
5773 offset: usize,
5774 _depth: fidl::encoding::Depth,
5775 ) -> fidl::Result<()> {
5776 encoder.debug_check_bounds::<UserbootPostBootfsFilesRequest>(offset);
5777 fidl::encoding::Encode::<UserbootPostBootfsFilesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5779 (
5780 <fidl::encoding::Vector<BootfsFileVmo, 64> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.files),
5781 ),
5782 encoder, offset, _depth
5783 )
5784 }
5785 }
5786 unsafe impl<
5787 T0: fidl::encoding::Encode<
5788 fidl::encoding::Vector<BootfsFileVmo, 64>,
5789 fidl::encoding::DefaultFuchsiaResourceDialect,
5790 >,
5791 >
5792 fidl::encoding::Encode<
5793 UserbootPostBootfsFilesRequest,
5794 fidl::encoding::DefaultFuchsiaResourceDialect,
5795 > for (T0,)
5796 {
5797 #[inline]
5798 unsafe fn encode(
5799 self,
5800 encoder: &mut fidl::encoding::Encoder<
5801 '_,
5802 fidl::encoding::DefaultFuchsiaResourceDialect,
5803 >,
5804 offset: usize,
5805 depth: fidl::encoding::Depth,
5806 ) -> fidl::Result<()> {
5807 encoder.debug_check_bounds::<UserbootPostBootfsFilesRequest>(offset);
5808 self.0.encode(encoder, offset + 0, depth)?;
5812 Ok(())
5813 }
5814 }
5815
5816 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5817 for UserbootPostBootfsFilesRequest
5818 {
5819 #[inline(always)]
5820 fn new_empty() -> Self {
5821 Self {
5822 files: fidl::new_empty!(fidl::encoding::Vector<BootfsFileVmo, 64>, fidl::encoding::DefaultFuchsiaResourceDialect),
5823 }
5824 }
5825
5826 #[inline]
5827 unsafe fn decode(
5828 &mut self,
5829 decoder: &mut fidl::encoding::Decoder<
5830 '_,
5831 fidl::encoding::DefaultFuchsiaResourceDialect,
5832 >,
5833 offset: usize,
5834 _depth: fidl::encoding::Depth,
5835 ) -> fidl::Result<()> {
5836 decoder.debug_check_bounds::<Self>(offset);
5837 fidl::decode!(fidl::encoding::Vector<BootfsFileVmo, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.files, decoder, offset + 0, _depth)?;
5839 Ok(())
5840 }
5841 }
5842
5843 impl fidl::encoding::ResourceTypeMarker for UserbootPostStashSvcRequest {
5844 type Borrowed<'a> = &'a mut Self;
5845 fn take_or_borrow<'a>(
5846 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5847 ) -> Self::Borrowed<'a> {
5848 value
5849 }
5850 }
5851
5852 unsafe impl fidl::encoding::TypeMarker for UserbootPostStashSvcRequest {
5853 type Owned = Self;
5854
5855 #[inline(always)]
5856 fn inline_align(_context: fidl::encoding::Context) -> usize {
5857 4
5858 }
5859
5860 #[inline(always)]
5861 fn inline_size(_context: fidl::encoding::Context) -> usize {
5862 4
5863 }
5864 }
5865
5866 unsafe impl
5867 fidl::encoding::Encode<
5868 UserbootPostStashSvcRequest,
5869 fidl::encoding::DefaultFuchsiaResourceDialect,
5870 > for &mut UserbootPostStashSvcRequest
5871 {
5872 #[inline]
5873 unsafe fn encode(
5874 self,
5875 encoder: &mut fidl::encoding::Encoder<
5876 '_,
5877 fidl::encoding::DefaultFuchsiaResourceDialect,
5878 >,
5879 offset: usize,
5880 _depth: fidl::encoding::Depth,
5881 ) -> fidl::Result<()> {
5882 encoder.debug_check_bounds::<UserbootPostStashSvcRequest>(offset);
5883 fidl::encoding::Encode::<UserbootPostStashSvcRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5885 (
5886 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stash_svc_endpoint),
5887 ),
5888 encoder, offset, _depth
5889 )
5890 }
5891 }
5892 unsafe impl<
5893 T0: fidl::encoding::Encode<
5894 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5895 fidl::encoding::DefaultFuchsiaResourceDialect,
5896 >,
5897 >
5898 fidl::encoding::Encode<
5899 UserbootPostStashSvcRequest,
5900 fidl::encoding::DefaultFuchsiaResourceDialect,
5901 > for (T0,)
5902 {
5903 #[inline]
5904 unsafe fn encode(
5905 self,
5906 encoder: &mut fidl::encoding::Encoder<
5907 '_,
5908 fidl::encoding::DefaultFuchsiaResourceDialect,
5909 >,
5910 offset: usize,
5911 depth: fidl::encoding::Depth,
5912 ) -> fidl::Result<()> {
5913 encoder.debug_check_bounds::<UserbootPostStashSvcRequest>(offset);
5914 self.0.encode(encoder, offset + 0, depth)?;
5918 Ok(())
5919 }
5920 }
5921
5922 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5923 for UserbootPostStashSvcRequest
5924 {
5925 #[inline(always)]
5926 fn new_empty() -> Self {
5927 Self {
5928 stash_svc_endpoint: fidl::new_empty!(
5929 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5930 fidl::encoding::DefaultFuchsiaResourceDialect
5931 ),
5932 }
5933 }
5934
5935 #[inline]
5936 unsafe fn decode(
5937 &mut self,
5938 decoder: &mut fidl::encoding::Decoder<
5939 '_,
5940 fidl::encoding::DefaultFuchsiaResourceDialect,
5941 >,
5942 offset: usize,
5943 _depth: fidl::encoding::Depth,
5944 ) -> fidl::Result<()> {
5945 decoder.debug_check_bounds::<Self>(offset);
5946 fidl::decode!(
5948 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
5949 fidl::encoding::DefaultFuchsiaResourceDialect,
5950 &mut self.stash_svc_endpoint,
5951 decoder,
5952 offset + 0,
5953 _depth
5954 )?;
5955 Ok(())
5956 }
5957 }
5958
5959 impl fidl::encoding::ResourceTypeMarker for WriteOnlyLogGetResponse {
5960 type Borrowed<'a> = &'a mut Self;
5961 fn take_or_borrow<'a>(
5962 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5963 ) -> Self::Borrowed<'a> {
5964 value
5965 }
5966 }
5967
5968 unsafe impl fidl::encoding::TypeMarker for WriteOnlyLogGetResponse {
5969 type Owned = Self;
5970
5971 #[inline(always)]
5972 fn inline_align(_context: fidl::encoding::Context) -> usize {
5973 4
5974 }
5975
5976 #[inline(always)]
5977 fn inline_size(_context: fidl::encoding::Context) -> usize {
5978 4
5979 }
5980 }
5981
5982 unsafe impl
5983 fidl::encoding::Encode<
5984 WriteOnlyLogGetResponse,
5985 fidl::encoding::DefaultFuchsiaResourceDialect,
5986 > for &mut WriteOnlyLogGetResponse
5987 {
5988 #[inline]
5989 unsafe fn encode(
5990 self,
5991 encoder: &mut fidl::encoding::Encoder<
5992 '_,
5993 fidl::encoding::DefaultFuchsiaResourceDialect,
5994 >,
5995 offset: usize,
5996 _depth: fidl::encoding::Depth,
5997 ) -> fidl::Result<()> {
5998 encoder.debug_check_bounds::<WriteOnlyLogGetResponse>(offset);
5999 fidl::encoding::Encode::<
6001 WriteOnlyLogGetResponse,
6002 fidl::encoding::DefaultFuchsiaResourceDialect,
6003 >::encode(
6004 (<fidl::encoding::HandleType<
6005 fidl::DebugLog,
6006 { fidl::ObjectType::DEBUGLOG.into_raw() },
6007 2147483648,
6008 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6009 &mut self.log
6010 ),),
6011 encoder,
6012 offset,
6013 _depth,
6014 )
6015 }
6016 }
6017 unsafe impl<
6018 T0: fidl::encoding::Encode<
6019 fidl::encoding::HandleType<
6020 fidl::DebugLog,
6021 { fidl::ObjectType::DEBUGLOG.into_raw() },
6022 2147483648,
6023 >,
6024 fidl::encoding::DefaultFuchsiaResourceDialect,
6025 >,
6026 >
6027 fidl::encoding::Encode<
6028 WriteOnlyLogGetResponse,
6029 fidl::encoding::DefaultFuchsiaResourceDialect,
6030 > for (T0,)
6031 {
6032 #[inline]
6033 unsafe fn encode(
6034 self,
6035 encoder: &mut fidl::encoding::Encoder<
6036 '_,
6037 fidl::encoding::DefaultFuchsiaResourceDialect,
6038 >,
6039 offset: usize,
6040 depth: fidl::encoding::Depth,
6041 ) -> fidl::Result<()> {
6042 encoder.debug_check_bounds::<WriteOnlyLogGetResponse>(offset);
6043 self.0.encode(encoder, offset + 0, depth)?;
6047 Ok(())
6048 }
6049 }
6050
6051 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6052 for WriteOnlyLogGetResponse
6053 {
6054 #[inline(always)]
6055 fn new_empty() -> Self {
6056 Self {
6057 log: fidl::new_empty!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6058 }
6059 }
6060
6061 #[inline]
6062 unsafe fn decode(
6063 &mut self,
6064 decoder: &mut fidl::encoding::Decoder<
6065 '_,
6066 fidl::encoding::DefaultFuchsiaResourceDialect,
6067 >,
6068 offset: usize,
6069 _depth: fidl::encoding::Depth,
6070 ) -> fidl::Result<()> {
6071 decoder.debug_check_bounds::<Self>(offset);
6072 fidl::decode!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.log, decoder, offset + 0, _depth)?;
6074 Ok(())
6075 }
6076 }
6077}