pub struct LoopState {
pub recent_hashes: Vec<u64>,
pub recent_signatures: Vec<String>,
pub total_outputs: u64,
pub loops_detected: u64,
pub iterations_run: u64,
pub iterations_succeeded: u64,
pub iterations_failed: u64,
pub consecutive_failures: u32,
}Expand description
Runtime state for loop detection and iteration tracking.
Fields§
§recent_hashes: Vec<u64>Sliding window of output similarity hashes (oldest first).
recent_signatures: Vec<String>Sliding window of normalized signatures for fuzzy matching.
total_outputs: u64Total outputs checked (including short/ignored).
loops_detected: u64Number of loops detected.
iterations_run: u64Total agent iterations run.
iterations_succeeded: u64§iterations_failed: u64§consecutive_failures: u32Implementations§
Source§impl LoopState
impl LoopState
Sourcepub fn record_success(&mut self)
pub fn record_success(&mut self)
Record a successful iteration. Resets the consecutive-failure counter.
Sourcepub fn record_failure(&mut self)
pub fn record_failure(&mut self)
Record a failed iteration. Increments the consecutive-failure counter.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LoopState
impl<'de> Deserialize<'de> for LoopState
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
impl Eq for LoopState
impl StructuralPartialEq for LoopState
Auto Trait Implementations§
impl Freeze for LoopState
impl RefUnwindSafe for LoopState
impl Send for LoopState
impl Sync for LoopState
impl Unpin for LoopState
impl UnsafeUnpin for LoopState
impl UnwindSafe for LoopState
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.