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