Function combine::parser::byte::num::le_f64[][src]

pub fn le_f64<'a, Input>(
) -> impl Parser<Input, Output = f64, PartialState = ()> where
    Input: Stream<Token = u8>,
    Input::Error: ParseError<Input::Token, Input::Range, Input::Position>, 
Expand description

Reads a i64 out of the byte stream with the specified endianess

use combine::Parser;
use combine::parser::byte::num::le_f64;

let buf = 123.45f64.to_le_bytes();
assert_eq!(le_f64().parse(&buf[..]), Ok((123.45, &b""[..])));
assert!(le_f64().parse(&b"\x01\0\0\0\0\0\0"[..]).is_err());