pub struct EngineState {Show 14 fields
pub algorithm_name: String,
pub algorithm_state: Vec<u8>,
pub gene_pool: GenePool,
pub rng_seed: u64,
pub budget: Budget,
pub gene_stats: Vec<(String, String, u32, u32)>,
pub fitness_history: VecDeque<f64>,
pub stagnation_counter: u32,
pub request_count: usize,
pub stats: SearchStats,
pub schema_version: u32,
pub corpus: BypassCorpus,
pub next_id: u64,
pub generation_evals: usize,
}Expand description
Serializable engine state.
Schema version 2 (2026-05-10) adds corpus, next_id, and
generation_evals so a restored engine doesn’t lose all of its
bypass discoveries and doesn’t reset its eval-id counter (which
would collide with any in-flight evaluation that survived the
crash).
What is intentionally NOT serialized:
in_flight: by definition transient; any pending eval at checkpoint time is lost on crash, but the corpus capture above means the useful bypasses are preserved.cache: LRU cache of payload→verdict; recomputable.target_health: runtime stats; resets on resume.checkpoint_path: re-injected by the caller after load.pending_single: legacy sequential API state, transient.- RNG state: search algorithms each capture their own RNG
state inside
algorithm_state; the engine-level rng is used only fornext_eval_idminting and gene-pool sampling when the algorithm doesn’t override.
Fields§
§algorithm_name: String§algorithm_state: Vec<u8>§gene_pool: GenePool§rng_seed: u64§budget: Budget§gene_stats: Vec<(String, String, u32, u32)>§fitness_history: VecDeque<f64>§stagnation_counter: u32§request_count: usize§stats: SearchStats§schema_version: u32§corpus: BypassCorpusSaved bypass discoveries — added in schema_version 2.
Defaults to empty for v1 checkpoints loaded by a v2 engine.
next_id: u64Next eval_id to mint — added in schema_version 2 so a
restored engine doesn’t recycle IDs that may collide with
any in-flight evaluation that survived the crash.
generation_evals: usizeEvaluations issued in the current generation — added in v2.
Trait Implementations§
Source§impl Clone for EngineState
impl Clone for EngineState
Source§fn clone(&self) -> EngineState
fn clone(&self) -> EngineState
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 EngineState
impl Debug for EngineState
Source§impl<'de> Deserialize<'de> for EngineState
impl<'de> Deserialize<'de> for EngineState
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 EngineState
impl RefUnwindSafe for EngineState
impl Send for EngineState
impl Sync for EngineState
impl Unpin for EngineState
impl UnsafeUnpin for EngineState
impl UnwindSafe for EngineState
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