fidl_cf_sc_internal_cpumanagerconfiglib/
fidl_cf_sc_internal_cpumanagerconfiglib.rs1#![warn(clippy::all)]
4#![allow(unused_parens, unused_mut, unused_imports, nonstandard_style)]
5
6use bitflags::bitflags;
7use fidl::client::QueryResponseFut;
8use fidl::encoding::{MessageBufFor, ProxyChannelBox, ResourceDialect};
9use fidl::endpoints::{ControlHandle as _, Responder as _};
10use futures::future::{self, MaybeDone, TryFutureExt};
11use zx_status;
12
13#[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
14pub struct Config {
15 pub node_config_path: String,
16}
17
18impl fidl::Persistable for Config {}
19
20mod internal {
21 use super::*;
22
23 impl fidl::encoding::ValueTypeMarker for Config {
24 type Borrowed<'a> = &'a Self;
25 fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
26 value
27 }
28 }
29
30 unsafe impl fidl::encoding::TypeMarker for Config {
31 type Owned = Self;
32
33 #[inline(always)]
34 fn inline_align(_context: fidl::encoding::Context) -> usize {
35 8
36 }
37
38 #[inline(always)]
39 fn inline_size(_context: fidl::encoding::Context) -> usize {
40 16
41 }
42 }
43
44 unsafe impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Encode<Config, D> for &Config {
45 #[inline]
46 unsafe fn encode(
47 self,
48 encoder: &mut fidl::encoding::Encoder<'_, D>,
49 offset: usize,
50 _depth: fidl::encoding::Depth,
51 ) -> fidl::Result<()> {
52 encoder.debug_check_bounds::<Config>(offset);
53 fidl::encoding::Encode::<Config, D>::encode(
55 (<fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(
56 &self.node_config_path,
57 ),),
58 encoder,
59 offset,
60 _depth,
61 )
62 }
63 }
64 unsafe impl<
65 D: fidl::encoding::ResourceDialect,
66 T0: fidl::encoding::Encode<fidl::encoding::BoundedString<128>, D>,
67 > fidl::encoding::Encode<Config, D> for (T0,)
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::<Config>(offset);
77 self.0.encode(encoder, offset + 0, depth)?;
81 Ok(())
82 }
83 }
84
85 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D> for Config {
86 #[inline(always)]
87 fn new_empty() -> Self {
88 Self { node_config_path: fidl::new_empty!(fidl::encoding::BoundedString<128>, D) }
89 }
90
91 #[inline]
92 unsafe fn decode(
93 &mut self,
94 decoder: &mut fidl::encoding::Decoder<'_, D>,
95 offset: usize,
96 _depth: fidl::encoding::Depth,
97 ) -> fidl::Result<()> {
98 decoder.debug_check_bounds::<Self>(offset);
99 fidl::decode!(
101 fidl::encoding::BoundedString<128>,
102 D,
103 &mut self.node_config_path,
104 decoder,
105 offset + 0,
106 _depth
107 )?;
108 Ok(())
109 }
110 }
111}