winnow::combinator

Function rest

Source
pub fn rest<Input, Error>(
    input: &mut Input,
) -> PResult<<Input as Stream>::Slice, Error>
where Input: Stream, Error: ParserError<Input>,
Expand description

Return the remaining input.

§Effective Signature

Assuming you are parsing a &str Stream:

pub fn rest<'i>(input: &mut &'i str) -> PResult<&'i str>

§Example

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