Function combine::eof
[−]
[src]
pub fn eof<I>() -> Eof<I> where I: Stream
Succeeds only if the stream is at end of input, fails otherwise.
let mut parser = eof(); assert_eq!(parser.parse(""), Ok(((), ""))); assert_eq!(parser.parse("x"), Err(ParseError { position: <char as Positioner>::start(), errors: vec![ Error::Unexpected('x'.into()), Error::Expected("end of input".into()) ] }));