Struct capnp::Word [] [src]

pub struct Word {
    // some 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

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

Derived Implementations

impl Eq for Word

impl PartialEq for Word

fn eq(&self, __arg_0: &Word) -> bool

fn ne(&self, __arg_0: &Word) -> bool

impl Debug for Word

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Copy for Word

impl Clone for Word

fn clone(&self) -> Word

1.0.0fn clone_from(&mut self, source: &Self)