devela::_dep::winnow::token

Function rest

pub fn rest<Input, Error>(
    input: &mut Input,
) -> Result<<Input as Stream>::Slice, ErrMode<Error>> 
where Input: Stream, Error: ParserError<Input>,
Available on crate feature dep_winnow only.
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::token::rest;
assert_eq!(rest::<_,InputError<_>>.parse_peek("abc"), Ok(("", "abc")));
assert_eq!(rest::<_,InputError<_>>.parse_peek(""), Ok(("", "")));