blob: bd1165bad142f467591852079a5996921f77da27 [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
)]
#[cfg(target_os = "fuchsia")]
#[allow(unused_imports)]
use fuchsia_zircon as zx;
#[allow(unused_imports)]
use fuchsia_zircon_status as zx_status;
#[allow(unused_imports)]
use fidl::{
fidl_bits,
fidl_enum,
fidl_empty_struct,
fidl_struct,
fidl_table,
fidl_xunion,
};
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: PizzaOrPasta,
members: [
Pizza {
ty: Pizza,
ordinal: 1,
},
Pasta {
ty: Pasta,
ordinal: 2,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: ExplicitPizzaOrPasta,
members: [
Pizza {
ty: Pizza,
ordinal: 1,
},
Pasta {
ty: Pasta,
ordinal: 4,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: FlexiblePizzaOrPasta,
members: [
Pizza {
ty: Pizza,
ordinal: 1,
},
Pasta {
ty: Pasta,
ordinal: 2,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: StrictPizzaOrPasta,
members: [
Pizza {
ty: Pizza,
ordinal: 1,
},
Pasta {
ty: Pasta,
ordinal: 2,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: Union,
members: [
Primitive {
ty: i32,
ordinal: 1,
},
StringNeedsConstructor {
ty: String,
ordinal: 2,
},
VectorStringAlsoNeedsConstructor {
ty: Vec<String>,
ordinal: 3,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: FlexibleUnion,
members: [
Primitive {
ty: i32,
ordinal: 1,
},
StringNeedsConstructor {
ty: String,
ordinal: 2,
},
VectorStringAlsoNeedsConstructor {
ty: Vec<String>,
ordinal: 3,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: StrictUnion,
members: [
Primitive {
ty: i32,
ordinal: 1,
},
StringNeedsConstructor {
ty: String,
ordinal: 2,
},
VectorStringAlsoNeedsConstructor {
ty: Vec<String>,
ordinal: 3,
},
],
}
fidl_xunion! {
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: FieldCollision,
members: [
FieldCollisionTag {
ty: i32,
ordinal: 1,
},
],
}
fidl_xunion! {
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: ExplicitUnion,
members: [
Primitive {
ty: i32,
ordinal: 1,
},
StringNeedsConstructor {
ty: String,
ordinal: 3,
},
],
}
fidl_xunion! {
#[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
name: ReverseOrdinalUnion,
members: [
First {
ty: u32,
ordinal: 1,
},
Second {
ty: u32,
ordinal: 2,
},
],
}
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Pizza {
pub toppings: Vec<String>,
}
fidl_struct! {
name: Pizza,
members: [
toppings {
ty: Vec<String>,
offset_v1: 0,
},
],
size_v1: 16,
align_v1: 8,
}
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct Pasta {
pub sauce: String,
}
fidl_struct! {
name: Pasta,
members: [
sauce {
ty: String,
offset_v1: 0,
},
],
size_v1: 16,
align_v1: 8,
}
#[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)]
pub struct NullableUnionStruct {
pub the_union: Option<Box<Union>>,
}
fidl_struct! {
name: NullableUnionStruct,
members: [
the_union {
ty: Option<Box<Union>>,
offset_v1: 0,
},
],
size_v1: 24,
align_v1: 8,
}