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§
Source§impl Ord for HalfWord
impl Ord for HalfWord
Source§impl PartialOrd for HalfWord
impl PartialOrd for HalfWord
impl Copy for HalfWord
impl Eq 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 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