Skip to main content

AnalysisConfig

Struct AnalysisConfig 

Source
pub struct AnalysisConfig {
    pub min_suspicious_entropy: f64,
    pub max_occurrences_per_string: usize,
    pub max_unique_strings: usize,
    pub max_input_bytes: usize,
    pub max_source_bytes: usize,
    pub max_unique_file_identities_per_string: usize,
    pub max_categories_per_string: usize,
    pub max_indicators_per_string: usize,
}
Expand description

Configuration for analysis and bounded in-memory tracking.

Byte limits are measured using str::len, so they refer to UTF-8 encoded bytes rather than Unicode scalar values. Every limit is enforced before a tracking mutation is applied.

Fields§

§min_suspicious_entropy: f64

Entropy threshold at or above which a sufficiently long value is flagged.

§max_occurrences_per_string: usize

Maximum detailed occurrence records retained for one distinct value.

§max_unique_strings: usize

Maximum number of distinct values retained by the tracker.

§max_input_bytes: usize

Maximum UTF-8 byte length of a value passed to the analyzer.

§max_source_bytes: usize

Maximum UTF-8 byte length of each source and context string field.

§max_unique_file_identities_per_string: usize

Maximum distinct (file_path, file_hash) pairs retained for one value.

§max_categories_per_string: usize

Maximum aggregate category names retained for one value.

§max_indicators_per_string: usize

Maximum suspicious indicators retained for one value.

Implementations§

Source§

impl AnalysisConfig

Source

pub fn validate(&self) -> AnalysisResult<()>

Validate that all thresholds and limits are usable.

Trait Implementations§

Source§

impl Clone for AnalysisConfig

Source§

fn clone(&self) -> AnalysisConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AnalysisConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AnalysisConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for AnalysisConfig

Source§

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 AnalysisConfig

Source§

fn eq(&self, other: &AnalysisConfig) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for AnalysisConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for AnalysisConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.