pub struct DetectionEngine { /* private fields */ }Expand description
Advanced detection methods for LLM security
Implementations§
Source§impl DetectionEngine
impl DetectionEngine
Sourcepub fn new(config: LLMSecurityConfig) -> Self
pub fn new(config: LLMSecurityConfig) -> Self
Create a new detection engine
Sourcepub fn detect_prompt_injection(&self, code: &str) -> InjectionDetectionResult
pub fn detect_prompt_injection(&self, code: &str) -> InjectionDetectionResult
Detect prompt injection attempts in user input
Sourcepub fn detect_prompt_injection_safe(
&self,
code: &str,
) -> InjectionDetectionResult
pub fn detect_prompt_injection_safe( &self, code: &str, ) -> InjectionDetectionResult
Enhanced security check with regex DoS protection
Auto Trait Implementations§
impl Freeze for DetectionEngine
impl RefUnwindSafe for DetectionEngine
impl Send for DetectionEngine
impl Sync for DetectionEngine
impl Unpin for DetectionEngine
impl UnwindSafe for DetectionEngine
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