Function winnow::combinator::eof

source ·
pub fn eof<I, E: ParseError<I>>(input: I) -> IResult<I, <I as Stream>::Slice, E>where
    I: Stream,
Expand description

Match the end of the Stream

Otherwise, it will error.

Example


let mut parser = eof;
assert_eq!(parser.parse_next("abc"), Err(ErrMode::Backtrack(Error::new("abc", ErrorKind::Eof))));
assert_eq!(parser.parse_next(""), Ok(("", "")));