#[repr(u8)]pub enum Size {
Bit8 = 1,
Bit16 = 2,
Bit32 = 3,
Bit64 = 4,
}
Expand description
Represents all the sizes used by the project from the X64 instruction set.
Variants§
Implementations§
Source§impl Size
impl Size
pub const fn as_u8(self) -> u8
Sourcepub const unsafe fn from_u8_unchecked(index: u8) -> Self
pub const unsafe fn from_u8_unchecked(index: u8) -> Self
Creates a new Size
from a u8
index.
§Safety
The index must be in the range 1..=4
, otherwise the behavior is undefined.
Trait Implementations§
Source§impl Ord for Size
impl Ord for Size
Source§impl PartialOrd for Size
impl PartialOrd for Size
impl Copy for Size
impl Eq for Size
impl StructuralPartialEq for Size
Auto Trait Implementations§
impl Freeze for Size
impl RefUnwindSafe for Size
impl Send for Size
impl Sync for Size
impl Unpin for Size
impl UnwindSafe for Size
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