[−][src]Function whiteread::parse_file
pub fn parse_file<T: FromStream, P: AsRef<Path>>(path: P) -> Result<T>
Parses a whole file as a FromStream
value
Calling this function is equivalent to:
Reader::open(path)?.finish()?
If you want to parse the file in multiple steps,
use Reader::open
.
Examples
Parse the whole file as an tuple.
let x: (i32, i32) = parse_file("coords.txt").unwrap();