Function rest

pub fn rest<Input, Error>(
    input: &mut Input,
) -> Result<<Input as Stream>::Slice, 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) -> ModalResult<&'i str>

§Example

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