| // 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}, |
| encoding::{Decodable as _, Encodable as _}, |
| 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(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] |
| #[repr(u32)] |
| pub enum ObjType { |
| None = 0, |
| Vmo = 3, |
| } |
| fidl_strict_enum! { |
| name: ObjType, |
| prim_ty: u32, |
| members: [ |
| None { value: 0, }, |
| Vmo { value: 3, }, |
| ], |
| } |
| |
| #[derive(Debug, PartialEq)] |
| pub enum UnionWithHandle { |
| H(fidl::Vmo), |
| #[deprecated = "Use `UnionWithHandle::unknown()` to construct and `UnionWithHandleUnknown!()` to exhaustively match."] |
| #[doc(hidden)] |
| __Unknown { |
| ordinal: u64, |
| data: fidl::UnknownData, |
| }, |
| } |
| /// Pattern that matches an unknown UnionWithHandle member. |
| #[macro_export] |
| macro_rules! UnionWithHandleUnknown { |
| () => { |
| _ |
| }; |
| } |
| fidl_xunion! { |
| name: UnionWithHandle, |
| members: [ |
| H { |
| ty: fidl::Vmo, |
| ordinal: 1, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| ], |
| resource_unknown_member: __Unknown, |
| } |
| |
| #[derive(Debug, PartialEq)] |
| pub struct HandlesInTypes { |
| pub normal_handle: fidl::Vmo, |
| pub handle_in_vec: Vec<fidl::Vmo>, |
| pub handle_in_array: [fidl::Vmo; 5], |
| pub handle_in_mixed_vec_array: Vec<[fidl::Vmo; 5]>, |
| pub table_with_handle: TableWithHandle, |
| pub union_with_handle: UnionWithHandle, |
| } |
| |
| fidl_struct! { |
| name: HandlesInTypes, |
| members: [ |
| normal_handle { |
| ty: fidl::Vmo, |
| offset_v1: 0, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| handle_in_vec { |
| ty: Vec<fidl::Vmo>, |
| offset_v1: 8, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| handle_in_array { |
| ty: [fidl::Vmo; 5], |
| offset_v1: 24, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| handle_in_mixed_vec_array { |
| ty: Vec<[fidl::Vmo; 5]>, |
| offset_v1: 48, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| table_with_handle { |
| ty: TableWithHandle, |
| offset_v1: 64, |
| }, |
| union_with_handle { |
| ty: UnionWithHandle, |
| offset_v1: 80, |
| }, |
| ], |
| padding: [ |
| { |
| ty: u64, |
| offset: 0, |
| mask: 0xffffffff00000000u64, |
| }, |
| { |
| ty: u64, |
| offset: 40, |
| mask: 0xffffffff00000000u64, |
| },], |
| size_v1: 104, |
| align_v1: 8, |
| } |
| |
| #[derive(Debug, PartialEq)] |
| pub struct TableWithHandle { |
| pub h: Option<fidl::Vmo>, |
| /// (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, fidl::UnknownData>>, |
| #[deprecated = "Use `..TableWithHandle::EMPTY` to construct and `..` to match."] |
| #[doc(hidden)] |
| pub __non_exhaustive: (), |
| } |
| |
| fidl_table! { |
| name: TableWithHandle, |
| members: [ |
| h { |
| ty: fidl::Vmo, |
| ordinal: 1, |
| handle_metadata: { |
| handle_subtype: fidl::ObjectType::VMO, |
| handle_rights: fidl::Rights::from_bits_const(2147483648).unwrap(), |
| }, |
| }, |
| ], |
| resource_unknown_member: unknown_data, |
| } |