| // 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: Union, |
| members: [ |
| Primitive { |
| ty: i32, |
| ordinal: 1, |
| explicit_ordinal: 1, |
| hashed_ordinal: 1, |
| }, |
| StringNeedsConstructor { |
| ty: String, |
| ordinal: 2, |
| explicit_ordinal: 2, |
| hashed_ordinal: 2, |
| }, |
| VectorStringAlsoNeedsConstructor { |
| ty: Vec<String>, |
| ordinal: 3, |
| explicit_ordinal: 3, |
| hashed_ordinal: 3, |
| }, |
| ], |
| } |
| |
| fidl_xunion! { |
| #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] |
| name: FieldCollision, |
| members: [ |
| FieldCollisionTag { |
| ty: i32, |
| ordinal: 1, |
| explicit_ordinal: 1, |
| hashed_ordinal: 1, |
| }, |
| ], |
| } |
| |
| fidl_xunion! { |
| #[derive(Debug, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] |
| name: ExplicitUnion, |
| members: [ |
| Primitive { |
| ty: i32, |
| ordinal: 1, |
| explicit_ordinal: 1, |
| hashed_ordinal: 1, |
| }, |
| StringNeedsConstructor { |
| ty: String, |
| ordinal: 3, |
| explicit_ordinal: 3, |
| hashed_ordinal: 3, |
| }, |
| ], |
| } |
| |
| fidl_xunion! { |
| #[derive(Debug, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash)] |
| name: ReverseOrdinalUnion, |
| members: [ |
| First { |
| ty: u32, |
| ordinal: 1, |
| explicit_ordinal: 1, |
| hashed_ordinal: 1, |
| }, |
| Second { |
| ty: u32, |
| ordinal: 2, |
| explicit_ordinal: 2, |
| hashed_ordinal: 2, |
| }, |
| ], |
| } |
| |
| #[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, |
| } |