pub struct SuspiciousPattern {
pub pattern_type: &'static str,
pub matched: String,
pub position: usize,
pub context: String,
}Expand description
A structural pattern match with surrounding context.
Fields§
§pattern_type: &'static strPattern category name from AttackStructures (one of 5 fixed values).
matched: String§position: usizeMatch start as a Unicode code-point index into the analyzed content,
mirroring the Python reference (semantic.py emits match.start() on
the processed str, so its positions are code-point indices). The
regex crate matches on bytes internally; byte offsets are converted
here at the result boundary.
context: StringSubstring surrounding the match (up to 20 bytes each side, rounded to char boundaries; the Python reference window is ±20 code points).
Trait Implementations§
Source§impl Clone for SuspiciousPattern
impl Clone for SuspiciousPattern
Source§impl Debug for SuspiciousPattern
impl Debug for SuspiciousPattern
impl Eq for SuspiciousPattern
Source§impl PartialEq for SuspiciousPattern
impl PartialEq for SuspiciousPattern
impl StructuralPartialEq for SuspiciousPattern
Auto Trait Implementations§
impl Freeze for SuspiciousPattern
impl RefUnwindSafe for SuspiciousPattern
impl Send for SuspiciousPattern
impl Sync for SuspiciousPattern
impl Unpin for SuspiciousPattern
impl UnsafeUnpin for SuspiciousPattern
impl UnwindSafe for SuspiciousPattern
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.