pub struct NoteLifecycleSpec {
pub field: &'static str,
pub initial: &'static str,
pub terminal: &'static [&'static str],
pub transitions: &'static [(&'static str, &'static str)],
}Expand description
Lifecycle specification for a note kind (ADR-004 §NoteKindSpec).
Declares which field holds the kind’s domain state, the initial value, terminal values, and allowed transitions. The runtime uses this to validate lifecycle operations at the verb boundary without hard-coding kind-specific logic in the shared CRUD path.
Phase 1 (current): packs declare the spec; the runtime records it for
documentation and future enforcement.
Phase 2 (future ADR): the runtime uses field to route lifecycle writes
to a first-class column rather than properties.
Fields§
§field: &'static strThe field name that holds the kind’s lifecycle state.
ADR-004 mandates "kind_status" for pack-owned lifecycle fields to
avoid the semantic collision with Note.status (NoteStatus).
initial: &'static strThe value assigned when a note of this kind is first created.
terminal: &'static [&'static str]Values from which no further transitions are possible.
transitions: &'static [(&'static str, &'static str)]Allowed (from, to) transitions. "*" as from matches any state.
Trait Implementations§
Source§impl Clone for NoteLifecycleSpec
impl Clone for NoteLifecycleSpec
Source§fn clone(&self) -> NoteLifecycleSpec
fn clone(&self) -> NoteLifecycleSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for NoteLifecycleSpec
impl Debug for NoteLifecycleSpec
Source§impl PartialEq for NoteLifecycleSpec
impl PartialEq for NoteLifecycleSpec
Source§fn eq(&self, other: &NoteLifecycleSpec) -> bool
fn eq(&self, other: &NoteLifecycleSpec) -> bool
self and other values to be equal, and is used by ==.