Skip to main content

BLOCK_PLAIN_NEEDLES

Constant BLOCK_PLAIN_NEEDLES 

Source
pub const BLOCK_PLAIN_NEEDLES: &[u8] = b": \t";
Expand description

Canonical YAML 1.2 plain-scalar boundary candidate set in block context. The scanner consumes a plain scalar by “jumping” to the first byte in this set, then validating whether it is a true terminator (e.g. : is only a key indicator when followed by whitespace, # is only a comment when preceded by whitespace).

This is the input to SimdScanner::new / StructuralIter for the block-context plain-scalar fast path.

§Examples

use noyalib::simd::{BLOCK_PLAIN_NEEDLES, SimdScanner};
let s = SimdScanner::new(BLOCK_PLAIN_NEEDLES);
assert_eq!(s.find_any(b"hello: world"), Some(5));