pub struct InjectionDetectionResult {
pub is_malicious: bool,
pub confidence: f32,
pub detected_patterns: Vec<String>,
pub risk_score: u32,
}Expand description
Result of injection detection analysis
Fields§
§is_malicious: boolWhether malicious patterns were detected
confidence: f32Confidence score (0.0 - 1.0)
detected_patterns: Vec<String>List of detected malicious patterns
risk_score: u32Overall risk score
Implementations§
Source§impl InjectionDetectionResult
impl InjectionDetectionResult
Sourcepub fn new(
is_malicious: bool,
confidence: f32,
detected_patterns: Vec<String>,
risk_score: u32,
) -> Self
pub fn new( is_malicious: bool, confidence: f32, detected_patterns: Vec<String>, risk_score: u32, ) -> Self
Create a new detection result
Sourcepub fn malicious(
confidence: f32,
detected_patterns: Vec<String>,
risk_score: u32,
) -> Self
pub fn malicious( confidence: f32, detected_patterns: Vec<String>, risk_score: u32, ) -> Self
Create a malicious result
Sourcepub fn is_high_risk(&self) -> bool
pub fn is_high_risk(&self) -> bool
Check if this result indicates high risk
Sourcepub fn is_critical_risk(&self) -> bool
pub fn is_critical_risk(&self) -> bool
Check if this result indicates critical risk
Sourcepub fn risk_level(&self) -> &'static str
pub fn risk_level(&self) -> &'static str
Get risk level as a string
Trait Implementations§
Source§impl Clone for InjectionDetectionResult
impl Clone for InjectionDetectionResult
Source§fn clone(&self) -> InjectionDetectionResult
fn clone(&self) -> InjectionDetectionResult
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 InjectionDetectionResult
impl Debug for InjectionDetectionResult
Source§impl<'de> Deserialize<'de> for InjectionDetectionResult
impl<'de> Deserialize<'de> for InjectionDetectionResult
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 InjectionDetectionResult
impl RefUnwindSafe for InjectionDetectionResult
impl Send for InjectionDetectionResult
impl Sync for InjectionDetectionResult
impl Unpin for InjectionDetectionResult
impl UnwindSafe for InjectionDetectionResult
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