Skip to main contentModule span_parser
Source - SpanParser
- sp_any
- Match any of the given string patterns (Aho-Corasick). Compiled at construction time.
- sp_boxed
- Wrap a boxed
ParserFn as a SpanParser escape hatch. - sp_css_block_comment
- Monolithic CSS block comment scanner: /*…*/
- sp_css_ident
- Monolithic CSS identifier scanner — direct byte scanning.
- sp_css_string
- Monolithic CSS quoted string scanner (memchr2).
- sp_css_ws_comment
- Monolithic CSS whitespace + comment scanner. Always succeeds.
- sp_eof
- End-of-input check for SpanParser. Succeeds with an empty Span at EOF.
- sp_epsilon
- Always succeeds, consuming nothing (empty span).
- sp_json_number
- Monolithic JSON number scanner.
- sp_json_string
- Monolithic JSON string scanner (memchr2). Content span, exclusive of quotes.
- sp_json_string_quoted
- Monolithic JSON string scanner (memchr2). Span includes quote delimiters.
- sp_next
- Consume exactly N bytes.
- sp_regex
- Match regex pattern. Uses global cache to avoid recompilation.
- sp_string
- Match exact string literal (byte comparison).
The string must be
'static (string literals, leaked strings). - sp_take_until_any
- Match one or more bytes until any byte in
excluded is found.
Enum-dispatched LUT scanner — no boxing, no vtable. - sp_take_while_byte
- Take bytes while predicate holds (byte-level, ASCII-safe).
- sp_take_while_char
- Take characters while predicate holds (char-level, Unicode-safe).