Skip to main content

CompiledRules

Struct CompiledRules 

Source
pub struct CompiledRules { /* private fields */ }
Expand description

Rules compiled for matching.

Implementations§

Source§

impl CompiledRules

Source

pub fn compile(set: &RuleSet) -> Result<CompiledRules, RuleError>

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn rule(&self, index: usize) -> Option<&Rule>

The rule at index (as returned in RuleMatch::index).

Source

pub fn match_root(&self, p: &Process) -> Option<RuleMatch<'_>>

Best identity match (process becomes a group root). Memoized by the process’s identity fields.

Source

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

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CompiledRules

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CompiledRules

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl !Freeze for CompiledRules

§

impl Forget for CompiledRules

§

impl Move for CompiledRules

§

impl RefUnwindSafe for CompiledRules

§

impl Send for CompiledRules
where 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 CompiledRules
where 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 CompiledRules
where 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 CompiledRules

§

impl UnwindSafe for CompiledRules

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.