fidl_fuchsia_examples_colocated__common/
fidl_fuchsia_examples_colocated__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 ColocatedGetVmosResponse {
13 pub vmos: Vec<u64>,
14}
15
16impl fidl::Persistable for ColocatedGetVmosResponse {}
17
18pub mod colocated_ordinals {
19 pub const GET_VMOS: u64 = 0x6e0e1cca8af3632a;
20}
21
22mod internal {
23 use super::*;
24
25 impl fidl::encoding::ValueTypeMarker for ColocatedGetVmosResponse {
26 type Borrowed<'a> = &'a Self;
27 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
28 value
29 }
30 }
31
32 unsafe impl fidl::encoding::TypeMarker for ColocatedGetVmosResponse {
33 type Owned = Self;
34
35 #[inline(always)]
36 fn inline_align(_context: fidl::encoding::Context) -> usize {
37 8
38 }
39
40 #[inline(always)]
41 fn inline_size(_context: fidl::encoding::Context) -> usize {
42 16
43 }
44 }
45
46 unsafe impl<D: fidl::encoding::ResourceDialect>
47 fidl::encoding::Encode<ColocatedGetVmosResponse, D> for &ColocatedGetVmosResponse
48 {
49 #[inline]
50 unsafe fn encode(
51 self,
52 encoder: &mut fidl::encoding::Encoder<'_, D>,
53 offset: usize,
54 _depth: fidl::encoding::Depth,
55 ) -> fidl::Result<()> {
56 encoder.debug_check_bounds::<ColocatedGetVmosResponse>(offset);
57 fidl::encoding::Encode::<ColocatedGetVmosResponse, D>::encode(
59 (
60 <fidl::encoding::UnboundedVector<u64> as fidl::encoding::ValueTypeMarker>::borrow(&self.vmos),
61 ),
62 encoder, offset, _depth
63 )
64 }
65 }
66 unsafe impl<
67 D: fidl::encoding::ResourceDialect,
68 T0: fidl::encoding::Encode<fidl::encoding::UnboundedVector<u64>, D>,
69 > fidl::encoding::Encode<ColocatedGetVmosResponse, 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::<ColocatedGetVmosResponse>(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 ColocatedGetVmosResponse
89 {
90 #[inline(always)]
91 fn new_empty() -> Self {
92 Self { vmos: fidl::new_empty!(fidl::encoding::UnboundedVector<u64>, D) }
93 }
94
95 #[inline]
96 unsafe fn decode(
97 &mut self,
98 decoder: &mut fidl::encoding::Decoder<'_, D>,
99 offset: usize,
100 _depth: fidl::encoding::Depth,
101 ) -> fidl::Result<()> {
102 decoder.debug_check_bounds::<Self>(offset);
103 fidl::decode!(
105 fidl::encoding::UnboundedVector<u64>,
106 D,
107 &mut self.vmos,
108 decoder,
109 offset + 0,
110 _depth
111 )?;
112 Ok(())
113 }
114 }
115}