#[repr(C, align(8))]pub struct Word { /* private fields */ }
Expand description
8 bytes, aligned to an 8-byte boundary.
Internally, capnproto-rust allocates message buffers using this type, to guarantee alignment.
Implementations
sourceimpl Word
impl Word
sourcepub fn allocate_zeroed_vec(length: usize) -> Vec<Word>
pub fn allocate_zeroed_vec(length: usize) -> Vec<Word>
Does this, but faster: vec![word(0,0,0,0,0,0,0,0); length]
.
pub fn words_to_bytes<'a>(words: &'a [Word]) -> &'a [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn words_to_bytes_mut<'a>(words: &'a mut [Word]) -> &'a mut [u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Trait Implementations
impl Copy for Word
impl Eq for Word
impl StructuralEq for Word
impl StructuralPartialEq for Word
Auto Trait Implementations
impl RefUnwindSafe for Word
impl Send for Word
impl Sync for Word
impl Unpin for Word
impl UnwindSafe for Word
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more