fidl_fuchsia_fs_realm__common/
fidl_fuchsia_fs_realm__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 ControllerUnmountRequest {
13 pub name: String,
14}
15
16impl fidl::Persistable for ControllerUnmountRequest {}
17
18pub mod controller_ordinals {
19 pub const MOUNT: u64 = 0x49300213a51ec7f7;
20 pub const UNMOUNT: u64 = 0x2d994ee1a9364179;
21 pub const FORMAT: u64 = 0x52ce219e43664bf0;
22 pub const CHECK: u64 = 0x20d3ff7c33a9b863;
23}
24
25mod internal {
26 use super::*;
27
28 impl fidl::encoding::ValueTypeMarker for ControllerUnmountRequest {
29 type Borrowed<'a> = &'a Self;
30 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
31 value
32 }
33 }
34
35 unsafe impl fidl::encoding::TypeMarker for ControllerUnmountRequest {
36 type Owned = Self;
37
38 #[inline(always)]
39 fn inline_align(_context: fidl::encoding::Context) -> usize {
40 8
41 }
42
43 #[inline(always)]
44 fn inline_size(_context: fidl::encoding::Context) -> usize {
45 16
46 }
47 }
48
49 unsafe impl<D: fidl::encoding::ResourceDialect>
50 fidl::encoding::Encode<ControllerUnmountRequest, D> for &ControllerUnmountRequest
51 {
52 #[inline]
53 unsafe fn encode(
54 self,
55 encoder: &mut fidl::encoding::Encoder<'_, D>,
56 offset: usize,
57 _depth: fidl::encoding::Depth,
58 ) -> fidl::Result<()> {
59 encoder.debug_check_bounds::<ControllerUnmountRequest>(offset);
60 fidl::encoding::Encode::<ControllerUnmountRequest, D>::encode(
62 (<fidl::encoding::BoundedString<255> as fidl::encoding::ValueTypeMarker>::borrow(
63 &self.name,
64 ),),
65 encoder,
66 offset,
67 _depth,
68 )
69 }
70 }
71 unsafe impl<
72 D: fidl::encoding::ResourceDialect,
73 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<255>, D>,
74 > fidl::encoding::Encode<ControllerUnmountRequest, D> for (T0,)
75 {
76 #[inline]
77 unsafe fn encode(
78 self,
79 encoder: &mut fidl::encoding::Encoder<'_, D>,
80 offset: usize,
81 depth: fidl::encoding::Depth,
82 ) -> fidl::Result<()> {
83 encoder.debug_check_bounds::<ControllerUnmountRequest>(offset);
84 self.0.encode(encoder, offset + 0, depth)?;
88 Ok(())
89 }
90 }
91
92 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
93 for ControllerUnmountRequest
94 {
95 #[inline(always)]
96 fn new_empty() -> Self {
97 Self { name: fidl::new_empty!(fidl::encoding::BoundedString<255>, D) }
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::BoundedString<255>,
111 D,
112 &mut self.name,
113 decoder,
114 offset + 0,
115 _depth
116 )?;
117 Ok(())
118 }
119 }
120}