pub enum InitialState {
Pending,
Active,
}Expand description
OPP-12 Phase-1 (0.8.19 Slice 5) — the CREATE-TIME subset of LifecycleState.
A write can only bring a node into existence as Pending or Active (design
§2 / gap-6). You CANNOT create a Deleted/Purged node — those states are
reachable only via the transition/purge verbs (Slice 10). Making the
create-time surface a separate two-variant type is the TYPED rejection: a
deleted/purged create is simply unrepresentable in the Rust API (the SDK
bindings map an out-of-subset string to a typed write-validation error).
Variants§
Pending
Active
The back-compat default: every pre-lifecycle write lands Active, matching
the migration step-20 DEFAULT 'active'.
Implementations§
Source§impl InitialState
impl InitialState
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
On-disk canonical_nodes.state spelling for a create-time state.
Sourcepub fn to_lifecycle_state(self) -> LifecycleState
pub fn to_lifecycle_state(self) -> LifecycleState
The full LifecycleState this create-time state corresponds to.
Sourcepub fn from_create_str(value: &str) -> Option<Self>
pub fn from_create_str(value: &str) -> Option<Self>
Parse a caller-supplied create-time state string into the create-time
subset. Some(state) for "pending"/"active"; None for "deleted",
"purged", or any unknown value — the SDK bindings turn None into a
typed write-validation rejection (you cannot CREATE a deleted/purged node).
Trait Implementations§
Source§impl Clone for InitialState
impl Clone for InitialState
Source§fn clone(&self) -> InitialState
fn clone(&self) -> InitialState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more