pub struct RecoveryFacts {
pub next_due: Timestamp,
pub snoozed_until: Option<Timestamp>,
pub snooze_budget_spent: bool,
pub rewrap_due: bool,
}Expand description
The recovery-verification cadence, flattened to the facts the predicate needs.
The 7 d → 90 d → 180 d ladder, its re-arm triggers, and its snooze accounting stay owned by
the cadence scheduler; this module consumes the already-computed next_due and never
recomputes the ladder. capsule-sdk depends on this crate and not the reverse, so the
scheduler cannot be named here — the SDK projects into this struct instead.
Fields§
§next_due: TimestampWhen the next verification prompt becomes due.
snoozed_until: Option<Timestamp>When an active snooze expires, if one is active.
This is where recovery snoozing lives, rather than
NotifyInput::suppressed: the cadence scheduler owns
the bounded-snooze-then-badge budget, so the snooze and the budget that bounds it stay
in one place. The generic map is for the other five classes.
A snooze set before the due date does not make the check due earlier: the class is due
at the later of this and next_due.
snooze_budget_spent: boolWhether the consecutive-snooze budget is spent. When it is, the class has degraded to a persistent, non-blocking badge: it is still reported (a client cannot render a badge for a condition it was not told about), but it is no longer pre-armed as a notification — the badge never escalates back into an alert on its own.
rewrap_due: boolWhether the scheduler has escalated to the guided re-wrap — repeated verification failures, or the user explicitly declaring the secret lost.
Carried because the alert class set is closed and recovery_check_due is the only class
that can report it: without this fact the alert for “you told us you lost your recovery
secret” would be indistinguishable from the routine ninety-day check. It surfaces as the
recovery parameter ("rewrap" / "check") so a client routes into the guided re-wrap
instead of a verification prompt. #[serde(default)] so a snapshot persisted before this
field existed still loads.
Trait Implementations§
Source§impl Clone for RecoveryFacts
impl Clone for RecoveryFacts
Source§fn clone(&self) -> RecoveryFacts
fn clone(&self) -> RecoveryFacts
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for RecoveryFacts
Source§impl Debug for RecoveryFacts
impl Debug for RecoveryFacts
Source§impl<'de> Deserialize<'de> for RecoveryFacts
impl<'de> Deserialize<'de> for RecoveryFacts
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>,
impl Eq for RecoveryFacts
Source§impl PartialEq for RecoveryFacts
impl PartialEq for RecoveryFacts
Source§fn eq(&self, other: &RecoveryFacts) -> bool
fn eq(&self, other: &RecoveryFacts) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for RecoveryFacts
impl Serialize for RecoveryFacts
impl StructuralPartialEq for RecoveryFacts
Auto Trait Implementations§
impl Freeze for RecoveryFacts
impl RefUnwindSafe for RecoveryFacts
impl Send for RecoveryFacts
impl Sync for RecoveryFacts
impl Unpin for RecoveryFacts
impl UnsafeUnpin for RecoveryFacts
impl UnwindSafe for RecoveryFacts
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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