pub trait Read {
Show 13 methods
fn read_u8(&mut self) -> u8;
fn read(&mut self, len: usize) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8];
fn read_buf(&mut self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8] { ... }
fn read_u16(&mut self) -> u16 { ... }
fn read_u32(&mut self) -> u32 { ... }
fn read_u32_be(&mut self) -> u32 { ... }
fn read_uvar<T: Uint>(&mut self) -> T { ... }
fn read_ivar(&mut self) -> i64 { ... }
fn read_string(&mut self) -> &str { ... }
fn read_f32(&mut self) -> f32 { ... }
fn read_f64(&mut self) -> f64 { ... }
fn read_i64(&mut self) -> i64 { ... }
fn read_u64(&mut self) -> u64 { ... }
}Required Methods
Provided Methods
Read a variable length buffer.
fn read_u32_be(&mut self) -> u32
fn read_u32_be(&mut self) -> u32
Read 4 bytes as unsigned integer in big endian order. (most significant byte first)
Read unsigned integer with variable length.
- numbers < 2^7 are stored in one byte
- numbers < 2^14 are stored in two bytes
Read signed integer with variable length.
- numbers < 2^7 are stored in one byte
- numbers < 2^14 are stored in two bytes
fn read_string(&mut self) -> &str
fn read_string(&mut self) -> &str
Read string of variable length.