pub trait WordRead {
    // Required methods
    fn read_words(&mut self, words: &mut [u32]) -> Result<()>;
    fn read_padded_bytes(&mut self, bytes: &mut [u8]) -> Result<()>;
}
Expand description

A reader for reading streams with serialized word-based data

Required Methods§

source

fn read_words(&mut self, words: &mut [u32]) -> Result<()>

Fill the given buffer with words from input. Returns an error if EOF was encountered.

source

fn read_padded_bytes(&mut self, bytes: &mut [u8]) -> Result<()>

Fill the given buffer with bytes from input, and discard the padding up to the next word boundary. Returns an error if EOF was encountered.

Implementations on Foreign Types§

source§

impl WordRead for &[u32]

source§

fn read_words(&mut self, out: &mut [u32]) -> Result<()>

source§

fn read_padded_bytes(&mut self, out: &mut [u8]) -> Result<()>

source§

impl<R: WordRead + ?Sized> WordRead for &mut R

source§

fn read_words(&mut self, words: &mut [u32]) -> Result<()>

source§

fn read_padded_bytes(&mut self, bytes: &mut [u8]) -> Result<()>

Implementors§