winnow::combinatorFunction eof
Source pub fn eof<I, E: ParserError<I>>(
input: &mut I,
) -> PResult<<I as Stream>::Slice, E>
Expand description
Match the end of the Stream
Otherwise, it will error.
ยงExample
let mut parser = eof;
assert_eq!(parser.parse_peek("abc"), Err(ErrMode::Backtrack(InputError::new("abc", ErrorKind::Eof))));
assert_eq!(parser.parse_peek(""), Ok(("", "")));