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<fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>, D>,
77    > fidl::encoding::Encode<FacadeIteratorGetNextResponse, D> for (T0,)
78    {
79        #[inline]
80        unsafe fn encode(
81            self,
82            encoder: &mut fidl::encoding::Encoder<'_, D>,
83            offset: usize,
84            depth: fidl::encoding::Depth,
85        ) -> fidl::Result<()> {
86            encoder.debug_check_bounds::<FacadeIteratorGetNextResponse>(offset);
87            // Zero out padding regions. There's no need to apply masks
88            // because the unmasked parts will be overwritten by fields.
89            // Write the fields.
90            self.0.encode(encoder, offset + 0, depth)?;
91            Ok(())
92        }
93    }
94
95    impl<D: fidl::encoding::ResourceDialect> fidl::encoding::Decode<Self, D>
96        for FacadeIteratorGetNextResponse
97    {
98        #[inline(always)]
99        fn new_empty() -> Self {
100            Self {
101                facades: fidl::new_empty!(
102                    fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
103                    D
104                ),
105            }
106        }
107
108        #[inline]
109        unsafe fn decode(
110            &mut self,
111            decoder: &mut fidl::encoding::Decoder<'_, D>,
112            offset: usize,
113            _depth: fidl::encoding::Depth,
114        ) -> fidl::Result<()> {
115            decoder.debug_check_bounds::<Self>(offset);
116            // Verify that padding bytes are zero.
117            fidl::decode!(
118                fidl::encoding::UnboundedVector<fidl::encoding::UnboundedString>,
119                D,
120                &mut self.facades,
121                decoder,
122                offset + 0,
123                _depth
124            )?;
125            Ok(())
126        }
127    }
128}