fidl_fuchsia_update_channel_common/
fidl_fuchsia_update_channel_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 ProviderGetCurrentResponse {
13 pub channel: String,
14}
15
16impl fidl::Persistable for ProviderGetCurrentResponse {}
17
18mod internal {
19 use super::*;
20
21 impl fidl::encoding::ValueTypeMarker for ProviderGetCurrentResponse {
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 ProviderGetCurrentResponse {
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<ProviderGetCurrentResponse, D> for &ProviderGetCurrentResponse
44 {
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::<ProviderGetCurrentResponse>(offset);
53 fidl::encoding::Encode::<ProviderGetCurrentResponse, D>::encode(
55 (<fidl::encoding::BoundedString<128> as fidl::encoding::ValueTypeMarker>::borrow(
56 &self.channel,
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<ProviderGetCurrentResponse, 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::<ProviderGetCurrentResponse>(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>
86 for ProviderGetCurrentResponse
87 {
88 #[inline(always)]
89 fn new_empty() -> Self {
90 Self { channel: fidl::new_empty!(fidl::encoding::BoundedString<128>, D) }
91 }
92
93 #[inline]
94 unsafe fn decode(
95 &mut self,
96 decoder: &mut fidl::encoding::Decoder<'_, D>,
97 offset: usize,
98 _depth: fidl::encoding::Depth,
99 ) -> fidl::Result<()> {
100 decoder.debug_check_bounds::<Self>(offset);
101 fidl::decode!(
103 fidl::encoding::BoundedString<128>,
104 D,
105 &mut self.channel,
106 decoder,
107 offset + 0,
108 _depth
109 )?;
110 Ok(())
111 }
112 }
113}