fidl_fuchsia_fshost__common/
fidl_fuchsia_fshost__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, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
12pub struct AdminStorageHostEnabledResponse {
13 pub enabled: bool,
14}
15
16impl fidl::Persistable for AdminStorageHostEnabledResponse {}
17
18#[derive(Clone, Debug, PartialEq)]
19pub struct RecoveryInitSystemPartitionTableRequest {
20 pub partitions: Vec<fidl_fuchsia_storage_partitions__common::PartitionInfo>,
21}
22
23impl fidl::Persistable for RecoveryInitSystemPartitionTableRequest {}
24
25pub mod admin_ordinals {
26 pub const SHRED_DATA_VOLUME: u64 = 0xb0d6c2e95343a10;
27 pub const STORAGE_HOST_ENABLED: u64 = 0x5934b6527ec49a35;
28}
29
30pub mod recovery_ordinals {
31 pub const INIT_SYSTEM_PARTITION_TABLE: u64 = 0x3dcadcbb75e2330b;
32 pub const WRITE_DATA_FILE: u64 = 0xd6cf7b3f57b418d;
33 pub const FORMAT_SYSTEM_BLOB_VOLUME: u64 = 0x4e93f6b198f61f7d;
34 pub const MOUNT_SYSTEM_BLOB_VOLUME: u64 = 0x63ddff4240e908c0;
35 pub const WRITE_SYSTEM_BLOB_IMAGE: u64 = 0x65751d7784fa3647;
36 pub const INSTALL_SYSTEM_BLOB_IMAGE: u64 = 0x311fc553a2a48b6;
37}
38
39pub mod starnix_volume_provider_ordinals {
40 pub const MOUNT: u64 = 0x62ae75763dde5af6;
41 pub const CREATE: u64 = 0x1f172ca81a8da7c4;
42}
43
44mod internal {
45 use super::*;
46
47 impl fidl::encoding::ValueTypeMarker for AdminStorageHostEnabledResponse {
48 type Borrowed<'a> = &'a Self;
49 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
50 value
51 }
52 }
53
54 unsafe impl fidl::encoding::TypeMarker for AdminStorageHostEnabledResponse {
55 type Owned = Self;
56
57 #[inline(always)]
58 fn inline_align(_context: fidl::encoding::Context) -> usize {
59 1
60 }
61
62 #[inline(always)]
63 fn inline_size(_context: fidl::encoding::Context) -> usize {
64 1
65 }
66 }
67
68 unsafe impl<D: fidl::encoding::ResourceDialect>
69 fidl::encoding::Encode<AdminStorageHostEnabledResponse, D>
70 for &AdminStorageHostEnabledResponse
71 {
72 #[inline]
73 unsafe fn encode(
74 self,
75 encoder: &mut fidl::encoding::Encoder<'_, D>,
76 offset: usize,
77 _depth: fidl::encoding::Depth,
78 ) -> fidl::Result<()> {
79 encoder.debug_check_bounds::<AdminStorageHostEnabledResponse>(offset);
80 fidl::encoding::Encode::<AdminStorageHostEnabledResponse, D>::encode(
82 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.enabled),),
83 encoder,
84 offset,
85 _depth,
86 )
87 }
88 }
89 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
90 fidl::encoding::Encode<AdminStorageHostEnabledResponse, D> for (T0,)
91 {
92 #[inline]
93 unsafe fn encode(
94 self,
95 encoder: &mut fidl::encoding::Encoder<'_, D>,
96 offset: usize,
97 depth: fidl::encoding::Depth,
98 ) -> fidl::Result<()> {
99 encoder.debug_check_bounds::<AdminStorageHostEnabledResponse>(offset);
100 self.0.encode(encoder, offset + 0, depth)?;
104 Ok(())
105 }
106 }
107
108 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
109 for AdminStorageHostEnabledResponse
110 {
111 #[inline(always)]
112 fn new_empty() -> Self {
113 Self { enabled: fidl::new_empty!(bool, D) }
114 }
115
116 #[inline]
117 unsafe fn decode(
118 &mut self,
119 decoder: &mut fidl::encoding::Decoder<'_, D>,
120 offset: usize,
121 _depth: fidl::encoding::Depth,
122 ) -> fidl::Result<()> {
123 decoder.debug_check_bounds::<Self>(offset);
124 fidl::decode!(bool, D, &mut self.enabled, decoder, offset + 0, _depth)?;
126 Ok(())
127 }
128 }
129
130 impl fidl::encoding::ValueTypeMarker for RecoveryInitSystemPartitionTableRequest {
131 type Borrowed<'a> = &'a Self;
132 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
133 value
134 }
135 }
136
137 unsafe impl fidl::encoding::TypeMarker for RecoveryInitSystemPartitionTableRequest {
138 type Owned = Self;
139
140 #[inline(always)]
141 fn inline_align(_context: fidl::encoding::Context) -> usize {
142 8
143 }
144
145 #[inline(always)]
146 fn inline_size(_context: fidl::encoding::Context) -> usize {
147 16
148 }
149 }
150
151 unsafe impl<D: fidl::encoding::ResourceDialect>
152 fidl::encoding::Encode<RecoveryInitSystemPartitionTableRequest, D>
153 for &RecoveryInitSystemPartitionTableRequest
154 {
155 #[inline]
156 unsafe fn encode(
157 self,
158 encoder: &mut fidl::encoding::Encoder<'_, D>,
159 offset: usize,
160 _depth: fidl::encoding::Depth,
161 ) -> fidl::Result<()> {
162 encoder.debug_check_bounds::<RecoveryInitSystemPartitionTableRequest>(offset);
163 fidl::encoding::Encode::<RecoveryInitSystemPartitionTableRequest, D>::encode(
165 (<fidl::encoding::Vector<
166 fidl_fuchsia_storage_partitions__common::PartitionInfo,
167 128,
168 > as fidl::encoding::ValueTypeMarker>::borrow(&self.partitions),),
169 encoder,
170 offset,
171 _depth,
172 )
173 }
174 }
175 unsafe impl<
176 D: fidl::encoding::ResourceDialect,
177 T0: fidl::encoding::Encode<
178 fidl::encoding::Vector<fidl_fuchsia_storage_partitions__common::PartitionInfo, 128>,
179 D,
180 >,
181 > fidl::encoding::Encode<RecoveryInitSystemPartitionTableRequest, D> for (T0,)
182 {
183 #[inline]
184 unsafe fn encode(
185 self,
186 encoder: &mut fidl::encoding::Encoder<'_, D>,
187 offset: usize,
188 depth: fidl::encoding::Depth,
189 ) -> fidl::Result<()> {
190 encoder.debug_check_bounds::<RecoveryInitSystemPartitionTableRequest>(offset);
191 self.0.encode(encoder, offset + 0, depth)?;
195 Ok(())
196 }
197 }
198
199 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
200 for RecoveryInitSystemPartitionTableRequest
201 {
202 #[inline(always)]
203 fn new_empty() -> Self {
204 Self {
205 partitions: fidl::new_empty!(fidl::encoding::Vector<fidl_fuchsia_storage_partitions__common::PartitionInfo, 128>, D),
206 }
207 }
208
209 #[inline]
210 unsafe fn decode(
211 &mut self,
212 decoder: &mut fidl::encoding::Decoder<'_, D>,
213 offset: usize,
214 _depth: fidl::encoding::Depth,
215 ) -> fidl::Result<()> {
216 decoder.debug_check_bounds::<Self>(offset);
217 fidl::decode!(fidl::encoding::Vector<fidl_fuchsia_storage_partitions__common::PartitionInfo, 128>, D, &mut self.partitions, decoder, offset + 0, _depth)?;
219 Ok(())
220 }
221 }
222}