pub struct PatternDef {
pub name: String,
pub regex: String,
pub category: String,
pub description: String,
pub is_suspicious: bool,
pub severity: u8,
}
Expand description
Serializable pattern definition
Fields§
§name: String
Unique identifier for the pattern
regex: String
Regular expression pattern string
category: String
Category this pattern belongs to
description: String
Human-readable description of what this pattern matches
is_suspicious: bool
Whether matches should be flagged as suspicious
severity: u8
Severity level (0-10) if suspicious
Implementations§
Source§impl PatternDef
impl PatternDef
Sourcepub fn compile(self) -> AnalysisResult<Pattern>
pub fn compile(self) -> AnalysisResult<Pattern>
Convert to a compiled Pattern
Trait Implementations§
Source§impl Clone for PatternDef
impl Clone for PatternDef
Source§fn clone(&self) -> PatternDef
fn clone(&self) -> PatternDef
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 PatternDef
impl Debug for PatternDef
Source§impl<'de> Deserialize<'de> for PatternDef
impl<'de> Deserialize<'de> for PatternDef
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PatternDef
impl RefUnwindSafe for PatternDef
impl Send for PatternDef
impl Sync for PatternDef
impl Unpin for PatternDef
impl UnwindSafe for PatternDef
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