pub struct ConfidenceGate<T: PartialEq + Copy> { /* private fields */ }Expand description
Per-sidecar-loop conviction state. One instance per gated decision axis; lives on the sidecar thread, no shared state.
Implementations§
Source§impl<T: PartialEq + Copy> ConfidenceGate<T>
impl<T: PartialEq + Copy> ConfidenceGate<T>
pub fn new(cfg: GateConfig) -> Self
Sourcepub fn observe(&mut self, recommendation: Option<T>) -> Option<T>
pub fn observe(&mut self, recommendation: Option<T>) -> Option<T>
Feed one scan’s recommendation. Returns the decision the sidecar may act on this scan: the recommendation itself when the gate is disabled, otherwise only once conviction and the sample floor are both satisfied.
Sourcepub fn shock(&mut self)
pub fn shock(&mut self)
External regime-shift signal (peer-count change, fill jump, inversion-rate discontinuity): collapse conviction so the gate demands fresh agreement under the new regime before acting.
Sourcepub fn confidence(&self) -> f32
pub fn confidence(&self) -> f32
Current conviction (observability).
Auto Trait Implementations§
impl<T> Freeze for ConfidenceGate<T>
impl<T> RefUnwindSafe for ConfidenceGate<T>where
Option<T>: RefUnwindSafe,
impl<T> Send for ConfidenceGate<T>
impl<T> Sync for ConfidenceGate<T>
impl<T> Unpin for ConfidenceGate<T>
impl<T> UnsafeUnpin for ConfidenceGate<T>where
Option<T>: UnsafeUnpin,
impl<T> UnwindSafe for ConfidenceGate<T>where
Option<T>: UnwindSafe,
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