pub struct RegexEngine<N: Normalizer = ProductionNormalizer, P: Prefilter = PrefixPrefilter> { /* private fields */ }Expand description
Production rule engine: pluggable normalizer + prefilter + RegexSet DFA.
Default type parameters give zero-cost production behavior via
monomorphization. Tests can substitute IdentityNormalizer and/or
NullPrefilter for isolation.
§Examples
use guardrail::engine::*;
let rules = vec![]; // load from config
// Production (default):
let engine = RegexEngine::new(rules.clone())?;
// Testing (no normalization, no prefilter):
let engine = RegexEngine::with_plugins(rules, IdentityNormalizer, NullPrefilter)?;Implementations§
Source§impl RegexEngine
Default constructor – production configuration.
impl RegexEngine
Default constructor – production configuration.
Source§impl<N: Normalizer, P: Prefilter> RegexEngine<N, P>
impl<N: Normalizer, P: Prefilter> RegexEngine<N, P>
Trait Implementations§
Source§impl<N: Normalizer + Debug, P: Prefilter + Debug> Debug for RegexEngine<N, P>
impl<N: Normalizer + Debug, P: Prefilter + Debug> Debug for RegexEngine<N, P>
Source§impl<N: Normalizer, P: Prefilter> RuleEngine for RegexEngine<N, P>
impl<N: Normalizer, P: Prefilter> RuleEngine for RegexEngine<N, P>
Auto Trait Implementations§
impl<N, P> Freeze for RegexEngine<N, P>
impl<N, P> RefUnwindSafe for RegexEngine<N, P>where
N: RefUnwindSafe,
P: RefUnwindSafe,
impl<N, P> Send for RegexEngine<N, P>
impl<N, P> Sync for RegexEngine<N, P>
impl<N, P> Unpin for RegexEngine<N, P>
impl<N, P> UnsafeUnpin for RegexEngine<N, P>where
N: UnsafeUnpin,
P: UnsafeUnpin,
impl<N, P> UnwindSafe for RegexEngine<N, P>where
N: UnwindSafe,
P: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more