pub fn tab<I, Error>(input: I) -> Result<(I, char), Err<Error>>where
Error: ParseError<I>,
I: Slice<RangeFrom<usize>> + InputIter + InputLength,
<I as InputIter>::Item: AsChar,
Available on crate feature
mtls
only.Expand description
Matches a tab character ‘\t’.
Streaming version: Will return Err(nom::Err::Incomplete(_))
if there’s not enough input data.
§Example
assert_eq!(tab::<_, (_, ErrorKind)>("\tc"), Ok(("c", '\t')));
assert_eq!(tab::<_, (_, ErrorKind)>("\r\nc"), Err(Err::Error(("\r\nc", ErrorKind::Char))));
assert_eq!(tab::<_, (_, ErrorKind)>(""), Err(Err::Incomplete(Needed::new(1))));