#[repr(u8)]pub enum EnumFlag {
Flag1 = 1,
Flag2 = 2,
Flag3 = 4,
Flag4 = 8,
}Expand description
A bit-mapped representation of allowed flags.
Using #[repr(u8)] ensures the compiler treats these variants as
specific numerical values during casting.
Variants§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EnumFlag
impl RefUnwindSafe for EnumFlag
impl Send for EnumFlag
impl Sync for EnumFlag
impl Unpin for EnumFlag
impl UnwindSafe for EnumFlag
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