blob: a03f6e164a23ef4c2c071fc83f294b514779110f [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
#![allow(
deprecated, // FIDL Impl struct pattern is referenced internally
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},
fidl_empty_struct, fidl_flexible_bits, fidl_flexible_enum, fidl_strict_bits,
fidl_strict_enum, fidl_struct, fidl_struct_copy, fidl_table, fidl_xunion,
wrap_handle_metadata,
},
fuchsia_zircon_status as zx_status,
futures::future::{self, MaybeDone, TryFutureExt},
};
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(C)]
pub struct Int8Int32 {
pub a: i8,
pub b: i32,
}
fidl_struct_copy! {
name: Int8Int32,
members: [
a {
ty: i8,
offset_v1: 0,
},
b {
ty: i32,
offset_v1: 4,
},
],
padding: [
{
ty: u64,
offset: 0,
mask: 0x00000000ffffff00u64,
},],
size_v1: 8,
align_v1: 4,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(C)]
pub struct Int16Int8 {
pub a: i16,
pub b: i8,
}
fidl_struct_copy! {
name: Int16Int8,
members: [
a {
ty: i16,
offset_v1: 0,
},
b {
ty: i8,
offset_v1: 2,
},
],
padding: [
{
ty: u32,
offset: 0,
mask: 0xff000000u32,
},],
size_v1: 4,
align_v1: 2,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(C)]
pub struct ArrayInt16Int8 {
pub arr: [Int16Int8; 3],
}
fidl_struct_copy! {
name: ArrayInt16Int8,
members: [
arr {
ty: [Int16Int8; 3],
offset_v1: 0,
},
],
padding: [
{
ty: u64,
offset: 0,
mask: 0xff000000ff000000u64,
},
{
ty: u32,
offset: 8,
mask: 0xff000000u32,
},],
size_v1: 12,
align_v1: 2,
}
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(C)]
pub struct StructPaddingTestStruct {
pub trailing: Int16Int8,
pub inner: Int8Int32,
pub array: ArrayInt16Int8,
}
fidl_struct_copy! {
name: StructPaddingTestStruct,
members: [
trailing {
ty: Int16Int8,
offset_v1: 0,
},
inner {
ty: Int8Int32,
offset_v1: 4,
},
array {
ty: ArrayInt16Int8,
offset_v1: 12,
},
],
padding: [
{
ty: u64,
offset: 0,
mask: 0xffffff00ff000000u64,
},
{
ty: u64,
offset: 8,
mask: 0xff00000000000000u64,
},
{
ty: u64,
offset: 16,
mask: 0xff000000ff000000u64,
},],
size_v1: 24,
align_v1: 4,
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct NonInlineStructTestStruct {
pub element: Option<Box<Int16Int8>>,
pub h: fidl::Handle,
}
fidl_struct! {
name: NonInlineStructTestStruct,
members: [
element {
ty: Option<Box<Int16Int8>>,
offset_v1: 0,
},
h {
ty: fidl::Handle,
offset_v1: 8,
handle_metadata: {
handle_subtype: fidl::ObjectType::NONE,
handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(),
},
},
],
padding: [
{
ty: u64,
offset: 8,
mask: 0xffffffff00000000u64,
},],
size_v1: 16,
align_v1: 8,
}
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct TopLevelStruct {
pub a: StructPaddingTestStruct,
pub b: NonInlineStructTestStruct,
}
fidl_struct! {
name: TopLevelStruct,
members: [
a {
ty: StructPaddingTestStruct,
offset_v1: 0,
},
b {
ty: NonInlineStructTestStruct,
offset_v1: 24,
},
],
padding: [],
size_v1: 40,
align_v1: 8,
}