pub enum ActiveOverlay {
State,
Verdict(Box<Evaluation>),
FrictionPause(FrictionPause),
Risk {
trigger: RiskOverlayTrigger,
opened_at: Instant,
},
}Expand description
Runtime representation of a live overlay. This exists as a
separate enum (not just OverlayTarget) so overlays can carry
ephemeral state — scroll offset, filter text, a timer, a
typed-confirm buffer — that the input + render layers mutate
without going back through dispatch.
Variants§
State
The operator-state overview. Sourced every render from
engine.operator_state; carries no state of its own.
Verdict(Box<Evaluation>)
Per-coin gate verdict. Carries the full
zero_engine_client::Evaluation returned by the engine
so the overlay renders exactly what the engine said — no
local recomputation, no synthetic fields.
FrictionPause(FrictionPause)
Friction pause — visible countdown and, at L2+, a typed
confirmation before a risk-increasing command runs. The
overlay owns the pending Command so the event loop can
re-dispatch via run_bypass_friction on completion.
Risk
M2 §4 risk overlay. Opens automatically when the
operator-state snapshot reports L3/L4 or the engine reports
drawdown within AppState::GUARDRAIL_PROXIMITY_PP of the
last hard-alert threshold. The overlay never owns a
pending command — unlike ActiveOverlay::FrictionPause,
it is a context surface, not a gate. The operator
dismisses with any key; the auto-open hook honors a
60 s cooldown (see AppState::RISK_DISMISS_COOLDOWN)
unless the trigger strictly escalates.
Fields
trigger: RiskOverlayTriggerImplementations§
Source§impl ActiveOverlay
impl ActiveOverlay
Sourcepub fn from_target(t: OverlayTarget) -> Self
pub fn from_target(t: OverlayTarget) -> Self
Construct an overlay from a OverlayTarget signal
emitted by the dispatcher. Only applies to self-contained
overlays; friction overlays are built separately because
they need the full FrictionDecision + pending
Command.
Trait Implementations§
Source§impl Clone for ActiveOverlay
impl Clone for ActiveOverlay
Source§fn clone(&self) -> ActiveOverlay
fn clone(&self) -> ActiveOverlay
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ActiveOverlay
impl RefUnwindSafe for ActiveOverlay
impl Send for ActiveOverlay
impl Sync for ActiveOverlay
impl Unpin for ActiveOverlay
impl UnsafeUnpin for ActiveOverlay
impl UnwindSafe for ActiveOverlay
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more