time/parsing/combinator/rfc/rfc2234.rs
1//! Rules defined in [RFC 2234].
2//!
3//! [RFC 2234]: https://datatracker.ietf.org/doc/html/rfc2234
4
5use crate::parsing::ParsedItem;
6
7/// Consume exactly one space or tab.
8pub(crate) const fn wsp(input: &[u8]) -> Option<ParsedItem<'_, ()>> {
9 match input {
10 [b' ' | b'\t', rest @ ..] => Some(ParsedItem(rest, ())),
11 _ => None,
12 }
13}