Enum EnumUint8
#[repr(u8)]pub enum EnumUint8 {
Member = 8,
}
Variants§
Member = 8
Implementations§
§impl EnumUint8
impl EnumUint8
pub fn from_primitive(prim: u8) -> Option<EnumUint8>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl<D> Decode<EnumUint8, D> for EnumUint8where
D: ResourceDialect,
impl<D> Decode<EnumUint8, D> for EnumUint8where
D: ResourceDialect,
§impl<D> Encode<EnumUint8, D> for EnumUint8where
D: ResourceDialect,
impl<D> Encode<EnumUint8, D> for EnumUint8where
D: ResourceDialect,
§impl Ord for EnumUint8
impl Ord for EnumUint8
§impl PartialOrd for EnumUint8
impl PartialOrd for EnumUint8
§impl TypeMarker for EnumUint8
impl TypeMarker for EnumUint8
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned
to a single memcpy. Read more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
Self::Owned
matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned
to a single memcpy.§impl ValueTypeMarker for EnumUint8
impl ValueTypeMarker for EnumUint8
§type Borrowed<'a> = EnumUint8
type Borrowed<'a> = EnumUint8
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<EnumUint8 as TypeMarker>::Owned,
) -> <EnumUint8 as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<EnumUint8 as TypeMarker>::Owned, ) -> <EnumUint8 as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for EnumUint8
impl Eq for EnumUint8
impl StructuralPartialEq for EnumUint8
Auto Trait Implementations§
impl Freeze for EnumUint8
impl RefUnwindSafe for EnumUint8
impl Send for EnumUint8
impl Sync for EnumUint8
impl Unpin for EnumUint8
impl UnwindSafe for EnumUint8
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more