pub enum LifecycleAction {
Close,
Reopen,
Extend,
Skip,
Pause,
Resume,
AdjustFuture,
Ignore,
}Expand description
One of the seven lifecycle actions (data-model.md §6).
Variants§
Close
Capture the instance’s immutable snapshot, mark it closed, and log the event.
Reopen
Reopen a closed instance: restore state to active and log the event.
WP04 of mission cycle-capacity-planning-01M3C85C. close’s inverse, and
deliberately not its mirror: a closed cycle’s capacity snapshot is
immutable historical evidence (C-008/NFR-002), so a reopen restores the record’s
state and appends one cycle_reopened event naming the snapshot it reopens —
and captures nothing. It is the one way a closed cycle may be configured again.
Extend
Push the instance’s due date out by one cadence period.
Skip
Record the sequence as skipped so it is never regenerated.
Pause
Pause the schedule and every affected instance.
Resume
Resume the schedule and every affected instance.
AdjustFuture
Re-derive every future instance’s dates from the schedule’s own definition, and re-derive the cursor.
Ignore
The explicit “no action” decision: nothing is written.
Implementations§
Source§impl LifecycleAction
impl LifecycleAction
Sourcepub const ALL: [Self; 8]
pub const ALL: [Self; 8]
Every action, in the data model’s order — with WP04’s reopen beside its
inverse close.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The contract’s spelling, used verbatim in payloads and tests.
Sourcepub const fn requires_reason(self) -> bool
pub const fn requires_reason(self) -> bool
Whether the action records a reason, and therefore refuses a missing one.
close, reopen, extend, skip and adjust-future change what a cycle
is; each is an auditable decision, so the request must carry the reason it was
taken. pause/resume are state toggles, and ignore decides nothing.
Trait Implementations§
Source§impl Clone for LifecycleAction
impl Clone for LifecycleAction
impl Copy for LifecycleAction
Source§impl Debug for LifecycleAction
impl Debug for LifecycleAction
impl Eq for LifecycleAction
Source§impl Hash for LifecycleAction
impl Hash for LifecycleAction
Source§impl PartialEq for LifecycleAction
impl PartialEq for LifecycleAction
impl StructuralPartialEq for LifecycleAction
Auto Trait Implementations§
impl Freeze for LifecycleAction
impl RefUnwindSafe for LifecycleAction
impl Send for LifecycleAction
impl Sync for LifecycleAction
impl Unpin for LifecycleAction
impl UnsafeUnpin for LifecycleAction
impl UnwindSafe for LifecycleAction
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<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
key and return true if they are equal.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