fidl_fuchsia_unknown_common/
fidl_fuchsia_unknown_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 QueryableQueryResponse {
13 pub protocol: Vec<u8>,
15}
16
17impl fidl::Persistable for QueryableQueryResponse {}
18
19mod internal {
20 use super::*;
21
22 impl fidl::encoding::ValueTypeMarker for QueryableQueryResponse {
23 type Borrowed<'a> = &'a Self;
24 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
25 value
26 }
27 }
28
29 unsafe impl fidl::encoding::TypeMarker for QueryableQueryResponse {
30 type Owned = Self;
31
32 #[inline(always)]
33 fn inline_align(_context: fidl::encoding::Context) -> usize {
34 8
35 }
36
37 #[inline(always)]
38 fn inline_size(_context: fidl::encoding::Context) -> usize {
39 16
40 }
41 }
42
43 unsafe impl<D: fidl::encoding::ResourceDialect>
44 fidl::encoding::Encode<QueryableQueryResponse, D> for &QueryableQueryResponse
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::<QueryableQueryResponse>(offset);
54 fidl::encoding::Encode::<QueryableQueryResponse, D>::encode(
56 (<fidl::encoding::UnboundedVector<u8> as fidl::encoding::ValueTypeMarker>::borrow(
57 &self.protocol,
58 ),),
59 encoder,
60 offset,
61 _depth,
62 )
63 }
64 }
65 unsafe impl<
66 D: fidl::encoding::ResourceDialect,
67 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u8>, D>,
68 > fidl::encoding::Encode<QueryableQueryResponse, D> for (T0,)
69 {
70 #[inline]
71 unsafe fn encode(
72 self,
73 encoder: &mut fidl::encoding::Encoder<'_, D>,
74 offset: usize,
75 depth: fidl::encoding::Depth,
76 ) -> fidl::Result<()> {
77 encoder.debug_check_bounds::<QueryableQueryResponse>(offset);
78 self.0.encode(encoder, offset + 0, depth)?;
82 Ok(())
83 }
84 }
85
86 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
87 for QueryableQueryResponse
88 {
89 #[inline(always)]
90 fn new_empty() -> Self {
91 Self { protocol: fidl::new_empty!(fidl::encoding::UnboundedVector<u8>, D) }
92 }
93
94 #[inline]
95 unsafe fn decode(
96 &mut self,
97 decoder: &mut fidl::encoding::Decoder<'_, D>,
98 offset: usize,
99 _depth: fidl::encoding::Depth,
100 ) -> fidl::Result<()> {
101 decoder.debug_check_bounds::<Self>(offset);
102 fidl::decode!(
104 fidl::encoding::UnboundedVector<u8>,
105 D,
106 &mut self.protocol,
107 decoder,
108 offset + 0,
109 _depth
110 )?;
111 Ok(())
112 }
113 }
114}