blob: c24aa1a10582796748668e054214fb96c8e48b77 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#![allow(
unused_parens, // one-element-tuple-case is not a tuple
unused_mut, // not all args require mutation, but many do
nonstandard_style, // auto-caps does its best, but is not always successful
)]
#![recursion_limit = "512"]
#[cfg(target_os = "fuchsia")]
#[allow(unused_imports)]
use fuchsia_zircon as zx;
#[allow(unused_imports)]
use {
bitflags::bitflags,
fidl::{
client::{decode_transaction_body_fut, QueryResponseFut},
encoding::{Decodable as _, Encodable as _},
endpoints::{ControlHandle as _, Responder as _},
fidl_bits, fidl_empty_struct, fidl_enum, fidl_struct, fidl_struct_copy, fidl_table,
fidl_union, wrap_handle_metadata,
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum UnionLargeArray {
A([u32; 100]),
}
impl UnionLargeArray {
#[deprecated = "Strict unions should not use `validate`"]
#[inline]
pub fn validate(self) -> std::result::Result<Self, (u64, Vec<u8>)> {
Ok(self)
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::encoding::Persistable for UnionLargeArray {}
fidl_union! {
name: UnionLargeArray,
members: [
A {
ty: [u32; 100],
ordinal: 1,
},
],
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub enum UnionSmallArray {
A([u32; 2]),
}
impl UnionSmallArray {
#[deprecated = "Strict unions should not use `validate`"]
#[inline]
pub fn validate(self) -> std::result::Result<Self, (u64, Vec<u8>)> {
Ok(self)
}
#[deprecated = "Strict unions should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
impl fidl::encoding::Persistable for UnionSmallArray {}
fidl_union! {
name: UnionSmallArray,
members: [
A {
ty: [u32; 2],
ordinal: 1,
},
],
}
#[derive(
Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, zerocopy::AsBytes, zerocopy::FromBytes,
)]
#[repr(C)]
pub struct StructLargeArray {
pub a: [u32; 100],
}
impl fidl::encoding::Persistable for StructLargeArray {}
fidl_struct_copy! {
name: StructLargeArray,
members: [
a {
ty: [u32; 100],
offset_v1: 0,
offset_v2: 0,
},
],
padding_v1: [],
padding_v2: [],
size_v1: 400,
size_v2: 400,
align_v1: 4,
align_v2: 4,
}
#[derive(
Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, zerocopy::AsBytes, zerocopy::FromBytes,
)]
#[repr(C)]
pub struct StructSmallArray {
pub a: [u32; 2],
}
impl fidl::encoding::Persistable for StructSmallArray {}
fidl_struct_copy! {
name: StructSmallArray,
members: [
a {
ty: [u32; 2],
offset_v1: 0,
offset_v2: 0,
},
],
padding_v1: [],
padding_v2: [],
size_v1: 8,
size_v2: 8,
align_v1: 4,
align_v2: 4,
}
#[derive(Debug, Clone, PartialEq)]
pub struct TableLargeArray {
pub a: Option<[u32; 100]>,
/// (FIDL-generated) Unknown fields encountered during decoding, stored as a
/// map from ordinals to raw data. The `Some` case is always nonempty.
pub unknown_data: Option<std::collections::BTreeMap<u64, Vec<u8>>>,
#[deprecated = "Use `..TableLargeArray::EMPTY` to construct and `..` to match."]
#[doc(hidden)]
pub __non_exhaustive: (),
}
impl TableLargeArray {
/// An empty table with every field set to `None`.
#[allow(deprecated)]
pub const EMPTY: Self = Self { a: None, unknown_data: None, __non_exhaustive: () };
}
impl fidl::encoding::Persistable for TableLargeArray {}
fidl_table! {
name: TableLargeArray,
members: [
a {
ty: [u32; 100],
ordinal: 1,
},
],
value_unknown_member: unknown_data,
}
#[derive(Debug, Clone, PartialEq)]
pub struct TableSmallArray {
pub a: Option<[u32; 2]>,
/// (FIDL-generated) Unknown fields encountered during decoding, stored as a
/// map from ordinals to raw data. The `Some` case is always nonempty.
pub unknown_data: Option<std::collections::BTreeMap<u64, Vec<u8>>>,
#[deprecated = "Use `..TableSmallArray::EMPTY` to construct and `..` to match."]
#[doc(hidden)]
pub __non_exhaustive: (),
}
impl TableSmallArray {
/// An empty table with every field set to `None`.
#[allow(deprecated)]
pub const EMPTY: Self = Self { a: None, unknown_data: None, __non_exhaustive: () };
}
impl fidl::encoding::Persistable for TableSmallArray {}
fidl_table! {
name: TableSmallArray,
members: [
a {
ty: [u32; 2],
ordinal: 1,
},
],
value_unknown_member: unknown_data,
}