Function line_ending
fn line_ending<Input, Error>(input: &mut Input) -> Result<<Input as Stream>::Slice, Error>
where
Input: StreamIsPartial + Stream + Compare<&'static str>,
Error: ParserError<Input>
Recognizes an end of line (both "\n" and "\r\n").
Complete version: Will return an error if there's not enough input data.
[Partial version][crate::_topic::partial]: Will return Err(winnow::error::ErrMode::Incomplete(_)) if there's not enough input data.
Effective Signature
Assuming you are parsing a &str [Stream]:
# use *;;
#
Example
# use *;
# use line_ending;
assert_eq!;
assert!;
assert!;
# use *;
# use ;
# use Partial;
# use line_ending;
assert_eq!;
assert!;
assert_eq!;