Skip to main content

Crate forbidden_regex

Crate forbidden_regex 

Source
Expand description

What: This Rust crate exports compile, Regex, and RegexSet. A Rust crate is closest to a TypeScript package module: it has private implementation files and a public API surface. The implementation matches byte slices (&[u8], a borrowed read-only view of bytes, not an owned Vec<u8> or fixed [u8; N] array), and internally chooses counting, product, or derivative-DFA matcher back-ends plus set-level literal gating. Why: This file is the Rust module that groups the lib implementation, so the compiler gives those items one namespace and sibling modules can import that name.

In TS you’d write (pseudocode):

// module lib: see exported functions and types below.

The batch match kernels (dfa::sheng/dfa::sheng2) use explicit std::arch SIMD intrinsics (vpermb / vqtbl4q), runtime-detected, so the crate needs no nightly portable_simd feature.

Structs§

Regex
What: Re-exports the public matcher API. Why: The surrounding function uses this step to keep the matcher behavior correct at this point.
RegexSet
What: Re-exports the public matcher API. Why: The surrounding function uses this step to keep the matcher behavior correct at this point.

Enums§

CompileError
What: Re-exports the compile-time error type. Why: The surrounding function uses this step to keep the matcher behavior correct at this point.

Functions§

compile
What: Re-exports the public matcher API. Why: The surrounding function uses this step to keep the matcher behavior correct at this point.