[][src]Function whiteread::parse_line

pub fn parse_line<T: FromStream>() -> Result<T>

Parse FromStream value from one line of stdin.

Leftovers are considered an error.

Examples

let x: i32 = parse_line().unwrap();

Drawbacks and alternatives

This function locks a mutex and allocates a buffer, so don't use it when reading more than few lines – use Reader or parse_stdin instead.

Note that reported line number will be wrong if you're mixing this function with other ways to read stdin.