[−][src]Trait grin_core::ser::Reader
Implementations defined how different numbers and binary structures are read from an underlying stream or container (depending on implementation).
Required methods
fn read_u8(&mut self) -> Result<u8, Error>
Read a u8 from the underlying Read
fn read_u16(&mut self) -> Result<u16, Error>
Read a u16 from the underlying Read
fn read_u32(&mut self) -> Result<u32, Error>
Read a u32 from the underlying Read
fn read_u64(&mut self) -> Result<u64, Error>
Read a u64 from the underlying Read
fn read_i32(&mut self) -> Result<i32, Error>
Read a i32 from the underlying Read
fn read_i64(&mut self) -> Result<i64, Error>
Read a i64 from the underlying Read
fn read_bytes_len_prefix(&mut self) -> Result<Vec<u8>, Error>
Read a u64 len prefix followed by that number of exact bytes.
fn read_fixed_bytes(&mut self, length: usize) -> Result<Vec<u8>, Error>
Read a fixed number of bytes from the underlying reader.
fn expect_u8(&mut self, val: u8) -> Result<u8, Error>
Consumes a byte from the reader, producing an error if it doesn't have the expected value
Implementors
impl<'a> Reader for StreamingReader<'a>
[src]
fn read_u8(&mut self) -> Result<u8, Error>
[src]
fn read_u16(&mut self) -> Result<u16, Error>
[src]
fn read_u32(&mut self) -> Result<u32, Error>
[src]
fn read_i32(&mut self) -> Result<i32, Error>
[src]
fn read_u64(&mut self) -> Result<u64, Error>
[src]
fn read_i64(&mut self) -> Result<i64, Error>
[src]
fn read_bytes_len_prefix(&mut self) -> Result<Vec<u8>, Error>
[src]
Read a variable size vector from the underlying stream. Expects a usize
fn read_fixed_bytes(&mut self, len: usize) -> Result<Vec<u8>, Error>
[src]
Read a fixed number of bytes.