Expand description
§matchkit — vocabulary types for multi-pattern matching
matchkit provides the shared types that every crate in the Santh
performance ecosystem depends on: the Match struct, the Matcher
and BlockMatcher traits, and common error definitions.
By isolating these types into a zero-dependency vocabulary crate,
consumer crates like simdsieve, warpstate, warpsearch, and
warpgrep can all agree on a single match representation without
pulling in heavyweight GPU or regex dependencies.
§Quick Start
use matchkit::{Match, MatchSet};
let mut set = MatchSet::new();
set.insert(Match::from_parts(0, 10, 18));
set.insert(Match::from_parts(1, 15, 20));
set.merge_overlapping();
assert_eq!(set.len(), 1);
assert_eq!(set.as_slice()[0].end, 20);Re-exports§
pub use error::Error;pub use error::Result;pub use matcher::BlockMatcher;pub use matcher::BoxedMatcher;pub use matcher::Matcher;
Modules§
- error
- Shared error types for all matching backends. Error types shared across all matching backends.
- matcher
- Trait definitions for pattern matching backends. Trait definitions for pattern matching backends.
Structs§
- GpuMatch
- Re-export of the GPU-internal match representation.
GPU-internal match representation — 4×u32,
bytemuck-compatible. - Match
- Re-export of the match result struct. A match result from pattern scanning.
- Match
Set - Re-export of the sorted, deduplicated match collection. Sorted, deduplicated collection of matches with efficient insertion.