Function rocket::mtls::oid::asn1_rs::nom::character::streaming::anychar

source ·
pub fn anychar<T, E>(input: T) -> Result<(T, char), Err<E>>
Available on crate feature mtls only.
Expand description

Matches one byte as a character. Note that the input type will accept a str, but not a &[u8], unlike many other nom parsers.

Streaming version: Will return Err(nom::Err::Incomplete(_)) if there’s not enough input data.

§Example

assert_eq!(anychar::<_, (_, ErrorKind)>("abc"), Ok(("bc",'a')));
assert_eq!(anychar::<_, (_, ErrorKind)>(""), Err(Err::Incomplete(Needed::new(1))));