[−][src]Trait floaout::io::read::ReadBytes
This trait reads bytes for inferring from variable to be assigned.
Required methods
fn read_be_bytes(&mut self) -> Result<T>
This method reads bytes in big-endian byte order.
Examples
use std::io; use std::fs::File; use floaout::io::read::ReadBytes; fn main() -> io::Result<()> { let mut f = File::open("foo.txt")?; // read u32 in big-endian byte order let u_32: u32 = f.read_be_bytes()?; Ok(()) }
fn read_le_bytes(&mut self) -> Result<T>
This method reads bytes in little-endian byte order.
Examples
use std::io; use std::fs::File; use floaout::io::read::ReadBytes; fn main() -> io::Result<()> { let mut f = File::open("foo.txt")?; // read u32 in little-endian byte order let u_32: u32 = f.read_le_bytes()?; Ok(()) }