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