#[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 &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
pub fn words_to_bytes_mut<'a>(words: &'a mut [Word]) -> &'a mut [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more