[][src]Trait serde_bser::de::DeRead

pub trait DeRead<'de> {
    fn next(&mut self) -> Result<u8, Error>;
fn peek(&mut self) -> Result<u8, Error>;
fn read_count(&self) -> usize;
fn discard(&mut self);
fn next_bytes<'s>(
        &'s mut self,
        len: usize,
        scratch: &'s mut Vec<u8>
    ) -> Result<Reference<'de, 's, [u8]>, Error>; fn next_u32(&mut self, scratch: &mut Vec<u8>) -> Result<u32, Error> { ... } }

Required methods

fn next(&mut self) -> Result<u8, Error>

read next byte (if peeked byte not discarded return it)

fn peek(&mut self) -> Result<u8, Error>

peek next byte (peeked byte should come in next and next_bytes unless discarded)

fn read_count(&self) -> usize

how many bytes have been read so far. this doesn't include the peeked byte

fn discard(&mut self)

discard peeked byte

fn next_bytes<'s>(
    &'s mut self,
    len: usize,
    scratch: &'s mut Vec<u8>
) -> Result<Reference<'de, 's, [u8]>, Error>

read next byte (if peeked byte not discarded include it)

Loading content...

Provided methods

fn next_u32(&mut self, scratch: &mut Vec<u8>) -> Result<u32, Error>

read u32 as native endian

Loading content...

Implementors

impl<'a> DeRead<'a> for SliceRead<'a>[src]

Loading content...