Trait risc0_zkvm::serde::WordRead
source · 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§
sourcefn read_words(&mut self, words: &mut [u32]) -> Result<()>
fn read_words(&mut self, words: &mut [u32]) -> Result<()>
Fill the given buffer with words from input. Returns an error if EOF was encountered.
sourcefn read_padded_bytes(&mut self, bytes: &mut [u8]) -> Result<()>
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.