#[repr(C)]pub enum EnumRepr {
Rust = 0,
RustNPO = 1,
U8 = 2,
U16 = 3,
U32 = 4,
U64 = 5,
USize = 6,
I8 = 7,
I16 = 8,
I32 = 9,
I64 = 10,
ISize = 11,
}Expand description
All possible representations for Rust enums — ie. the type/size of the discriminant
Variants§
Rust = 0
Default Rust enum representation with unspecified discriminant layout.
The compiler chooses the discriminant size and layout as an implementation detail. Reflection operations that require knowing the discriminant layout will fail for enums with this repr.
RustNPO = 1
Special-case representation discriminated by zeros under non-nullable pointer
U8 = 2
u8 representation (#[repr(u8)])
U16 = 3
u16 representation (#[repr(u16)])
U32 = 4
u32 representation (#[repr(u32)])
U64 = 5
u64 representation (#[repr(u64)])
USize = 6
usize representation (#[repr(usize)])
I8 = 7
i8 representation (#[repr(i8)])
I16 = 8
i16 representation (#[repr(i16)])
I32 = 9
i32 representation (#[repr(i32)])
I64 = 10
i64 representation (#[repr(i64)])
ISize = 11
isize representation (#[repr(isize)])
Implementations§
Trait Implementations§
impl Copy for EnumRepr
impl Eq for EnumRepr
impl StructuralPartialEq for EnumRepr
Auto Trait Implementations§
impl Freeze for EnumRepr
impl RefUnwindSafe for EnumRepr
impl Send for EnumRepr
impl Sync for EnumRepr
impl Unpin for EnumRepr
impl UnsafeUnpin for EnumRepr
impl UnwindSafe for EnumRepr
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