pub struct DetectionConfig {
pub sensitivity: Sensitivity,
pub custom_patterns: Vec<String>,
pub blocklist: Vec<String>,
pub allowlist: Vec<String>,
pub audit_capacity: usize,
}Expand description
Detector configuration.
Fields§
§sensitivity: SensitivityDetector sensitivity. Balanced is the default and aims to catch
high-confidence injection attempts without flagging ordinary security
administration questions.
custom_patterns: Vec<String>Additional regular expressions supplied by the embedding application. Public findings expose hashes of these patterns, never the raw regex bodies.
blocklist: Vec<String>Normalized phrase deny-list. Entries must be at least three non-whitespace characters long; matches require token boundaries and prompt-control or exfiltration intent context. Public findings expose hashes, not raw entries.
allowlist: Vec<String>Case-insensitive substring allow-list used to suppress overlapping benign findings without suppressing unrelated malicious spans.
audit_capacity: usizeMaximum number of hash-only audit records retained in memory.
Trait Implementations§
Source§impl Clone for DetectionConfig
impl Clone for DetectionConfig
Source§fn clone(&self) -> DetectionConfig
fn clone(&self) -> DetectionConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DetectionConfig
impl Debug for DetectionConfig
Source§impl Default for DetectionConfig
impl Default for DetectionConfig
Source§impl<'de> Deserialize<'de> for DetectionConfig
impl<'de> Deserialize<'de> for DetectionConfig
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
Source§impl PartialEq for DetectionConfig
impl PartialEq for DetectionConfig
Source§fn eq(&self, other: &DetectionConfig) -> bool
fn eq(&self, other: &DetectionConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for DetectionConfig
impl Serialize for DetectionConfig
impl Eq for DetectionConfig
impl StructuralPartialEq for DetectionConfig
Auto Trait Implementations§
impl Freeze for DetectionConfig
impl RefUnwindSafe for DetectionConfig
impl Send for DetectionConfig
impl Sync for DetectionConfig
impl Unpin for DetectionConfig
impl UnsafeUnpin for DetectionConfig
impl UnwindSafe for DetectionConfig
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more