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 _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13pub const MAX_ARGS_COLLECT_LENGTH: u8 = 193;
14
15pub const MAX_ARGS_NAME_LENGTH: u8 = 64;
16
17pub const MAX_ARGS_VALUE_LENGTH: u8 = 128;
18
19pub const MAX_ARGS_VECTOR_LENGTH: u8 = 255;
20
21pub const MAX_FILE_NAME_LENGTH: u8 = 255;
22
23#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
24pub struct ArgumentsCollectRequest {
25 pub prefix: String,
26}
27
28impl fidl::Persistable for ArgumentsCollectRequest {}
29
30#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
31pub struct ArgumentsCollectResponse {
32 pub results: Vec<String>,
33}
34
35impl fidl::Persistable for ArgumentsCollectResponse {}
36
37#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
38pub struct ArgumentsGetBoolRequest {
39 pub key: String,
40 pub defaultval: bool,
41}
42
43impl fidl::Persistable for ArgumentsGetBoolRequest {}
44
45#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
46pub struct ArgumentsGetBoolResponse {
47 pub value: bool,
48}
49
50impl fidl::Persistable for ArgumentsGetBoolResponse {}
51
52#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
53pub struct ArgumentsGetBoolsRequest {
54 pub keys: Vec<BoolPair>,
55}
56
57impl fidl::Persistable for ArgumentsGetBoolsRequest {}
58
59#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
60pub struct ArgumentsGetBoolsResponse {
61 pub values: Vec<bool>,
62}
63
64impl fidl::Persistable for ArgumentsGetBoolsResponse {}
65
66#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
67pub struct ArgumentsGetStringRequest {
68 pub key: String,
69}
70
71impl fidl::Persistable for ArgumentsGetStringRequest {}
72
73#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
74pub struct ArgumentsGetStringResponse {
75 pub value: Option<String>,
76}
77
78impl fidl::Persistable for ArgumentsGetStringResponse {}
79
80#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
81pub struct ArgumentsGetStringsRequest {
82 pub keys: Vec<String>,
83}
84
85impl fidl::Persistable for ArgumentsGetStringsRequest {}
86
87#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
88pub struct ArgumentsGetStringsResponse {
89 pub values: Vec<Option<String>>,
90}
91
92impl fidl::Persistable for ArgumentsGetStringsResponse {}
93
94#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
95pub struct BoolPair {
96 pub key: String,
97 pub defaultval: bool,
98}
99
100impl fidl::Persistable for BoolPair {}
101
102#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
104pub struct BootfsFileVmo {
105 pub offset: u32,
107 pub contents: fidl::Vmo,
109}
110
111impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for BootfsFileVmo {}
112
113#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
114#[repr(C)]
115pub struct Extra {
116 pub n: u32,
117}
118
119impl fidl::Persistable for Extra {}
120
121#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
122#[repr(C)]
123pub struct FactoryItemsGetRequest {
124 pub extra: u32,
125}
126
127impl fidl::Persistable for FactoryItemsGetRequest {}
128
129#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
130pub struct FactoryItemsGetResponse {
131 pub payload: Option<fidl::Vmo>,
132 pub length: u32,
133}
134
135impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for FactoryItemsGetResponse {}
136
137#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
138pub struct ItemsGet2Request {
139 pub type_: u32,
140 pub extra: Option<Box<Extra>>,
141}
142
143impl fidl::Persistable for ItemsGet2Request {}
144
145#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
146pub struct ItemsGetBootloaderFileRequest {
147 pub filename: String,
148}
149
150impl fidl::Persistable for ItemsGetBootloaderFileRequest {}
151
152#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
153pub struct ItemsGetBootloaderFileResponse {
154 pub payload: Option<fidl::Vmo>,
155}
156
157impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
158 for ItemsGetBootloaderFileResponse
159{
160}
161
162#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
163#[repr(C)]
164pub struct ItemsGetRequest {
165 pub type_: u32,
166 pub extra: u32,
167}
168
169impl fidl::Persistable for ItemsGetRequest {}
170
171#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
172pub struct ItemsGetResponse {
173 pub payload: Option<fidl::Vmo>,
174 pub length: u32,
175}
176
177impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ItemsGetResponse {}
178
179#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
180pub struct ItemsGet2Response {
181 pub retrieved_items: Vec<RetrievedItems>,
182}
183
184impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ItemsGet2Response {}
185
186#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
187pub struct ReadOnlyLogGetResponse {
188 pub log: fidl::DebugLog,
189}
190
191impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for ReadOnlyLogGetResponse {}
192
193#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
194pub struct RetrievedItems {
195 pub payload: fidl::Vmo,
196 pub length: u32,
197 pub extra: u32,
198}
199
200impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for RetrievedItems {}
201
202#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
203pub struct SvcStashProviderGetResponse {
204 pub resource: fidl::endpoints::ServerEnd<SvcStashMarker>,
205}
206
207impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
208 for SvcStashProviderGetResponse
209{
210}
211
212#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
213pub struct SvcStashStoreRequest {
214 pub svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
215}
216
217impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for SvcStashStoreRequest {}
218
219#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
220pub struct UserbootPostBootfsFilesRequest {
221 pub files: Vec<BootfsFileVmo>,
222}
223
224impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
225 for UserbootPostBootfsFilesRequest
226{
227}
228
229#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
230pub struct UserbootPostStashSvcRequest {
231 pub stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
232}
233
234impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect>
235 for UserbootPostStashSvcRequest
236{
237}
238
239#[derive(Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
240pub struct WriteOnlyLogGetResponse {
241 pub log: fidl::DebugLog,
242}
243
244impl fidl::Standalone<fidl::encoding::DefaultFuchsiaResourceDialect> for WriteOnlyLogGetResponse {}
245
246#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
247pub struct ArgumentsMarker;
248
249impl fidl::endpoints::ProtocolMarker for ArgumentsMarker {
250 type Proxy = ArgumentsProxy;
251 type RequestStream = ArgumentsRequestStream;
252 #[cfg(target_os = "fuchsia")]
253 type SynchronousProxy = ArgumentsSynchronousProxy;
254
255 const DEBUG_NAME: &'static str = "fuchsia.boot.Arguments";
256}
257impl fidl::endpoints::DiscoverableProtocolMarker for ArgumentsMarker {}
258
259pub trait ArgumentsProxyInterface: Send + Sync {
260 type GetStringResponseFut: std::future::Future<Output = Result<Option<String>, fidl::Error>>
261 + Send;
262 fn r#get_string(&self, key: &str) -> Self::GetStringResponseFut;
263 type GetStringsResponseFut: std::future::Future<Output = Result<Vec<Option<String>>, fidl::Error>>
264 + Send;
265 fn r#get_strings(&self, keys: &[String]) -> Self::GetStringsResponseFut;
266 type GetBoolResponseFut: std::future::Future<Output = Result<bool, fidl::Error>> + Send;
267 fn r#get_bool(&self, key: &str, defaultval: bool) -> Self::GetBoolResponseFut;
268 type GetBoolsResponseFut: std::future::Future<Output = Result<Vec<bool>, fidl::Error>> + Send;
269 fn r#get_bools(&self, keys: &[BoolPair]) -> Self::GetBoolsResponseFut;
270 type CollectResponseFut: std::future::Future<Output = Result<Vec<String>, fidl::Error>> + Send;
271 fn r#collect(&self, prefix: &str) -> Self::CollectResponseFut;
272}
273#[derive(Debug)]
274#[cfg(target_os = "fuchsia")]
275pub struct ArgumentsSynchronousProxy {
276 client: fidl::client::sync::Client,
277}
278
279#[cfg(target_os = "fuchsia")]
280impl fidl::endpoints::SynchronousProxy for ArgumentsSynchronousProxy {
281 type Proxy = ArgumentsProxy;
282 type Protocol = ArgumentsMarker;
283
284 fn from_channel(inner: fidl::Channel) -> Self {
285 Self::new(inner)
286 }
287
288 fn into_channel(self) -> fidl::Channel {
289 self.client.into_channel()
290 }
291
292 fn as_channel(&self) -> &fidl::Channel {
293 self.client.as_channel()
294 }
295}
296
297#[cfg(target_os = "fuchsia")]
298impl ArgumentsSynchronousProxy {
299 pub fn new(channel: fidl::Channel) -> Self {
300 let protocol_name = <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
301 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
302 }
303
304 pub fn into_channel(self) -> fidl::Channel {
305 self.client.into_channel()
306 }
307
308 pub fn wait_for_event(
311 &self,
312 deadline: zx::MonotonicInstant,
313 ) -> Result<ArgumentsEvent, fidl::Error> {
314 ArgumentsEvent::decode(self.client.wait_for_event(deadline)?)
315 }
316
317 pub fn r#get_string(
319 &self,
320 mut key: &str,
321 ___deadline: zx::MonotonicInstant,
322 ) -> Result<Option<String>, fidl::Error> {
323 let _response =
324 self.client.send_query::<ArgumentsGetStringRequest, ArgumentsGetStringResponse>(
325 (key,),
326 0x426c026d966f8fe,
327 fidl::encoding::DynamicFlags::empty(),
328 ___deadline,
329 )?;
330 Ok(_response.value)
331 }
332
333 pub fn r#get_strings(
335 &self,
336 mut keys: &[String],
337 ___deadline: zx::MonotonicInstant,
338 ) -> Result<Vec<Option<String>>, fidl::Error> {
339 let _response =
340 self.client.send_query::<ArgumentsGetStringsRequest, ArgumentsGetStringsResponse>(
341 (keys,),
342 0x328fb6b545aa96f7,
343 fidl::encoding::DynamicFlags::empty(),
344 ___deadline,
345 )?;
346 Ok(_response.values)
347 }
348
349 pub fn r#get_bool(
355 &self,
356 mut key: &str,
357 mut defaultval: bool,
358 ___deadline: zx::MonotonicInstant,
359 ) -> Result<bool, fidl::Error> {
360 let _response =
361 self.client.send_query::<ArgumentsGetBoolRequest, ArgumentsGetBoolResponse>(
362 (key, defaultval),
363 0x4c5dd3149815cccd,
364 fidl::encoding::DynamicFlags::empty(),
365 ___deadline,
366 )?;
367 Ok(_response.value)
368 }
369
370 pub fn r#get_bools(
373 &self,
374 mut keys: &[BoolPair],
375 ___deadline: zx::MonotonicInstant,
376 ) -> Result<Vec<bool>, fidl::Error> {
377 let _response =
378 self.client.send_query::<ArgumentsGetBoolsRequest, ArgumentsGetBoolsResponse>(
379 (keys,),
380 0xfcc9fc9a0f22615,
381 fidl::encoding::DynamicFlags::empty(),
382 ___deadline,
383 )?;
384 Ok(_response.values)
385 }
386
387 pub fn r#collect(
391 &self,
392 mut prefix: &str,
393 ___deadline: zx::MonotonicInstant,
394 ) -> Result<Vec<String>, fidl::Error> {
395 let _response =
396 self.client.send_query::<ArgumentsCollectRequest, ArgumentsCollectResponse>(
397 (prefix,),
398 0x24e5acd864546e30,
399 fidl::encoding::DynamicFlags::empty(),
400 ___deadline,
401 )?;
402 Ok(_response.results)
403 }
404}
405
406#[derive(Debug, Clone)]
407pub struct ArgumentsProxy {
408 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
409}
410
411impl fidl::endpoints::Proxy for ArgumentsProxy {
412 type Protocol = ArgumentsMarker;
413
414 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
415 Self::new(inner)
416 }
417
418 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
419 self.client.into_channel().map_err(|client| Self { client })
420 }
421
422 fn as_channel(&self) -> &::fidl::AsyncChannel {
423 self.client.as_channel()
424 }
425}
426
427impl ArgumentsProxy {
428 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
430 let protocol_name = <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
431 Self { client: fidl::client::Client::new(channel, protocol_name) }
432 }
433
434 pub fn take_event_stream(&self) -> ArgumentsEventStream {
440 ArgumentsEventStream { event_receiver: self.client.take_event_receiver() }
441 }
442
443 pub fn r#get_string(
445 &self,
446 mut key: &str,
447 ) -> fidl::client::QueryResponseFut<Option<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
448 {
449 ArgumentsProxyInterface::r#get_string(self, key)
450 }
451
452 pub fn r#get_strings(
454 &self,
455 mut keys: &[String],
456 ) -> fidl::client::QueryResponseFut<
457 Vec<Option<String>>,
458 fidl::encoding::DefaultFuchsiaResourceDialect,
459 > {
460 ArgumentsProxyInterface::r#get_strings(self, keys)
461 }
462
463 pub fn r#get_bool(
469 &self,
470 mut key: &str,
471 mut defaultval: bool,
472 ) -> fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect> {
473 ArgumentsProxyInterface::r#get_bool(self, key, defaultval)
474 }
475
476 pub fn r#get_bools(
479 &self,
480 mut keys: &[BoolPair],
481 ) -> fidl::client::QueryResponseFut<Vec<bool>, fidl::encoding::DefaultFuchsiaResourceDialect>
482 {
483 ArgumentsProxyInterface::r#get_bools(self, keys)
484 }
485
486 pub fn r#collect(
490 &self,
491 mut prefix: &str,
492 ) -> fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>
493 {
494 ArgumentsProxyInterface::r#collect(self, prefix)
495 }
496}
497
498impl ArgumentsProxyInterface for ArgumentsProxy {
499 type GetStringResponseFut = fidl::client::QueryResponseFut<
500 Option<String>,
501 fidl::encoding::DefaultFuchsiaResourceDialect,
502 >;
503 fn r#get_string(&self, mut key: &str) -> Self::GetStringResponseFut {
504 fn _decode(
505 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
506 ) -> Result<Option<String>, fidl::Error> {
507 let _response = fidl::client::decode_transaction_body::<
508 ArgumentsGetStringResponse,
509 fidl::encoding::DefaultFuchsiaResourceDialect,
510 0x426c026d966f8fe,
511 >(_buf?)?;
512 Ok(_response.value)
513 }
514 self.client.send_query_and_decode::<ArgumentsGetStringRequest, Option<String>>(
515 (key,),
516 0x426c026d966f8fe,
517 fidl::encoding::DynamicFlags::empty(),
518 _decode,
519 )
520 }
521
522 type GetStringsResponseFut = fidl::client::QueryResponseFut<
523 Vec<Option<String>>,
524 fidl::encoding::DefaultFuchsiaResourceDialect,
525 >;
526 fn r#get_strings(&self, mut keys: &[String]) -> Self::GetStringsResponseFut {
527 fn _decode(
528 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
529 ) -> Result<Vec<Option<String>>, fidl::Error> {
530 let _response = fidl::client::decode_transaction_body::<
531 ArgumentsGetStringsResponse,
532 fidl::encoding::DefaultFuchsiaResourceDialect,
533 0x328fb6b545aa96f7,
534 >(_buf?)?;
535 Ok(_response.values)
536 }
537 self.client.send_query_and_decode::<ArgumentsGetStringsRequest, Vec<Option<String>>>(
538 (keys,),
539 0x328fb6b545aa96f7,
540 fidl::encoding::DynamicFlags::empty(),
541 _decode,
542 )
543 }
544
545 type GetBoolResponseFut =
546 fidl::client::QueryResponseFut<bool, fidl::encoding::DefaultFuchsiaResourceDialect>;
547 fn r#get_bool(&self, mut key: &str, mut defaultval: bool) -> Self::GetBoolResponseFut {
548 fn _decode(
549 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
550 ) -> Result<bool, fidl::Error> {
551 let _response = fidl::client::decode_transaction_body::<
552 ArgumentsGetBoolResponse,
553 fidl::encoding::DefaultFuchsiaResourceDialect,
554 0x4c5dd3149815cccd,
555 >(_buf?)?;
556 Ok(_response.value)
557 }
558 self.client.send_query_and_decode::<ArgumentsGetBoolRequest, bool>(
559 (key, defaultval),
560 0x4c5dd3149815cccd,
561 fidl::encoding::DynamicFlags::empty(),
562 _decode,
563 )
564 }
565
566 type GetBoolsResponseFut =
567 fidl::client::QueryResponseFut<Vec<bool>, fidl::encoding::DefaultFuchsiaResourceDialect>;
568 fn r#get_bools(&self, mut keys: &[BoolPair]) -> Self::GetBoolsResponseFut {
569 fn _decode(
570 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
571 ) -> Result<Vec<bool>, fidl::Error> {
572 let _response = fidl::client::decode_transaction_body::<
573 ArgumentsGetBoolsResponse,
574 fidl::encoding::DefaultFuchsiaResourceDialect,
575 0xfcc9fc9a0f22615,
576 >(_buf?)?;
577 Ok(_response.values)
578 }
579 self.client.send_query_and_decode::<ArgumentsGetBoolsRequest, Vec<bool>>(
580 (keys,),
581 0xfcc9fc9a0f22615,
582 fidl::encoding::DynamicFlags::empty(),
583 _decode,
584 )
585 }
586
587 type CollectResponseFut =
588 fidl::client::QueryResponseFut<Vec<String>, fidl::encoding::DefaultFuchsiaResourceDialect>;
589 fn r#collect(&self, mut prefix: &str) -> Self::CollectResponseFut {
590 fn _decode(
591 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
592 ) -> Result<Vec<String>, fidl::Error> {
593 let _response = fidl::client::decode_transaction_body::<
594 ArgumentsCollectResponse,
595 fidl::encoding::DefaultFuchsiaResourceDialect,
596 0x24e5acd864546e30,
597 >(_buf?)?;
598 Ok(_response.results)
599 }
600 self.client.send_query_and_decode::<ArgumentsCollectRequest, Vec<String>>(
601 (prefix,),
602 0x24e5acd864546e30,
603 fidl::encoding::DynamicFlags::empty(),
604 _decode,
605 )
606 }
607}
608
609pub struct ArgumentsEventStream {
610 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
611}
612
613impl std::marker::Unpin for ArgumentsEventStream {}
614
615impl futures::stream::FusedStream for ArgumentsEventStream {
616 fn is_terminated(&self) -> bool {
617 self.event_receiver.is_terminated()
618 }
619}
620
621impl futures::Stream for ArgumentsEventStream {
622 type Item = Result<ArgumentsEvent, fidl::Error>;
623
624 fn poll_next(
625 mut self: std::pin::Pin<&mut Self>,
626 cx: &mut std::task::Context<'_>,
627 ) -> std::task::Poll<Option<Self::Item>> {
628 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
629 &mut self.event_receiver,
630 cx
631 )?) {
632 Some(buf) => std::task::Poll::Ready(Some(ArgumentsEvent::decode(buf))),
633 None => std::task::Poll::Ready(None),
634 }
635 }
636}
637
638#[derive(Debug)]
639pub enum ArgumentsEvent {}
640
641impl ArgumentsEvent {
642 fn decode(
644 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
645 ) -> Result<ArgumentsEvent, fidl::Error> {
646 let (bytes, _handles) = buf.split_mut();
647 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
648 debug_assert_eq!(tx_header.tx_id, 0);
649 match tx_header.ordinal {
650 _ => Err(fidl::Error::UnknownOrdinal {
651 ordinal: tx_header.ordinal,
652 protocol_name: <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
653 }),
654 }
655 }
656}
657
658pub struct ArgumentsRequestStream {
660 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
661 is_terminated: bool,
662}
663
664impl std::marker::Unpin for ArgumentsRequestStream {}
665
666impl futures::stream::FusedStream for ArgumentsRequestStream {
667 fn is_terminated(&self) -> bool {
668 self.is_terminated
669 }
670}
671
672impl fidl::endpoints::RequestStream for ArgumentsRequestStream {
673 type Protocol = ArgumentsMarker;
674 type ControlHandle = ArgumentsControlHandle;
675
676 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
677 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
678 }
679
680 fn control_handle(&self) -> Self::ControlHandle {
681 ArgumentsControlHandle { inner: self.inner.clone() }
682 }
683
684 fn into_inner(
685 self,
686 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
687 {
688 (self.inner, self.is_terminated)
689 }
690
691 fn from_inner(
692 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
693 is_terminated: bool,
694 ) -> Self {
695 Self { inner, is_terminated }
696 }
697}
698
699impl futures::Stream for ArgumentsRequestStream {
700 type Item = Result<ArgumentsRequest, fidl::Error>;
701
702 fn poll_next(
703 mut self: std::pin::Pin<&mut Self>,
704 cx: &mut std::task::Context<'_>,
705 ) -> std::task::Poll<Option<Self::Item>> {
706 let this = &mut *self;
707 if this.inner.check_shutdown(cx) {
708 this.is_terminated = true;
709 return std::task::Poll::Ready(None);
710 }
711 if this.is_terminated {
712 panic!("polled ArgumentsRequestStream after completion");
713 }
714 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
715 |bytes, handles| {
716 match this.inner.channel().read_etc(cx, bytes, handles) {
717 std::task::Poll::Ready(Ok(())) => {}
718 std::task::Poll::Pending => return std::task::Poll::Pending,
719 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
720 this.is_terminated = true;
721 return std::task::Poll::Ready(None);
722 }
723 std::task::Poll::Ready(Err(e)) => {
724 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
725 e.into(),
726 ))))
727 }
728 }
729
730 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
732
733 std::task::Poll::Ready(Some(match header.ordinal {
734 0x426c026d966f8fe => {
735 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
736 let mut req = fidl::new_empty!(
737 ArgumentsGetStringRequest,
738 fidl::encoding::DefaultFuchsiaResourceDialect
739 );
740 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetStringRequest>(&header, _body_bytes, handles, &mut req)?;
741 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
742 Ok(ArgumentsRequest::GetString {
743 key: req.key,
744
745 responder: ArgumentsGetStringResponder {
746 control_handle: std::mem::ManuallyDrop::new(control_handle),
747 tx_id: header.tx_id,
748 },
749 })
750 }
751 0x328fb6b545aa96f7 => {
752 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
753 let mut req = fidl::new_empty!(
754 ArgumentsGetStringsRequest,
755 fidl::encoding::DefaultFuchsiaResourceDialect
756 );
757 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetStringsRequest>(&header, _body_bytes, handles, &mut req)?;
758 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
759 Ok(ArgumentsRequest::GetStrings {
760 keys: req.keys,
761
762 responder: ArgumentsGetStringsResponder {
763 control_handle: std::mem::ManuallyDrop::new(control_handle),
764 tx_id: header.tx_id,
765 },
766 })
767 }
768 0x4c5dd3149815cccd => {
769 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
770 let mut req = fidl::new_empty!(
771 ArgumentsGetBoolRequest,
772 fidl::encoding::DefaultFuchsiaResourceDialect
773 );
774 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetBoolRequest>(&header, _body_bytes, handles, &mut req)?;
775 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
776 Ok(ArgumentsRequest::GetBool {
777 key: req.key,
778 defaultval: req.defaultval,
779
780 responder: ArgumentsGetBoolResponder {
781 control_handle: std::mem::ManuallyDrop::new(control_handle),
782 tx_id: header.tx_id,
783 },
784 })
785 }
786 0xfcc9fc9a0f22615 => {
787 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
788 let mut req = fidl::new_empty!(
789 ArgumentsGetBoolsRequest,
790 fidl::encoding::DefaultFuchsiaResourceDialect
791 );
792 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsGetBoolsRequest>(&header, _body_bytes, handles, &mut req)?;
793 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
794 Ok(ArgumentsRequest::GetBools {
795 keys: req.keys,
796
797 responder: ArgumentsGetBoolsResponder {
798 control_handle: std::mem::ManuallyDrop::new(control_handle),
799 tx_id: header.tx_id,
800 },
801 })
802 }
803 0x24e5acd864546e30 => {
804 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
805 let mut req = fidl::new_empty!(
806 ArgumentsCollectRequest,
807 fidl::encoding::DefaultFuchsiaResourceDialect
808 );
809 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ArgumentsCollectRequest>(&header, _body_bytes, handles, &mut req)?;
810 let control_handle = ArgumentsControlHandle { inner: this.inner.clone() };
811 Ok(ArgumentsRequest::Collect {
812 prefix: req.prefix,
813
814 responder: ArgumentsCollectResponder {
815 control_handle: std::mem::ManuallyDrop::new(control_handle),
816 tx_id: header.tx_id,
817 },
818 })
819 }
820 _ => Err(fidl::Error::UnknownOrdinal {
821 ordinal: header.ordinal,
822 protocol_name:
823 <ArgumentsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
824 }),
825 }))
826 },
827 )
828 }
829}
830
831#[derive(Debug)]
833pub enum ArgumentsRequest {
834 GetString { key: String, responder: ArgumentsGetStringResponder },
836 GetStrings { keys: Vec<String>, responder: ArgumentsGetStringsResponder },
838 GetBool { key: String, defaultval: bool, responder: ArgumentsGetBoolResponder },
844 GetBools { keys: Vec<BoolPair>, responder: ArgumentsGetBoolsResponder },
847 Collect { prefix: String, responder: ArgumentsCollectResponder },
851}
852
853impl ArgumentsRequest {
854 #[allow(irrefutable_let_patterns)]
855 pub fn into_get_string(self) -> Option<(String, ArgumentsGetStringResponder)> {
856 if let ArgumentsRequest::GetString { key, responder } = self {
857 Some((key, responder))
858 } else {
859 None
860 }
861 }
862
863 #[allow(irrefutable_let_patterns)]
864 pub fn into_get_strings(self) -> Option<(Vec<String>, ArgumentsGetStringsResponder)> {
865 if let ArgumentsRequest::GetStrings { keys, responder } = self {
866 Some((keys, responder))
867 } else {
868 None
869 }
870 }
871
872 #[allow(irrefutable_let_patterns)]
873 pub fn into_get_bool(self) -> Option<(String, bool, ArgumentsGetBoolResponder)> {
874 if let ArgumentsRequest::GetBool { key, defaultval, responder } = self {
875 Some((key, defaultval, responder))
876 } else {
877 None
878 }
879 }
880
881 #[allow(irrefutable_let_patterns)]
882 pub fn into_get_bools(self) -> Option<(Vec<BoolPair>, ArgumentsGetBoolsResponder)> {
883 if let ArgumentsRequest::GetBools { keys, responder } = self {
884 Some((keys, responder))
885 } else {
886 None
887 }
888 }
889
890 #[allow(irrefutable_let_patterns)]
891 pub fn into_collect(self) -> Option<(String, ArgumentsCollectResponder)> {
892 if let ArgumentsRequest::Collect { prefix, responder } = self {
893 Some((prefix, responder))
894 } else {
895 None
896 }
897 }
898
899 pub fn method_name(&self) -> &'static str {
901 match *self {
902 ArgumentsRequest::GetString { .. } => "get_string",
903 ArgumentsRequest::GetStrings { .. } => "get_strings",
904 ArgumentsRequest::GetBool { .. } => "get_bool",
905 ArgumentsRequest::GetBools { .. } => "get_bools",
906 ArgumentsRequest::Collect { .. } => "collect",
907 }
908 }
909}
910
911#[derive(Debug, Clone)]
912pub struct ArgumentsControlHandle {
913 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
914}
915
916impl fidl::endpoints::ControlHandle for ArgumentsControlHandle {
917 fn shutdown(&self) {
918 self.inner.shutdown()
919 }
920 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
921 self.inner.shutdown_with_epitaph(status)
922 }
923
924 fn is_closed(&self) -> bool {
925 self.inner.channel().is_closed()
926 }
927 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
928 self.inner.channel().on_closed()
929 }
930
931 #[cfg(target_os = "fuchsia")]
932 fn signal_peer(
933 &self,
934 clear_mask: zx::Signals,
935 set_mask: zx::Signals,
936 ) -> Result<(), zx_status::Status> {
937 use fidl::Peered;
938 self.inner.channel().signal_peer(clear_mask, set_mask)
939 }
940}
941
942impl ArgumentsControlHandle {}
943
944#[must_use = "FIDL methods require a response to be sent"]
945#[derive(Debug)]
946pub struct ArgumentsGetStringResponder {
947 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
948 tx_id: u32,
949}
950
951impl std::ops::Drop for ArgumentsGetStringResponder {
955 fn drop(&mut self) {
956 self.control_handle.shutdown();
957 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
959 }
960}
961
962impl fidl::endpoints::Responder for ArgumentsGetStringResponder {
963 type ControlHandle = ArgumentsControlHandle;
964
965 fn control_handle(&self) -> &ArgumentsControlHandle {
966 &self.control_handle
967 }
968
969 fn drop_without_shutdown(mut self) {
970 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
972 std::mem::forget(self);
974 }
975}
976
977impl ArgumentsGetStringResponder {
978 pub fn send(self, mut value: Option<&str>) -> Result<(), fidl::Error> {
982 let _result = self.send_raw(value);
983 if _result.is_err() {
984 self.control_handle.shutdown();
985 }
986 self.drop_without_shutdown();
987 _result
988 }
989
990 pub fn send_no_shutdown_on_err(self, mut value: Option<&str>) -> Result<(), fidl::Error> {
992 let _result = self.send_raw(value);
993 self.drop_without_shutdown();
994 _result
995 }
996
997 fn send_raw(&self, mut value: Option<&str>) -> Result<(), fidl::Error> {
998 self.control_handle.inner.send::<ArgumentsGetStringResponse>(
999 (value,),
1000 self.tx_id,
1001 0x426c026d966f8fe,
1002 fidl::encoding::DynamicFlags::empty(),
1003 )
1004 }
1005}
1006
1007#[must_use = "FIDL methods require a response to be sent"]
1008#[derive(Debug)]
1009pub struct ArgumentsGetStringsResponder {
1010 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1011 tx_id: u32,
1012}
1013
1014impl std::ops::Drop for ArgumentsGetStringsResponder {
1018 fn drop(&mut self) {
1019 self.control_handle.shutdown();
1020 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1022 }
1023}
1024
1025impl fidl::endpoints::Responder for ArgumentsGetStringsResponder {
1026 type ControlHandle = ArgumentsControlHandle;
1027
1028 fn control_handle(&self) -> &ArgumentsControlHandle {
1029 &self.control_handle
1030 }
1031
1032 fn drop_without_shutdown(mut self) {
1033 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1035 std::mem::forget(self);
1037 }
1038}
1039
1040impl ArgumentsGetStringsResponder {
1041 pub fn send(self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
1045 let _result = self.send_raw(values);
1046 if _result.is_err() {
1047 self.control_handle.shutdown();
1048 }
1049 self.drop_without_shutdown();
1050 _result
1051 }
1052
1053 pub fn send_no_shutdown_on_err(self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
1055 let _result = self.send_raw(values);
1056 self.drop_without_shutdown();
1057 _result
1058 }
1059
1060 fn send_raw(&self, mut values: &[Option<String>]) -> Result<(), fidl::Error> {
1061 self.control_handle.inner.send::<ArgumentsGetStringsResponse>(
1062 (values,),
1063 self.tx_id,
1064 0x328fb6b545aa96f7,
1065 fidl::encoding::DynamicFlags::empty(),
1066 )
1067 }
1068}
1069
1070#[must_use = "FIDL methods require a response to be sent"]
1071#[derive(Debug)]
1072pub struct ArgumentsGetBoolResponder {
1073 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1074 tx_id: u32,
1075}
1076
1077impl std::ops::Drop for ArgumentsGetBoolResponder {
1081 fn drop(&mut self) {
1082 self.control_handle.shutdown();
1083 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1085 }
1086}
1087
1088impl fidl::endpoints::Responder for ArgumentsGetBoolResponder {
1089 type ControlHandle = ArgumentsControlHandle;
1090
1091 fn control_handle(&self) -> &ArgumentsControlHandle {
1092 &self.control_handle
1093 }
1094
1095 fn drop_without_shutdown(mut self) {
1096 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1098 std::mem::forget(self);
1100 }
1101}
1102
1103impl ArgumentsGetBoolResponder {
1104 pub fn send(self, mut value: bool) -> Result<(), fidl::Error> {
1108 let _result = self.send_raw(value);
1109 if _result.is_err() {
1110 self.control_handle.shutdown();
1111 }
1112 self.drop_without_shutdown();
1113 _result
1114 }
1115
1116 pub fn send_no_shutdown_on_err(self, mut value: bool) -> Result<(), fidl::Error> {
1118 let _result = self.send_raw(value);
1119 self.drop_without_shutdown();
1120 _result
1121 }
1122
1123 fn send_raw(&self, mut value: bool) -> Result<(), fidl::Error> {
1124 self.control_handle.inner.send::<ArgumentsGetBoolResponse>(
1125 (value,),
1126 self.tx_id,
1127 0x4c5dd3149815cccd,
1128 fidl::encoding::DynamicFlags::empty(),
1129 )
1130 }
1131}
1132
1133#[must_use = "FIDL methods require a response to be sent"]
1134#[derive(Debug)]
1135pub struct ArgumentsGetBoolsResponder {
1136 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1137 tx_id: u32,
1138}
1139
1140impl std::ops::Drop for ArgumentsGetBoolsResponder {
1144 fn drop(&mut self) {
1145 self.control_handle.shutdown();
1146 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1148 }
1149}
1150
1151impl fidl::endpoints::Responder for ArgumentsGetBoolsResponder {
1152 type ControlHandle = ArgumentsControlHandle;
1153
1154 fn control_handle(&self) -> &ArgumentsControlHandle {
1155 &self.control_handle
1156 }
1157
1158 fn drop_without_shutdown(mut self) {
1159 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1161 std::mem::forget(self);
1163 }
1164}
1165
1166impl ArgumentsGetBoolsResponder {
1167 pub fn send(self, mut values: &[bool]) -> Result<(), fidl::Error> {
1171 let _result = self.send_raw(values);
1172 if _result.is_err() {
1173 self.control_handle.shutdown();
1174 }
1175 self.drop_without_shutdown();
1176 _result
1177 }
1178
1179 pub fn send_no_shutdown_on_err(self, mut values: &[bool]) -> Result<(), fidl::Error> {
1181 let _result = self.send_raw(values);
1182 self.drop_without_shutdown();
1183 _result
1184 }
1185
1186 fn send_raw(&self, mut values: &[bool]) -> Result<(), fidl::Error> {
1187 self.control_handle.inner.send::<ArgumentsGetBoolsResponse>(
1188 (values,),
1189 self.tx_id,
1190 0xfcc9fc9a0f22615,
1191 fidl::encoding::DynamicFlags::empty(),
1192 )
1193 }
1194}
1195
1196#[must_use = "FIDL methods require a response to be sent"]
1197#[derive(Debug)]
1198pub struct ArgumentsCollectResponder {
1199 control_handle: std::mem::ManuallyDrop<ArgumentsControlHandle>,
1200 tx_id: u32,
1201}
1202
1203impl std::ops::Drop for ArgumentsCollectResponder {
1207 fn drop(&mut self) {
1208 self.control_handle.shutdown();
1209 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1211 }
1212}
1213
1214impl fidl::endpoints::Responder for ArgumentsCollectResponder {
1215 type ControlHandle = ArgumentsControlHandle;
1216
1217 fn control_handle(&self) -> &ArgumentsControlHandle {
1218 &self.control_handle
1219 }
1220
1221 fn drop_without_shutdown(mut self) {
1222 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1224 std::mem::forget(self);
1226 }
1227}
1228
1229impl ArgumentsCollectResponder {
1230 pub fn send(self, mut results: &[String]) -> Result<(), fidl::Error> {
1234 let _result = self.send_raw(results);
1235 if _result.is_err() {
1236 self.control_handle.shutdown();
1237 }
1238 self.drop_without_shutdown();
1239 _result
1240 }
1241
1242 pub fn send_no_shutdown_on_err(self, mut results: &[String]) -> Result<(), fidl::Error> {
1244 let _result = self.send_raw(results);
1245 self.drop_without_shutdown();
1246 _result
1247 }
1248
1249 fn send_raw(&self, mut results: &[String]) -> Result<(), fidl::Error> {
1250 self.control_handle.inner.send::<ArgumentsCollectResponse>(
1251 (results,),
1252 self.tx_id,
1253 0x24e5acd864546e30,
1254 fidl::encoding::DynamicFlags::empty(),
1255 )
1256 }
1257}
1258
1259#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1260pub struct FactoryItemsMarker;
1261
1262impl fidl::endpoints::ProtocolMarker for FactoryItemsMarker {
1263 type Proxy = FactoryItemsProxy;
1264 type RequestStream = FactoryItemsRequestStream;
1265 #[cfg(target_os = "fuchsia")]
1266 type SynchronousProxy = FactoryItemsSynchronousProxy;
1267
1268 const DEBUG_NAME: &'static str = "fuchsia.boot.FactoryItems";
1269}
1270impl fidl::endpoints::DiscoverableProtocolMarker for FactoryItemsMarker {}
1271
1272pub trait FactoryItemsProxyInterface: Send + Sync {
1273 type GetResponseFut: std::future::Future<Output = Result<(Option<fidl::Vmo>, u32), fidl::Error>>
1274 + Send;
1275 fn r#get(&self, extra: u32) -> Self::GetResponseFut;
1276}
1277#[derive(Debug)]
1278#[cfg(target_os = "fuchsia")]
1279pub struct FactoryItemsSynchronousProxy {
1280 client: fidl::client::sync::Client,
1281}
1282
1283#[cfg(target_os = "fuchsia")]
1284impl fidl::endpoints::SynchronousProxy for FactoryItemsSynchronousProxy {
1285 type Proxy = FactoryItemsProxy;
1286 type Protocol = FactoryItemsMarker;
1287
1288 fn from_channel(inner: fidl::Channel) -> Self {
1289 Self::new(inner)
1290 }
1291
1292 fn into_channel(self) -> fidl::Channel {
1293 self.client.into_channel()
1294 }
1295
1296 fn as_channel(&self) -> &fidl::Channel {
1297 self.client.as_channel()
1298 }
1299}
1300
1301#[cfg(target_os = "fuchsia")]
1302impl FactoryItemsSynchronousProxy {
1303 pub fn new(channel: fidl::Channel) -> Self {
1304 let protocol_name = <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1305 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1306 }
1307
1308 pub fn into_channel(self) -> fidl::Channel {
1309 self.client.into_channel()
1310 }
1311
1312 pub fn wait_for_event(
1315 &self,
1316 deadline: zx::MonotonicInstant,
1317 ) -> Result<FactoryItemsEvent, fidl::Error> {
1318 FactoryItemsEvent::decode(self.client.wait_for_event(deadline)?)
1319 }
1320
1321 pub fn r#get(
1326 &self,
1327 mut extra: u32,
1328 ___deadline: zx::MonotonicInstant,
1329 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1330 let _response = self.client.send_query::<FactoryItemsGetRequest, FactoryItemsGetResponse>(
1331 (extra,),
1332 0x2f0dcb1aba41b6d9,
1333 fidl::encoding::DynamicFlags::empty(),
1334 ___deadline,
1335 )?;
1336 Ok((_response.payload, _response.length))
1337 }
1338}
1339
1340#[derive(Debug, Clone)]
1341pub struct FactoryItemsProxy {
1342 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1343}
1344
1345impl fidl::endpoints::Proxy for FactoryItemsProxy {
1346 type Protocol = FactoryItemsMarker;
1347
1348 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1349 Self::new(inner)
1350 }
1351
1352 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1353 self.client.into_channel().map_err(|client| Self { client })
1354 }
1355
1356 fn as_channel(&self) -> &::fidl::AsyncChannel {
1357 self.client.as_channel()
1358 }
1359}
1360
1361impl FactoryItemsProxy {
1362 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1364 let protocol_name = <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1365 Self { client: fidl::client::Client::new(channel, protocol_name) }
1366 }
1367
1368 pub fn take_event_stream(&self) -> FactoryItemsEventStream {
1374 FactoryItemsEventStream { event_receiver: self.client.take_event_receiver() }
1375 }
1376
1377 pub fn r#get(
1382 &self,
1383 mut extra: u32,
1384 ) -> fidl::client::QueryResponseFut<
1385 (Option<fidl::Vmo>, u32),
1386 fidl::encoding::DefaultFuchsiaResourceDialect,
1387 > {
1388 FactoryItemsProxyInterface::r#get(self, extra)
1389 }
1390}
1391
1392impl FactoryItemsProxyInterface for FactoryItemsProxy {
1393 type GetResponseFut = fidl::client::QueryResponseFut<
1394 (Option<fidl::Vmo>, u32),
1395 fidl::encoding::DefaultFuchsiaResourceDialect,
1396 >;
1397 fn r#get(&self, mut extra: u32) -> Self::GetResponseFut {
1398 fn _decode(
1399 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1400 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1401 let _response = fidl::client::decode_transaction_body::<
1402 FactoryItemsGetResponse,
1403 fidl::encoding::DefaultFuchsiaResourceDialect,
1404 0x2f0dcb1aba41b6d9,
1405 >(_buf?)?;
1406 Ok((_response.payload, _response.length))
1407 }
1408 self.client.send_query_and_decode::<FactoryItemsGetRequest, (Option<fidl::Vmo>, u32)>(
1409 (extra,),
1410 0x2f0dcb1aba41b6d9,
1411 fidl::encoding::DynamicFlags::empty(),
1412 _decode,
1413 )
1414 }
1415}
1416
1417pub struct FactoryItemsEventStream {
1418 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1419}
1420
1421impl std::marker::Unpin for FactoryItemsEventStream {}
1422
1423impl futures::stream::FusedStream for FactoryItemsEventStream {
1424 fn is_terminated(&self) -> bool {
1425 self.event_receiver.is_terminated()
1426 }
1427}
1428
1429impl futures::Stream for FactoryItemsEventStream {
1430 type Item = Result<FactoryItemsEvent, fidl::Error>;
1431
1432 fn poll_next(
1433 mut self: std::pin::Pin<&mut Self>,
1434 cx: &mut std::task::Context<'_>,
1435 ) -> std::task::Poll<Option<Self::Item>> {
1436 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
1437 &mut self.event_receiver,
1438 cx
1439 )?) {
1440 Some(buf) => std::task::Poll::Ready(Some(FactoryItemsEvent::decode(buf))),
1441 None => std::task::Poll::Ready(None),
1442 }
1443 }
1444}
1445
1446#[derive(Debug)]
1447pub enum FactoryItemsEvent {}
1448
1449impl FactoryItemsEvent {
1450 fn decode(
1452 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
1453 ) -> Result<FactoryItemsEvent, fidl::Error> {
1454 let (bytes, _handles) = buf.split_mut();
1455 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1456 debug_assert_eq!(tx_header.tx_id, 0);
1457 match tx_header.ordinal {
1458 _ => Err(fidl::Error::UnknownOrdinal {
1459 ordinal: tx_header.ordinal,
1460 protocol_name: <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1461 }),
1462 }
1463 }
1464}
1465
1466pub struct FactoryItemsRequestStream {
1468 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1469 is_terminated: bool,
1470}
1471
1472impl std::marker::Unpin for FactoryItemsRequestStream {}
1473
1474impl futures::stream::FusedStream for FactoryItemsRequestStream {
1475 fn is_terminated(&self) -> bool {
1476 self.is_terminated
1477 }
1478}
1479
1480impl fidl::endpoints::RequestStream for FactoryItemsRequestStream {
1481 type Protocol = FactoryItemsMarker;
1482 type ControlHandle = FactoryItemsControlHandle;
1483
1484 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
1485 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
1486 }
1487
1488 fn control_handle(&self) -> Self::ControlHandle {
1489 FactoryItemsControlHandle { inner: self.inner.clone() }
1490 }
1491
1492 fn into_inner(
1493 self,
1494 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
1495 {
1496 (self.inner, self.is_terminated)
1497 }
1498
1499 fn from_inner(
1500 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1501 is_terminated: bool,
1502 ) -> Self {
1503 Self { inner, is_terminated }
1504 }
1505}
1506
1507impl futures::Stream for FactoryItemsRequestStream {
1508 type Item = Result<FactoryItemsRequest, fidl::Error>;
1509
1510 fn poll_next(
1511 mut self: std::pin::Pin<&mut Self>,
1512 cx: &mut std::task::Context<'_>,
1513 ) -> std::task::Poll<Option<Self::Item>> {
1514 let this = &mut *self;
1515 if this.inner.check_shutdown(cx) {
1516 this.is_terminated = true;
1517 return std::task::Poll::Ready(None);
1518 }
1519 if this.is_terminated {
1520 panic!("polled FactoryItemsRequestStream after completion");
1521 }
1522 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
1523 |bytes, handles| {
1524 match this.inner.channel().read_etc(cx, bytes, handles) {
1525 std::task::Poll::Ready(Ok(())) => {}
1526 std::task::Poll::Pending => return std::task::Poll::Pending,
1527 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
1528 this.is_terminated = true;
1529 return std::task::Poll::Ready(None);
1530 }
1531 std::task::Poll::Ready(Err(e)) => {
1532 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
1533 e.into(),
1534 ))))
1535 }
1536 }
1537
1538 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
1540
1541 std::task::Poll::Ready(Some(match header.ordinal {
1542 0x2f0dcb1aba41b6d9 => {
1543 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
1544 let mut req = fidl::new_empty!(
1545 FactoryItemsGetRequest,
1546 fidl::encoding::DefaultFuchsiaResourceDialect
1547 );
1548 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<FactoryItemsGetRequest>(&header, _body_bytes, handles, &mut req)?;
1549 let control_handle =
1550 FactoryItemsControlHandle { inner: this.inner.clone() };
1551 Ok(FactoryItemsRequest::Get {
1552 extra: req.extra,
1553
1554 responder: FactoryItemsGetResponder {
1555 control_handle: std::mem::ManuallyDrop::new(control_handle),
1556 tx_id: header.tx_id,
1557 },
1558 })
1559 }
1560 _ => Err(fidl::Error::UnknownOrdinal {
1561 ordinal: header.ordinal,
1562 protocol_name:
1563 <FactoryItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
1564 }),
1565 }))
1566 },
1567 )
1568 }
1569}
1570
1571#[derive(Debug)]
1573pub enum FactoryItemsRequest {
1574 Get { extra: u32, responder: FactoryItemsGetResponder },
1579}
1580
1581impl FactoryItemsRequest {
1582 #[allow(irrefutable_let_patterns)]
1583 pub fn into_get(self) -> Option<(u32, FactoryItemsGetResponder)> {
1584 if let FactoryItemsRequest::Get { extra, responder } = self {
1585 Some((extra, responder))
1586 } else {
1587 None
1588 }
1589 }
1590
1591 pub fn method_name(&self) -> &'static str {
1593 match *self {
1594 FactoryItemsRequest::Get { .. } => "get",
1595 }
1596 }
1597}
1598
1599#[derive(Debug, Clone)]
1600pub struct FactoryItemsControlHandle {
1601 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
1602}
1603
1604impl fidl::endpoints::ControlHandle for FactoryItemsControlHandle {
1605 fn shutdown(&self) {
1606 self.inner.shutdown()
1607 }
1608 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
1609 self.inner.shutdown_with_epitaph(status)
1610 }
1611
1612 fn is_closed(&self) -> bool {
1613 self.inner.channel().is_closed()
1614 }
1615 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
1616 self.inner.channel().on_closed()
1617 }
1618
1619 #[cfg(target_os = "fuchsia")]
1620 fn signal_peer(
1621 &self,
1622 clear_mask: zx::Signals,
1623 set_mask: zx::Signals,
1624 ) -> Result<(), zx_status::Status> {
1625 use fidl::Peered;
1626 self.inner.channel().signal_peer(clear_mask, set_mask)
1627 }
1628}
1629
1630impl FactoryItemsControlHandle {}
1631
1632#[must_use = "FIDL methods require a response to be sent"]
1633#[derive(Debug)]
1634pub struct FactoryItemsGetResponder {
1635 control_handle: std::mem::ManuallyDrop<FactoryItemsControlHandle>,
1636 tx_id: u32,
1637}
1638
1639impl std::ops::Drop for FactoryItemsGetResponder {
1643 fn drop(&mut self) {
1644 self.control_handle.shutdown();
1645 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1647 }
1648}
1649
1650impl fidl::endpoints::Responder for FactoryItemsGetResponder {
1651 type ControlHandle = FactoryItemsControlHandle;
1652
1653 fn control_handle(&self) -> &FactoryItemsControlHandle {
1654 &self.control_handle
1655 }
1656
1657 fn drop_without_shutdown(mut self) {
1658 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
1660 std::mem::forget(self);
1662 }
1663}
1664
1665impl FactoryItemsGetResponder {
1666 pub fn send(self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
1670 let _result = self.send_raw(payload, length);
1671 if _result.is_err() {
1672 self.control_handle.shutdown();
1673 }
1674 self.drop_without_shutdown();
1675 _result
1676 }
1677
1678 pub fn send_no_shutdown_on_err(
1680 self,
1681 mut payload: Option<fidl::Vmo>,
1682 mut length: u32,
1683 ) -> Result<(), fidl::Error> {
1684 let _result = self.send_raw(payload, length);
1685 self.drop_without_shutdown();
1686 _result
1687 }
1688
1689 fn send_raw(&self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
1690 self.control_handle.inner.send::<FactoryItemsGetResponse>(
1691 (payload, length),
1692 self.tx_id,
1693 0x2f0dcb1aba41b6d9,
1694 fidl::encoding::DynamicFlags::empty(),
1695 )
1696 }
1697}
1698
1699#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
1700pub struct ItemsMarker;
1701
1702impl fidl::endpoints::ProtocolMarker for ItemsMarker {
1703 type Proxy = ItemsProxy;
1704 type RequestStream = ItemsRequestStream;
1705 #[cfg(target_os = "fuchsia")]
1706 type SynchronousProxy = ItemsSynchronousProxy;
1707
1708 const DEBUG_NAME: &'static str = "fuchsia.boot.Items";
1709}
1710impl fidl::endpoints::DiscoverableProtocolMarker for ItemsMarker {}
1711pub type ItemsGet2Result = Result<Vec<RetrievedItems>, i32>;
1712
1713pub trait ItemsProxyInterface: Send + Sync {
1714 type GetResponseFut: std::future::Future<Output = Result<(Option<fidl::Vmo>, u32), fidl::Error>>
1715 + Send;
1716 fn r#get(&self, type_: u32, extra: u32) -> Self::GetResponseFut;
1717 type Get2ResponseFut: std::future::Future<Output = Result<ItemsGet2Result, fidl::Error>> + Send;
1718 fn r#get2(&self, type_: u32, extra: Option<&Extra>) -> Self::Get2ResponseFut;
1719 type GetBootloaderFileResponseFut: std::future::Future<Output = Result<Option<fidl::Vmo>, fidl::Error>>
1720 + Send;
1721 fn r#get_bootloader_file(&self, filename: &str) -> Self::GetBootloaderFileResponseFut;
1722}
1723#[derive(Debug)]
1724#[cfg(target_os = "fuchsia")]
1725pub struct ItemsSynchronousProxy {
1726 client: fidl::client::sync::Client,
1727}
1728
1729#[cfg(target_os = "fuchsia")]
1730impl fidl::endpoints::SynchronousProxy for ItemsSynchronousProxy {
1731 type Proxy = ItemsProxy;
1732 type Protocol = ItemsMarker;
1733
1734 fn from_channel(inner: fidl::Channel) -> Self {
1735 Self::new(inner)
1736 }
1737
1738 fn into_channel(self) -> fidl::Channel {
1739 self.client.into_channel()
1740 }
1741
1742 fn as_channel(&self) -> &fidl::Channel {
1743 self.client.as_channel()
1744 }
1745}
1746
1747#[cfg(target_os = "fuchsia")]
1748impl ItemsSynchronousProxy {
1749 pub fn new(channel: fidl::Channel) -> Self {
1750 let protocol_name = <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1751 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
1752 }
1753
1754 pub fn into_channel(self) -> fidl::Channel {
1755 self.client.into_channel()
1756 }
1757
1758 pub fn wait_for_event(
1761 &self,
1762 deadline: zx::MonotonicInstant,
1763 ) -> Result<ItemsEvent, fidl::Error> {
1764 ItemsEvent::decode(self.client.wait_for_event(deadline)?)
1765 }
1766
1767 pub fn r#get(
1775 &self,
1776 mut type_: u32,
1777 mut extra: u32,
1778 ___deadline: zx::MonotonicInstant,
1779 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1780 let _response = self.client.send_query::<ItemsGetRequest, ItemsGetResponse>(
1781 (type_, extra),
1782 0x542db3f176641edc,
1783 fidl::encoding::DynamicFlags::empty(),
1784 ___deadline,
1785 )?;
1786 Ok((_response.payload, _response.length))
1787 }
1788
1789 pub fn r#get2(
1794 &self,
1795 mut type_: u32,
1796 mut extra: Option<&Extra>,
1797 ___deadline: zx::MonotonicInstant,
1798 ) -> Result<ItemsGet2Result, fidl::Error> {
1799 let _response = self
1800 .client
1801 .send_query::<ItemsGet2Request, fidl::encoding::ResultType<ItemsGet2Response, i32>>(
1802 (type_, extra),
1803 0x2a64bd32f9ba3f2e,
1804 fidl::encoding::DynamicFlags::empty(),
1805 ___deadline,
1806 )?;
1807 Ok(_response.map(|x| x.retrieved_items))
1808 }
1809
1810 pub fn r#get_bootloader_file(
1813 &self,
1814 mut filename: &str,
1815 ___deadline: zx::MonotonicInstant,
1816 ) -> Result<Option<fidl::Vmo>, fidl::Error> {
1817 let _response = self
1818 .client
1819 .send_query::<ItemsGetBootloaderFileRequest, ItemsGetBootloaderFileResponse>(
1820 (filename,),
1821 0x5a004db3c9378e8c,
1822 fidl::encoding::DynamicFlags::empty(),
1823 ___deadline,
1824 )?;
1825 Ok(_response.payload)
1826 }
1827}
1828
1829#[derive(Debug, Clone)]
1830pub struct ItemsProxy {
1831 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
1832}
1833
1834impl fidl::endpoints::Proxy for ItemsProxy {
1835 type Protocol = ItemsMarker;
1836
1837 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
1838 Self::new(inner)
1839 }
1840
1841 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
1842 self.client.into_channel().map_err(|client| Self { client })
1843 }
1844
1845 fn as_channel(&self) -> &::fidl::AsyncChannel {
1846 self.client.as_channel()
1847 }
1848}
1849
1850impl ItemsProxy {
1851 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
1853 let protocol_name = <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
1854 Self { client: fidl::client::Client::new(channel, protocol_name) }
1855 }
1856
1857 pub fn take_event_stream(&self) -> ItemsEventStream {
1863 ItemsEventStream { event_receiver: self.client.take_event_receiver() }
1864 }
1865
1866 pub fn r#get(
1874 &self,
1875 mut type_: u32,
1876 mut extra: u32,
1877 ) -> fidl::client::QueryResponseFut<
1878 (Option<fidl::Vmo>, u32),
1879 fidl::encoding::DefaultFuchsiaResourceDialect,
1880 > {
1881 ItemsProxyInterface::r#get(self, type_, extra)
1882 }
1883
1884 pub fn r#get2(
1889 &self,
1890 mut type_: u32,
1891 mut extra: Option<&Extra>,
1892 ) -> fidl::client::QueryResponseFut<
1893 ItemsGet2Result,
1894 fidl::encoding::DefaultFuchsiaResourceDialect,
1895 > {
1896 ItemsProxyInterface::r#get2(self, type_, extra)
1897 }
1898
1899 pub fn r#get_bootloader_file(
1902 &self,
1903 mut filename: &str,
1904 ) -> fidl::client::QueryResponseFut<
1905 Option<fidl::Vmo>,
1906 fidl::encoding::DefaultFuchsiaResourceDialect,
1907 > {
1908 ItemsProxyInterface::r#get_bootloader_file(self, filename)
1909 }
1910}
1911
1912impl ItemsProxyInterface for ItemsProxy {
1913 type GetResponseFut = fidl::client::QueryResponseFut<
1914 (Option<fidl::Vmo>, u32),
1915 fidl::encoding::DefaultFuchsiaResourceDialect,
1916 >;
1917 fn r#get(&self, mut type_: u32, mut extra: u32) -> Self::GetResponseFut {
1918 fn _decode(
1919 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1920 ) -> Result<(Option<fidl::Vmo>, u32), fidl::Error> {
1921 let _response = fidl::client::decode_transaction_body::<
1922 ItemsGetResponse,
1923 fidl::encoding::DefaultFuchsiaResourceDialect,
1924 0x542db3f176641edc,
1925 >(_buf?)?;
1926 Ok((_response.payload, _response.length))
1927 }
1928 self.client.send_query_and_decode::<ItemsGetRequest, (Option<fidl::Vmo>, u32)>(
1929 (type_, extra),
1930 0x542db3f176641edc,
1931 fidl::encoding::DynamicFlags::empty(),
1932 _decode,
1933 )
1934 }
1935
1936 type Get2ResponseFut = fidl::client::QueryResponseFut<
1937 ItemsGet2Result,
1938 fidl::encoding::DefaultFuchsiaResourceDialect,
1939 >;
1940 fn r#get2(&self, mut type_: u32, mut extra: Option<&Extra>) -> Self::Get2ResponseFut {
1941 fn _decode(
1942 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1943 ) -> Result<ItemsGet2Result, fidl::Error> {
1944 let _response = fidl::client::decode_transaction_body::<
1945 fidl::encoding::ResultType<ItemsGet2Response, i32>,
1946 fidl::encoding::DefaultFuchsiaResourceDialect,
1947 0x2a64bd32f9ba3f2e,
1948 >(_buf?)?;
1949 Ok(_response.map(|x| x.retrieved_items))
1950 }
1951 self.client.send_query_and_decode::<ItemsGet2Request, ItemsGet2Result>(
1952 (type_, extra),
1953 0x2a64bd32f9ba3f2e,
1954 fidl::encoding::DynamicFlags::empty(),
1955 _decode,
1956 )
1957 }
1958
1959 type GetBootloaderFileResponseFut = fidl::client::QueryResponseFut<
1960 Option<fidl::Vmo>,
1961 fidl::encoding::DefaultFuchsiaResourceDialect,
1962 >;
1963 fn r#get_bootloader_file(&self, mut filename: &str) -> Self::GetBootloaderFileResponseFut {
1964 fn _decode(
1965 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
1966 ) -> Result<Option<fidl::Vmo>, fidl::Error> {
1967 let _response = fidl::client::decode_transaction_body::<
1968 ItemsGetBootloaderFileResponse,
1969 fidl::encoding::DefaultFuchsiaResourceDialect,
1970 0x5a004db3c9378e8c,
1971 >(_buf?)?;
1972 Ok(_response.payload)
1973 }
1974 self.client.send_query_and_decode::<ItemsGetBootloaderFileRequest, Option<fidl::Vmo>>(
1975 (filename,),
1976 0x5a004db3c9378e8c,
1977 fidl::encoding::DynamicFlags::empty(),
1978 _decode,
1979 )
1980 }
1981}
1982
1983pub struct ItemsEventStream {
1984 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
1985}
1986
1987impl std::marker::Unpin for ItemsEventStream {}
1988
1989impl futures::stream::FusedStream for ItemsEventStream {
1990 fn is_terminated(&self) -> bool {
1991 self.event_receiver.is_terminated()
1992 }
1993}
1994
1995impl futures::Stream for ItemsEventStream {
1996 type Item = Result<ItemsEvent, fidl::Error>;
1997
1998 fn poll_next(
1999 mut self: std::pin::Pin<&mut Self>,
2000 cx: &mut std::task::Context<'_>,
2001 ) -> std::task::Poll<Option<Self::Item>> {
2002 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2003 &mut self.event_receiver,
2004 cx
2005 )?) {
2006 Some(buf) => std::task::Poll::Ready(Some(ItemsEvent::decode(buf))),
2007 None => std::task::Poll::Ready(None),
2008 }
2009 }
2010}
2011
2012#[derive(Debug)]
2013pub enum ItemsEvent {}
2014
2015impl ItemsEvent {
2016 fn decode(
2018 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2019 ) -> Result<ItemsEvent, fidl::Error> {
2020 let (bytes, _handles) = buf.split_mut();
2021 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2022 debug_assert_eq!(tx_header.tx_id, 0);
2023 match tx_header.ordinal {
2024 _ => Err(fidl::Error::UnknownOrdinal {
2025 ordinal: tx_header.ordinal,
2026 protocol_name: <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2027 }),
2028 }
2029 }
2030}
2031
2032pub struct ItemsRequestStream {
2034 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2035 is_terminated: bool,
2036}
2037
2038impl std::marker::Unpin for ItemsRequestStream {}
2039
2040impl futures::stream::FusedStream for ItemsRequestStream {
2041 fn is_terminated(&self) -> bool {
2042 self.is_terminated
2043 }
2044}
2045
2046impl fidl::endpoints::RequestStream for ItemsRequestStream {
2047 type Protocol = ItemsMarker;
2048 type ControlHandle = ItemsControlHandle;
2049
2050 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2051 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2052 }
2053
2054 fn control_handle(&self) -> Self::ControlHandle {
2055 ItemsControlHandle { inner: self.inner.clone() }
2056 }
2057
2058 fn into_inner(
2059 self,
2060 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2061 {
2062 (self.inner, self.is_terminated)
2063 }
2064
2065 fn from_inner(
2066 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2067 is_terminated: bool,
2068 ) -> Self {
2069 Self { inner, is_terminated }
2070 }
2071}
2072
2073impl futures::Stream for ItemsRequestStream {
2074 type Item = Result<ItemsRequest, fidl::Error>;
2075
2076 fn poll_next(
2077 mut self: std::pin::Pin<&mut Self>,
2078 cx: &mut std::task::Context<'_>,
2079 ) -> std::task::Poll<Option<Self::Item>> {
2080 let this = &mut *self;
2081 if this.inner.check_shutdown(cx) {
2082 this.is_terminated = true;
2083 return std::task::Poll::Ready(None);
2084 }
2085 if this.is_terminated {
2086 panic!("polled ItemsRequestStream after completion");
2087 }
2088 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2089 |bytes, handles| {
2090 match this.inner.channel().read_etc(cx, bytes, handles) {
2091 std::task::Poll::Ready(Ok(())) => {}
2092 std::task::Poll::Pending => return std::task::Poll::Pending,
2093 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2094 this.is_terminated = true;
2095 return std::task::Poll::Ready(None);
2096 }
2097 std::task::Poll::Ready(Err(e)) => {
2098 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2099 e.into(),
2100 ))))
2101 }
2102 }
2103
2104 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2106
2107 std::task::Poll::Ready(Some(match header.ordinal {
2108 0x542db3f176641edc => {
2109 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2110 let mut req = fidl::new_empty!(
2111 ItemsGetRequest,
2112 fidl::encoding::DefaultFuchsiaResourceDialect
2113 );
2114 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGetRequest>(&header, _body_bytes, handles, &mut req)?;
2115 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2116 Ok(ItemsRequest::Get {
2117 type_: req.type_,
2118 extra: req.extra,
2119
2120 responder: ItemsGetResponder {
2121 control_handle: std::mem::ManuallyDrop::new(control_handle),
2122 tx_id: header.tx_id,
2123 },
2124 })
2125 }
2126 0x2a64bd32f9ba3f2e => {
2127 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2128 let mut req = fidl::new_empty!(
2129 ItemsGet2Request,
2130 fidl::encoding::DefaultFuchsiaResourceDialect
2131 );
2132 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGet2Request>(&header, _body_bytes, handles, &mut req)?;
2133 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2134 Ok(ItemsRequest::Get2 {
2135 type_: req.type_,
2136 extra: req.extra,
2137
2138 responder: ItemsGet2Responder {
2139 control_handle: std::mem::ManuallyDrop::new(control_handle),
2140 tx_id: header.tx_id,
2141 },
2142 })
2143 }
2144 0x5a004db3c9378e8c => {
2145 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2146 let mut req = fidl::new_empty!(
2147 ItemsGetBootloaderFileRequest,
2148 fidl::encoding::DefaultFuchsiaResourceDialect
2149 );
2150 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<ItemsGetBootloaderFileRequest>(&header, _body_bytes, handles, &mut req)?;
2151 let control_handle = ItemsControlHandle { inner: this.inner.clone() };
2152 Ok(ItemsRequest::GetBootloaderFile {
2153 filename: req.filename,
2154
2155 responder: ItemsGetBootloaderFileResponder {
2156 control_handle: std::mem::ManuallyDrop::new(control_handle),
2157 tx_id: header.tx_id,
2158 },
2159 })
2160 }
2161 _ => Err(fidl::Error::UnknownOrdinal {
2162 ordinal: header.ordinal,
2163 protocol_name: <ItemsMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2164 }),
2165 }))
2166 },
2167 )
2168 }
2169}
2170
2171#[derive(Debug)]
2173pub enum ItemsRequest {
2174 Get { type_: u32, extra: u32, responder: ItemsGetResponder },
2182 Get2 { type_: u32, extra: Option<Box<Extra>>, responder: ItemsGet2Responder },
2187 GetBootloaderFile { filename: String, responder: ItemsGetBootloaderFileResponder },
2190}
2191
2192impl ItemsRequest {
2193 #[allow(irrefutable_let_patterns)]
2194 pub fn into_get(self) -> Option<(u32, u32, ItemsGetResponder)> {
2195 if let ItemsRequest::Get { type_, extra, responder } = self {
2196 Some((type_, extra, responder))
2197 } else {
2198 None
2199 }
2200 }
2201
2202 #[allow(irrefutable_let_patterns)]
2203 pub fn into_get2(self) -> Option<(u32, Option<Box<Extra>>, ItemsGet2Responder)> {
2204 if let ItemsRequest::Get2 { type_, extra, responder } = self {
2205 Some((type_, extra, responder))
2206 } else {
2207 None
2208 }
2209 }
2210
2211 #[allow(irrefutable_let_patterns)]
2212 pub fn into_get_bootloader_file(self) -> Option<(String, ItemsGetBootloaderFileResponder)> {
2213 if let ItemsRequest::GetBootloaderFile { filename, responder } = self {
2214 Some((filename, responder))
2215 } else {
2216 None
2217 }
2218 }
2219
2220 pub fn method_name(&self) -> &'static str {
2222 match *self {
2223 ItemsRequest::Get { .. } => "get",
2224 ItemsRequest::Get2 { .. } => "get2",
2225 ItemsRequest::GetBootloaderFile { .. } => "get_bootloader_file",
2226 }
2227 }
2228}
2229
2230#[derive(Debug, Clone)]
2231pub struct ItemsControlHandle {
2232 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2233}
2234
2235impl fidl::endpoints::ControlHandle for ItemsControlHandle {
2236 fn shutdown(&self) {
2237 self.inner.shutdown()
2238 }
2239 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2240 self.inner.shutdown_with_epitaph(status)
2241 }
2242
2243 fn is_closed(&self) -> bool {
2244 self.inner.channel().is_closed()
2245 }
2246 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2247 self.inner.channel().on_closed()
2248 }
2249
2250 #[cfg(target_os = "fuchsia")]
2251 fn signal_peer(
2252 &self,
2253 clear_mask: zx::Signals,
2254 set_mask: zx::Signals,
2255 ) -> Result<(), zx_status::Status> {
2256 use fidl::Peered;
2257 self.inner.channel().signal_peer(clear_mask, set_mask)
2258 }
2259}
2260
2261impl ItemsControlHandle {}
2262
2263#[must_use = "FIDL methods require a response to be sent"]
2264#[derive(Debug)]
2265pub struct ItemsGetResponder {
2266 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2267 tx_id: u32,
2268}
2269
2270impl std::ops::Drop for ItemsGetResponder {
2274 fn drop(&mut self) {
2275 self.control_handle.shutdown();
2276 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2278 }
2279}
2280
2281impl fidl::endpoints::Responder for ItemsGetResponder {
2282 type ControlHandle = ItemsControlHandle;
2283
2284 fn control_handle(&self) -> &ItemsControlHandle {
2285 &self.control_handle
2286 }
2287
2288 fn drop_without_shutdown(mut self) {
2289 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2291 std::mem::forget(self);
2293 }
2294}
2295
2296impl ItemsGetResponder {
2297 pub fn send(self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
2301 let _result = self.send_raw(payload, length);
2302 if _result.is_err() {
2303 self.control_handle.shutdown();
2304 }
2305 self.drop_without_shutdown();
2306 _result
2307 }
2308
2309 pub fn send_no_shutdown_on_err(
2311 self,
2312 mut payload: Option<fidl::Vmo>,
2313 mut length: u32,
2314 ) -> Result<(), fidl::Error> {
2315 let _result = self.send_raw(payload, length);
2316 self.drop_without_shutdown();
2317 _result
2318 }
2319
2320 fn send_raw(&self, mut payload: Option<fidl::Vmo>, mut length: u32) -> Result<(), fidl::Error> {
2321 self.control_handle.inner.send::<ItemsGetResponse>(
2322 (payload, length),
2323 self.tx_id,
2324 0x542db3f176641edc,
2325 fidl::encoding::DynamicFlags::empty(),
2326 )
2327 }
2328}
2329
2330#[must_use = "FIDL methods require a response to be sent"]
2331#[derive(Debug)]
2332pub struct ItemsGet2Responder {
2333 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2334 tx_id: u32,
2335}
2336
2337impl std::ops::Drop for ItemsGet2Responder {
2341 fn drop(&mut self) {
2342 self.control_handle.shutdown();
2343 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2345 }
2346}
2347
2348impl fidl::endpoints::Responder for ItemsGet2Responder {
2349 type ControlHandle = ItemsControlHandle;
2350
2351 fn control_handle(&self) -> &ItemsControlHandle {
2352 &self.control_handle
2353 }
2354
2355 fn drop_without_shutdown(mut self) {
2356 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2358 std::mem::forget(self);
2360 }
2361}
2362
2363impl ItemsGet2Responder {
2364 pub fn send(self, mut result: Result<Vec<RetrievedItems>, i32>) -> Result<(), fidl::Error> {
2368 let _result = self.send_raw(result);
2369 if _result.is_err() {
2370 self.control_handle.shutdown();
2371 }
2372 self.drop_without_shutdown();
2373 _result
2374 }
2375
2376 pub fn send_no_shutdown_on_err(
2378 self,
2379 mut result: Result<Vec<RetrievedItems>, i32>,
2380 ) -> Result<(), fidl::Error> {
2381 let _result = self.send_raw(result);
2382 self.drop_without_shutdown();
2383 _result
2384 }
2385
2386 fn send_raw(&self, mut result: Result<Vec<RetrievedItems>, i32>) -> Result<(), fidl::Error> {
2387 self.control_handle.inner.send::<fidl::encoding::ResultType<ItemsGet2Response, i32>>(
2388 result
2389 .as_mut()
2390 .map_err(|e| *e)
2391 .map(|retrieved_items| (retrieved_items.as_mut_slice(),)),
2392 self.tx_id,
2393 0x2a64bd32f9ba3f2e,
2394 fidl::encoding::DynamicFlags::empty(),
2395 )
2396 }
2397}
2398
2399#[must_use = "FIDL methods require a response to be sent"]
2400#[derive(Debug)]
2401pub struct ItemsGetBootloaderFileResponder {
2402 control_handle: std::mem::ManuallyDrop<ItemsControlHandle>,
2403 tx_id: u32,
2404}
2405
2406impl std::ops::Drop for ItemsGetBootloaderFileResponder {
2410 fn drop(&mut self) {
2411 self.control_handle.shutdown();
2412 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2414 }
2415}
2416
2417impl fidl::endpoints::Responder for ItemsGetBootloaderFileResponder {
2418 type ControlHandle = ItemsControlHandle;
2419
2420 fn control_handle(&self) -> &ItemsControlHandle {
2421 &self.control_handle
2422 }
2423
2424 fn drop_without_shutdown(mut self) {
2425 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2427 std::mem::forget(self);
2429 }
2430}
2431
2432impl ItemsGetBootloaderFileResponder {
2433 pub fn send(self, mut payload: Option<fidl::Vmo>) -> Result<(), fidl::Error> {
2437 let _result = self.send_raw(payload);
2438 if _result.is_err() {
2439 self.control_handle.shutdown();
2440 }
2441 self.drop_without_shutdown();
2442 _result
2443 }
2444
2445 pub fn send_no_shutdown_on_err(
2447 self,
2448 mut payload: Option<fidl::Vmo>,
2449 ) -> Result<(), fidl::Error> {
2450 let _result = self.send_raw(payload);
2451 self.drop_without_shutdown();
2452 _result
2453 }
2454
2455 fn send_raw(&self, mut payload: Option<fidl::Vmo>) -> Result<(), fidl::Error> {
2456 self.control_handle.inner.send::<ItemsGetBootloaderFileResponse>(
2457 (payload,),
2458 self.tx_id,
2459 0x5a004db3c9378e8c,
2460 fidl::encoding::DynamicFlags::empty(),
2461 )
2462 }
2463}
2464
2465#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2466pub struct ReadOnlyLogMarker;
2467
2468impl fidl::endpoints::ProtocolMarker for ReadOnlyLogMarker {
2469 type Proxy = ReadOnlyLogProxy;
2470 type RequestStream = ReadOnlyLogRequestStream;
2471 #[cfg(target_os = "fuchsia")]
2472 type SynchronousProxy = ReadOnlyLogSynchronousProxy;
2473
2474 const DEBUG_NAME: &'static str = "fuchsia.boot.ReadOnlyLog";
2475}
2476impl fidl::endpoints::DiscoverableProtocolMarker for ReadOnlyLogMarker {}
2477
2478pub trait ReadOnlyLogProxyInterface: Send + Sync {
2479 type GetResponseFut: std::future::Future<Output = Result<fidl::DebugLog, fidl::Error>> + Send;
2480 fn r#get(&self) -> Self::GetResponseFut;
2481}
2482#[derive(Debug)]
2483#[cfg(target_os = "fuchsia")]
2484pub struct ReadOnlyLogSynchronousProxy {
2485 client: fidl::client::sync::Client,
2486}
2487
2488#[cfg(target_os = "fuchsia")]
2489impl fidl::endpoints::SynchronousProxy for ReadOnlyLogSynchronousProxy {
2490 type Proxy = ReadOnlyLogProxy;
2491 type Protocol = ReadOnlyLogMarker;
2492
2493 fn from_channel(inner: fidl::Channel) -> Self {
2494 Self::new(inner)
2495 }
2496
2497 fn into_channel(self) -> fidl::Channel {
2498 self.client.into_channel()
2499 }
2500
2501 fn as_channel(&self) -> &fidl::Channel {
2502 self.client.as_channel()
2503 }
2504}
2505
2506#[cfg(target_os = "fuchsia")]
2507impl ReadOnlyLogSynchronousProxy {
2508 pub fn new(channel: fidl::Channel) -> Self {
2509 let protocol_name = <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2510 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2511 }
2512
2513 pub fn into_channel(self) -> fidl::Channel {
2514 self.client.into_channel()
2515 }
2516
2517 pub fn wait_for_event(
2520 &self,
2521 deadline: zx::MonotonicInstant,
2522 ) -> Result<ReadOnlyLogEvent, fidl::Error> {
2523 ReadOnlyLogEvent::decode(self.client.wait_for_event(deadline)?)
2524 }
2525
2526 pub fn r#get(&self, ___deadline: zx::MonotonicInstant) -> Result<fidl::DebugLog, fidl::Error> {
2528 let _response =
2529 self.client.send_query::<fidl::encoding::EmptyPayload, ReadOnlyLogGetResponse>(
2530 (),
2531 0x6f3ceba5eca871ff,
2532 fidl::encoding::DynamicFlags::empty(),
2533 ___deadline,
2534 )?;
2535 Ok(_response.log)
2536 }
2537}
2538
2539#[derive(Debug, Clone)]
2540pub struct ReadOnlyLogProxy {
2541 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2542}
2543
2544impl fidl::endpoints::Proxy for ReadOnlyLogProxy {
2545 type Protocol = ReadOnlyLogMarker;
2546
2547 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2548 Self::new(inner)
2549 }
2550
2551 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2552 self.client.into_channel().map_err(|client| Self { client })
2553 }
2554
2555 fn as_channel(&self) -> &::fidl::AsyncChannel {
2556 self.client.as_channel()
2557 }
2558}
2559
2560impl ReadOnlyLogProxy {
2561 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2563 let protocol_name = <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2564 Self { client: fidl::client::Client::new(channel, protocol_name) }
2565 }
2566
2567 pub fn take_event_stream(&self) -> ReadOnlyLogEventStream {
2573 ReadOnlyLogEventStream { event_receiver: self.client.take_event_receiver() }
2574 }
2575
2576 pub fn r#get(
2578 &self,
2579 ) -> fidl::client::QueryResponseFut<fidl::DebugLog, fidl::encoding::DefaultFuchsiaResourceDialect>
2580 {
2581 ReadOnlyLogProxyInterface::r#get(self)
2582 }
2583}
2584
2585impl ReadOnlyLogProxyInterface for ReadOnlyLogProxy {
2586 type GetResponseFut = fidl::client::QueryResponseFut<
2587 fidl::DebugLog,
2588 fidl::encoding::DefaultFuchsiaResourceDialect,
2589 >;
2590 fn r#get(&self) -> Self::GetResponseFut {
2591 fn _decode(
2592 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
2593 ) -> Result<fidl::DebugLog, fidl::Error> {
2594 let _response = fidl::client::decode_transaction_body::<
2595 ReadOnlyLogGetResponse,
2596 fidl::encoding::DefaultFuchsiaResourceDialect,
2597 0x6f3ceba5eca871ff,
2598 >(_buf?)?;
2599 Ok(_response.log)
2600 }
2601 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::DebugLog>(
2602 (),
2603 0x6f3ceba5eca871ff,
2604 fidl::encoding::DynamicFlags::empty(),
2605 _decode,
2606 )
2607 }
2608}
2609
2610pub struct ReadOnlyLogEventStream {
2611 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
2612}
2613
2614impl std::marker::Unpin for ReadOnlyLogEventStream {}
2615
2616impl futures::stream::FusedStream for ReadOnlyLogEventStream {
2617 fn is_terminated(&self) -> bool {
2618 self.event_receiver.is_terminated()
2619 }
2620}
2621
2622impl futures::Stream for ReadOnlyLogEventStream {
2623 type Item = Result<ReadOnlyLogEvent, fidl::Error>;
2624
2625 fn poll_next(
2626 mut self: std::pin::Pin<&mut Self>,
2627 cx: &mut std::task::Context<'_>,
2628 ) -> std::task::Poll<Option<Self::Item>> {
2629 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
2630 &mut self.event_receiver,
2631 cx
2632 )?) {
2633 Some(buf) => std::task::Poll::Ready(Some(ReadOnlyLogEvent::decode(buf))),
2634 None => std::task::Poll::Ready(None),
2635 }
2636 }
2637}
2638
2639#[derive(Debug)]
2640pub enum ReadOnlyLogEvent {}
2641
2642impl ReadOnlyLogEvent {
2643 fn decode(
2645 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
2646 ) -> Result<ReadOnlyLogEvent, fidl::Error> {
2647 let (bytes, _handles) = buf.split_mut();
2648 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2649 debug_assert_eq!(tx_header.tx_id, 0);
2650 match tx_header.ordinal {
2651 _ => Err(fidl::Error::UnknownOrdinal {
2652 ordinal: tx_header.ordinal,
2653 protocol_name: <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2654 }),
2655 }
2656 }
2657}
2658
2659pub struct ReadOnlyLogRequestStream {
2661 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2662 is_terminated: bool,
2663}
2664
2665impl std::marker::Unpin for ReadOnlyLogRequestStream {}
2666
2667impl futures::stream::FusedStream for ReadOnlyLogRequestStream {
2668 fn is_terminated(&self) -> bool {
2669 self.is_terminated
2670 }
2671}
2672
2673impl fidl::endpoints::RequestStream for ReadOnlyLogRequestStream {
2674 type Protocol = ReadOnlyLogMarker;
2675 type ControlHandle = ReadOnlyLogControlHandle;
2676
2677 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
2678 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
2679 }
2680
2681 fn control_handle(&self) -> Self::ControlHandle {
2682 ReadOnlyLogControlHandle { inner: self.inner.clone() }
2683 }
2684
2685 fn into_inner(
2686 self,
2687 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
2688 {
2689 (self.inner, self.is_terminated)
2690 }
2691
2692 fn from_inner(
2693 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2694 is_terminated: bool,
2695 ) -> Self {
2696 Self { inner, is_terminated }
2697 }
2698}
2699
2700impl futures::Stream for ReadOnlyLogRequestStream {
2701 type Item = Result<ReadOnlyLogRequest, fidl::Error>;
2702
2703 fn poll_next(
2704 mut self: std::pin::Pin<&mut Self>,
2705 cx: &mut std::task::Context<'_>,
2706 ) -> std::task::Poll<Option<Self::Item>> {
2707 let this = &mut *self;
2708 if this.inner.check_shutdown(cx) {
2709 this.is_terminated = true;
2710 return std::task::Poll::Ready(None);
2711 }
2712 if this.is_terminated {
2713 panic!("polled ReadOnlyLogRequestStream after completion");
2714 }
2715 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
2716 |bytes, handles| {
2717 match this.inner.channel().read_etc(cx, bytes, handles) {
2718 std::task::Poll::Ready(Ok(())) => {}
2719 std::task::Poll::Pending => return std::task::Poll::Pending,
2720 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
2721 this.is_terminated = true;
2722 return std::task::Poll::Ready(None);
2723 }
2724 std::task::Poll::Ready(Err(e)) => {
2725 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
2726 e.into(),
2727 ))))
2728 }
2729 }
2730
2731 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
2733
2734 std::task::Poll::Ready(Some(match header.ordinal {
2735 0x6f3ceba5eca871ff => {
2736 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
2737 let mut req = fidl::new_empty!(
2738 fidl::encoding::EmptyPayload,
2739 fidl::encoding::DefaultFuchsiaResourceDialect
2740 );
2741 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
2742 let control_handle = ReadOnlyLogControlHandle { inner: this.inner.clone() };
2743 Ok(ReadOnlyLogRequest::Get {
2744 responder: ReadOnlyLogGetResponder {
2745 control_handle: std::mem::ManuallyDrop::new(control_handle),
2746 tx_id: header.tx_id,
2747 },
2748 })
2749 }
2750 _ => Err(fidl::Error::UnknownOrdinal {
2751 ordinal: header.ordinal,
2752 protocol_name:
2753 <ReadOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
2754 }),
2755 }))
2756 },
2757 )
2758 }
2759}
2760
2761#[derive(Debug)]
2763pub enum ReadOnlyLogRequest {
2764 Get { responder: ReadOnlyLogGetResponder },
2766}
2767
2768impl ReadOnlyLogRequest {
2769 #[allow(irrefutable_let_patterns)]
2770 pub fn into_get(self) -> Option<(ReadOnlyLogGetResponder)> {
2771 if let ReadOnlyLogRequest::Get { responder } = self {
2772 Some((responder))
2773 } else {
2774 None
2775 }
2776 }
2777
2778 pub fn method_name(&self) -> &'static str {
2780 match *self {
2781 ReadOnlyLogRequest::Get { .. } => "get",
2782 }
2783 }
2784}
2785
2786#[derive(Debug, Clone)]
2787pub struct ReadOnlyLogControlHandle {
2788 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
2789}
2790
2791impl fidl::endpoints::ControlHandle for ReadOnlyLogControlHandle {
2792 fn shutdown(&self) {
2793 self.inner.shutdown()
2794 }
2795 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
2796 self.inner.shutdown_with_epitaph(status)
2797 }
2798
2799 fn is_closed(&self) -> bool {
2800 self.inner.channel().is_closed()
2801 }
2802 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
2803 self.inner.channel().on_closed()
2804 }
2805
2806 #[cfg(target_os = "fuchsia")]
2807 fn signal_peer(
2808 &self,
2809 clear_mask: zx::Signals,
2810 set_mask: zx::Signals,
2811 ) -> Result<(), zx_status::Status> {
2812 use fidl::Peered;
2813 self.inner.channel().signal_peer(clear_mask, set_mask)
2814 }
2815}
2816
2817impl ReadOnlyLogControlHandle {}
2818
2819#[must_use = "FIDL methods require a response to be sent"]
2820#[derive(Debug)]
2821pub struct ReadOnlyLogGetResponder {
2822 control_handle: std::mem::ManuallyDrop<ReadOnlyLogControlHandle>,
2823 tx_id: u32,
2824}
2825
2826impl std::ops::Drop for ReadOnlyLogGetResponder {
2830 fn drop(&mut self) {
2831 self.control_handle.shutdown();
2832 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2834 }
2835}
2836
2837impl fidl::endpoints::Responder for ReadOnlyLogGetResponder {
2838 type ControlHandle = ReadOnlyLogControlHandle;
2839
2840 fn control_handle(&self) -> &ReadOnlyLogControlHandle {
2841 &self.control_handle
2842 }
2843
2844 fn drop_without_shutdown(mut self) {
2845 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
2847 std::mem::forget(self);
2849 }
2850}
2851
2852impl ReadOnlyLogGetResponder {
2853 pub fn send(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2857 let _result = self.send_raw(log);
2858 if _result.is_err() {
2859 self.control_handle.shutdown();
2860 }
2861 self.drop_without_shutdown();
2862 _result
2863 }
2864
2865 pub fn send_no_shutdown_on_err(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2867 let _result = self.send_raw(log);
2868 self.drop_without_shutdown();
2869 _result
2870 }
2871
2872 fn send_raw(&self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
2873 self.control_handle.inner.send::<ReadOnlyLogGetResponse>(
2874 (log,),
2875 self.tx_id,
2876 0x6f3ceba5eca871ff,
2877 fidl::encoding::DynamicFlags::empty(),
2878 )
2879 }
2880}
2881
2882#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
2883pub struct SvcStashMarker;
2884
2885impl fidl::endpoints::ProtocolMarker for SvcStashMarker {
2886 type Proxy = SvcStashProxy;
2887 type RequestStream = SvcStashRequestStream;
2888 #[cfg(target_os = "fuchsia")]
2889 type SynchronousProxy = SvcStashSynchronousProxy;
2890
2891 const DEBUG_NAME: &'static str = "(anonymous) SvcStash";
2892}
2893
2894pub trait SvcStashProxyInterface: Send + Sync {
2895 fn r#store(
2896 &self,
2897 svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
2898 ) -> Result<(), fidl::Error>;
2899}
2900#[derive(Debug)]
2901#[cfg(target_os = "fuchsia")]
2902pub struct SvcStashSynchronousProxy {
2903 client: fidl::client::sync::Client,
2904}
2905
2906#[cfg(target_os = "fuchsia")]
2907impl fidl::endpoints::SynchronousProxy for SvcStashSynchronousProxy {
2908 type Proxy = SvcStashProxy;
2909 type Protocol = SvcStashMarker;
2910
2911 fn from_channel(inner: fidl::Channel) -> Self {
2912 Self::new(inner)
2913 }
2914
2915 fn into_channel(self) -> fidl::Channel {
2916 self.client.into_channel()
2917 }
2918
2919 fn as_channel(&self) -> &fidl::Channel {
2920 self.client.as_channel()
2921 }
2922}
2923
2924#[cfg(target_os = "fuchsia")]
2925impl SvcStashSynchronousProxy {
2926 pub fn new(channel: fidl::Channel) -> Self {
2927 let protocol_name = <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2928 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
2929 }
2930
2931 pub fn into_channel(self) -> fidl::Channel {
2932 self.client.into_channel()
2933 }
2934
2935 pub fn wait_for_event(
2938 &self,
2939 deadline: zx::MonotonicInstant,
2940 ) -> Result<SvcStashEvent, fidl::Error> {
2941 SvcStashEvent::decode(self.client.wait_for_event(deadline)?)
2942 }
2943
2944 pub fn r#store(
2948 &self,
2949 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
2950 ) -> Result<(), fidl::Error> {
2951 self.client.send::<SvcStashStoreRequest>(
2952 (svc_endpoint,),
2953 0xc2648e356ca2870,
2954 fidl::encoding::DynamicFlags::empty(),
2955 )
2956 }
2957}
2958
2959#[derive(Debug, Clone)]
2960pub struct SvcStashProxy {
2961 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
2962}
2963
2964impl fidl::endpoints::Proxy for SvcStashProxy {
2965 type Protocol = SvcStashMarker;
2966
2967 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
2968 Self::new(inner)
2969 }
2970
2971 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
2972 self.client.into_channel().map_err(|client| Self { client })
2973 }
2974
2975 fn as_channel(&self) -> &::fidl::AsyncChannel {
2976 self.client.as_channel()
2977 }
2978}
2979
2980impl SvcStashProxy {
2981 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
2983 let protocol_name = <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
2984 Self { client: fidl::client::Client::new(channel, protocol_name) }
2985 }
2986
2987 pub fn take_event_stream(&self) -> SvcStashEventStream {
2993 SvcStashEventStream { event_receiver: self.client.take_event_receiver() }
2994 }
2995
2996 pub fn r#store(
3000 &self,
3001 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
3002 ) -> Result<(), fidl::Error> {
3003 SvcStashProxyInterface::r#store(self, svc_endpoint)
3004 }
3005}
3006
3007impl SvcStashProxyInterface for SvcStashProxy {
3008 fn r#store(
3009 &self,
3010 mut svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
3011 ) -> Result<(), fidl::Error> {
3012 self.client.send::<SvcStashStoreRequest>(
3013 (svc_endpoint,),
3014 0xc2648e356ca2870,
3015 fidl::encoding::DynamicFlags::empty(),
3016 )
3017 }
3018}
3019
3020pub struct SvcStashEventStream {
3021 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3022}
3023
3024impl std::marker::Unpin for SvcStashEventStream {}
3025
3026impl futures::stream::FusedStream for SvcStashEventStream {
3027 fn is_terminated(&self) -> bool {
3028 self.event_receiver.is_terminated()
3029 }
3030}
3031
3032impl futures::Stream for SvcStashEventStream {
3033 type Item = Result<SvcStashEvent, fidl::Error>;
3034
3035 fn poll_next(
3036 mut self: std::pin::Pin<&mut Self>,
3037 cx: &mut std::task::Context<'_>,
3038 ) -> std::task::Poll<Option<Self::Item>> {
3039 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3040 &mut self.event_receiver,
3041 cx
3042 )?) {
3043 Some(buf) => std::task::Poll::Ready(Some(SvcStashEvent::decode(buf))),
3044 None => std::task::Poll::Ready(None),
3045 }
3046 }
3047}
3048
3049#[derive(Debug)]
3050pub enum SvcStashEvent {}
3051
3052impl SvcStashEvent {
3053 fn decode(
3055 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3056 ) -> Result<SvcStashEvent, fidl::Error> {
3057 let (bytes, _handles) = buf.split_mut();
3058 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3059 debug_assert_eq!(tx_header.tx_id, 0);
3060 match tx_header.ordinal {
3061 _ => Err(fidl::Error::UnknownOrdinal {
3062 ordinal: tx_header.ordinal,
3063 protocol_name: <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3064 }),
3065 }
3066 }
3067}
3068
3069pub struct SvcStashRequestStream {
3071 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3072 is_terminated: bool,
3073}
3074
3075impl std::marker::Unpin for SvcStashRequestStream {}
3076
3077impl futures::stream::FusedStream for SvcStashRequestStream {
3078 fn is_terminated(&self) -> bool {
3079 self.is_terminated
3080 }
3081}
3082
3083impl fidl::endpoints::RequestStream for SvcStashRequestStream {
3084 type Protocol = SvcStashMarker;
3085 type ControlHandle = SvcStashControlHandle;
3086
3087 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3088 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3089 }
3090
3091 fn control_handle(&self) -> Self::ControlHandle {
3092 SvcStashControlHandle { inner: self.inner.clone() }
3093 }
3094
3095 fn into_inner(
3096 self,
3097 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3098 {
3099 (self.inner, self.is_terminated)
3100 }
3101
3102 fn from_inner(
3103 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3104 is_terminated: bool,
3105 ) -> Self {
3106 Self { inner, is_terminated }
3107 }
3108}
3109
3110impl futures::Stream for SvcStashRequestStream {
3111 type Item = Result<SvcStashRequest, fidl::Error>;
3112
3113 fn poll_next(
3114 mut self: std::pin::Pin<&mut Self>,
3115 cx: &mut std::task::Context<'_>,
3116 ) -> std::task::Poll<Option<Self::Item>> {
3117 let this = &mut *self;
3118 if this.inner.check_shutdown(cx) {
3119 this.is_terminated = true;
3120 return std::task::Poll::Ready(None);
3121 }
3122 if this.is_terminated {
3123 panic!("polled SvcStashRequestStream after completion");
3124 }
3125 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3126 |bytes, handles| {
3127 match this.inner.channel().read_etc(cx, bytes, handles) {
3128 std::task::Poll::Ready(Ok(())) => {}
3129 std::task::Poll::Pending => return std::task::Poll::Pending,
3130 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3131 this.is_terminated = true;
3132 return std::task::Poll::Ready(None);
3133 }
3134 std::task::Poll::Ready(Err(e)) => {
3135 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3136 e.into(),
3137 ))))
3138 }
3139 }
3140
3141 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3143
3144 std::task::Poll::Ready(Some(match header.ordinal {
3145 0xc2648e356ca2870 => {
3146 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3147 let mut req = fidl::new_empty!(
3148 SvcStashStoreRequest,
3149 fidl::encoding::DefaultFuchsiaResourceDialect
3150 );
3151 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<SvcStashStoreRequest>(&header, _body_bytes, handles, &mut req)?;
3152 let control_handle = SvcStashControlHandle { inner: this.inner.clone() };
3153 Ok(SvcStashRequest::Store {
3154 svc_endpoint: req.svc_endpoint,
3155
3156 control_handle,
3157 })
3158 }
3159 _ => Err(fidl::Error::UnknownOrdinal {
3160 ordinal: header.ordinal,
3161 protocol_name:
3162 <SvcStashMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3163 }),
3164 }))
3165 },
3166 )
3167 }
3168}
3169
3170#[derive(Debug)]
3172pub enum SvcStashRequest {
3173 Store {
3177 svc_endpoint: fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
3178 control_handle: SvcStashControlHandle,
3179 },
3180}
3181
3182impl SvcStashRequest {
3183 #[allow(irrefutable_let_patterns)]
3184 pub fn into_store(
3185 self,
3186 ) -> Option<(fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>, SvcStashControlHandle)>
3187 {
3188 if let SvcStashRequest::Store { svc_endpoint, control_handle } = self {
3189 Some((svc_endpoint, control_handle))
3190 } else {
3191 None
3192 }
3193 }
3194
3195 pub fn method_name(&self) -> &'static str {
3197 match *self {
3198 SvcStashRequest::Store { .. } => "store",
3199 }
3200 }
3201}
3202
3203#[derive(Debug, Clone)]
3204pub struct SvcStashControlHandle {
3205 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3206}
3207
3208impl fidl::endpoints::ControlHandle for SvcStashControlHandle {
3209 fn shutdown(&self) {
3210 self.inner.shutdown()
3211 }
3212 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3213 self.inner.shutdown_with_epitaph(status)
3214 }
3215
3216 fn is_closed(&self) -> bool {
3217 self.inner.channel().is_closed()
3218 }
3219 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3220 self.inner.channel().on_closed()
3221 }
3222
3223 #[cfg(target_os = "fuchsia")]
3224 fn signal_peer(
3225 &self,
3226 clear_mask: zx::Signals,
3227 set_mask: zx::Signals,
3228 ) -> Result<(), zx_status::Status> {
3229 use fidl::Peered;
3230 self.inner.channel().signal_peer(clear_mask, set_mask)
3231 }
3232}
3233
3234impl SvcStashControlHandle {}
3235
3236#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3237pub struct SvcStashProviderMarker;
3238
3239impl fidl::endpoints::ProtocolMarker for SvcStashProviderMarker {
3240 type Proxy = SvcStashProviderProxy;
3241 type RequestStream = SvcStashProviderRequestStream;
3242 #[cfg(target_os = "fuchsia")]
3243 type SynchronousProxy = SvcStashProviderSynchronousProxy;
3244
3245 const DEBUG_NAME: &'static str = "fuchsia.boot.SvcStashProvider";
3246}
3247impl fidl::endpoints::DiscoverableProtocolMarker for SvcStashProviderMarker {}
3248pub type SvcStashProviderGetResult = Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>;
3249
3250pub trait SvcStashProviderProxyInterface: Send + Sync {
3251 type GetResponseFut: std::future::Future<Output = Result<SvcStashProviderGetResult, fidl::Error>>
3252 + Send;
3253 fn r#get(&self) -> Self::GetResponseFut;
3254}
3255#[derive(Debug)]
3256#[cfg(target_os = "fuchsia")]
3257pub struct SvcStashProviderSynchronousProxy {
3258 client: fidl::client::sync::Client,
3259}
3260
3261#[cfg(target_os = "fuchsia")]
3262impl fidl::endpoints::SynchronousProxy for SvcStashProviderSynchronousProxy {
3263 type Proxy = SvcStashProviderProxy;
3264 type Protocol = SvcStashProviderMarker;
3265
3266 fn from_channel(inner: fidl::Channel) -> Self {
3267 Self::new(inner)
3268 }
3269
3270 fn into_channel(self) -> fidl::Channel {
3271 self.client.into_channel()
3272 }
3273
3274 fn as_channel(&self) -> &fidl::Channel {
3275 self.client.as_channel()
3276 }
3277}
3278
3279#[cfg(target_os = "fuchsia")]
3280impl SvcStashProviderSynchronousProxy {
3281 pub fn new(channel: fidl::Channel) -> Self {
3282 let protocol_name = <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3283 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3284 }
3285
3286 pub fn into_channel(self) -> fidl::Channel {
3287 self.client.into_channel()
3288 }
3289
3290 pub fn wait_for_event(
3293 &self,
3294 deadline: zx::MonotonicInstant,
3295 ) -> Result<SvcStashProviderEvent, fidl::Error> {
3296 SvcStashProviderEvent::decode(self.client.wait_for_event(deadline)?)
3297 }
3298
3299 pub fn r#get(
3304 &self,
3305 ___deadline: zx::MonotonicInstant,
3306 ) -> Result<SvcStashProviderGetResult, fidl::Error> {
3307 let _response = self.client.send_query::<
3308 fidl::encoding::EmptyPayload,
3309 fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>,
3310 >(
3311 (),
3312 0x3885bad5b734f883,
3313 fidl::encoding::DynamicFlags::empty(),
3314 ___deadline,
3315 )?;
3316 Ok(_response.map(|x| x.resource))
3317 }
3318}
3319
3320#[derive(Debug, Clone)]
3321pub struct SvcStashProviderProxy {
3322 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3323}
3324
3325impl fidl::endpoints::Proxy for SvcStashProviderProxy {
3326 type Protocol = SvcStashProviderMarker;
3327
3328 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3329 Self::new(inner)
3330 }
3331
3332 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3333 self.client.into_channel().map_err(|client| Self { client })
3334 }
3335
3336 fn as_channel(&self) -> &::fidl::AsyncChannel {
3337 self.client.as_channel()
3338 }
3339}
3340
3341impl SvcStashProviderProxy {
3342 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3344 let protocol_name = <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3345 Self { client: fidl::client::Client::new(channel, protocol_name) }
3346 }
3347
3348 pub fn take_event_stream(&self) -> SvcStashProviderEventStream {
3354 SvcStashProviderEventStream { event_receiver: self.client.take_event_receiver() }
3355 }
3356
3357 pub fn r#get(
3362 &self,
3363 ) -> fidl::client::QueryResponseFut<
3364 SvcStashProviderGetResult,
3365 fidl::encoding::DefaultFuchsiaResourceDialect,
3366 > {
3367 SvcStashProviderProxyInterface::r#get(self)
3368 }
3369}
3370
3371impl SvcStashProviderProxyInterface for SvcStashProviderProxy {
3372 type GetResponseFut = fidl::client::QueryResponseFut<
3373 SvcStashProviderGetResult,
3374 fidl::encoding::DefaultFuchsiaResourceDialect,
3375 >;
3376 fn r#get(&self) -> Self::GetResponseFut {
3377 fn _decode(
3378 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
3379 ) -> Result<SvcStashProviderGetResult, fidl::Error> {
3380 let _response = fidl::client::decode_transaction_body::<
3381 fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>,
3382 fidl::encoding::DefaultFuchsiaResourceDialect,
3383 0x3885bad5b734f883,
3384 >(_buf?)?;
3385 Ok(_response.map(|x| x.resource))
3386 }
3387 self.client
3388 .send_query_and_decode::<fidl::encoding::EmptyPayload, SvcStashProviderGetResult>(
3389 (),
3390 0x3885bad5b734f883,
3391 fidl::encoding::DynamicFlags::empty(),
3392 _decode,
3393 )
3394 }
3395}
3396
3397pub struct SvcStashProviderEventStream {
3398 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3399}
3400
3401impl std::marker::Unpin for SvcStashProviderEventStream {}
3402
3403impl futures::stream::FusedStream for SvcStashProviderEventStream {
3404 fn is_terminated(&self) -> bool {
3405 self.event_receiver.is_terminated()
3406 }
3407}
3408
3409impl futures::Stream for SvcStashProviderEventStream {
3410 type Item = Result<SvcStashProviderEvent, fidl::Error>;
3411
3412 fn poll_next(
3413 mut self: std::pin::Pin<&mut Self>,
3414 cx: &mut std::task::Context<'_>,
3415 ) -> std::task::Poll<Option<Self::Item>> {
3416 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3417 &mut self.event_receiver,
3418 cx
3419 )?) {
3420 Some(buf) => std::task::Poll::Ready(Some(SvcStashProviderEvent::decode(buf))),
3421 None => std::task::Poll::Ready(None),
3422 }
3423 }
3424}
3425
3426#[derive(Debug)]
3427pub enum SvcStashProviderEvent {}
3428
3429impl SvcStashProviderEvent {
3430 fn decode(
3432 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3433 ) -> Result<SvcStashProviderEvent, fidl::Error> {
3434 let (bytes, _handles) = buf.split_mut();
3435 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3436 debug_assert_eq!(tx_header.tx_id, 0);
3437 match tx_header.ordinal {
3438 _ => Err(fidl::Error::UnknownOrdinal {
3439 ordinal: tx_header.ordinal,
3440 protocol_name:
3441 <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3442 }),
3443 }
3444 }
3445}
3446
3447pub struct SvcStashProviderRequestStream {
3449 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3450 is_terminated: bool,
3451}
3452
3453impl std::marker::Unpin for SvcStashProviderRequestStream {}
3454
3455impl futures::stream::FusedStream for SvcStashProviderRequestStream {
3456 fn is_terminated(&self) -> bool {
3457 self.is_terminated
3458 }
3459}
3460
3461impl fidl::endpoints::RequestStream for SvcStashProviderRequestStream {
3462 type Protocol = SvcStashProviderMarker;
3463 type ControlHandle = SvcStashProviderControlHandle;
3464
3465 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3466 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3467 }
3468
3469 fn control_handle(&self) -> Self::ControlHandle {
3470 SvcStashProviderControlHandle { inner: self.inner.clone() }
3471 }
3472
3473 fn into_inner(
3474 self,
3475 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3476 {
3477 (self.inner, self.is_terminated)
3478 }
3479
3480 fn from_inner(
3481 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3482 is_terminated: bool,
3483 ) -> Self {
3484 Self { inner, is_terminated }
3485 }
3486}
3487
3488impl futures::Stream for SvcStashProviderRequestStream {
3489 type Item = Result<SvcStashProviderRequest, fidl::Error>;
3490
3491 fn poll_next(
3492 mut self: std::pin::Pin<&mut Self>,
3493 cx: &mut std::task::Context<'_>,
3494 ) -> std::task::Poll<Option<Self::Item>> {
3495 let this = &mut *self;
3496 if this.inner.check_shutdown(cx) {
3497 this.is_terminated = true;
3498 return std::task::Poll::Ready(None);
3499 }
3500 if this.is_terminated {
3501 panic!("polled SvcStashProviderRequestStream after completion");
3502 }
3503 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3504 |bytes, handles| {
3505 match this.inner.channel().read_etc(cx, bytes, handles) {
3506 std::task::Poll::Ready(Ok(())) => {}
3507 std::task::Poll::Pending => return std::task::Poll::Pending,
3508 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3509 this.is_terminated = true;
3510 return std::task::Poll::Ready(None);
3511 }
3512 std::task::Poll::Ready(Err(e)) => {
3513 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3514 e.into(),
3515 ))))
3516 }
3517 }
3518
3519 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3521
3522 std::task::Poll::Ready(Some(match header.ordinal {
3523 0x3885bad5b734f883 => {
3524 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
3525 let mut req = fidl::new_empty!(
3526 fidl::encoding::EmptyPayload,
3527 fidl::encoding::DefaultFuchsiaResourceDialect
3528 );
3529 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
3530 let control_handle =
3531 SvcStashProviderControlHandle { inner: this.inner.clone() };
3532 Ok(SvcStashProviderRequest::Get {
3533 responder: SvcStashProviderGetResponder {
3534 control_handle: std::mem::ManuallyDrop::new(control_handle),
3535 tx_id: header.tx_id,
3536 },
3537 })
3538 }
3539 _ => Err(fidl::Error::UnknownOrdinal {
3540 ordinal: header.ordinal,
3541 protocol_name:
3542 <SvcStashProviderMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3543 }),
3544 }))
3545 },
3546 )
3547 }
3548}
3549
3550#[derive(Debug)]
3552pub enum SvcStashProviderRequest {
3553 Get { responder: SvcStashProviderGetResponder },
3558}
3559
3560impl SvcStashProviderRequest {
3561 #[allow(irrefutable_let_patterns)]
3562 pub fn into_get(self) -> Option<(SvcStashProviderGetResponder)> {
3563 if let SvcStashProviderRequest::Get { responder } = self {
3564 Some((responder))
3565 } else {
3566 None
3567 }
3568 }
3569
3570 pub fn method_name(&self) -> &'static str {
3572 match *self {
3573 SvcStashProviderRequest::Get { .. } => "get",
3574 }
3575 }
3576}
3577
3578#[derive(Debug, Clone)]
3579pub struct SvcStashProviderControlHandle {
3580 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3581}
3582
3583impl fidl::endpoints::ControlHandle for SvcStashProviderControlHandle {
3584 fn shutdown(&self) {
3585 self.inner.shutdown()
3586 }
3587 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
3588 self.inner.shutdown_with_epitaph(status)
3589 }
3590
3591 fn is_closed(&self) -> bool {
3592 self.inner.channel().is_closed()
3593 }
3594 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
3595 self.inner.channel().on_closed()
3596 }
3597
3598 #[cfg(target_os = "fuchsia")]
3599 fn signal_peer(
3600 &self,
3601 clear_mask: zx::Signals,
3602 set_mask: zx::Signals,
3603 ) -> Result<(), zx_status::Status> {
3604 use fidl::Peered;
3605 self.inner.channel().signal_peer(clear_mask, set_mask)
3606 }
3607}
3608
3609impl SvcStashProviderControlHandle {}
3610
3611#[must_use = "FIDL methods require a response to be sent"]
3612#[derive(Debug)]
3613pub struct SvcStashProviderGetResponder {
3614 control_handle: std::mem::ManuallyDrop<SvcStashProviderControlHandle>,
3615 tx_id: u32,
3616}
3617
3618impl std::ops::Drop for SvcStashProviderGetResponder {
3622 fn drop(&mut self) {
3623 self.control_handle.shutdown();
3624 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3626 }
3627}
3628
3629impl fidl::endpoints::Responder for SvcStashProviderGetResponder {
3630 type ControlHandle = SvcStashProviderControlHandle;
3631
3632 fn control_handle(&self) -> &SvcStashProviderControlHandle {
3633 &self.control_handle
3634 }
3635
3636 fn drop_without_shutdown(mut self) {
3637 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
3639 std::mem::forget(self);
3641 }
3642}
3643
3644impl SvcStashProviderGetResponder {
3645 pub fn send(
3649 self,
3650 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3651 ) -> Result<(), fidl::Error> {
3652 let _result = self.send_raw(result);
3653 if _result.is_err() {
3654 self.control_handle.shutdown();
3655 }
3656 self.drop_without_shutdown();
3657 _result
3658 }
3659
3660 pub fn send_no_shutdown_on_err(
3662 self,
3663 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3664 ) -> Result<(), fidl::Error> {
3665 let _result = self.send_raw(result);
3666 self.drop_without_shutdown();
3667 _result
3668 }
3669
3670 fn send_raw(
3671 &self,
3672 mut result: Result<fidl::endpoints::ServerEnd<SvcStashMarker>, i32>,
3673 ) -> Result<(), fidl::Error> {
3674 self.control_handle
3675 .inner
3676 .send::<fidl::encoding::ResultType<SvcStashProviderGetResponse, i32>>(
3677 result.map(|resource| (resource,)),
3678 self.tx_id,
3679 0x3885bad5b734f883,
3680 fidl::encoding::DynamicFlags::empty(),
3681 )
3682 }
3683}
3684
3685#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
3686pub struct UserbootMarker;
3687
3688impl fidl::endpoints::ProtocolMarker for UserbootMarker {
3689 type Proxy = UserbootProxy;
3690 type RequestStream = UserbootRequestStream;
3691 #[cfg(target_os = "fuchsia")]
3692 type SynchronousProxy = UserbootSynchronousProxy;
3693
3694 const DEBUG_NAME: &'static str = "(anonymous) Userboot";
3695}
3696
3697pub trait UserbootProxyInterface: Send + Sync {
3698 fn r#post_bootfs_files(&self, files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error>;
3699 fn r#post_stash_svc(
3700 &self,
3701 stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3702 ) -> Result<(), fidl::Error>;
3703}
3704#[derive(Debug)]
3705#[cfg(target_os = "fuchsia")]
3706pub struct UserbootSynchronousProxy {
3707 client: fidl::client::sync::Client,
3708}
3709
3710#[cfg(target_os = "fuchsia")]
3711impl fidl::endpoints::SynchronousProxy for UserbootSynchronousProxy {
3712 type Proxy = UserbootProxy;
3713 type Protocol = UserbootMarker;
3714
3715 fn from_channel(inner: fidl::Channel) -> Self {
3716 Self::new(inner)
3717 }
3718
3719 fn into_channel(self) -> fidl::Channel {
3720 self.client.into_channel()
3721 }
3722
3723 fn as_channel(&self) -> &fidl::Channel {
3724 self.client.as_channel()
3725 }
3726}
3727
3728#[cfg(target_os = "fuchsia")]
3729impl UserbootSynchronousProxy {
3730 pub fn new(channel: fidl::Channel) -> Self {
3731 let protocol_name = <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3732 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
3733 }
3734
3735 pub fn into_channel(self) -> fidl::Channel {
3736 self.client.into_channel()
3737 }
3738
3739 pub fn wait_for_event(
3742 &self,
3743 deadline: zx::MonotonicInstant,
3744 ) -> Result<UserbootEvent, fidl::Error> {
3745 UserbootEvent::decode(self.client.wait_for_event(deadline)?)
3746 }
3747
3748 pub fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3754 self.client.send::<UserbootPostBootfsFilesRequest>(
3755 (files.as_mut(),),
3756 0x296d4420db7cc694,
3757 fidl::encoding::DynamicFlags::empty(),
3758 )
3759 }
3760
3761 pub fn r#post_stash_svc(
3763 &self,
3764 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3765 ) -> Result<(), fidl::Error> {
3766 self.client.send::<UserbootPostStashSvcRequest>(
3767 (stash_svc_endpoint,),
3768 0x506ecf7db01adeac,
3769 fidl::encoding::DynamicFlags::empty(),
3770 )
3771 }
3772}
3773
3774#[derive(Debug, Clone)]
3775pub struct UserbootProxy {
3776 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
3777}
3778
3779impl fidl::endpoints::Proxy for UserbootProxy {
3780 type Protocol = UserbootMarker;
3781
3782 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
3783 Self::new(inner)
3784 }
3785
3786 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
3787 self.client.into_channel().map_err(|client| Self { client })
3788 }
3789
3790 fn as_channel(&self) -> &::fidl::AsyncChannel {
3791 self.client.as_channel()
3792 }
3793}
3794
3795impl UserbootProxy {
3796 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
3798 let protocol_name = <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
3799 Self { client: fidl::client::Client::new(channel, protocol_name) }
3800 }
3801
3802 pub fn take_event_stream(&self) -> UserbootEventStream {
3808 UserbootEventStream { event_receiver: self.client.take_event_receiver() }
3809 }
3810
3811 pub fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3817 UserbootProxyInterface::r#post_bootfs_files(self, files)
3818 }
3819
3820 pub fn r#post_stash_svc(
3822 &self,
3823 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3824 ) -> Result<(), fidl::Error> {
3825 UserbootProxyInterface::r#post_stash_svc(self, stash_svc_endpoint)
3826 }
3827}
3828
3829impl UserbootProxyInterface for UserbootProxy {
3830 fn r#post_bootfs_files(&self, mut files: Vec<BootfsFileVmo>) -> Result<(), fidl::Error> {
3831 self.client.send::<UserbootPostBootfsFilesRequest>(
3832 (files.as_mut(),),
3833 0x296d4420db7cc694,
3834 fidl::encoding::DynamicFlags::empty(),
3835 )
3836 }
3837
3838 fn r#post_stash_svc(
3839 &self,
3840 mut stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
3841 ) -> Result<(), fidl::Error> {
3842 self.client.send::<UserbootPostStashSvcRequest>(
3843 (stash_svc_endpoint,),
3844 0x506ecf7db01adeac,
3845 fidl::encoding::DynamicFlags::empty(),
3846 )
3847 }
3848}
3849
3850pub struct UserbootEventStream {
3851 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
3852}
3853
3854impl std::marker::Unpin for UserbootEventStream {}
3855
3856impl futures::stream::FusedStream for UserbootEventStream {
3857 fn is_terminated(&self) -> bool {
3858 self.event_receiver.is_terminated()
3859 }
3860}
3861
3862impl futures::Stream for UserbootEventStream {
3863 type Item = Result<UserbootEvent, fidl::Error>;
3864
3865 fn poll_next(
3866 mut self: std::pin::Pin<&mut Self>,
3867 cx: &mut std::task::Context<'_>,
3868 ) -> std::task::Poll<Option<Self::Item>> {
3869 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
3870 &mut self.event_receiver,
3871 cx
3872 )?) {
3873 Some(buf) => std::task::Poll::Ready(Some(UserbootEvent::decode(buf))),
3874 None => std::task::Poll::Ready(None),
3875 }
3876 }
3877}
3878
3879#[derive(Debug)]
3880pub enum UserbootEvent {}
3881
3882impl UserbootEvent {
3883 fn decode(
3885 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
3886 ) -> Result<UserbootEvent, fidl::Error> {
3887 let (bytes, _handles) = buf.split_mut();
3888 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3889 debug_assert_eq!(tx_header.tx_id, 0);
3890 match tx_header.ordinal {
3891 _ => Err(fidl::Error::UnknownOrdinal {
3892 ordinal: tx_header.ordinal,
3893 protocol_name: <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
3894 }),
3895 }
3896 }
3897}
3898
3899pub struct UserbootRequestStream {
3901 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3902 is_terminated: bool,
3903}
3904
3905impl std::marker::Unpin for UserbootRequestStream {}
3906
3907impl futures::stream::FusedStream for UserbootRequestStream {
3908 fn is_terminated(&self) -> bool {
3909 self.is_terminated
3910 }
3911}
3912
3913impl fidl::endpoints::RequestStream for UserbootRequestStream {
3914 type Protocol = UserbootMarker;
3915 type ControlHandle = UserbootControlHandle;
3916
3917 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
3918 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
3919 }
3920
3921 fn control_handle(&self) -> Self::ControlHandle {
3922 UserbootControlHandle { inner: self.inner.clone() }
3923 }
3924
3925 fn into_inner(
3926 self,
3927 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
3928 {
3929 (self.inner, self.is_terminated)
3930 }
3931
3932 fn from_inner(
3933 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
3934 is_terminated: bool,
3935 ) -> Self {
3936 Self { inner, is_terminated }
3937 }
3938}
3939
3940impl futures::Stream for UserbootRequestStream {
3941 type Item = Result<UserbootRequest, fidl::Error>;
3942
3943 fn poll_next(
3944 mut self: std::pin::Pin<&mut Self>,
3945 cx: &mut std::task::Context<'_>,
3946 ) -> std::task::Poll<Option<Self::Item>> {
3947 let this = &mut *self;
3948 if this.inner.check_shutdown(cx) {
3949 this.is_terminated = true;
3950 return std::task::Poll::Ready(None);
3951 }
3952 if this.is_terminated {
3953 panic!("polled UserbootRequestStream after completion");
3954 }
3955 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
3956 |bytes, handles| {
3957 match this.inner.channel().read_etc(cx, bytes, handles) {
3958 std::task::Poll::Ready(Ok(())) => {}
3959 std::task::Poll::Pending => return std::task::Poll::Pending,
3960 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
3961 this.is_terminated = true;
3962 return std::task::Poll::Ready(None);
3963 }
3964 std::task::Poll::Ready(Err(e)) => {
3965 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
3966 e.into(),
3967 ))))
3968 }
3969 }
3970
3971 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
3973
3974 std::task::Poll::Ready(Some(match header.ordinal {
3975 0x296d4420db7cc694 => {
3976 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3977 let mut req = fidl::new_empty!(
3978 UserbootPostBootfsFilesRequest,
3979 fidl::encoding::DefaultFuchsiaResourceDialect
3980 );
3981 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UserbootPostBootfsFilesRequest>(&header, _body_bytes, handles, &mut req)?;
3982 let control_handle = UserbootControlHandle { inner: this.inner.clone() };
3983 Ok(UserbootRequest::PostBootfsFiles { files: req.files, control_handle })
3984 }
3985 0x506ecf7db01adeac => {
3986 header.validate_request_tx_id(fidl::MethodType::OneWay)?;
3987 let mut req = fidl::new_empty!(
3988 UserbootPostStashSvcRequest,
3989 fidl::encoding::DefaultFuchsiaResourceDialect
3990 );
3991 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<UserbootPostStashSvcRequest>(&header, _body_bytes, handles, &mut req)?;
3992 let control_handle = UserbootControlHandle { inner: this.inner.clone() };
3993 Ok(UserbootRequest::PostStashSvc {
3994 stash_svc_endpoint: req.stash_svc_endpoint,
3995
3996 control_handle,
3997 })
3998 }
3999 _ => Err(fidl::Error::UnknownOrdinal {
4000 ordinal: header.ordinal,
4001 protocol_name:
4002 <UserbootMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4003 }),
4004 }))
4005 },
4006 )
4007 }
4008}
4009
4010#[derive(Debug)]
4018pub enum UserbootRequest {
4019 PostBootfsFiles { files: Vec<BootfsFileVmo>, control_handle: UserbootControlHandle },
4025 PostStashSvc {
4027 stash_svc_endpoint: fidl::endpoints::ServerEnd<SvcStashMarker>,
4028 control_handle: UserbootControlHandle,
4029 },
4030}
4031
4032impl UserbootRequest {
4033 #[allow(irrefutable_let_patterns)]
4034 pub fn into_post_bootfs_files(self) -> Option<(Vec<BootfsFileVmo>, UserbootControlHandle)> {
4035 if let UserbootRequest::PostBootfsFiles { files, control_handle } = self {
4036 Some((files, control_handle))
4037 } else {
4038 None
4039 }
4040 }
4041
4042 #[allow(irrefutable_let_patterns)]
4043 pub fn into_post_stash_svc(
4044 self,
4045 ) -> Option<(fidl::endpoints::ServerEnd<SvcStashMarker>, UserbootControlHandle)> {
4046 if let UserbootRequest::PostStashSvc { stash_svc_endpoint, control_handle } = self {
4047 Some((stash_svc_endpoint, control_handle))
4048 } else {
4049 None
4050 }
4051 }
4052
4053 pub fn method_name(&self) -> &'static str {
4055 match *self {
4056 UserbootRequest::PostBootfsFiles { .. } => "post_bootfs_files",
4057 UserbootRequest::PostStashSvc { .. } => "post_stash_svc",
4058 }
4059 }
4060}
4061
4062#[derive(Debug, Clone)]
4063pub struct UserbootControlHandle {
4064 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4065}
4066
4067impl fidl::endpoints::ControlHandle for UserbootControlHandle {
4068 fn shutdown(&self) {
4069 self.inner.shutdown()
4070 }
4071 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4072 self.inner.shutdown_with_epitaph(status)
4073 }
4074
4075 fn is_closed(&self) -> bool {
4076 self.inner.channel().is_closed()
4077 }
4078 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4079 self.inner.channel().on_closed()
4080 }
4081
4082 #[cfg(target_os = "fuchsia")]
4083 fn signal_peer(
4084 &self,
4085 clear_mask: zx::Signals,
4086 set_mask: zx::Signals,
4087 ) -> Result<(), zx_status::Status> {
4088 use fidl::Peered;
4089 self.inner.channel().signal_peer(clear_mask, set_mask)
4090 }
4091}
4092
4093impl UserbootControlHandle {}
4094
4095#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
4096pub struct WriteOnlyLogMarker;
4097
4098impl fidl::endpoints::ProtocolMarker for WriteOnlyLogMarker {
4099 type Proxy = WriteOnlyLogProxy;
4100 type RequestStream = WriteOnlyLogRequestStream;
4101 #[cfg(target_os = "fuchsia")]
4102 type SynchronousProxy = WriteOnlyLogSynchronousProxy;
4103
4104 const DEBUG_NAME: &'static str = "fuchsia.boot.WriteOnlyLog";
4105}
4106impl fidl::endpoints::DiscoverableProtocolMarker for WriteOnlyLogMarker {}
4107
4108pub trait WriteOnlyLogProxyInterface: Send + Sync {
4109 type GetResponseFut: std::future::Future<Output = Result<fidl::DebugLog, fidl::Error>> + Send;
4110 fn r#get(&self) -> Self::GetResponseFut;
4111}
4112#[derive(Debug)]
4113#[cfg(target_os = "fuchsia")]
4114pub struct WriteOnlyLogSynchronousProxy {
4115 client: fidl::client::sync::Client,
4116}
4117
4118#[cfg(target_os = "fuchsia")]
4119impl fidl::endpoints::SynchronousProxy for WriteOnlyLogSynchronousProxy {
4120 type Proxy = WriteOnlyLogProxy;
4121 type Protocol = WriteOnlyLogMarker;
4122
4123 fn from_channel(inner: fidl::Channel) -> Self {
4124 Self::new(inner)
4125 }
4126
4127 fn into_channel(self) -> fidl::Channel {
4128 self.client.into_channel()
4129 }
4130
4131 fn as_channel(&self) -> &fidl::Channel {
4132 self.client.as_channel()
4133 }
4134}
4135
4136#[cfg(target_os = "fuchsia")]
4137impl WriteOnlyLogSynchronousProxy {
4138 pub fn new(channel: fidl::Channel) -> Self {
4139 let protocol_name = <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4140 Self { client: fidl::client::sync::Client::new(channel, protocol_name) }
4141 }
4142
4143 pub fn into_channel(self) -> fidl::Channel {
4144 self.client.into_channel()
4145 }
4146
4147 pub fn wait_for_event(
4150 &self,
4151 deadline: zx::MonotonicInstant,
4152 ) -> Result<WriteOnlyLogEvent, fidl::Error> {
4153 WriteOnlyLogEvent::decode(self.client.wait_for_event(deadline)?)
4154 }
4155
4156 pub fn r#get(&self, ___deadline: zx::MonotonicInstant) -> Result<fidl::DebugLog, fidl::Error> {
4158 let _response =
4159 self.client.send_query::<fidl::encoding::EmptyPayload, WriteOnlyLogGetResponse>(
4160 (),
4161 0x4579dac289d3007,
4162 fidl::encoding::DynamicFlags::empty(),
4163 ___deadline,
4164 )?;
4165 Ok(_response.log)
4166 }
4167}
4168
4169#[derive(Debug, Clone)]
4170pub struct WriteOnlyLogProxy {
4171 client: fidl::client::Client<fidl::encoding::DefaultFuchsiaResourceDialect>,
4172}
4173
4174impl fidl::endpoints::Proxy for WriteOnlyLogProxy {
4175 type Protocol = WriteOnlyLogMarker;
4176
4177 fn from_channel(inner: ::fidl::AsyncChannel) -> Self {
4178 Self::new(inner)
4179 }
4180
4181 fn into_channel(self) -> Result<::fidl::AsyncChannel, Self> {
4182 self.client.into_channel().map_err(|client| Self { client })
4183 }
4184
4185 fn as_channel(&self) -> &::fidl::AsyncChannel {
4186 self.client.as_channel()
4187 }
4188}
4189
4190impl WriteOnlyLogProxy {
4191 pub fn new(channel: ::fidl::AsyncChannel) -> Self {
4193 let protocol_name = <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME;
4194 Self { client: fidl::client::Client::new(channel, protocol_name) }
4195 }
4196
4197 pub fn take_event_stream(&self) -> WriteOnlyLogEventStream {
4203 WriteOnlyLogEventStream { event_receiver: self.client.take_event_receiver() }
4204 }
4205
4206 pub fn r#get(
4208 &self,
4209 ) -> fidl::client::QueryResponseFut<fidl::DebugLog, fidl::encoding::DefaultFuchsiaResourceDialect>
4210 {
4211 WriteOnlyLogProxyInterface::r#get(self)
4212 }
4213}
4214
4215impl WriteOnlyLogProxyInterface for WriteOnlyLogProxy {
4216 type GetResponseFut = fidl::client::QueryResponseFut<
4217 fidl::DebugLog,
4218 fidl::encoding::DefaultFuchsiaResourceDialect,
4219 >;
4220 fn r#get(&self) -> Self::GetResponseFut {
4221 fn _decode(
4222 mut _buf: Result<<fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc, fidl::Error>,
4223 ) -> Result<fidl::DebugLog, fidl::Error> {
4224 let _response = fidl::client::decode_transaction_body::<
4225 WriteOnlyLogGetResponse,
4226 fidl::encoding::DefaultFuchsiaResourceDialect,
4227 0x4579dac289d3007,
4228 >(_buf?)?;
4229 Ok(_response.log)
4230 }
4231 self.client.send_query_and_decode::<fidl::encoding::EmptyPayload, fidl::DebugLog>(
4232 (),
4233 0x4579dac289d3007,
4234 fidl::encoding::DynamicFlags::empty(),
4235 _decode,
4236 )
4237 }
4238}
4239
4240pub struct WriteOnlyLogEventStream {
4241 event_receiver: fidl::client::EventReceiver<fidl::encoding::DefaultFuchsiaResourceDialect>,
4242}
4243
4244impl std::marker::Unpin for WriteOnlyLogEventStream {}
4245
4246impl futures::stream::FusedStream for WriteOnlyLogEventStream {
4247 fn is_terminated(&self) -> bool {
4248 self.event_receiver.is_terminated()
4249 }
4250}
4251
4252impl futures::Stream for WriteOnlyLogEventStream {
4253 type Item = Result<WriteOnlyLogEvent, fidl::Error>;
4254
4255 fn poll_next(
4256 mut self: std::pin::Pin<&mut Self>,
4257 cx: &mut std::task::Context<'_>,
4258 ) -> std::task::Poll<Option<Self::Item>> {
4259 match futures::ready!(futures::stream::StreamExt::poll_next_unpin(
4260 &mut self.event_receiver,
4261 cx
4262 )?) {
4263 Some(buf) => std::task::Poll::Ready(Some(WriteOnlyLogEvent::decode(buf))),
4264 None => std::task::Poll::Ready(None),
4265 }
4266 }
4267}
4268
4269#[derive(Debug)]
4270pub enum WriteOnlyLogEvent {}
4271
4272impl WriteOnlyLogEvent {
4273 fn decode(
4275 mut buf: <fidl::encoding::DefaultFuchsiaResourceDialect as fidl::encoding::ResourceDialect>::MessageBufEtc,
4276 ) -> Result<WriteOnlyLogEvent, fidl::Error> {
4277 let (bytes, _handles) = buf.split_mut();
4278 let (tx_header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4279 debug_assert_eq!(tx_header.tx_id, 0);
4280 match tx_header.ordinal {
4281 _ => Err(fidl::Error::UnknownOrdinal {
4282 ordinal: tx_header.ordinal,
4283 protocol_name: <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4284 }),
4285 }
4286 }
4287}
4288
4289pub struct WriteOnlyLogRequestStream {
4291 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4292 is_terminated: bool,
4293}
4294
4295impl std::marker::Unpin for WriteOnlyLogRequestStream {}
4296
4297impl futures::stream::FusedStream for WriteOnlyLogRequestStream {
4298 fn is_terminated(&self) -> bool {
4299 self.is_terminated
4300 }
4301}
4302
4303impl fidl::endpoints::RequestStream for WriteOnlyLogRequestStream {
4304 type Protocol = WriteOnlyLogMarker;
4305 type ControlHandle = WriteOnlyLogControlHandle;
4306
4307 fn from_channel(channel: ::fidl::AsyncChannel) -> Self {
4308 Self { inner: std::sync::Arc::new(fidl::ServeInner::new(channel)), is_terminated: false }
4309 }
4310
4311 fn control_handle(&self) -> Self::ControlHandle {
4312 WriteOnlyLogControlHandle { inner: self.inner.clone() }
4313 }
4314
4315 fn into_inner(
4316 self,
4317 ) -> (::std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>, bool)
4318 {
4319 (self.inner, self.is_terminated)
4320 }
4321
4322 fn from_inner(
4323 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4324 is_terminated: bool,
4325 ) -> Self {
4326 Self { inner, is_terminated }
4327 }
4328}
4329
4330impl futures::Stream for WriteOnlyLogRequestStream {
4331 type Item = Result<WriteOnlyLogRequest, fidl::Error>;
4332
4333 fn poll_next(
4334 mut self: std::pin::Pin<&mut Self>,
4335 cx: &mut std::task::Context<'_>,
4336 ) -> std::task::Poll<Option<Self::Item>> {
4337 let this = &mut *self;
4338 if this.inner.check_shutdown(cx) {
4339 this.is_terminated = true;
4340 return std::task::Poll::Ready(None);
4341 }
4342 if this.is_terminated {
4343 panic!("polled WriteOnlyLogRequestStream after completion");
4344 }
4345 fidl::encoding::with_tls_decode_buf::<_, fidl::encoding::DefaultFuchsiaResourceDialect>(
4346 |bytes, handles| {
4347 match this.inner.channel().read_etc(cx, bytes, handles) {
4348 std::task::Poll::Ready(Ok(())) => {}
4349 std::task::Poll::Pending => return std::task::Poll::Pending,
4350 std::task::Poll::Ready(Err(zx_status::Status::PEER_CLOSED)) => {
4351 this.is_terminated = true;
4352 return std::task::Poll::Ready(None);
4353 }
4354 std::task::Poll::Ready(Err(e)) => {
4355 return std::task::Poll::Ready(Some(Err(fidl::Error::ServerRequestRead(
4356 e.into(),
4357 ))))
4358 }
4359 }
4360
4361 let (header, _body_bytes) = fidl::encoding::decode_transaction_header(bytes)?;
4363
4364 std::task::Poll::Ready(Some(match header.ordinal {
4365 0x4579dac289d3007 => {
4366 header.validate_request_tx_id(fidl::MethodType::TwoWay)?;
4367 let mut req = fidl::new_empty!(
4368 fidl::encoding::EmptyPayload,
4369 fidl::encoding::DefaultFuchsiaResourceDialect
4370 );
4371 fidl::encoding::Decoder::<fidl::encoding::DefaultFuchsiaResourceDialect>::decode_into::<fidl::encoding::EmptyPayload>(&header, _body_bytes, handles, &mut req)?;
4372 let control_handle =
4373 WriteOnlyLogControlHandle { inner: this.inner.clone() };
4374 Ok(WriteOnlyLogRequest::Get {
4375 responder: WriteOnlyLogGetResponder {
4376 control_handle: std::mem::ManuallyDrop::new(control_handle),
4377 tx_id: header.tx_id,
4378 },
4379 })
4380 }
4381 _ => Err(fidl::Error::UnknownOrdinal {
4382 ordinal: header.ordinal,
4383 protocol_name:
4384 <WriteOnlyLogMarker as fidl::endpoints::ProtocolMarker>::DEBUG_NAME,
4385 }),
4386 }))
4387 },
4388 )
4389 }
4390}
4391
4392#[derive(Debug)]
4394pub enum WriteOnlyLogRequest {
4395 Get { responder: WriteOnlyLogGetResponder },
4397}
4398
4399impl WriteOnlyLogRequest {
4400 #[allow(irrefutable_let_patterns)]
4401 pub fn into_get(self) -> Option<(WriteOnlyLogGetResponder)> {
4402 if let WriteOnlyLogRequest::Get { responder } = self {
4403 Some((responder))
4404 } else {
4405 None
4406 }
4407 }
4408
4409 pub fn method_name(&self) -> &'static str {
4411 match *self {
4412 WriteOnlyLogRequest::Get { .. } => "get",
4413 }
4414 }
4415}
4416
4417#[derive(Debug, Clone)]
4418pub struct WriteOnlyLogControlHandle {
4419 inner: std::sync::Arc<fidl::ServeInner<fidl::encoding::DefaultFuchsiaResourceDialect>>,
4420}
4421
4422impl fidl::endpoints::ControlHandle for WriteOnlyLogControlHandle {
4423 fn shutdown(&self) {
4424 self.inner.shutdown()
4425 }
4426 fn shutdown_with_epitaph(&self, status: zx_status::Status) {
4427 self.inner.shutdown_with_epitaph(status)
4428 }
4429
4430 fn is_closed(&self) -> bool {
4431 self.inner.channel().is_closed()
4432 }
4433 fn on_closed(&self) -> fidl::OnSignalsRef<'_> {
4434 self.inner.channel().on_closed()
4435 }
4436
4437 #[cfg(target_os = "fuchsia")]
4438 fn signal_peer(
4439 &self,
4440 clear_mask: zx::Signals,
4441 set_mask: zx::Signals,
4442 ) -> Result<(), zx_status::Status> {
4443 use fidl::Peered;
4444 self.inner.channel().signal_peer(clear_mask, set_mask)
4445 }
4446}
4447
4448impl WriteOnlyLogControlHandle {}
4449
4450#[must_use = "FIDL methods require a response to be sent"]
4451#[derive(Debug)]
4452pub struct WriteOnlyLogGetResponder {
4453 control_handle: std::mem::ManuallyDrop<WriteOnlyLogControlHandle>,
4454 tx_id: u32,
4455}
4456
4457impl std::ops::Drop for WriteOnlyLogGetResponder {
4461 fn drop(&mut self) {
4462 self.control_handle.shutdown();
4463 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4465 }
4466}
4467
4468impl fidl::endpoints::Responder for WriteOnlyLogGetResponder {
4469 type ControlHandle = WriteOnlyLogControlHandle;
4470
4471 fn control_handle(&self) -> &WriteOnlyLogControlHandle {
4472 &self.control_handle
4473 }
4474
4475 fn drop_without_shutdown(mut self) {
4476 unsafe { std::mem::ManuallyDrop::drop(&mut self.control_handle) };
4478 std::mem::forget(self);
4480 }
4481}
4482
4483impl WriteOnlyLogGetResponder {
4484 pub fn send(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4488 let _result = self.send_raw(log);
4489 if _result.is_err() {
4490 self.control_handle.shutdown();
4491 }
4492 self.drop_without_shutdown();
4493 _result
4494 }
4495
4496 pub fn send_no_shutdown_on_err(self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4498 let _result = self.send_raw(log);
4499 self.drop_without_shutdown();
4500 _result
4501 }
4502
4503 fn send_raw(&self, mut log: fidl::DebugLog) -> Result<(), fidl::Error> {
4504 self.control_handle.inner.send::<WriteOnlyLogGetResponse>(
4505 (log,),
4506 self.tx_id,
4507 0x4579dac289d3007,
4508 fidl::encoding::DynamicFlags::empty(),
4509 )
4510 }
4511}
4512
4513mod internal {
4514 use super::*;
4515
4516 impl fidl::encoding::ValueTypeMarker for ArgumentsCollectRequest {
4517 type Borrowed<'a> = &'a Self;
4518 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4519 value
4520 }
4521 }
4522
4523 unsafe impl fidl::encoding::TypeMarker for ArgumentsCollectRequest {
4524 type Owned = Self;
4525
4526 #[inline(always)]
4527 fn inline_align(_context: fidl::encoding::Context) -> usize {
4528 8
4529 }
4530
4531 #[inline(always)]
4532 fn inline_size(_context: fidl::encoding::Context) -> usize {
4533 16
4534 }
4535 }
4536
4537 unsafe impl<D: fidl::encoding::ResourceDialect>
4538 fidl::encoding::Encode<ArgumentsCollectRequest, D> for &ArgumentsCollectRequest
4539 {
4540 #[inline]
4541 unsafe fn encode(
4542 self,
4543 encoder: &mut fidl::encoding::Encoder<'_, D>,
4544 offset: usize,
4545 _depth: fidl::encoding::Depth,
4546 ) -> fidl::Result<()> {
4547 encoder.debug_check_bounds::<ArgumentsCollectRequest>(offset);
4548 fidl::encoding::Encode::<ArgumentsCollectRequest, D>::encode(
4550 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
4551 &self.prefix,
4552 ),),
4553 encoder,
4554 offset,
4555 _depth,
4556 )
4557 }
4558 }
4559 unsafe impl<
4560 D: fidl::encoding::ResourceDialect,
4561 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
4562 > fidl::encoding::Encode<ArgumentsCollectRequest, D> for (T0,)
4563 {
4564 #[inline]
4565 unsafe fn encode(
4566 self,
4567 encoder: &mut fidl::encoding::Encoder<'_, D>,
4568 offset: usize,
4569 depth: fidl::encoding::Depth,
4570 ) -> fidl::Result<()> {
4571 encoder.debug_check_bounds::<ArgumentsCollectRequest>(offset);
4572 self.0.encode(encoder, offset + 0, depth)?;
4576 Ok(())
4577 }
4578 }
4579
4580 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4581 for ArgumentsCollectRequest
4582 {
4583 #[inline(always)]
4584 fn new_empty() -> Self {
4585 Self { prefix: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
4586 }
4587
4588 #[inline]
4589 unsafe fn decode(
4590 &mut self,
4591 decoder: &mut fidl::encoding::Decoder<'_, D>,
4592 offset: usize,
4593 _depth: fidl::encoding::Depth,
4594 ) -> fidl::Result<()> {
4595 decoder.debug_check_bounds::<Self>(offset);
4596 fidl::decode!(
4598 fidl::encoding::BoundedString<64>,
4599 D,
4600 &mut self.prefix,
4601 decoder,
4602 offset + 0,
4603 _depth
4604 )?;
4605 Ok(())
4606 }
4607 }
4608
4609 impl fidl::encoding::ValueTypeMarker for ArgumentsCollectResponse {
4610 type Borrowed<'a> = &'a Self;
4611 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4612 value
4613 }
4614 }
4615
4616 unsafe impl fidl::encoding::TypeMarker for ArgumentsCollectResponse {
4617 type Owned = Self;
4618
4619 #[inline(always)]
4620 fn inline_align(_context: fidl::encoding::Context) -> usize {
4621 8
4622 }
4623
4624 #[inline(always)]
4625 fn inline_size(_context: fidl::encoding::Context) -> usize {
4626 16
4627 }
4628 }
4629
4630 unsafe impl<D: fidl::encoding::ResourceDialect>
4631 fidl::encoding::Encode<ArgumentsCollectResponse, D> for &ArgumentsCollectResponse
4632 {
4633 #[inline]
4634 unsafe fn encode(
4635 self,
4636 encoder: &mut fidl::encoding::Encoder<'_, D>,
4637 offset: usize,
4638 _depth: fidl::encoding::Depth,
4639 ) -> fidl::Result<()> {
4640 encoder.debug_check_bounds::<ArgumentsCollectResponse>(offset);
4641 fidl::encoding::Encode::<ArgumentsCollectResponse, D>::encode(
4643 (
4644 <fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.results),
4645 ),
4646 encoder, offset, _depth
4647 )
4648 }
4649 }
4650 unsafe impl<
4651 D: fidl::encoding::ResourceDialect,
4652 T0: fidl::encoding::Encode<
4653 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
4654 D,
4655 >,
4656 > fidl::encoding::Encode<ArgumentsCollectResponse, D> for (T0,)
4657 {
4658 #[inline]
4659 unsafe fn encode(
4660 self,
4661 encoder: &mut fidl::encoding::Encoder<'_, D>,
4662 offset: usize,
4663 depth: fidl::encoding::Depth,
4664 ) -> fidl::Result<()> {
4665 encoder.debug_check_bounds::<ArgumentsCollectResponse>(offset);
4666 self.0.encode(encoder, offset + 0, depth)?;
4670 Ok(())
4671 }
4672 }
4673
4674 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4675 for ArgumentsCollectResponse
4676 {
4677 #[inline(always)]
4678 fn new_empty() -> Self {
4679 Self {
4680 results: fidl::new_empty!(
4681 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
4682 D
4683 ),
4684 }
4685 }
4686
4687 #[inline]
4688 unsafe fn decode(
4689 &mut self,
4690 decoder: &mut fidl::encoding::Decoder<'_, D>,
4691 offset: usize,
4692 _depth: fidl::encoding::Depth,
4693 ) -> fidl::Result<()> {
4694 decoder.debug_check_bounds::<Self>(offset);
4695 fidl::decode!(
4697 fidl::encoding::Vector<fidl::encoding::BoundedString<193>, 255>,
4698 D,
4699 &mut self.results,
4700 decoder,
4701 offset + 0,
4702 _depth
4703 )?;
4704 Ok(())
4705 }
4706 }
4707
4708 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolRequest {
4709 type Borrowed<'a> = &'a Self;
4710 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4711 value
4712 }
4713 }
4714
4715 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolRequest {
4716 type Owned = Self;
4717
4718 #[inline(always)]
4719 fn inline_align(_context: fidl::encoding::Context) -> usize {
4720 8
4721 }
4722
4723 #[inline(always)]
4724 fn inline_size(_context: fidl::encoding::Context) -> usize {
4725 24
4726 }
4727 }
4728
4729 unsafe impl<D: fidl::encoding::ResourceDialect>
4730 fidl::encoding::Encode<ArgumentsGetBoolRequest, D> for &ArgumentsGetBoolRequest
4731 {
4732 #[inline]
4733 unsafe fn encode(
4734 self,
4735 encoder: &mut fidl::encoding::Encoder<'_, D>,
4736 offset: usize,
4737 _depth: fidl::encoding::Depth,
4738 ) -> fidl::Result<()> {
4739 encoder.debug_check_bounds::<ArgumentsGetBoolRequest>(offset);
4740 fidl::encoding::Encode::<ArgumentsGetBoolRequest, D>::encode(
4742 (
4743 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
4744 &self.key,
4745 ),
4746 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.defaultval),
4747 ),
4748 encoder,
4749 offset,
4750 _depth,
4751 )
4752 }
4753 }
4754 unsafe impl<
4755 D: fidl::encoding::ResourceDialect,
4756 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
4757 T1: fidl::encoding::Encode<bool, D>,
4758 > fidl::encoding::Encode<ArgumentsGetBoolRequest, D> for (T0, T1)
4759 {
4760 #[inline]
4761 unsafe fn encode(
4762 self,
4763 encoder: &mut fidl::encoding::Encoder<'_, D>,
4764 offset: usize,
4765 depth: fidl::encoding::Depth,
4766 ) -> fidl::Result<()> {
4767 encoder.debug_check_bounds::<ArgumentsGetBoolRequest>(offset);
4768 unsafe {
4771 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
4772 (ptr as *mut u64).write_unaligned(0);
4773 }
4774 self.0.encode(encoder, offset + 0, depth)?;
4776 self.1.encode(encoder, offset + 16, depth)?;
4777 Ok(())
4778 }
4779 }
4780
4781 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4782 for ArgumentsGetBoolRequest
4783 {
4784 #[inline(always)]
4785 fn new_empty() -> Self {
4786 Self {
4787 key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
4788 defaultval: fidl::new_empty!(bool, D),
4789 }
4790 }
4791
4792 #[inline]
4793 unsafe fn decode(
4794 &mut self,
4795 decoder: &mut fidl::encoding::Decoder<'_, D>,
4796 offset: usize,
4797 _depth: fidl::encoding::Depth,
4798 ) -> fidl::Result<()> {
4799 decoder.debug_check_bounds::<Self>(offset);
4800 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
4802 let padval = unsafe { (ptr as *const u64).read_unaligned() };
4803 let mask = 0xffffffffffffff00u64;
4804 let maskedval = padval & mask;
4805 if maskedval != 0 {
4806 return Err(fidl::Error::NonZeroPadding {
4807 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
4808 });
4809 }
4810 fidl::decode!(
4811 fidl::encoding::BoundedString<64>,
4812 D,
4813 &mut self.key,
4814 decoder,
4815 offset + 0,
4816 _depth
4817 )?;
4818 fidl::decode!(bool, D, &mut self.defaultval, decoder, offset + 16, _depth)?;
4819 Ok(())
4820 }
4821 }
4822
4823 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolResponse {
4824 type Borrowed<'a> = &'a Self;
4825 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4826 value
4827 }
4828 }
4829
4830 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolResponse {
4831 type Owned = Self;
4832
4833 #[inline(always)]
4834 fn inline_align(_context: fidl::encoding::Context) -> usize {
4835 1
4836 }
4837
4838 #[inline(always)]
4839 fn inline_size(_context: fidl::encoding::Context) -> usize {
4840 1
4841 }
4842 }
4843
4844 unsafe impl<D: fidl::encoding::ResourceDialect>
4845 fidl::encoding::Encode<ArgumentsGetBoolResponse, D> for &ArgumentsGetBoolResponse
4846 {
4847 #[inline]
4848 unsafe fn encode(
4849 self,
4850 encoder: &mut fidl::encoding::Encoder<'_, D>,
4851 offset: usize,
4852 _depth: fidl::encoding::Depth,
4853 ) -> fidl::Result<()> {
4854 encoder.debug_check_bounds::<ArgumentsGetBoolResponse>(offset);
4855 fidl::encoding::Encode::<ArgumentsGetBoolResponse, D>::encode(
4857 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.value),),
4858 encoder,
4859 offset,
4860 _depth,
4861 )
4862 }
4863 }
4864 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
4865 fidl::encoding::Encode<ArgumentsGetBoolResponse, D> for (T0,)
4866 {
4867 #[inline]
4868 unsafe fn encode(
4869 self,
4870 encoder: &mut fidl::encoding::Encoder<'_, D>,
4871 offset: usize,
4872 depth: fidl::encoding::Depth,
4873 ) -> fidl::Result<()> {
4874 encoder.debug_check_bounds::<ArgumentsGetBoolResponse>(offset);
4875 self.0.encode(encoder, offset + 0, depth)?;
4879 Ok(())
4880 }
4881 }
4882
4883 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4884 for ArgumentsGetBoolResponse
4885 {
4886 #[inline(always)]
4887 fn new_empty() -> Self {
4888 Self { value: fidl::new_empty!(bool, D) }
4889 }
4890
4891 #[inline]
4892 unsafe fn decode(
4893 &mut self,
4894 decoder: &mut fidl::encoding::Decoder<'_, D>,
4895 offset: usize,
4896 _depth: fidl::encoding::Depth,
4897 ) -> fidl::Result<()> {
4898 decoder.debug_check_bounds::<Self>(offset);
4899 fidl::decode!(bool, D, &mut self.value, decoder, offset + 0, _depth)?;
4901 Ok(())
4902 }
4903 }
4904
4905 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolsRequest {
4906 type Borrowed<'a> = &'a Self;
4907 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4908 value
4909 }
4910 }
4911
4912 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolsRequest {
4913 type Owned = Self;
4914
4915 #[inline(always)]
4916 fn inline_align(_context: fidl::encoding::Context) -> usize {
4917 8
4918 }
4919
4920 #[inline(always)]
4921 fn inline_size(_context: fidl::encoding::Context) -> usize {
4922 16
4923 }
4924 }
4925
4926 unsafe impl<D: fidl::encoding::ResourceDialect>
4927 fidl::encoding::Encode<ArgumentsGetBoolsRequest, D> for &ArgumentsGetBoolsRequest
4928 {
4929 #[inline]
4930 unsafe fn encode(
4931 self,
4932 encoder: &mut fidl::encoding::Encoder<'_, D>,
4933 offset: usize,
4934 _depth: fidl::encoding::Depth,
4935 ) -> fidl::Result<()> {
4936 encoder.debug_check_bounds::<ArgumentsGetBoolsRequest>(offset);
4937 fidl::encoding::Encode::<ArgumentsGetBoolsRequest, D>::encode(
4939 (
4940 <fidl::encoding::Vector<BoolPair, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
4941 ),
4942 encoder, offset, _depth
4943 )
4944 }
4945 }
4946 unsafe impl<
4947 D: fidl::encoding::ResourceDialect,
4948 T0: fidl::encoding::Encode<fidl::encoding::Vector<BoolPair, 255>, D>,
4949 > fidl::encoding::Encode<ArgumentsGetBoolsRequest, D> for (T0,)
4950 {
4951 #[inline]
4952 unsafe fn encode(
4953 self,
4954 encoder: &mut fidl::encoding::Encoder<'_, D>,
4955 offset: usize,
4956 depth: fidl::encoding::Depth,
4957 ) -> fidl::Result<()> {
4958 encoder.debug_check_bounds::<ArgumentsGetBoolsRequest>(offset);
4959 self.0.encode(encoder, offset + 0, depth)?;
4963 Ok(())
4964 }
4965 }
4966
4967 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
4968 for ArgumentsGetBoolsRequest
4969 {
4970 #[inline(always)]
4971 fn new_empty() -> Self {
4972 Self { keys: fidl::new_empty!(fidl::encoding::Vector<BoolPair, 255>, D) }
4973 }
4974
4975 #[inline]
4976 unsafe fn decode(
4977 &mut self,
4978 decoder: &mut fidl::encoding::Decoder<'_, D>,
4979 offset: usize,
4980 _depth: fidl::encoding::Depth,
4981 ) -> fidl::Result<()> {
4982 decoder.debug_check_bounds::<Self>(offset);
4983 fidl::decode!(fidl::encoding::Vector<BoolPair, 255>, D, &mut self.keys, decoder, offset + 0, _depth)?;
4985 Ok(())
4986 }
4987 }
4988
4989 impl fidl::encoding::ValueTypeMarker for ArgumentsGetBoolsResponse {
4990 type Borrowed<'a> = &'a Self;
4991 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
4992 value
4993 }
4994 }
4995
4996 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetBoolsResponse {
4997 type Owned = Self;
4998
4999 #[inline(always)]
5000 fn inline_align(_context: fidl::encoding::Context) -> usize {
5001 8
5002 }
5003
5004 #[inline(always)]
5005 fn inline_size(_context: fidl::encoding::Context) -> usize {
5006 16
5007 }
5008 }
5009
5010 unsafe impl<D: fidl::encoding::ResourceDialect>
5011 fidl::encoding::Encode<ArgumentsGetBoolsResponse, D> for &ArgumentsGetBoolsResponse
5012 {
5013 #[inline]
5014 unsafe fn encode(
5015 self,
5016 encoder: &mut fidl::encoding::Encoder<'_, D>,
5017 offset: usize,
5018 _depth: fidl::encoding::Depth,
5019 ) -> fidl::Result<()> {
5020 encoder.debug_check_bounds::<ArgumentsGetBoolsResponse>(offset);
5021 fidl::encoding::Encode::<ArgumentsGetBoolsResponse, D>::encode(
5023 (<fidl::encoding::Vector<bool, 255> as fidl::encoding::ValueTypeMarker>::borrow(
5024 &self.values,
5025 ),),
5026 encoder,
5027 offset,
5028 _depth,
5029 )
5030 }
5031 }
5032 unsafe impl<
5033 D: fidl::encoding::ResourceDialect,
5034 T0: fidl::encoding::Encode<fidl::encoding::Vector<bool, 255>, D>,
5035 > fidl::encoding::Encode<ArgumentsGetBoolsResponse, D> for (T0,)
5036 {
5037 #[inline]
5038 unsafe fn encode(
5039 self,
5040 encoder: &mut fidl::encoding::Encoder<'_, D>,
5041 offset: usize,
5042 depth: fidl::encoding::Depth,
5043 ) -> fidl::Result<()> {
5044 encoder.debug_check_bounds::<ArgumentsGetBoolsResponse>(offset);
5045 self.0.encode(encoder, offset + 0, depth)?;
5049 Ok(())
5050 }
5051 }
5052
5053 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5054 for ArgumentsGetBoolsResponse
5055 {
5056 #[inline(always)]
5057 fn new_empty() -> Self {
5058 Self { values: fidl::new_empty!(fidl::encoding::Vector<bool, 255>, D) }
5059 }
5060
5061 #[inline]
5062 unsafe fn decode(
5063 &mut self,
5064 decoder: &mut fidl::encoding::Decoder<'_, D>,
5065 offset: usize,
5066 _depth: fidl::encoding::Depth,
5067 ) -> fidl::Result<()> {
5068 decoder.debug_check_bounds::<Self>(offset);
5069 fidl::decode!(fidl::encoding::Vector<bool, 255>, D, &mut self.values, decoder, offset + 0, _depth)?;
5071 Ok(())
5072 }
5073 }
5074
5075 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringRequest {
5076 type Borrowed<'a> = &'a Self;
5077 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5078 value
5079 }
5080 }
5081
5082 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringRequest {
5083 type Owned = Self;
5084
5085 #[inline(always)]
5086 fn inline_align(_context: fidl::encoding::Context) -> usize {
5087 8
5088 }
5089
5090 #[inline(always)]
5091 fn inline_size(_context: fidl::encoding::Context) -> usize {
5092 16
5093 }
5094 }
5095
5096 unsafe impl<D: fidl::encoding::ResourceDialect>
5097 fidl::encoding::Encode<ArgumentsGetStringRequest, D> for &ArgumentsGetStringRequest
5098 {
5099 #[inline]
5100 unsafe fn encode(
5101 self,
5102 encoder: &mut fidl::encoding::Encoder<'_, D>,
5103 offset: usize,
5104 _depth: fidl::encoding::Depth,
5105 ) -> fidl::Result<()> {
5106 encoder.debug_check_bounds::<ArgumentsGetStringRequest>(offset);
5107 fidl::encoding::Encode::<ArgumentsGetStringRequest, D>::encode(
5109 (<fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
5110 &self.key,
5111 ),),
5112 encoder,
5113 offset,
5114 _depth,
5115 )
5116 }
5117 }
5118 unsafe impl<
5119 D: fidl::encoding::ResourceDialect,
5120 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
5121 > fidl::encoding::Encode<ArgumentsGetStringRequest, D> for (T0,)
5122 {
5123 #[inline]
5124 unsafe fn encode(
5125 self,
5126 encoder: &mut fidl::encoding::Encoder<'_, D>,
5127 offset: usize,
5128 depth: fidl::encoding::Depth,
5129 ) -> fidl::Result<()> {
5130 encoder.debug_check_bounds::<ArgumentsGetStringRequest>(offset);
5131 self.0.encode(encoder, offset + 0, depth)?;
5135 Ok(())
5136 }
5137 }
5138
5139 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5140 for ArgumentsGetStringRequest
5141 {
5142 #[inline(always)]
5143 fn new_empty() -> Self {
5144 Self { key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D) }
5145 }
5146
5147 #[inline]
5148 unsafe fn decode(
5149 &mut self,
5150 decoder: &mut fidl::encoding::Decoder<'_, D>,
5151 offset: usize,
5152 _depth: fidl::encoding::Depth,
5153 ) -> fidl::Result<()> {
5154 decoder.debug_check_bounds::<Self>(offset);
5155 fidl::decode!(
5157 fidl::encoding::BoundedString<64>,
5158 D,
5159 &mut self.key,
5160 decoder,
5161 offset + 0,
5162 _depth
5163 )?;
5164 Ok(())
5165 }
5166 }
5167
5168 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringResponse {
5169 type Borrowed<'a> = &'a Self;
5170 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5171 value
5172 }
5173 }
5174
5175 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringResponse {
5176 type Owned = Self;
5177
5178 #[inline(always)]
5179 fn inline_align(_context: fidl::encoding::Context) -> usize {
5180 8
5181 }
5182
5183 #[inline(always)]
5184 fn inline_size(_context: fidl::encoding::Context) -> usize {
5185 16
5186 }
5187 }
5188
5189 unsafe impl<D: fidl::encoding::ResourceDialect>
5190 fidl::encoding::Encode<ArgumentsGetStringResponse, D> for &ArgumentsGetStringResponse
5191 {
5192 #[inline]
5193 unsafe fn encode(
5194 self,
5195 encoder: &mut fidl::encoding::Encoder<'_, D>,
5196 offset: usize,
5197 _depth: fidl::encoding::Depth,
5198 ) -> fidl::Result<()> {
5199 encoder.debug_check_bounds::<ArgumentsGetStringResponse>(offset);
5200 fidl::encoding::Encode::<ArgumentsGetStringResponse, D>::encode(
5202 (
5203 <fidl::encoding::Optional<fidl::encoding::BoundedString<128>> as fidl::encoding::ValueTypeMarker>::borrow(&self.value),
5204 ),
5205 encoder, offset, _depth
5206 )
5207 }
5208 }
5209 unsafe impl<
5210 D: fidl::encoding::ResourceDialect,
5211 T0: fidl::encoding::Encode<fidl::encoding::Optional<fidl::encoding::BoundedString<128>>, D>,
5212 > fidl::encoding::Encode<ArgumentsGetStringResponse, D> for (T0,)
5213 {
5214 #[inline]
5215 unsafe fn encode(
5216 self,
5217 encoder: &mut fidl::encoding::Encoder<'_, D>,
5218 offset: usize,
5219 depth: fidl::encoding::Depth,
5220 ) -> fidl::Result<()> {
5221 encoder.debug_check_bounds::<ArgumentsGetStringResponse>(offset);
5222 self.0.encode(encoder, offset + 0, depth)?;
5226 Ok(())
5227 }
5228 }
5229
5230 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5231 for ArgumentsGetStringResponse
5232 {
5233 #[inline(always)]
5234 fn new_empty() -> Self {
5235 Self {
5236 value: fidl::new_empty!(
5237 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5238 D
5239 ),
5240 }
5241 }
5242
5243 #[inline]
5244 unsafe fn decode(
5245 &mut self,
5246 decoder: &mut fidl::encoding::Decoder<'_, D>,
5247 offset: usize,
5248 _depth: fidl::encoding::Depth,
5249 ) -> fidl::Result<()> {
5250 decoder.debug_check_bounds::<Self>(offset);
5251 fidl::decode!(
5253 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5254 D,
5255 &mut self.value,
5256 decoder,
5257 offset + 0,
5258 _depth
5259 )?;
5260 Ok(())
5261 }
5262 }
5263
5264 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringsRequest {
5265 type Borrowed<'a> = &'a Self;
5266 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5267 value
5268 }
5269 }
5270
5271 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringsRequest {
5272 type Owned = Self;
5273
5274 #[inline(always)]
5275 fn inline_align(_context: fidl::encoding::Context) -> usize {
5276 8
5277 }
5278
5279 #[inline(always)]
5280 fn inline_size(_context: fidl::encoding::Context) -> usize {
5281 16
5282 }
5283 }
5284
5285 unsafe impl<D: fidl::encoding::ResourceDialect>
5286 fidl::encoding::Encode<ArgumentsGetStringsRequest, D> for &ArgumentsGetStringsRequest
5287 {
5288 #[inline]
5289 unsafe fn encode(
5290 self,
5291 encoder: &mut fidl::encoding::Encoder<'_, D>,
5292 offset: usize,
5293 _depth: fidl::encoding::Depth,
5294 ) -> fidl::Result<()> {
5295 encoder.debug_check_bounds::<ArgumentsGetStringsRequest>(offset);
5296 fidl::encoding::Encode::<ArgumentsGetStringsRequest, D>::encode(
5298 (
5299 <fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255> as fidl::encoding::ValueTypeMarker>::borrow(&self.keys),
5300 ),
5301 encoder, offset, _depth
5302 )
5303 }
5304 }
5305 unsafe impl<
5306 D: fidl::encoding::ResourceDialect,
5307 T0: fidl::encoding::Encode<
5308 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
5309 D,
5310 >,
5311 > fidl::encoding::Encode<ArgumentsGetStringsRequest, D> for (T0,)
5312 {
5313 #[inline]
5314 unsafe fn encode(
5315 self,
5316 encoder: &mut fidl::encoding::Encoder<'_, D>,
5317 offset: usize,
5318 depth: fidl::encoding::Depth,
5319 ) -> fidl::Result<()> {
5320 encoder.debug_check_bounds::<ArgumentsGetStringsRequest>(offset);
5321 self.0.encode(encoder, offset + 0, depth)?;
5325 Ok(())
5326 }
5327 }
5328
5329 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5330 for ArgumentsGetStringsRequest
5331 {
5332 #[inline(always)]
5333 fn new_empty() -> Self {
5334 Self {
5335 keys: fidl::new_empty!(
5336 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
5337 D
5338 ),
5339 }
5340 }
5341
5342 #[inline]
5343 unsafe fn decode(
5344 &mut self,
5345 decoder: &mut fidl::encoding::Decoder<'_, D>,
5346 offset: usize,
5347 _depth: fidl::encoding::Depth,
5348 ) -> fidl::Result<()> {
5349 decoder.debug_check_bounds::<Self>(offset);
5350 fidl::decode!(
5352 fidl::encoding::Vector<fidl::encoding::BoundedString<64>, 255>,
5353 D,
5354 &mut self.keys,
5355 decoder,
5356 offset + 0,
5357 _depth
5358 )?;
5359 Ok(())
5360 }
5361 }
5362
5363 impl fidl::encoding::ValueTypeMarker for ArgumentsGetStringsResponse {
5364 type Borrowed<'a> = &'a Self;
5365 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5366 value
5367 }
5368 }
5369
5370 unsafe impl fidl::encoding::TypeMarker for ArgumentsGetStringsResponse {
5371 type Owned = Self;
5372
5373 #[inline(always)]
5374 fn inline_align(_context: fidl::encoding::Context) -> usize {
5375 8
5376 }
5377
5378 #[inline(always)]
5379 fn inline_size(_context: fidl::encoding::Context) -> usize {
5380 16
5381 }
5382 }
5383
5384 unsafe impl<D: fidl::encoding::ResourceDialect>
5385 fidl::encoding::Encode<ArgumentsGetStringsResponse, D> for &ArgumentsGetStringsResponse
5386 {
5387 #[inline]
5388 unsafe fn encode(
5389 self,
5390 encoder: &mut fidl::encoding::Encoder<'_, D>,
5391 offset: usize,
5392 _depth: fidl::encoding::Depth,
5393 ) -> fidl::Result<()> {
5394 encoder.debug_check_bounds::<ArgumentsGetStringsResponse>(offset);
5395 fidl::encoding::Encode::<ArgumentsGetStringsResponse, D>::encode(
5397 (<fidl::encoding::Vector<
5398 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5399 255,
5400 > as fidl::encoding::ValueTypeMarker>::borrow(&self.values),),
5401 encoder,
5402 offset,
5403 _depth,
5404 )
5405 }
5406 }
5407 unsafe impl<
5408 D: fidl::encoding::ResourceDialect,
5409 T0: fidl::encoding::Encode<
5410 fidl::encoding::Vector<
5411 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5412 255,
5413 >,
5414 D,
5415 >,
5416 > fidl::encoding::Encode<ArgumentsGetStringsResponse, D> for (T0,)
5417 {
5418 #[inline]
5419 unsafe fn encode(
5420 self,
5421 encoder: &mut fidl::encoding::Encoder<'_, D>,
5422 offset: usize,
5423 depth: fidl::encoding::Depth,
5424 ) -> fidl::Result<()> {
5425 encoder.debug_check_bounds::<ArgumentsGetStringsResponse>(offset);
5426 self.0.encode(encoder, offset + 0, depth)?;
5430 Ok(())
5431 }
5432 }
5433
5434 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5435 for ArgumentsGetStringsResponse
5436 {
5437 #[inline(always)]
5438 fn new_empty() -> Self {
5439 Self {
5440 values: fidl::new_empty!(
5441 fidl::encoding::Vector<
5442 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5443 255,
5444 >,
5445 D
5446 ),
5447 }
5448 }
5449
5450 #[inline]
5451 unsafe fn decode(
5452 &mut self,
5453 decoder: &mut fidl::encoding::Decoder<'_, D>,
5454 offset: usize,
5455 _depth: fidl::encoding::Depth,
5456 ) -> fidl::Result<()> {
5457 decoder.debug_check_bounds::<Self>(offset);
5458 fidl::decode!(
5460 fidl::encoding::Vector<
5461 fidl::encoding::Optional<fidl::encoding::BoundedString<128>>,
5462 255,
5463 >,
5464 D,
5465 &mut self.values,
5466 decoder,
5467 offset + 0,
5468 _depth
5469 )?;
5470 Ok(())
5471 }
5472 }
5473
5474 impl fidl::encoding::ValueTypeMarker for BoolPair {
5475 type Borrowed<'a> = &'a Self;
5476 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5477 value
5478 }
5479 }
5480
5481 unsafe impl fidl::encoding::TypeMarker for BoolPair {
5482 type Owned = Self;
5483
5484 #[inline(always)]
5485 fn inline_align(_context: fidl::encoding::Context) -> usize {
5486 8
5487 }
5488
5489 #[inline(always)]
5490 fn inline_size(_context: fidl::encoding::Context) -> usize {
5491 24
5492 }
5493 }
5494
5495 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<BoolPair, D> for &BoolPair {
5496 #[inline]
5497 unsafe fn encode(
5498 self,
5499 encoder: &mut fidl::encoding::Encoder<'_, D>,
5500 offset: usize,
5501 _depth: fidl::encoding::Depth,
5502 ) -> fidl::Result<()> {
5503 encoder.debug_check_bounds::<BoolPair>(offset);
5504 fidl::encoding::Encode::<BoolPair, D>::encode(
5506 (
5507 <fidl::encoding::BoundedString<64> as fidl::encoding::ValueTypeMarker>::borrow(
5508 &self.key,
5509 ),
5510 <bool as fidl::encoding::ValueTypeMarker>::borrow(&self.defaultval),
5511 ),
5512 encoder,
5513 offset,
5514 _depth,
5515 )
5516 }
5517 }
5518 unsafe impl<
5519 D: fidl::encoding::ResourceDialect,
5520 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<64>, D>,
5521 T1: fidl::encoding::Encode<bool, D>,
5522 > fidl::encoding::Encode<BoolPair, D> for (T0, T1)
5523 {
5524 #[inline]
5525 unsafe fn encode(
5526 self,
5527 encoder: &mut fidl::encoding::Encoder<'_, D>,
5528 offset: usize,
5529 depth: fidl::encoding::Depth,
5530 ) -> fidl::Result<()> {
5531 encoder.debug_check_bounds::<BoolPair>(offset);
5532 unsafe {
5535 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(16);
5536 (ptr as *mut u64).write_unaligned(0);
5537 }
5538 self.0.encode(encoder, offset + 0, depth)?;
5540 self.1.encode(encoder, offset + 16, depth)?;
5541 Ok(())
5542 }
5543 }
5544
5545 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for BoolPair {
5546 #[inline(always)]
5547 fn new_empty() -> Self {
5548 Self {
5549 key: fidl::new_empty!(fidl::encoding::BoundedString<64>, D),
5550 defaultval: fidl::new_empty!(bool, D),
5551 }
5552 }
5553
5554 #[inline]
5555 unsafe fn decode(
5556 &mut self,
5557 decoder: &mut fidl::encoding::Decoder<'_, D>,
5558 offset: usize,
5559 _depth: fidl::encoding::Depth,
5560 ) -> fidl::Result<()> {
5561 decoder.debug_check_bounds::<Self>(offset);
5562 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(16) };
5564 let padval = unsafe { (ptr as *const u64).read_unaligned() };
5565 let mask = 0xffffffffffffff00u64;
5566 let maskedval = padval & mask;
5567 if maskedval != 0 {
5568 return Err(fidl::Error::NonZeroPadding {
5569 padding_start: offset + 16 + ((mask as u64).trailing_zeros() / 8) as usize,
5570 });
5571 }
5572 fidl::decode!(
5573 fidl::encoding::BoundedString<64>,
5574 D,
5575 &mut self.key,
5576 decoder,
5577 offset + 0,
5578 _depth
5579 )?;
5580 fidl::decode!(bool, D, &mut self.defaultval, decoder, offset + 16, _depth)?;
5581 Ok(())
5582 }
5583 }
5584
5585 impl fidl::encoding::ResourceTypeMarker for BootfsFileVmo {
5586 type Borrowed<'a> = &'a mut Self;
5587 fn take_or_borrow<'a>(
5588 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5589 ) -> Self::Borrowed<'a> {
5590 value
5591 }
5592 }
5593
5594 unsafe impl fidl::encoding::TypeMarker for BootfsFileVmo {
5595 type Owned = Self;
5596
5597 #[inline(always)]
5598 fn inline_align(_context: fidl::encoding::Context) -> usize {
5599 4
5600 }
5601
5602 #[inline(always)]
5603 fn inline_size(_context: fidl::encoding::Context) -> usize {
5604 8
5605 }
5606 }
5607
5608 unsafe impl fidl::encoding::Encode<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>
5609 for &mut BootfsFileVmo
5610 {
5611 #[inline]
5612 unsafe fn encode(
5613 self,
5614 encoder: &mut fidl::encoding::Encoder<
5615 '_,
5616 fidl::encoding::DefaultFuchsiaResourceDialect,
5617 >,
5618 offset: usize,
5619 _depth: fidl::encoding::Depth,
5620 ) -> fidl::Result<()> {
5621 encoder.debug_check_bounds::<BootfsFileVmo>(offset);
5622 fidl::encoding::Encode::<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
5624 (
5625 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.offset),
5626 <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.contents),
5627 ),
5628 encoder, offset, _depth
5629 )
5630 }
5631 }
5632 unsafe impl<
5633 T0: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5634 T1: fidl::encoding::Encode<
5635 fidl::encoding::HandleType<
5636 fidl::Vmo,
5637 { fidl::ObjectType::VMO.into_raw() },
5638 2147483648,
5639 >,
5640 fidl::encoding::DefaultFuchsiaResourceDialect,
5641 >,
5642 > fidl::encoding::Encode<BootfsFileVmo, fidl::encoding::DefaultFuchsiaResourceDialect>
5643 for (T0, T1)
5644 {
5645 #[inline]
5646 unsafe fn encode(
5647 self,
5648 encoder: &mut fidl::encoding::Encoder<
5649 '_,
5650 fidl::encoding::DefaultFuchsiaResourceDialect,
5651 >,
5652 offset: usize,
5653 depth: fidl::encoding::Depth,
5654 ) -> fidl::Result<()> {
5655 encoder.debug_check_bounds::<BootfsFileVmo>(offset);
5656 self.0.encode(encoder, offset + 0, depth)?;
5660 self.1.encode(encoder, offset + 4, depth)?;
5661 Ok(())
5662 }
5663 }
5664
5665 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect> for BootfsFileVmo {
5666 #[inline(always)]
5667 fn new_empty() -> Self {
5668 Self {
5669 offset: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
5670 contents: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
5671 }
5672 }
5673
5674 #[inline]
5675 unsafe fn decode(
5676 &mut self,
5677 decoder: &mut fidl::encoding::Decoder<
5678 '_,
5679 fidl::encoding::DefaultFuchsiaResourceDialect,
5680 >,
5681 offset: usize,
5682 _depth: fidl::encoding::Depth,
5683 ) -> fidl::Result<()> {
5684 decoder.debug_check_bounds::<Self>(offset);
5685 fidl::decode!(
5687 u32,
5688 fidl::encoding::DefaultFuchsiaResourceDialect,
5689 &mut self.offset,
5690 decoder,
5691 offset + 0,
5692 _depth
5693 )?;
5694 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.contents, decoder, offset + 4, _depth)?;
5695 Ok(())
5696 }
5697 }
5698
5699 impl fidl::encoding::ValueTypeMarker for Extra {
5700 type Borrowed<'a> = &'a Self;
5701 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5702 value
5703 }
5704 }
5705
5706 unsafe impl fidl::encoding::TypeMarker for Extra {
5707 type Owned = Self;
5708
5709 #[inline(always)]
5710 fn inline_align(_context: fidl::encoding::Context) -> usize {
5711 4
5712 }
5713
5714 #[inline(always)]
5715 fn inline_size(_context: fidl::encoding::Context) -> usize {
5716 4
5717 }
5718 #[inline(always)]
5719 fn encode_is_copy() -> bool {
5720 true
5721 }
5722
5723 #[inline(always)]
5724 fn decode_is_copy() -> bool {
5725 true
5726 }
5727 }
5728
5729 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Extra, D> for &Extra {
5730 #[inline]
5731 unsafe fn encode(
5732 self,
5733 encoder: &mut fidl::encoding::Encoder<'_, D>,
5734 offset: usize,
5735 _depth: fidl::encoding::Depth,
5736 ) -> fidl::Result<()> {
5737 encoder.debug_check_bounds::<Extra>(offset);
5738 unsafe {
5739 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5741 (buf_ptr as *mut Extra).write_unaligned((self as *const Extra).read());
5742 }
5745 Ok(())
5746 }
5747 }
5748 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5749 fidl::encoding::Encode<Extra, D> for (T0,)
5750 {
5751 #[inline]
5752 unsafe fn encode(
5753 self,
5754 encoder: &mut fidl::encoding::Encoder<'_, D>,
5755 offset: usize,
5756 depth: fidl::encoding::Depth,
5757 ) -> fidl::Result<()> {
5758 encoder.debug_check_bounds::<Extra>(offset);
5759 self.0.encode(encoder, offset + 0, depth)?;
5763 Ok(())
5764 }
5765 }
5766
5767 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Extra {
5768 #[inline(always)]
5769 fn new_empty() -> Self {
5770 Self { n: fidl::new_empty!(u32, D) }
5771 }
5772
5773 #[inline]
5774 unsafe fn decode(
5775 &mut self,
5776 decoder: &mut fidl::encoding::Decoder<'_, D>,
5777 offset: usize,
5778 _depth: fidl::encoding::Depth,
5779 ) -> fidl::Result<()> {
5780 decoder.debug_check_bounds::<Self>(offset);
5781 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5782 unsafe {
5785 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5786 }
5787 Ok(())
5788 }
5789 }
5790
5791 impl fidl::encoding::ValueTypeMarker for FactoryItemsGetRequest {
5792 type Borrowed<'a> = &'a Self;
5793 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
5794 value
5795 }
5796 }
5797
5798 unsafe impl fidl::encoding::TypeMarker for FactoryItemsGetRequest {
5799 type Owned = Self;
5800
5801 #[inline(always)]
5802 fn inline_align(_context: fidl::encoding::Context) -> usize {
5803 4
5804 }
5805
5806 #[inline(always)]
5807 fn inline_size(_context: fidl::encoding::Context) -> usize {
5808 4
5809 }
5810 #[inline(always)]
5811 fn encode_is_copy() -> bool {
5812 true
5813 }
5814
5815 #[inline(always)]
5816 fn decode_is_copy() -> bool {
5817 true
5818 }
5819 }
5820
5821 unsafe impl<D: fidl::encoding::ResourceDialect>
5822 fidl::encoding::Encode<FactoryItemsGetRequest, D> for &FactoryItemsGetRequest
5823 {
5824 #[inline]
5825 unsafe fn encode(
5826 self,
5827 encoder: &mut fidl::encoding::Encoder<'_, D>,
5828 offset: usize,
5829 _depth: fidl::encoding::Depth,
5830 ) -> fidl::Result<()> {
5831 encoder.debug_check_bounds::<FactoryItemsGetRequest>(offset);
5832 unsafe {
5833 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
5835 (buf_ptr as *mut FactoryItemsGetRequest)
5836 .write_unaligned((self as *const FactoryItemsGetRequest).read());
5837 }
5840 Ok(())
5841 }
5842 }
5843 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<u32, D>>
5844 fidl::encoding::Encode<FactoryItemsGetRequest, D> for (T0,)
5845 {
5846 #[inline]
5847 unsafe fn encode(
5848 self,
5849 encoder: &mut fidl::encoding::Encoder<'_, D>,
5850 offset: usize,
5851 depth: fidl::encoding::Depth,
5852 ) -> fidl::Result<()> {
5853 encoder.debug_check_bounds::<FactoryItemsGetRequest>(offset);
5854 self.0.encode(encoder, offset + 0, depth)?;
5858 Ok(())
5859 }
5860 }
5861
5862 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
5863 for FactoryItemsGetRequest
5864 {
5865 #[inline(always)]
5866 fn new_empty() -> Self {
5867 Self { extra: fidl::new_empty!(u32, D) }
5868 }
5869
5870 #[inline]
5871 unsafe fn decode(
5872 &mut self,
5873 decoder: &mut fidl::encoding::Decoder<'_, D>,
5874 offset: usize,
5875 _depth: fidl::encoding::Depth,
5876 ) -> fidl::Result<()> {
5877 decoder.debug_check_bounds::<Self>(offset);
5878 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
5879 unsafe {
5882 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 4);
5883 }
5884 Ok(())
5885 }
5886 }
5887
5888 impl fidl::encoding::ResourceTypeMarker for FactoryItemsGetResponse {
5889 type Borrowed<'a> = &'a mut Self;
5890 fn take_or_borrow<'a>(
5891 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
5892 ) -> Self::Borrowed<'a> {
5893 value
5894 }
5895 }
5896
5897 unsafe impl fidl::encoding::TypeMarker for FactoryItemsGetResponse {
5898 type Owned = Self;
5899
5900 #[inline(always)]
5901 fn inline_align(_context: fidl::encoding::Context) -> usize {
5902 4
5903 }
5904
5905 #[inline(always)]
5906 fn inline_size(_context: fidl::encoding::Context) -> usize {
5907 8
5908 }
5909 }
5910
5911 unsafe impl
5912 fidl::encoding::Encode<
5913 FactoryItemsGetResponse,
5914 fidl::encoding::DefaultFuchsiaResourceDialect,
5915 > for &mut FactoryItemsGetResponse
5916 {
5917 #[inline]
5918 unsafe fn encode(
5919 self,
5920 encoder: &mut fidl::encoding::Encoder<
5921 '_,
5922 fidl::encoding::DefaultFuchsiaResourceDialect,
5923 >,
5924 offset: usize,
5925 _depth: fidl::encoding::Depth,
5926 ) -> fidl::Result<()> {
5927 encoder.debug_check_bounds::<FactoryItemsGetResponse>(offset);
5928 fidl::encoding::Encode::<
5930 FactoryItemsGetResponse,
5931 fidl::encoding::DefaultFuchsiaResourceDialect,
5932 >::encode(
5933 (
5934 <fidl::encoding::Optional<
5935 fidl::encoding::HandleType<
5936 fidl::Vmo,
5937 { fidl::ObjectType::VMO.into_raw() },
5938 2147483648,
5939 >,
5940 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
5941 &mut self.payload
5942 ),
5943 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
5944 ),
5945 encoder,
5946 offset,
5947 _depth,
5948 )
5949 }
5950 }
5951 unsafe impl<
5952 T0: fidl::encoding::Encode<
5953 fidl::encoding::Optional<
5954 fidl::encoding::HandleType<
5955 fidl::Vmo,
5956 { fidl::ObjectType::VMO.into_raw() },
5957 2147483648,
5958 >,
5959 >,
5960 fidl::encoding::DefaultFuchsiaResourceDialect,
5961 >,
5962 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
5963 >
5964 fidl::encoding::Encode<
5965 FactoryItemsGetResponse,
5966 fidl::encoding::DefaultFuchsiaResourceDialect,
5967 > for (T0, T1)
5968 {
5969 #[inline]
5970 unsafe fn encode(
5971 self,
5972 encoder: &mut fidl::encoding::Encoder<
5973 '_,
5974 fidl::encoding::DefaultFuchsiaResourceDialect,
5975 >,
5976 offset: usize,
5977 depth: fidl::encoding::Depth,
5978 ) -> fidl::Result<()> {
5979 encoder.debug_check_bounds::<FactoryItemsGetResponse>(offset);
5980 self.0.encode(encoder, offset + 0, depth)?;
5984 self.1.encode(encoder, offset + 4, depth)?;
5985 Ok(())
5986 }
5987 }
5988
5989 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
5990 for FactoryItemsGetResponse
5991 {
5992 #[inline(always)]
5993 fn new_empty() -> Self {
5994 Self {
5995 payload: fidl::new_empty!(
5996 fidl::encoding::Optional<
5997 fidl::encoding::HandleType<
5998 fidl::Vmo,
5999 { fidl::ObjectType::VMO.into_raw() },
6000 2147483648,
6001 >,
6002 >,
6003 fidl::encoding::DefaultFuchsiaResourceDialect
6004 ),
6005 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6006 }
6007 }
6008
6009 #[inline]
6010 unsafe fn decode(
6011 &mut self,
6012 decoder: &mut fidl::encoding::Decoder<
6013 '_,
6014 fidl::encoding::DefaultFuchsiaResourceDialect,
6015 >,
6016 offset: usize,
6017 _depth: fidl::encoding::Depth,
6018 ) -> fidl::Result<()> {
6019 decoder.debug_check_bounds::<Self>(offset);
6020 fidl::decode!(
6022 fidl::encoding::Optional<
6023 fidl::encoding::HandleType<
6024 fidl::Vmo,
6025 { fidl::ObjectType::VMO.into_raw() },
6026 2147483648,
6027 >,
6028 >,
6029 fidl::encoding::DefaultFuchsiaResourceDialect,
6030 &mut self.payload,
6031 decoder,
6032 offset + 0,
6033 _depth
6034 )?;
6035 fidl::decode!(
6036 u32,
6037 fidl::encoding::DefaultFuchsiaResourceDialect,
6038 &mut self.length,
6039 decoder,
6040 offset + 4,
6041 _depth
6042 )?;
6043 Ok(())
6044 }
6045 }
6046
6047 impl fidl::encoding::ValueTypeMarker for ItemsGet2Request {
6048 type Borrowed<'a> = &'a Self;
6049 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6050 value
6051 }
6052 }
6053
6054 unsafe impl fidl::encoding::TypeMarker for ItemsGet2Request {
6055 type Owned = Self;
6056
6057 #[inline(always)]
6058 fn inline_align(_context: fidl::encoding::Context) -> usize {
6059 8
6060 }
6061
6062 #[inline(always)]
6063 fn inline_size(_context: fidl::encoding::Context) -> usize {
6064 16
6065 }
6066 }
6067
6068 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ItemsGet2Request, D>
6069 for &ItemsGet2Request
6070 {
6071 #[inline]
6072 unsafe fn encode(
6073 self,
6074 encoder: &mut fidl::encoding::Encoder<'_, D>,
6075 offset: usize,
6076 _depth: fidl::encoding::Depth,
6077 ) -> fidl::Result<()> {
6078 encoder.debug_check_bounds::<ItemsGet2Request>(offset);
6079 fidl::encoding::Encode::<ItemsGet2Request, D>::encode(
6081 (
6082 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.type_),
6083 <fidl::encoding::Boxed<Extra> as fidl::encoding::ValueTypeMarker>::borrow(
6084 &self.extra,
6085 ),
6086 ),
6087 encoder,
6088 offset,
6089 _depth,
6090 )
6091 }
6092 }
6093 unsafe impl<
6094 D: fidl::encoding::ResourceDialect,
6095 T0: fidl::encoding::Encode<u32, D>,
6096 T1: fidl::encoding::Encode<fidl::encoding::Boxed<Extra>, D>,
6097 > fidl::encoding::Encode<ItemsGet2Request, D> for (T0, T1)
6098 {
6099 #[inline]
6100 unsafe fn encode(
6101 self,
6102 encoder: &mut fidl::encoding::Encoder<'_, D>,
6103 offset: usize,
6104 depth: fidl::encoding::Depth,
6105 ) -> fidl::Result<()> {
6106 encoder.debug_check_bounds::<ItemsGet2Request>(offset);
6107 unsafe {
6110 let ptr = encoder.buf.as_mut_ptr().add(offset).offset(0);
6111 (ptr as *mut u64).write_unaligned(0);
6112 }
6113 self.0.encode(encoder, offset + 0, depth)?;
6115 self.1.encode(encoder, offset + 8, depth)?;
6116 Ok(())
6117 }
6118 }
6119
6120 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ItemsGet2Request {
6121 #[inline(always)]
6122 fn new_empty() -> Self {
6123 Self {
6124 type_: fidl::new_empty!(u32, D),
6125 extra: fidl::new_empty!(fidl::encoding::Boxed<Extra>, D),
6126 }
6127 }
6128
6129 #[inline]
6130 unsafe fn decode(
6131 &mut self,
6132 decoder: &mut fidl::encoding::Decoder<'_, D>,
6133 offset: usize,
6134 _depth: fidl::encoding::Depth,
6135 ) -> fidl::Result<()> {
6136 decoder.debug_check_bounds::<Self>(offset);
6137 let ptr = unsafe { decoder.buf.as_ptr().add(offset).offset(0) };
6139 let padval = unsafe { (ptr as *const u64).read_unaligned() };
6140 let mask = 0xffffffff00000000u64;
6141 let maskedval = padval & mask;
6142 if maskedval != 0 {
6143 return Err(fidl::Error::NonZeroPadding {
6144 padding_start: offset + 0 + ((mask as u64).trailing_zeros() / 8) as usize,
6145 });
6146 }
6147 fidl::decode!(u32, D, &mut self.type_, decoder, offset + 0, _depth)?;
6148 fidl::decode!(
6149 fidl::encoding::Boxed<Extra>,
6150 D,
6151 &mut self.extra,
6152 decoder,
6153 offset + 8,
6154 _depth
6155 )?;
6156 Ok(())
6157 }
6158 }
6159
6160 impl fidl::encoding::ValueTypeMarker for ItemsGetBootloaderFileRequest {
6161 type Borrowed<'a> = &'a Self;
6162 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6163 value
6164 }
6165 }
6166
6167 unsafe impl fidl::encoding::TypeMarker for ItemsGetBootloaderFileRequest {
6168 type Owned = Self;
6169
6170 #[inline(always)]
6171 fn inline_align(_context: fidl::encoding::Context) -> usize {
6172 8
6173 }
6174
6175 #[inline(always)]
6176 fn inline_size(_context: fidl::encoding::Context) -> usize {
6177 16
6178 }
6179 }
6180
6181 unsafe impl<D: fidl::encoding::ResourceDialect>
6182 fidl::encoding::Encode<ItemsGetBootloaderFileRequest, D>
6183 for &ItemsGetBootloaderFileRequest
6184 {
6185 #[inline]
6186 unsafe fn encode(
6187 self,
6188 encoder: &mut fidl::encoding::Encoder<'_, D>,
6189 offset: usize,
6190 _depth: fidl::encoding::Depth,
6191 ) -> fidl::Result<()> {
6192 encoder.debug_check_bounds::<ItemsGetBootloaderFileRequest>(offset);
6193 fidl::encoding::Encode::<ItemsGetBootloaderFileRequest, D>::encode(
6195 (<fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
6196 &self.filename,
6197 ),),
6198 encoder,
6199 offset,
6200 _depth,
6201 )
6202 }
6203 }
6204 unsafe impl<
6205 D: fidl::encoding::ResourceDialect,
6206 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
6207 > fidl::encoding::Encode<ItemsGetBootloaderFileRequest, D> for (T0,)
6208 {
6209 #[inline]
6210 unsafe fn encode(
6211 self,
6212 encoder: &mut fidl::encoding::Encoder<'_, D>,
6213 offset: usize,
6214 depth: fidl::encoding::Depth,
6215 ) -> fidl::Result<()> {
6216 encoder.debug_check_bounds::<ItemsGetBootloaderFileRequest>(offset);
6217 self.0.encode(encoder, offset + 0, depth)?;
6221 Ok(())
6222 }
6223 }
6224
6225 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
6226 for ItemsGetBootloaderFileRequest
6227 {
6228 #[inline(always)]
6229 fn new_empty() -> Self {
6230 Self { filename: fidl::new_empty!(fidl::encoding::BoundedString<255>, D) }
6231 }
6232
6233 #[inline]
6234 unsafe fn decode(
6235 &mut self,
6236 decoder: &mut fidl::encoding::Decoder<'_, D>,
6237 offset: usize,
6238 _depth: fidl::encoding::Depth,
6239 ) -> fidl::Result<()> {
6240 decoder.debug_check_bounds::<Self>(offset);
6241 fidl::decode!(
6243 fidl::encoding::BoundedString<255>,
6244 D,
6245 &mut self.filename,
6246 decoder,
6247 offset + 0,
6248 _depth
6249 )?;
6250 Ok(())
6251 }
6252 }
6253
6254 impl fidl::encoding::ResourceTypeMarker for ItemsGetBootloaderFileResponse {
6255 type Borrowed<'a> = &'a mut Self;
6256 fn take_or_borrow<'a>(
6257 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6258 ) -> Self::Borrowed<'a> {
6259 value
6260 }
6261 }
6262
6263 unsafe impl fidl::encoding::TypeMarker for ItemsGetBootloaderFileResponse {
6264 type Owned = Self;
6265
6266 #[inline(always)]
6267 fn inline_align(_context: fidl::encoding::Context) -> usize {
6268 4
6269 }
6270
6271 #[inline(always)]
6272 fn inline_size(_context: fidl::encoding::Context) -> usize {
6273 4
6274 }
6275 }
6276
6277 unsafe impl
6278 fidl::encoding::Encode<
6279 ItemsGetBootloaderFileResponse,
6280 fidl::encoding::DefaultFuchsiaResourceDialect,
6281 > for &mut ItemsGetBootloaderFileResponse
6282 {
6283 #[inline]
6284 unsafe fn encode(
6285 self,
6286 encoder: &mut fidl::encoding::Encoder<
6287 '_,
6288 fidl::encoding::DefaultFuchsiaResourceDialect,
6289 >,
6290 offset: usize,
6291 _depth: fidl::encoding::Depth,
6292 ) -> fidl::Result<()> {
6293 encoder.debug_check_bounds::<ItemsGetBootloaderFileResponse>(offset);
6294 fidl::encoding::Encode::<
6296 ItemsGetBootloaderFileResponse,
6297 fidl::encoding::DefaultFuchsiaResourceDialect,
6298 >::encode(
6299 (<fidl::encoding::Optional<
6300 fidl::encoding::HandleType<
6301 fidl::Vmo,
6302 { fidl::ObjectType::VMO.into_raw() },
6303 2147483648,
6304 >,
6305 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6306 &mut self.payload
6307 ),),
6308 encoder,
6309 offset,
6310 _depth,
6311 )
6312 }
6313 }
6314 unsafe impl<
6315 T0: fidl::encoding::Encode<
6316 fidl::encoding::Optional<
6317 fidl::encoding::HandleType<
6318 fidl::Vmo,
6319 { fidl::ObjectType::VMO.into_raw() },
6320 2147483648,
6321 >,
6322 >,
6323 fidl::encoding::DefaultFuchsiaResourceDialect,
6324 >,
6325 >
6326 fidl::encoding::Encode<
6327 ItemsGetBootloaderFileResponse,
6328 fidl::encoding::DefaultFuchsiaResourceDialect,
6329 > for (T0,)
6330 {
6331 #[inline]
6332 unsafe fn encode(
6333 self,
6334 encoder: &mut fidl::encoding::Encoder<
6335 '_,
6336 fidl::encoding::DefaultFuchsiaResourceDialect,
6337 >,
6338 offset: usize,
6339 depth: fidl::encoding::Depth,
6340 ) -> fidl::Result<()> {
6341 encoder.debug_check_bounds::<ItemsGetBootloaderFileResponse>(offset);
6342 self.0.encode(encoder, offset + 0, depth)?;
6346 Ok(())
6347 }
6348 }
6349
6350 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6351 for ItemsGetBootloaderFileResponse
6352 {
6353 #[inline(always)]
6354 fn new_empty() -> Self {
6355 Self {
6356 payload: fidl::new_empty!(
6357 fidl::encoding::Optional<
6358 fidl::encoding::HandleType<
6359 fidl::Vmo,
6360 { fidl::ObjectType::VMO.into_raw() },
6361 2147483648,
6362 >,
6363 >,
6364 fidl::encoding::DefaultFuchsiaResourceDialect
6365 ),
6366 }
6367 }
6368
6369 #[inline]
6370 unsafe fn decode(
6371 &mut self,
6372 decoder: &mut fidl::encoding::Decoder<
6373 '_,
6374 fidl::encoding::DefaultFuchsiaResourceDialect,
6375 >,
6376 offset: usize,
6377 _depth: fidl::encoding::Depth,
6378 ) -> fidl::Result<()> {
6379 decoder.debug_check_bounds::<Self>(offset);
6380 fidl::decode!(
6382 fidl::encoding::Optional<
6383 fidl::encoding::HandleType<
6384 fidl::Vmo,
6385 { fidl::ObjectType::VMO.into_raw() },
6386 2147483648,
6387 >,
6388 >,
6389 fidl::encoding::DefaultFuchsiaResourceDialect,
6390 &mut self.payload,
6391 decoder,
6392 offset + 0,
6393 _depth
6394 )?;
6395 Ok(())
6396 }
6397 }
6398
6399 impl fidl::encoding::ValueTypeMarker for ItemsGetRequest {
6400 type Borrowed<'a> = &'a Self;
6401 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
6402 value
6403 }
6404 }
6405
6406 unsafe impl fidl::encoding::TypeMarker for ItemsGetRequest {
6407 type Owned = Self;
6408
6409 #[inline(always)]
6410 fn inline_align(_context: fidl::encoding::Context) -> usize {
6411 4
6412 }
6413
6414 #[inline(always)]
6415 fn inline_size(_context: fidl::encoding::Context) -> usize {
6416 8
6417 }
6418 #[inline(always)]
6419 fn encode_is_copy() -> bool {
6420 true
6421 }
6422
6423 #[inline(always)]
6424 fn decode_is_copy() -> bool {
6425 true
6426 }
6427 }
6428
6429 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<ItemsGetRequest, D>
6430 for &ItemsGetRequest
6431 {
6432 #[inline]
6433 unsafe fn encode(
6434 self,
6435 encoder: &mut fidl::encoding::Encoder<'_, D>,
6436 offset: usize,
6437 _depth: fidl::encoding::Depth,
6438 ) -> fidl::Result<()> {
6439 encoder.debug_check_bounds::<ItemsGetRequest>(offset);
6440 unsafe {
6441 let buf_ptr = encoder.buf.as_mut_ptr().add(offset);
6443 (buf_ptr as *mut ItemsGetRequest)
6444 .write_unaligned((self as *const ItemsGetRequest).read());
6445 }
6448 Ok(())
6449 }
6450 }
6451 unsafe impl<
6452 D: fidl::encoding::ResourceDialect,
6453 T0: fidl::encoding::Encode<u32, D>,
6454 T1: fidl::encoding::Encode<u32, D>,
6455 > fidl::encoding::Encode<ItemsGetRequest, D> for (T0, T1)
6456 {
6457 #[inline]
6458 unsafe fn encode(
6459 self,
6460 encoder: &mut fidl::encoding::Encoder<'_, D>,
6461 offset: usize,
6462 depth: fidl::encoding::Depth,
6463 ) -> fidl::Result<()> {
6464 encoder.debug_check_bounds::<ItemsGetRequest>(offset);
6465 self.0.encode(encoder, offset + 0, depth)?;
6469 self.1.encode(encoder, offset + 4, depth)?;
6470 Ok(())
6471 }
6472 }
6473
6474 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for ItemsGetRequest {
6475 #[inline(always)]
6476 fn new_empty() -> Self {
6477 Self { type_: fidl::new_empty!(u32, D), extra: fidl::new_empty!(u32, D) }
6478 }
6479
6480 #[inline]
6481 unsafe fn decode(
6482 &mut self,
6483 decoder: &mut fidl::encoding::Decoder<'_, D>,
6484 offset: usize,
6485 _depth: fidl::encoding::Depth,
6486 ) -> fidl::Result<()> {
6487 decoder.debug_check_bounds::<Self>(offset);
6488 let buf_ptr = unsafe { decoder.buf.as_ptr().add(offset) };
6489 unsafe {
6492 std::ptr::copy_nonoverlapping(buf_ptr, self as *mut Self as *mut u8, 8);
6493 }
6494 Ok(())
6495 }
6496 }
6497
6498 impl fidl::encoding::ResourceTypeMarker for ItemsGetResponse {
6499 type Borrowed<'a> = &'a mut Self;
6500 fn take_or_borrow<'a>(
6501 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6502 ) -> Self::Borrowed<'a> {
6503 value
6504 }
6505 }
6506
6507 unsafe impl fidl::encoding::TypeMarker for ItemsGetResponse {
6508 type Owned = Self;
6509
6510 #[inline(always)]
6511 fn inline_align(_context: fidl::encoding::Context) -> usize {
6512 4
6513 }
6514
6515 #[inline(always)]
6516 fn inline_size(_context: fidl::encoding::Context) -> usize {
6517 8
6518 }
6519 }
6520
6521 unsafe impl
6522 fidl::encoding::Encode<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
6523 for &mut ItemsGetResponse
6524 {
6525 #[inline]
6526 unsafe fn encode(
6527 self,
6528 encoder: &mut fidl::encoding::Encoder<
6529 '_,
6530 fidl::encoding::DefaultFuchsiaResourceDialect,
6531 >,
6532 offset: usize,
6533 _depth: fidl::encoding::Depth,
6534 ) -> fidl::Result<()> {
6535 encoder.debug_check_bounds::<ItemsGetResponse>(offset);
6536 fidl::encoding::Encode::<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6538 (
6539 <fidl::encoding::Optional<fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
6540 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
6541 ),
6542 encoder, offset, _depth
6543 )
6544 }
6545 }
6546 unsafe impl<
6547 T0: fidl::encoding::Encode<
6548 fidl::encoding::Optional<
6549 fidl::encoding::HandleType<
6550 fidl::Vmo,
6551 { fidl::ObjectType::VMO.into_raw() },
6552 2147483648,
6553 >,
6554 >,
6555 fidl::encoding::DefaultFuchsiaResourceDialect,
6556 >,
6557 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6558 >
6559 fidl::encoding::Encode<ItemsGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>
6560 for (T0, T1)
6561 {
6562 #[inline]
6563 unsafe fn encode(
6564 self,
6565 encoder: &mut fidl::encoding::Encoder<
6566 '_,
6567 fidl::encoding::DefaultFuchsiaResourceDialect,
6568 >,
6569 offset: usize,
6570 depth: fidl::encoding::Depth,
6571 ) -> fidl::Result<()> {
6572 encoder.debug_check_bounds::<ItemsGetResponse>(offset);
6573 self.0.encode(encoder, offset + 0, depth)?;
6577 self.1.encode(encoder, offset + 4, depth)?;
6578 Ok(())
6579 }
6580 }
6581
6582 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6583 for ItemsGetResponse
6584 {
6585 #[inline(always)]
6586 fn new_empty() -> Self {
6587 Self {
6588 payload: fidl::new_empty!(
6589 fidl::encoding::Optional<
6590 fidl::encoding::HandleType<
6591 fidl::Vmo,
6592 { fidl::ObjectType::VMO.into_raw() },
6593 2147483648,
6594 >,
6595 >,
6596 fidl::encoding::DefaultFuchsiaResourceDialect
6597 ),
6598 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6599 }
6600 }
6601
6602 #[inline]
6603 unsafe fn decode(
6604 &mut self,
6605 decoder: &mut fidl::encoding::Decoder<
6606 '_,
6607 fidl::encoding::DefaultFuchsiaResourceDialect,
6608 >,
6609 offset: usize,
6610 _depth: fidl::encoding::Depth,
6611 ) -> fidl::Result<()> {
6612 decoder.debug_check_bounds::<Self>(offset);
6613 fidl::decode!(
6615 fidl::encoding::Optional<
6616 fidl::encoding::HandleType<
6617 fidl::Vmo,
6618 { fidl::ObjectType::VMO.into_raw() },
6619 2147483648,
6620 >,
6621 >,
6622 fidl::encoding::DefaultFuchsiaResourceDialect,
6623 &mut self.payload,
6624 decoder,
6625 offset + 0,
6626 _depth
6627 )?;
6628 fidl::decode!(
6629 u32,
6630 fidl::encoding::DefaultFuchsiaResourceDialect,
6631 &mut self.length,
6632 decoder,
6633 offset + 4,
6634 _depth
6635 )?;
6636 Ok(())
6637 }
6638 }
6639
6640 impl fidl::encoding::ResourceTypeMarker for ItemsGet2Response {
6641 type Borrowed<'a> = &'a mut Self;
6642 fn take_or_borrow<'a>(
6643 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6644 ) -> Self::Borrowed<'a> {
6645 value
6646 }
6647 }
6648
6649 unsafe impl fidl::encoding::TypeMarker for ItemsGet2Response {
6650 type Owned = Self;
6651
6652 #[inline(always)]
6653 fn inline_align(_context: fidl::encoding::Context) -> usize {
6654 8
6655 }
6656
6657 #[inline(always)]
6658 fn inline_size(_context: fidl::encoding::Context) -> usize {
6659 16
6660 }
6661 }
6662
6663 unsafe impl
6664 fidl::encoding::Encode<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>
6665 for &mut ItemsGet2Response
6666 {
6667 #[inline]
6668 unsafe fn encode(
6669 self,
6670 encoder: &mut fidl::encoding::Encoder<
6671 '_,
6672 fidl::encoding::DefaultFuchsiaResourceDialect,
6673 >,
6674 offset: usize,
6675 _depth: fidl::encoding::Depth,
6676 ) -> fidl::Result<()> {
6677 encoder.debug_check_bounds::<ItemsGet2Response>(offset);
6678 fidl::encoding::Encode::<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6680 (
6681 <fidl::encoding::UnboundedVector<RetrievedItems> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.retrieved_items),
6682 ),
6683 encoder, offset, _depth
6684 )
6685 }
6686 }
6687 unsafe impl<
6688 T0: fidl::encoding::Encode<
6689 fidl::encoding::UnboundedVector<RetrievedItems>,
6690 fidl::encoding::DefaultFuchsiaResourceDialect,
6691 >,
6692 >
6693 fidl::encoding::Encode<ItemsGet2Response, fidl::encoding::DefaultFuchsiaResourceDialect>
6694 for (T0,)
6695 {
6696 #[inline]
6697 unsafe fn encode(
6698 self,
6699 encoder: &mut fidl::encoding::Encoder<
6700 '_,
6701 fidl::encoding::DefaultFuchsiaResourceDialect,
6702 >,
6703 offset: usize,
6704 depth: fidl::encoding::Depth,
6705 ) -> fidl::Result<()> {
6706 encoder.debug_check_bounds::<ItemsGet2Response>(offset);
6707 self.0.encode(encoder, offset + 0, depth)?;
6711 Ok(())
6712 }
6713 }
6714
6715 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6716 for ItemsGet2Response
6717 {
6718 #[inline(always)]
6719 fn new_empty() -> Self {
6720 Self {
6721 retrieved_items: fidl::new_empty!(
6722 fidl::encoding::UnboundedVector<RetrievedItems>,
6723 fidl::encoding::DefaultFuchsiaResourceDialect
6724 ),
6725 }
6726 }
6727
6728 #[inline]
6729 unsafe fn decode(
6730 &mut self,
6731 decoder: &mut fidl::encoding::Decoder<
6732 '_,
6733 fidl::encoding::DefaultFuchsiaResourceDialect,
6734 >,
6735 offset: usize,
6736 _depth: fidl::encoding::Depth,
6737 ) -> fidl::Result<()> {
6738 decoder.debug_check_bounds::<Self>(offset);
6739 fidl::decode!(
6741 fidl::encoding::UnboundedVector<RetrievedItems>,
6742 fidl::encoding::DefaultFuchsiaResourceDialect,
6743 &mut self.retrieved_items,
6744 decoder,
6745 offset + 0,
6746 _depth
6747 )?;
6748 Ok(())
6749 }
6750 }
6751
6752 impl fidl::encoding::ResourceTypeMarker for ReadOnlyLogGetResponse {
6753 type Borrowed<'a> = &'a mut Self;
6754 fn take_or_borrow<'a>(
6755 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6756 ) -> Self::Borrowed<'a> {
6757 value
6758 }
6759 }
6760
6761 unsafe impl fidl::encoding::TypeMarker for ReadOnlyLogGetResponse {
6762 type Owned = Self;
6763
6764 #[inline(always)]
6765 fn inline_align(_context: fidl::encoding::Context) -> usize {
6766 4
6767 }
6768
6769 #[inline(always)]
6770 fn inline_size(_context: fidl::encoding::Context) -> usize {
6771 4
6772 }
6773 }
6774
6775 unsafe impl
6776 fidl::encoding::Encode<
6777 ReadOnlyLogGetResponse,
6778 fidl::encoding::DefaultFuchsiaResourceDialect,
6779 > for &mut ReadOnlyLogGetResponse
6780 {
6781 #[inline]
6782 unsafe fn encode(
6783 self,
6784 encoder: &mut fidl::encoding::Encoder<
6785 '_,
6786 fidl::encoding::DefaultFuchsiaResourceDialect,
6787 >,
6788 offset: usize,
6789 _depth: fidl::encoding::Depth,
6790 ) -> fidl::Result<()> {
6791 encoder.debug_check_bounds::<ReadOnlyLogGetResponse>(offset);
6792 fidl::encoding::Encode::<
6794 ReadOnlyLogGetResponse,
6795 fidl::encoding::DefaultFuchsiaResourceDialect,
6796 >::encode(
6797 (<fidl::encoding::HandleType<
6798 fidl::DebugLog,
6799 { fidl::ObjectType::DEBUGLOG.into_raw() },
6800 2147483648,
6801 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
6802 &mut self.log
6803 ),),
6804 encoder,
6805 offset,
6806 _depth,
6807 )
6808 }
6809 }
6810 unsafe impl<
6811 T0: fidl::encoding::Encode<
6812 fidl::encoding::HandleType<
6813 fidl::DebugLog,
6814 { fidl::ObjectType::DEBUGLOG.into_raw() },
6815 2147483648,
6816 >,
6817 fidl::encoding::DefaultFuchsiaResourceDialect,
6818 >,
6819 >
6820 fidl::encoding::Encode<
6821 ReadOnlyLogGetResponse,
6822 fidl::encoding::DefaultFuchsiaResourceDialect,
6823 > for (T0,)
6824 {
6825 #[inline]
6826 unsafe fn encode(
6827 self,
6828 encoder: &mut fidl::encoding::Encoder<
6829 '_,
6830 fidl::encoding::DefaultFuchsiaResourceDialect,
6831 >,
6832 offset: usize,
6833 depth: fidl::encoding::Depth,
6834 ) -> fidl::Result<()> {
6835 encoder.debug_check_bounds::<ReadOnlyLogGetResponse>(offset);
6836 self.0.encode(encoder, offset + 0, depth)?;
6840 Ok(())
6841 }
6842 }
6843
6844 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6845 for ReadOnlyLogGetResponse
6846 {
6847 #[inline(always)]
6848 fn new_empty() -> Self {
6849 Self {
6850 log: fidl::new_empty!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6851 }
6852 }
6853
6854 #[inline]
6855 unsafe fn decode(
6856 &mut self,
6857 decoder: &mut fidl::encoding::Decoder<
6858 '_,
6859 fidl::encoding::DefaultFuchsiaResourceDialect,
6860 >,
6861 offset: usize,
6862 _depth: fidl::encoding::Depth,
6863 ) -> fidl::Result<()> {
6864 decoder.debug_check_bounds::<Self>(offset);
6865 fidl::decode!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.log, decoder, offset + 0, _depth)?;
6867 Ok(())
6868 }
6869 }
6870
6871 impl fidl::encoding::ResourceTypeMarker for RetrievedItems {
6872 type Borrowed<'a> = &'a mut Self;
6873 fn take_or_borrow<'a>(
6874 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
6875 ) -> Self::Borrowed<'a> {
6876 value
6877 }
6878 }
6879
6880 unsafe impl fidl::encoding::TypeMarker for RetrievedItems {
6881 type Owned = Self;
6882
6883 #[inline(always)]
6884 fn inline_align(_context: fidl::encoding::Context) -> usize {
6885 4
6886 }
6887
6888 #[inline(always)]
6889 fn inline_size(_context: fidl::encoding::Context) -> usize {
6890 12
6891 }
6892 }
6893
6894 unsafe impl
6895 fidl::encoding::Encode<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>
6896 for &mut RetrievedItems
6897 {
6898 #[inline]
6899 unsafe fn encode(
6900 self,
6901 encoder: &mut fidl::encoding::Encoder<
6902 '_,
6903 fidl::encoding::DefaultFuchsiaResourceDialect,
6904 >,
6905 offset: usize,
6906 _depth: fidl::encoding::Depth,
6907 ) -> fidl::Result<()> {
6908 encoder.debug_check_bounds::<RetrievedItems>(offset);
6909 fidl::encoding::Encode::<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
6911 (
6912 <fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.payload),
6913 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.length),
6914 <u32 as fidl::encoding::ValueTypeMarker>::borrow(&self.extra),
6915 ),
6916 encoder, offset, _depth
6917 )
6918 }
6919 }
6920 unsafe impl<
6921 T0: fidl::encoding::Encode<
6922 fidl::encoding::HandleType<
6923 fidl::Vmo,
6924 { fidl::ObjectType::VMO.into_raw() },
6925 2147483648,
6926 >,
6927 fidl::encoding::DefaultFuchsiaResourceDialect,
6928 >,
6929 T1: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6930 T2: fidl::encoding::Encode<u32, fidl::encoding::DefaultFuchsiaResourceDialect>,
6931 > fidl::encoding::Encode<RetrievedItems, fidl::encoding::DefaultFuchsiaResourceDialect>
6932 for (T0, T1, T2)
6933 {
6934 #[inline]
6935 unsafe fn encode(
6936 self,
6937 encoder: &mut fidl::encoding::Encoder<
6938 '_,
6939 fidl::encoding::DefaultFuchsiaResourceDialect,
6940 >,
6941 offset: usize,
6942 depth: fidl::encoding::Depth,
6943 ) -> fidl::Result<()> {
6944 encoder.debug_check_bounds::<RetrievedItems>(offset);
6945 self.0.encode(encoder, offset + 0, depth)?;
6949 self.1.encode(encoder, offset + 4, depth)?;
6950 self.2.encode(encoder, offset + 8, depth)?;
6951 Ok(())
6952 }
6953 }
6954
6955 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
6956 for RetrievedItems
6957 {
6958 #[inline(always)]
6959 fn new_empty() -> Self {
6960 Self {
6961 payload: fidl::new_empty!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
6962 length: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6963 extra: fidl::new_empty!(u32, fidl::encoding::DefaultFuchsiaResourceDialect),
6964 }
6965 }
6966
6967 #[inline]
6968 unsafe fn decode(
6969 &mut self,
6970 decoder: &mut fidl::encoding::Decoder<
6971 '_,
6972 fidl::encoding::DefaultFuchsiaResourceDialect,
6973 >,
6974 offset: usize,
6975 _depth: fidl::encoding::Depth,
6976 ) -> fidl::Result<()> {
6977 decoder.debug_check_bounds::<Self>(offset);
6978 fidl::decode!(fidl::encoding::HandleType<fidl::Vmo, { fidl::ObjectType::VMO.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.payload, decoder, offset + 0, _depth)?;
6980 fidl::decode!(
6981 u32,
6982 fidl::encoding::DefaultFuchsiaResourceDialect,
6983 &mut self.length,
6984 decoder,
6985 offset + 4,
6986 _depth
6987 )?;
6988 fidl::decode!(
6989 u32,
6990 fidl::encoding::DefaultFuchsiaResourceDialect,
6991 &mut self.extra,
6992 decoder,
6993 offset + 8,
6994 _depth
6995 )?;
6996 Ok(())
6997 }
6998 }
6999
7000 impl fidl::encoding::ResourceTypeMarker for SvcStashProviderGetResponse {
7001 type Borrowed<'a> = &'a mut Self;
7002 fn take_or_borrow<'a>(
7003 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7004 ) -> Self::Borrowed<'a> {
7005 value
7006 }
7007 }
7008
7009 unsafe impl fidl::encoding::TypeMarker for SvcStashProviderGetResponse {
7010 type Owned = Self;
7011
7012 #[inline(always)]
7013 fn inline_align(_context: fidl::encoding::Context) -> usize {
7014 4
7015 }
7016
7017 #[inline(always)]
7018 fn inline_size(_context: fidl::encoding::Context) -> usize {
7019 4
7020 }
7021 }
7022
7023 unsafe impl
7024 fidl::encoding::Encode<
7025 SvcStashProviderGetResponse,
7026 fidl::encoding::DefaultFuchsiaResourceDialect,
7027 > for &mut SvcStashProviderGetResponse
7028 {
7029 #[inline]
7030 unsafe fn encode(
7031 self,
7032 encoder: &mut fidl::encoding::Encoder<
7033 '_,
7034 fidl::encoding::DefaultFuchsiaResourceDialect,
7035 >,
7036 offset: usize,
7037 _depth: fidl::encoding::Depth,
7038 ) -> fidl::Result<()> {
7039 encoder.debug_check_bounds::<SvcStashProviderGetResponse>(offset);
7040 fidl::encoding::Encode::<SvcStashProviderGetResponse, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7042 (
7043 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.resource),
7044 ),
7045 encoder, offset, _depth
7046 )
7047 }
7048 }
7049 unsafe impl<
7050 T0: fidl::encoding::Encode<
7051 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7052 fidl::encoding::DefaultFuchsiaResourceDialect,
7053 >,
7054 >
7055 fidl::encoding::Encode<
7056 SvcStashProviderGetResponse,
7057 fidl::encoding::DefaultFuchsiaResourceDialect,
7058 > for (T0,)
7059 {
7060 #[inline]
7061 unsafe fn encode(
7062 self,
7063 encoder: &mut fidl::encoding::Encoder<
7064 '_,
7065 fidl::encoding::DefaultFuchsiaResourceDialect,
7066 >,
7067 offset: usize,
7068 depth: fidl::encoding::Depth,
7069 ) -> fidl::Result<()> {
7070 encoder.debug_check_bounds::<SvcStashProviderGetResponse>(offset);
7071 self.0.encode(encoder, offset + 0, depth)?;
7075 Ok(())
7076 }
7077 }
7078
7079 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7080 for SvcStashProviderGetResponse
7081 {
7082 #[inline(always)]
7083 fn new_empty() -> Self {
7084 Self {
7085 resource: fidl::new_empty!(
7086 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7087 fidl::encoding::DefaultFuchsiaResourceDialect
7088 ),
7089 }
7090 }
7091
7092 #[inline]
7093 unsafe fn decode(
7094 &mut self,
7095 decoder: &mut fidl::encoding::Decoder<
7096 '_,
7097 fidl::encoding::DefaultFuchsiaResourceDialect,
7098 >,
7099 offset: usize,
7100 _depth: fidl::encoding::Depth,
7101 ) -> fidl::Result<()> {
7102 decoder.debug_check_bounds::<Self>(offset);
7103 fidl::decode!(
7105 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7106 fidl::encoding::DefaultFuchsiaResourceDialect,
7107 &mut self.resource,
7108 decoder,
7109 offset + 0,
7110 _depth
7111 )?;
7112 Ok(())
7113 }
7114 }
7115
7116 impl fidl::encoding::ResourceTypeMarker for SvcStashStoreRequest {
7117 type Borrowed<'a> = &'a mut Self;
7118 fn take_or_borrow<'a>(
7119 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7120 ) -> Self::Borrowed<'a> {
7121 value
7122 }
7123 }
7124
7125 unsafe impl fidl::encoding::TypeMarker for SvcStashStoreRequest {
7126 type Owned = Self;
7127
7128 #[inline(always)]
7129 fn inline_align(_context: fidl::encoding::Context) -> usize {
7130 4
7131 }
7132
7133 #[inline(always)]
7134 fn inline_size(_context: fidl::encoding::Context) -> usize {
7135 4
7136 }
7137 }
7138
7139 unsafe impl
7140 fidl::encoding::Encode<SvcStashStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7141 for &mut SvcStashStoreRequest
7142 {
7143 #[inline]
7144 unsafe fn encode(
7145 self,
7146 encoder: &mut fidl::encoding::Encoder<
7147 '_,
7148 fidl::encoding::DefaultFuchsiaResourceDialect,
7149 >,
7150 offset: usize,
7151 _depth: fidl::encoding::Depth,
7152 ) -> fidl::Result<()> {
7153 encoder.debug_check_bounds::<SvcStashStoreRequest>(offset);
7154 fidl::encoding::Encode::<
7156 SvcStashStoreRequest,
7157 fidl::encoding::DefaultFuchsiaResourceDialect,
7158 >::encode(
7159 (<fidl::encoding::Endpoint<
7160 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
7161 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7162 &mut self.svc_endpoint
7163 ),),
7164 encoder,
7165 offset,
7166 _depth,
7167 )
7168 }
7169 }
7170 unsafe impl<
7171 T0: fidl::encoding::Encode<
7172 fidl::encoding::Endpoint<
7173 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
7174 >,
7175 fidl::encoding::DefaultFuchsiaResourceDialect,
7176 >,
7177 >
7178 fidl::encoding::Encode<SvcStashStoreRequest, fidl::encoding::DefaultFuchsiaResourceDialect>
7179 for (T0,)
7180 {
7181 #[inline]
7182 unsafe fn encode(
7183 self,
7184 encoder: &mut fidl::encoding::Encoder<
7185 '_,
7186 fidl::encoding::DefaultFuchsiaResourceDialect,
7187 >,
7188 offset: usize,
7189 depth: fidl::encoding::Depth,
7190 ) -> fidl::Result<()> {
7191 encoder.debug_check_bounds::<SvcStashStoreRequest>(offset);
7192 self.0.encode(encoder, offset + 0, depth)?;
7196 Ok(())
7197 }
7198 }
7199
7200 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7201 for SvcStashStoreRequest
7202 {
7203 #[inline(always)]
7204 fn new_empty() -> Self {
7205 Self {
7206 svc_endpoint: fidl::new_empty!(
7207 fidl::encoding::Endpoint<
7208 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
7209 >,
7210 fidl::encoding::DefaultFuchsiaResourceDialect
7211 ),
7212 }
7213 }
7214
7215 #[inline]
7216 unsafe fn decode(
7217 &mut self,
7218 decoder: &mut fidl::encoding::Decoder<
7219 '_,
7220 fidl::encoding::DefaultFuchsiaResourceDialect,
7221 >,
7222 offset: usize,
7223 _depth: fidl::encoding::Depth,
7224 ) -> fidl::Result<()> {
7225 decoder.debug_check_bounds::<Self>(offset);
7226 fidl::decode!(
7228 fidl::encoding::Endpoint<
7229 fidl::endpoints::ServerEnd<fidl_fuchsia_io::DirectoryMarker>,
7230 >,
7231 fidl::encoding::DefaultFuchsiaResourceDialect,
7232 &mut self.svc_endpoint,
7233 decoder,
7234 offset + 0,
7235 _depth
7236 )?;
7237 Ok(())
7238 }
7239 }
7240
7241 impl fidl::encoding::ResourceTypeMarker for UserbootPostBootfsFilesRequest {
7242 type Borrowed<'a> = &'a mut Self;
7243 fn take_or_borrow<'a>(
7244 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7245 ) -> Self::Borrowed<'a> {
7246 value
7247 }
7248 }
7249
7250 unsafe impl fidl::encoding::TypeMarker for UserbootPostBootfsFilesRequest {
7251 type Owned = Self;
7252
7253 #[inline(always)]
7254 fn inline_align(_context: fidl::encoding::Context) -> usize {
7255 8
7256 }
7257
7258 #[inline(always)]
7259 fn inline_size(_context: fidl::encoding::Context) -> usize {
7260 16
7261 }
7262 }
7263
7264 unsafe impl
7265 fidl::encoding::Encode<
7266 UserbootPostBootfsFilesRequest,
7267 fidl::encoding::DefaultFuchsiaResourceDialect,
7268 > for &mut UserbootPostBootfsFilesRequest
7269 {
7270 #[inline]
7271 unsafe fn encode(
7272 self,
7273 encoder: &mut fidl::encoding::Encoder<
7274 '_,
7275 fidl::encoding::DefaultFuchsiaResourceDialect,
7276 >,
7277 offset: usize,
7278 _depth: fidl::encoding::Depth,
7279 ) -> fidl::Result<()> {
7280 encoder.debug_check_bounds::<UserbootPostBootfsFilesRequest>(offset);
7281 fidl::encoding::Encode::<UserbootPostBootfsFilesRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7283 (
7284 <fidl::encoding::Vector<BootfsFileVmo, 64> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.files),
7285 ),
7286 encoder, offset, _depth
7287 )
7288 }
7289 }
7290 unsafe impl<
7291 T0: fidl::encoding::Encode<
7292 fidl::encoding::Vector<BootfsFileVmo, 64>,
7293 fidl::encoding::DefaultFuchsiaResourceDialect,
7294 >,
7295 >
7296 fidl::encoding::Encode<
7297 UserbootPostBootfsFilesRequest,
7298 fidl::encoding::DefaultFuchsiaResourceDialect,
7299 > for (T0,)
7300 {
7301 #[inline]
7302 unsafe fn encode(
7303 self,
7304 encoder: &mut fidl::encoding::Encoder<
7305 '_,
7306 fidl::encoding::DefaultFuchsiaResourceDialect,
7307 >,
7308 offset: usize,
7309 depth: fidl::encoding::Depth,
7310 ) -> fidl::Result<()> {
7311 encoder.debug_check_bounds::<UserbootPostBootfsFilesRequest>(offset);
7312 self.0.encode(encoder, offset + 0, depth)?;
7316 Ok(())
7317 }
7318 }
7319
7320 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7321 for UserbootPostBootfsFilesRequest
7322 {
7323 #[inline(always)]
7324 fn new_empty() -> Self {
7325 Self {
7326 files: fidl::new_empty!(fidl::encoding::Vector<BootfsFileVmo, 64>, fidl::encoding::DefaultFuchsiaResourceDialect),
7327 }
7328 }
7329
7330 #[inline]
7331 unsafe fn decode(
7332 &mut self,
7333 decoder: &mut fidl::encoding::Decoder<
7334 '_,
7335 fidl::encoding::DefaultFuchsiaResourceDialect,
7336 >,
7337 offset: usize,
7338 _depth: fidl::encoding::Depth,
7339 ) -> fidl::Result<()> {
7340 decoder.debug_check_bounds::<Self>(offset);
7341 fidl::decode!(fidl::encoding::Vector<BootfsFileVmo, 64>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.files, decoder, offset + 0, _depth)?;
7343 Ok(())
7344 }
7345 }
7346
7347 impl fidl::encoding::ResourceTypeMarker for UserbootPostStashSvcRequest {
7348 type Borrowed<'a> = &'a mut Self;
7349 fn take_or_borrow<'a>(
7350 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7351 ) -> Self::Borrowed<'a> {
7352 value
7353 }
7354 }
7355
7356 unsafe impl fidl::encoding::TypeMarker for UserbootPostStashSvcRequest {
7357 type Owned = Self;
7358
7359 #[inline(always)]
7360 fn inline_align(_context: fidl::encoding::Context) -> usize {
7361 4
7362 }
7363
7364 #[inline(always)]
7365 fn inline_size(_context: fidl::encoding::Context) -> usize {
7366 4
7367 }
7368 }
7369
7370 unsafe impl
7371 fidl::encoding::Encode<
7372 UserbootPostStashSvcRequest,
7373 fidl::encoding::DefaultFuchsiaResourceDialect,
7374 > for &mut UserbootPostStashSvcRequest
7375 {
7376 #[inline]
7377 unsafe fn encode(
7378 self,
7379 encoder: &mut fidl::encoding::Encoder<
7380 '_,
7381 fidl::encoding::DefaultFuchsiaResourceDialect,
7382 >,
7383 offset: usize,
7384 _depth: fidl::encoding::Depth,
7385 ) -> fidl::Result<()> {
7386 encoder.debug_check_bounds::<UserbootPostStashSvcRequest>(offset);
7387 fidl::encoding::Encode::<UserbootPostStashSvcRequest, fidl::encoding::DefaultFuchsiaResourceDialect>::encode(
7389 (
7390 <fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>> as fidl::encoding::ResourceTypeMarker>::take_or_borrow(&mut self.stash_svc_endpoint),
7391 ),
7392 encoder, offset, _depth
7393 )
7394 }
7395 }
7396 unsafe impl<
7397 T0: fidl::encoding::Encode<
7398 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7399 fidl::encoding::DefaultFuchsiaResourceDialect,
7400 >,
7401 >
7402 fidl::encoding::Encode<
7403 UserbootPostStashSvcRequest,
7404 fidl::encoding::DefaultFuchsiaResourceDialect,
7405 > for (T0,)
7406 {
7407 #[inline]
7408 unsafe fn encode(
7409 self,
7410 encoder: &mut fidl::encoding::Encoder<
7411 '_,
7412 fidl::encoding::DefaultFuchsiaResourceDialect,
7413 >,
7414 offset: usize,
7415 depth: fidl::encoding::Depth,
7416 ) -> fidl::Result<()> {
7417 encoder.debug_check_bounds::<UserbootPostStashSvcRequest>(offset);
7418 self.0.encode(encoder, offset + 0, depth)?;
7422 Ok(())
7423 }
7424 }
7425
7426 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7427 for UserbootPostStashSvcRequest
7428 {
7429 #[inline(always)]
7430 fn new_empty() -> Self {
7431 Self {
7432 stash_svc_endpoint: fidl::new_empty!(
7433 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7434 fidl::encoding::DefaultFuchsiaResourceDialect
7435 ),
7436 }
7437 }
7438
7439 #[inline]
7440 unsafe fn decode(
7441 &mut self,
7442 decoder: &mut fidl::encoding::Decoder<
7443 '_,
7444 fidl::encoding::DefaultFuchsiaResourceDialect,
7445 >,
7446 offset: usize,
7447 _depth: fidl::encoding::Depth,
7448 ) -> fidl::Result<()> {
7449 decoder.debug_check_bounds::<Self>(offset);
7450 fidl::decode!(
7452 fidl::encoding::Endpoint<fidl::endpoints::ServerEnd<SvcStashMarker>>,
7453 fidl::encoding::DefaultFuchsiaResourceDialect,
7454 &mut self.stash_svc_endpoint,
7455 decoder,
7456 offset + 0,
7457 _depth
7458 )?;
7459 Ok(())
7460 }
7461 }
7462
7463 impl fidl::encoding::ResourceTypeMarker for WriteOnlyLogGetResponse {
7464 type Borrowed<'a> = &'a mut Self;
7465 fn take_or_borrow<'a>(
7466 value: &'a mut <Self as fidl::encoding::TypeMarker>::Owned,
7467 ) -> Self::Borrowed<'a> {
7468 value
7469 }
7470 }
7471
7472 unsafe impl fidl::encoding::TypeMarker for WriteOnlyLogGetResponse {
7473 type Owned = Self;
7474
7475 #[inline(always)]
7476 fn inline_align(_context: fidl::encoding::Context) -> usize {
7477 4
7478 }
7479
7480 #[inline(always)]
7481 fn inline_size(_context: fidl::encoding::Context) -> usize {
7482 4
7483 }
7484 }
7485
7486 unsafe impl
7487 fidl::encoding::Encode<
7488 WriteOnlyLogGetResponse,
7489 fidl::encoding::DefaultFuchsiaResourceDialect,
7490 > for &mut WriteOnlyLogGetResponse
7491 {
7492 #[inline]
7493 unsafe fn encode(
7494 self,
7495 encoder: &mut fidl::encoding::Encoder<
7496 '_,
7497 fidl::encoding::DefaultFuchsiaResourceDialect,
7498 >,
7499 offset: usize,
7500 _depth: fidl::encoding::Depth,
7501 ) -> fidl::Result<()> {
7502 encoder.debug_check_bounds::<WriteOnlyLogGetResponse>(offset);
7503 fidl::encoding::Encode::<
7505 WriteOnlyLogGetResponse,
7506 fidl::encoding::DefaultFuchsiaResourceDialect,
7507 >::encode(
7508 (<fidl::encoding::HandleType<
7509 fidl::DebugLog,
7510 { fidl::ObjectType::DEBUGLOG.into_raw() },
7511 2147483648,
7512 > as fidl::encoding::ResourceTypeMarker>::take_or_borrow(
7513 &mut self.log
7514 ),),
7515 encoder,
7516 offset,
7517 _depth,
7518 )
7519 }
7520 }
7521 unsafe impl<
7522 T0: fidl::encoding::Encode<
7523 fidl::encoding::HandleType<
7524 fidl::DebugLog,
7525 { fidl::ObjectType::DEBUGLOG.into_raw() },
7526 2147483648,
7527 >,
7528 fidl::encoding::DefaultFuchsiaResourceDialect,
7529 >,
7530 >
7531 fidl::encoding::Encode<
7532 WriteOnlyLogGetResponse,
7533 fidl::encoding::DefaultFuchsiaResourceDialect,
7534 > for (T0,)
7535 {
7536 #[inline]
7537 unsafe fn encode(
7538 self,
7539 encoder: &mut fidl::encoding::Encoder<
7540 '_,
7541 fidl::encoding::DefaultFuchsiaResourceDialect,
7542 >,
7543 offset: usize,
7544 depth: fidl::encoding::Depth,
7545 ) -> fidl::Result<()> {
7546 encoder.debug_check_bounds::<WriteOnlyLogGetResponse>(offset);
7547 self.0.encode(encoder, offset + 0, depth)?;
7551 Ok(())
7552 }
7553 }
7554
7555 impl fidl::encoding::Decode<Self, fidl::encoding::DefaultFuchsiaResourceDialect>
7556 for WriteOnlyLogGetResponse
7557 {
7558 #[inline(always)]
7559 fn new_empty() -> Self {
7560 Self {
7561 log: fidl::new_empty!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect),
7562 }
7563 }
7564
7565 #[inline]
7566 unsafe fn decode(
7567 &mut self,
7568 decoder: &mut fidl::encoding::Decoder<
7569 '_,
7570 fidl::encoding::DefaultFuchsiaResourceDialect,
7571 >,
7572 offset: usize,
7573 _depth: fidl::encoding::Depth,
7574 ) -> fidl::Result<()> {
7575 decoder.debug_check_bounds::<Self>(offset);
7576 fidl::decode!(fidl::encoding::HandleType<fidl::DebugLog, { fidl::ObjectType::DEBUGLOG.into_raw() }, 2147483648>, fidl::encoding::DefaultFuchsiaResourceDialect, &mut self.log, decoder, offset + 0, _depth)?;
7578 Ok(())
7579 }
7580 }
7581}