fidl_fuchsia_test_intl_manager_common/
fidl_fuchsia_test_intl_manager_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, PartialEq)]
12pub struct PropertyManagerSetProfileRequest {
13 pub intl_profile: fidl_fuchsia_intl::Profile,
14}
15
16impl fidl::Persistable for PropertyManagerSetProfileRequest {}
17
18mod internal {
19 use super::*;
20
21 impl fidl::encoding::ValueTypeMarker for PropertyManagerSetProfileRequest {
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 PropertyManagerSetProfileRequest {
29 type Owned = Self;
30
31 #[inline(always)]
32 fn inline_align(_context: fidl::encoding::Context) -> usize {
33 8
34 }
35
36 #[inline(always)]
37 fn inline_size(_context: fidl::encoding::Context) -> usize {
38 16
39 }
40 }
41
42 unsafe impl<D: fidl::encoding::ResourceDialect>
43 fidl::encoding::Encode<PropertyManagerSetProfileRequest, D>
44 for &PropertyManagerSetProfileRequest
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::<PropertyManagerSetProfileRequest>(offset);
54 fidl::encoding::Encode::<PropertyManagerSetProfileRequest, D>::encode(
56 (<fidl_fuchsia_intl::Profile as fidl::encoding::ValueTypeMarker>::borrow(
57 &self.intl_profile,
58 ),),
59 encoder,
60 offset,
61 _depth,
62 )
63 }
64 }
65 unsafe impl<
66 D: fidl::encoding::ResourceDialect,
67 T0: fidl::encoding::Encode<fidl_fuchsia_intl::Profile, D>,
68 > fidl::encoding::Encode<PropertyManagerSetProfileRequest, D> for (T0,)
69 {
70 #[inline]
71 unsafe fn encode(
72 self,
73 encoder: &mut fidl::encoding::Encoder<'_, D>,
74 offset: usize,
75 depth: fidl::encoding::Depth,
76 ) -> fidl::Result<()> {
77 encoder.debug_check_bounds::<PropertyManagerSetProfileRequest>(offset);
78 self.0.encode(encoder, offset + 0, depth)?;
82 Ok(())
83 }
84 }
85
86 impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
87 for PropertyManagerSetProfileRequest
88 {
89 #[inline(always)]
90 fn new_empty() -> Self {
91 Self { intl_profile: fidl::new_empty!(fidl_fuchsia_intl::Profile, D) }
92 }
93
94 #[inline]
95 unsafe fn decode(
96 &mut self,
97 decoder: &mut fidl::encoding::Decoder<'_, D>,
98 offset: usize,
99 _depth: fidl::encoding::Depth,
100 ) -> fidl::Result<()> {
101 decoder.debug_check_bounds::<Self>(offset);
102 fidl::decode!(
104 fidl_fuchsia_intl::Profile,
105 D,
106 &mut self.intl_profile,
107 decoder,
108 offset + 0,
109 _depth
110 )?;
111 Ok(())
112 }
113 }
114}