pub struct SessionStepLedger { /* private fields */ }Expand description
In-memory, session-scoped StepLedger — pure (no fs). A Vec in plan
order; deterministic (no clock/uuid) for stable tests.
Trait Implementations§
Source§impl Default for SessionStepLedger
impl Default for SessionStepLedger
Source§fn default() -> SessionStepLedger
fn default() -> SessionStepLedger
Returns the “default value” for a type. Read more
Source§impl StepLedger for SessionStepLedger
impl StepLedger for SessionStepLedger
Source§fn set_plan(&self, steps: &[String]) -> usize
fn set_plan(&self, steps: &[String]) -> usize
Replace the plan with a fresh ordered list — the first step becomes
Active, the rest Todo. Blank descriptions are dropped; capped at
[
MAX_STEPS]. Returns the number of steps actually set.Source§fn advance(&self) -> Option<String>
fn advance(&self) -> Option<String>
Mark the Active step Done and activate the next Todo. Returns the new
active step’s description, or
None when the plan is complete/empty.Source§fn done_count(&self) -> u64
fn done_count(&self) -> u64
Completed steps (for
/context stats).Source§fn snapshot(&self) -> PlanSnapshot
fn snapshot(&self) -> PlanSnapshot
A full-state
PlanSnapshot for persistence/resume (#715): the ordered
steps with each one’s status, so a later Self::restore reinstates the
ledger EXACTLY (unlike Self::set_plan, which resets every status).Source§fn restore(&self, snap: &PlanSnapshot)
fn restore(&self, snap: &PlanSnapshot)
Restore the ledger from a
PlanSnapshot (#715) — replaces the steps
and their statuses verbatim (a full clear + replace, the inverse of
Self::snapshot). An empty snapshot leaves the ledger empty.Auto Trait Implementations§
impl !Freeze for SessionStepLedger
impl RefUnwindSafe for SessionStepLedger
impl Send for SessionStepLedger
impl Sync for SessionStepLedger
impl Unpin for SessionStepLedger
impl UnsafeUnpin for SessionStepLedger
impl UnwindSafe for SessionStepLedger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
Converts
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>
Converts
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