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
18pub mod session_manager_ordinals {
19 pub const CREATE_SESSION: u64 = 0x70a8a74a19cc4b52;
20 pub const HAS_PRIMARY_CONNECTED: u64 = 0x723fdb4c1469fa36;
21}
22
23mod internal {
24 use super::*;
25
26 impl fidl::encoding::ValueTypeMarker for SessionManagerHasPrimaryConnectedResponse {
27 type Borrowed<'a> = &'a Self;
28 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
29 value
30 }
31 }
32
33 unsafe impl fidl::encoding::TypeMarker for SessionManagerHasPrimaryConnectedResponse {
34 type Owned = Self;
35
36 #[inline(always)]
37 fn inline_align(_context: fidl::encoding::Context) -> usize {
38 1
39 }
40
41 #[inline(always)]
42 fn inline_size(_context: fidl::encoding::Context) -> usize {
43 1
44 }
45 }
46
47 unsafe impl<D: fidl::encoding::ResourceDialect>
48 fidl::encoding::Encode<SessionManagerHasPrimaryConnectedResponse, D>
49 for &SessionManagerHasPrimaryConnectedResponse
50 {
51 #[inline]
52 unsafe fn encode(
53 self,
54 encoder: &mut fidl::encoding::Encoder<'_, D>,
55 offset: usize,
56 _depth: fidl::encoding::Depth,
57 ) -> fidl::Result<()> {
58 encoder.debug_check_bounds::<SessionManagerHasPrimaryConnectedResponse>(offset);
59 fidl::encoding::Encode::<SessionManagerHasPrimaryConnectedResponse, D>::encode(
61 (<bool as fidl::encoding::ValueTypeMarker>::borrow(&self.connected),),
62 encoder,
63 offset,
64 _depth,
65 )
66 }
67 }
68 unsafe impl<D: fidl::encoding::ResourceDialect, T0: fidl::encoding::Encode<bool, D>>
69 fidl::encoding::Encode<SessionManagerHasPrimaryConnectedResponse, 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::<SessionManagerHasPrimaryConnectedResponse>(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 SessionManagerHasPrimaryConnectedResponse
89 {
90 #[inline(always)]
91 fn new_empty() -> Self {
92 Self { connected: fidl::new_empty!(bool, 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!(bool, D, &mut self.connected, decoder, offset + 0, _depth)?;
105 Ok(())
106 }
107 }
108}