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 parser = eof;
assert_eq!(parser("abc"), Err(ErrMode::Backtrack(Error::new("abc", ErrorKind::Eof))));
assert_eq!(parser(""), Ok(("", "")));