pub struct MotifEntry {
pub motif_class: MotifClass,
pub min_severity: u8,
pub disposition: SemanticDisposition,
pub provenance: Provenance,
pub description: &'static str,
}Expand description
A single entry in the heuristics bank.
Fields§
§motif_class: MotifClassThe motif class this entry matches.
min_severity: u8Minimum grammar severity required to activate this entry. 0 = any, 1 = Boundary or above, 2 = Violation only.
disposition: SemanticDispositionSemantic disposition returned when this entry matches.
provenance: ProvenanceProvenance of this entry.
description: &'static strHuman-readable description (fixed-length str for no_std).
Implementations§
Source§impl MotifEntry
impl MotifEntry
Sourcepub fn matches(&self, motif: MotifClass, grammar: GrammarState) -> bool
pub fn matches(&self, motif: MotifClass, grammar: GrammarState) -> bool
Returns true if this entry matches the given motif class and grammar severity.
Trait Implementations§
Source§impl Clone for MotifEntry
impl Clone for MotifEntry
Source§fn clone(&self) -> MotifEntry
fn clone(&self) -> MotifEntry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MotifEntry
impl Debug for MotifEntry
impl Copy for MotifEntry
Auto Trait Implementations§
impl Freeze for MotifEntry
impl RefUnwindSafe for MotifEntry
impl Send for MotifEntry
impl Sync for MotifEntry
impl Unpin for MotifEntry
impl UnsafeUnpin for MotifEntry
impl UnwindSafe for MotifEntry
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