fidl_fuchsia_testing_sl4f_common/
fidl_fuchsia_testing_sl4f_common.rs1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
8use futures::future::{self, MaybeDone, TryFutureExt};
9use zx_status;
10
11#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12pub struct FacadeIteratorGetNextResponse {
13 pub facades: Vec<String>,
14}
15
16impl fidl::Persistable for FacadeIteratorGetNextResponse {}
17
18mod internal {
19 use super::*;
20
21 impl fidl::encoding::ValueTypeMarker for FacadeIteratorGetNextResponse {
22 type Borrowed<'a> = &'a Self;
23 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
24 value
25 }
26 }
27
28 unsafe impl fidl::encoding::TypeMarker for FacadeIteratorGetNextResponse {
29 type Owned = Self;
30
31 #[inline(always)]
32 fn inline_align(_context: fidl::encoding::Context) -> usize {
33 8
34 }
35
36 #[inline(always)]
37 fn inline_size(_context: fidl::encoding::Context) -> usize {
38 16
39 }
40 }
41
42 unsafe impl<D: fidl::encoding::ResourceDialect>
43 fidl::encoding::Encode<FacadeIteratorGetNextResponse, D>
44 for &FacadeIteratorGetNextResponse
45 {
46 #[inline]
47 unsafe fn encode(
48 self,
49 encoder: &mut fidl::encoding::Encoder<'_, D>,
50 offset: usize,
51 _depth: fidl::encoding::Depth,
52 ) -> fidl::Result<()> {
53 encoder.debug_check_bounds::<FacadeIteratorGetNextResponse>(offset);
54 fidl::encoding::Encode::<FacadeIteratorGetNextResponse, D>::encode(
56 (
57 <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.facades),
58 ),
59 encoder, offset, _depth
60 )
61 }
62 }
63 unsafe impl<
64 D: fidl::encoding::ResourceDialect,
65 T0: fidl::encoding::Encode<
66 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
67 D,
68 >,
69 > fidl::encoding::Encode<FacadeIteratorGetNextResponse, D> for (T0,)
70 {
71 #[inline]
72 unsafe fn encode(
73 self,
74 encoder: &mut fidl::encoding::Encoder<'_, D>,
75 offset: usize,
76 depth: fidl::encoding::Depth,
77 ) -> fidl::Result<()> {
78 encoder.debug_check_bounds::<FacadeIteratorGetNextResponse>(offset);
79 self.0.encode(encoder, offset + 0, depth)?;
83 Ok(())
84 }
85 }
86
87 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
88 for FacadeIteratorGetNextResponse
89 {
90 #[inline(always)]
91 fn new_empty() -> Self {
92 Self {
93 facades: fidl::new_empty!(
94 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
95 D
96 ),
97 }
98 }
99
100 #[inline]
101 unsafe fn decode(
102 &mut self,
103 decoder: &mut fidl::encoding::Decoder<'_, D>,
104 offset: usize,
105 _depth: fidl::encoding::Depth,
106 ) -> fidl::Result<()> {
107 decoder.debug_check_bounds::<Self>(offset);
108 fidl::decode!(
110 fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
111 D,
112 &mut self.facades,
113 decoder,
114 offset + 0,
115 _depth
116 )?;
117 Ok(())
118 }
119 }
120}