[−][src]Trait lebe::io::ReadPrimitive
Offers a prettier versions of reading a primitive number.
The default way of reading a value is:
let number: u16 = reader.read_from_little_endian()?; println!("{}", number);
This trait enables you to use expressions:
println!("{}", u16::read_from_little_endian(&mut reader)?);
.
Provided methods
fn read_from_little_endian(read: &mut R) -> Result<Self>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian()
.
fn read_from_big_endian(read: &mut R) -> Result<Self>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian()
.