pub struct Word(/* private fields */);Expand description
Describes the machine’s base type. Every base operation occurs on this type.
Implementations§
Source§impl Word
impl Word
Sourcepub const fn from_usize(value: usize) -> Self
pub const fn from_usize(value: usize) -> Self
Creates a new word from its 64 bits value.
Sourcepub const fn from_be_bytes(value: [u8; 8]) -> Self
pub const fn from_be_bytes(value: [u8; 8]) -> Self
Create a native endian integer value from its representation as a byte array in big endian.
Sourcepub const fn merge(top: HalfWord, bottom: HalfWord) -> Self
pub const fn merge(top: HalfWord, bottom: HalfWord) -> Self
Creates a new word from two half-words.
Sourcepub const fn to_be_bytes(&self) -> [u8; 8]
pub const fn to_be_bytes(&self) -> [u8; 8]
Return the memory representation of this integer as a byte array in big-endian (network) byte order.
Sourcepub const fn split(&self) -> [HalfWord; 2]
pub const fn split(&self) -> [HalfWord; 2]
Returns two 32 bits half-words splitting the 64 bits word.
Trait Implementations§
Source§impl Ord for Word
impl Ord for Word
Source§impl PartialOrd for Word
impl PartialOrd for Word
Source§impl ProduceConsume<Word> for WordQueue
impl ProduceConsume<Word> for WordQueue
Source§impl ProduceConsume<Word> for WordStack
impl ProduceConsume<Word> for WordStack
impl Copy for Word
impl Eq for Word
impl StructuralPartialEq for Word
Auto Trait Implementations§
impl Freeze for Word
impl RefUnwindSafe for Word
impl Send for Word
impl Sync for Word
impl Unpin for Word
impl UnwindSafe for Word
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