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

Read a single byte.

Provided Methods

Read a variable length buffer.

Read 2 bytes as unsigned integer

Read 4 bytes as unsigned integer

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

Read string of variable length.

Read float32 in big endian order

Read float64 in big endian order

Read BigInt64 in big endian order

read BigUInt64 in big endian order

Implementors