fidl_fuchsia_testing_sl4f__common/
fidl_fuchsia_testing_sl4f__common.rs

1// WARNING: This file is machine generated by fidlgen.
2
3#![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 FacadeIteratorGetNextResponse {
13    pub facades: Vec<String>,
14}
15
16impl fidl::Persistable for FacadeIteratorGetNextResponse {}
17
18pub mod facade_iterator_ordinals {
19    pub const GET_NEXT: u64 = 0x1d22c13a17449134;
20}
21
22pub mod facade_provider_ordinals {
23    pub const GET_FACADES: u64 = 0xe3f63eb545df361;
24    pub const EXECUTE: u64 = 0x7d6de537b3caf392;
25    pub const CLEANUP: u64 = 0x3d3accf7ad309712;
26    pub const PRINT: u64 = 0x3e8853ac2d3a18d7;
27}
28
29mod internal {
30    use super::*;
31
32    impl fidl::encoding::ValueTypeMarker for FacadeIteratorGetNextResponse {
33        type Borrowed<'a> = &'a Self;
34        fn borrow(value: &<Self as fidl::encoding::TypeMarker>::Owned) -> Self::Borrowed<'_> {
35            value
36        }
37    }
38
39    unsafe impl fidl::encoding::TypeMarker for FacadeIteratorGetNextResponse {
40        type Owned = Self;
41
42        #[inline(always)]
43        fn inline_align(_context: fidl::encoding::Context) -> usize {
44            8
45        }
46
47        #[inline(always)]
48        fn inline_size(_context: fidl::encoding::Context) -> usize {
49            16
50        }
51    }
52
53    unsafe impl<D: fidl::encoding::ResourceDialect>
54        fidl::encoding::Encode<FacadeIteratorGetNextResponse, D>
55        for &FacadeIteratorGetNextResponse
56    {
57        #[inline]
58        unsafe fn encode(
59            self,
60            encoder: &mut fidl::encoding::Encoder<'_, D>,
61            offset: usize,
62            _depth: fidl::encoding::Depth,
63        ) -> fidl::Result<()> {
64            encoder.debug_check_bounds::<FacadeIteratorGetNextResponse>(offset);
65            // Delegate to tuple encoding.
66            fidl::encoding::Encode::<FacadeIteratorGetNextResponse, D>::encode(
67                (
68                    <fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString> as fidl::encoding::ValueTypeMarker>::borrow(&self.facades),
69                ),
70                encoder, offset, _depth
71            )
72        }
73    }
74    unsafe impl<
75            D: fidl::encoding::ResourceDialect,
76            T0: fidl::encoding::Encode<
77                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
78                D,
79            >,
80        > fidl::encoding::Encode<FacadeIteratorGetNextResponse, D> for (T0,)
81    {
82        #[inline]
83        unsafe fn encode(
84            self,
85            encoder: &mut fidl::encoding::Encoder<'_, D>,
86            offset: usize,
87            depth: fidl::encoding::Depth,
88        ) -> fidl::Result<()> {
89            encoder.debug_check_bounds::<FacadeIteratorGetNextResponse>(offset);
90            // Zero out padding regions. There's no need to apply masks
91            // because the unmasked parts will be overwritten by fields.
92            // Write the fields.
93            self.0.encode(encoder, offset + 0, depth)?;
94            Ok(())
95        }
96    }
97
98    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
99        for FacadeIteratorGetNextResponse
100    {
101        #[inline(always)]
102        fn new_empty() -> Self {
103            Self {
104                facades: fidl::new_empty!(
105                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
106                    D
107                ),
108            }
109        }
110
111        #[inline]
112        unsafe fn decode(
113            &mut self,
114            decoder: &mut fidl::encoding::Decoder<'_, D>,
115            offset: usize,
116            _depth: fidl::encoding::Depth,
117        ) -> fidl::Result<()> {
118            decoder.debug_check_bounds::<Self>(offset);
119            // Verify that padding bytes are zero.
120            fidl::decode!(
121                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
122                D,
123                &mut self.facades,
124                decoder,
125                offset + 0,
126                _depth
127            )?;
128            Ok(())
129        }
130    }
131}