winnow::combinator

Function rest

source
pub fn rest<I, E: ParserError<I>>(
    input: &mut I,
) -> PResult<<I as Stream>::Slice, E>
where I: Stream,
Expand description

Return the remaining input.

ยงExample

use winnow::combinator::rest;
assert_eq!(rest::<_,InputError<_>>.parse_peek("abc"), Ok(("", "abc")));
assert_eq!(rest::<_,InputError<_>>.parse_peek(""), Ok(("", "")));