Skip to main content

IntelligenceLoop

Struct IntelligenceLoop 

Source
pub struct IntelligenceLoop { /* private fields */ }
Expand description

Intelligence loop connecting differential analysis with evolutionary tuning.

Implementations§

Source§

impl IntelligenceLoop

Source

pub fn new(population_size: usize) -> Self

Create a new intelligence loop with the given evolution population size.

Source

pub fn with_budget( population_size: usize, min_probes: usize, budget: Budget, ) -> Self

Create with configurable minimum probes and budget.

Source

pub fn generate_probes(&self) -> Vec<Probe>

Generate the full set of differential analysis probes, respecting budget.

Source

pub fn generate_quick_probes(&self) -> Vec<Probe>

Generate a minimal probe set for quick analysis.

Source

pub fn record_probe(&mut self, probe: &Probe, was_blocked: bool)

Record a differential probe result.

Source

pub fn differential_results(&self) -> &DifferentialResult

Get the differential analysis results.

Source

pub fn suggested_evasions(&self) -> Vec<String>

Get recommended evasion strategies based on differential analysis.

Source

pub fn waf_report(&self) -> String

Get a human-readable report of what the WAF blocks.

Source

pub fn next_candidate(&mut self) -> Option<(usize, &Chromosome)>

Get the next technique combination to try from the evolution engine.

Source

pub fn batch_candidates(&mut self, n: usize) -> Vec<(usize, Chromosome)>

Request a batch of evolved candidates.

Source

pub fn record_feedback(&mut self, chromosome_index: usize, passed: bool)

Record evolution feedback. An out-of-range chromosome_index indicates a state-machine bug between caller and engine — log loudly via tracing rather than swallowing the error silently.

Source

pub fn record_verdict( &mut self, chromosome_index: usize, verdict: &OracleVerdict, )

Record rich verdict feedback. Same error semantics as record_feedback.

Source

pub fn evolve(&mut self)

Evolve the population to the next generation.

Source

pub fn best_combination(&self) -> Option<&Chromosome>

Get the best-performing technique combination.

Source

pub fn probes_completed(&self) -> usize

Number of differential probes completed.

Source

pub fn feedback_count(&self) -> usize

Number of evolution feedback events recorded.

Source

pub fn diversity(&self) -> f64

Population diversity score.

Source

pub fn has_sufficient_data(&self) -> bool

Check if enough probes have been completed for a meaningful analysis.

Source

pub fn step(&mut self, feedback: Feedback) -> LoopAction

Step the state machine forward given the latest feedback.

This is the primary orchestration API. Call it repeatedly, performing the action it returns and feeding the result back as the next feedback.

Source

pub fn suggested_delay_ms(&self) -> u64

Suggested delay before the next request, based on target health.

Trait Implementations§

Source§

impl Clone for IntelligenceLoop

Source§

fn clone(&self) -> IntelligenceLoop

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 IntelligenceLoop

Source§

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

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

impl Default for IntelligenceLoop

Source§

fn default() -> Self

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

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more