blob: 14906d928f0e5e94ea2b965c1c81b7ef9a3ee276 [file] [log] [blame] [edit]
// 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},
};
bitflags! {
pub struct BitsType: u32 {
const VALUE = 1;
const TRUE_ = 2;
}
}
impl BitsType {
#[deprecated = "Strict bits should not use `has_unknown_bits`"]
#[inline(always)]
pub fn has_unknown_bits(&self) -> bool {
false
}
#[deprecated = "Strict bits should not use `get_unknown_bits`"]
#[inline(always)]
pub fn get_unknown_bits(&self) -> u32 {
0
}
}
fidl_bits! {
name: BitsType,
prim_ty: u32,
strict: true,
}
pub const ANSWER: u16 = 42;
pub const ANSWER_IN_BINARY: u16 = 42;
pub const CONVERSION_FACTOR: f64 = 1.41421;
pub const DIAMOND: u64 = 1746410393481133080;
pub const ENABLED_FLAG: bool = true;
pub const FUCHSIA: u64 = 4054509061583223046;
pub const MIN_TEMP: f32 = -273.15;
pub const OFFSET: i8 = -33;
pub const POPULATION_USA_2018: u32 = 330000000;
pub const USERNAME: &str = r###""squeenze""###;
pub const ZX_CONST: u64 = fidl_zx::CHANNEL_MAX_MSG_BYTES;
pub const ZX_OBJ_VAL: fidl_zx::ObjType = fidl_zx::ObjType::Channel;
pub const ZX_RIGHTS_VAL: fidl_zx::Rights = fidl_zx::Rights::READ;
pub const BITS_PRIMITIVE_TRUE: u32 = BitsType::TRUE_.bits();
pub const BITS_PRIMITIVE_VAL: u32 = BitsType::VALUE.bits();
pub const BITS_TRUE: BitsType = BitsType::TRUE_;
pub const BITS_VAL: BitsType = BitsType::VALUE;
pub const ENUM_PRIMITIVE_TRUE: i32 = EnumType::True_.into_primitive();
pub const ENUM_PRIMITIVE_VAL: i32 = EnumType::Value.into_primitive();
pub const ENUM_TRUE: EnumType = EnumType::True_;
pub const ENUM_VAL: EnumType = EnumType::Value;
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)]
#[repr(i32)]
pub enum EnumType {
Value = 1,
True_ = 2,
}
impl EnumType {
#[inline]
pub fn from_primitive(prim: i32) -> Option<Self> {
match prim {
1 => Some(Self::Value),
2 => Some(Self::True_),
_ => None,
}
}
#[inline]
pub const fn into_primitive(self) -> i32 {
self as i32
}
#[deprecated = "Strict enums should not use `validate`"]
#[inline]
pub fn validate(self) -> std::result::Result<Self, i32> {
Ok(self)
}
#[deprecated = "Strict enums should not use `is_unknown`"]
#[inline]
pub fn is_unknown(&self) -> bool {
false
}
}
fidl_enum! {
name: EnumType,
prim_ty: i32,
strict: true,
min_member: Value,
}