Struct capnp::Word
[−]
[src]
#[repr(C)]pub struct Word { /* fields omitted */ }
Eight bytes of memory with opaque interior. Use capnp_word!()
to construct one of these.
This type is used to ensure that the data of a message is properly aligned.
Methods
impl Word
[src]
fn allocate_zeroed_vec(length: usize) -> Vec<Word>
Does this, but faster:
::std::iter::repeat(Word(0)).take(length).collect()
fn bytes_to_words<'a>(bytes: &'a [u8]) -> &'a [Word]
fn bytes_to_words_mut<'a>(bytes: &'a mut [u8]) -> &'a mut [Word]
fn words_to_bytes<'a>(words: &'a [Word]) -> &'a [u8]
fn words_to_bytes_mut<'a>(words: &'a mut [Word]) -> &'a mut [u8]
Trait Implementations
impl Clone for Word
[src]
fn clone(&self) -> Word
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for Word
[src]
impl Debug for Word
[src]
impl PartialEq for Word
[src]
fn eq(&self, __arg_0: &Word) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Word) -> bool
This method tests for !=
.