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