pub struct HalfWord(/* private fields */);Expand description
Describes a half-word. This type is the half of the size of Word.
Implementations§
Source§impl HalfWord
impl HalfWord
Sourcepub const fn with(self, other: HalfWord) -> Word
pub const fn with(self, other: HalfWord) -> Word
Merges the current HalfWord with another into a whole Word.
The current half-word is the top of the new word while other is the bottom.
§Example
use osiris_data::data::atomic::{HalfWord, Word};
let top = HalfWord::default();
let bottom = HalfWord::default();
let whole: Word = top.with(bottom);
let [top, bottom] = whole.split();
let whole = Word::merge(top, bottom);Trait Implementations§
impl Copy for HalfWord
impl Eq for HalfWord
Source§impl Ord for HalfWord
impl Ord for HalfWord
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for HalfWord
impl PartialOrd for HalfWord
impl StructuralPartialEq for HalfWord
Auto Trait Implementations§
impl Freeze for HalfWord
impl RefUnwindSafe for HalfWord
impl Send for HalfWord
impl Sync for HalfWord
impl Unpin for HalfWord
impl UnsafeUnpin for HalfWord
impl UnwindSafe for HalfWord
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