pub struct CompiledRules { /* private fields */ }Expand description
Rules compiled for matching.
Implementations§
Source§impl CompiledRules
impl CompiledRules
pub fn compile(set: &RuleSet) -> Result<CompiledRules, RuleError>
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn rule(&self, index: usize) -> Option<&Rule>
pub fn rule(&self, index: usize) -> Option<&Rule>
The rule at index (as returned in RuleMatch::index).
Sourcepub fn match_root(&self, p: &Process) -> Option<RuleMatch<'_>>
pub fn match_root(&self, p: &Process) -> Option<RuleMatch<'_>>
Best identity match (process becomes a group root). Memoized by the process’s identity fields.
Sourcepub fn match_marker(&self, p: &Process) -> Option<RuleMatch<'_>>
pub fn match_marker(&self, p: &Process) -> Option<RuleMatch<'_>>
Best marker (env) match (process joins a session of the rule).
Trait Implementations§
Source§impl Clone for CompiledRules
impl Clone for CompiledRules
Source§impl Debug for CompiledRules
impl Debug for CompiledRules
Auto Trait Implementations§
impl !Freeze for CompiledRules
impl Forget for CompiledRules
impl Move for CompiledRules
impl RefUnwindSafe for CompiledRuleswhere
Mutex<Memo>: RefUnwindSafe,
Atomic<usize>: RefUnwindSafe,
Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>: RefUnwindSafe,
Pool<PatternSet, Box<dyn Fn() -> PatternSet + Send + UnwindSafe + Sync + RefUnwindSafe>>: RefUnwindSafe,
impl Send for CompiledRuleswhere
Mutex<Memo>: Send,
RawVecInner: Send,
RawTable<(Vec<u8>, Vec<usize>)>: Send,
Arc<dyn AcAutomaton>: Send,
RawTable<(Vec<u8>, Vec<(usize, Regex)>)>: Send,
Arc<RegexI>: Send,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Send,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Send,
Arc<str>: Send,
Arc<[String]>: Send,
impl Sync for CompiledRuleswhere
Mutex<Memo>: Sync,
RawVecInner: Sync,
RawTable<(Vec<u8>, Vec<usize>)>: Sync,
Arc<dyn AcAutomaton>: Sync,
RawTable<(Vec<u8>, Vec<(usize, Regex)>)>: Sync,
Arc<RegexI>: Sync,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Sync,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Sync,
Arc<str>: Sync,
Arc<[String]>: Sync,
impl Unpin for CompiledRuleswhere
Align4<u32>: Unpin,
Align1<u8>: Unpin,
*const u8 is !null: Unpin,
Arc<dyn AcAutomaton>: Unpin,
Arc<RegexI>: Unpin,
Box<Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Unpin,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + Send + UnwindSafe + Sync + RefUnwindSafe>>>: Unpin,
Arc<str>: Unpin,
Arc<[String]>: Unpin,
impl UnsafeUnpin for CompiledRuleswhere
Align4<u32>: UnsafeUnpin,
Align1<u8>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<(u64, Option<usize>)>: UnsafeUnpin,
PhantomData<((u64, GroupKind), String)>: UnsafeUnpin,
PhantomData<((u64, Option<u32>, u32), (GroupKind, String))>: UnsafeUnpin,
PhantomData<CompiledRule>: UnsafeUnpin,
PhantomData<GlobSetMatchStrategy>: UnsafeUnpin,
PhantomData<Glob>: UnsafeUnpin,
PhantomData<usize>: UnsafeUnpin,
*const ArcInner<RegexI> is !null: UnsafeUnpin,
PhantomData<ArcInner<RegexI>>: UnsafeUnpin,
*const Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>> is !null: UnsafeUnpin,
PhantomData<Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>>: UnsafeUnpin,
*const ArcInner<[String]> is !null: UnsafeUnpin,
PhantomData<ArcInner<[String]>>: UnsafeUnpin,
impl UnwindSafe for CompiledRuleswhere
Mutex<Memo>: UnwindSafe,
RawVecInner: UnwindSafe,
HashMap<Vec<u8>, Vec<usize>, BuildHasherDefault<Hasher>>: UnwindSafe,
Arc<dyn AcAutomaton>: UnwindSafe,
HashMap<Vec<u8>, Vec<(usize, Regex)>, BuildHasherDefault<Hasher>>: UnwindSafe,
Arc<RegexI>: UnwindSafe,
BoxRaw<Pool<Cache, Box<dyn Fn() -> Cache + Send + UnwindSafe + Sync + RefUnwindSafe>>>: UnwindSafe,
Arc<Pool<PatternSet, Box<dyn Fn() -> PatternSet + Send + UnwindSafe + Sync + RefUnwindSafe>>>: UnwindSafe,
Arc<str>: UnwindSafe,
Arc<[String]>: 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