mars-protocol · lifecycle
Public declarations and documentation for mars-protocol::lifecycle.
Package: mars-protocol · Workspace version: 0.1.0 · Module: lifecycle
This reference follows declared modules and public syntax, including public implementation methods. Function bodies and constant values are omitted. Feature conditions are retained. Private-module re-exports and trait resolution require the compiler; not every declaration is a root import.
lifecycle::LifecycleStatus
The lifecycle status of a MARS registry entry.
#[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "contracts", derive(schemars::JsonSchema, utoipa::ToSchema))]
#[serde(rename_all = "camelCase")]
pub enum LifecycleStatus {
/// Entry submitted but not yet bonded/anchored.
Draft,
/// Entry bonded, anchored, and serving.
#[default]
Active,
/// Superseded by newer version; still resolvable.
Deprecated,
/// No longer actively served; preserved for history.
Archived,
/// Permanently deactivated; irreversible.
Revoked,
/// Published for testing; lower bond requirements.
Experimental,
}Source line: 17.
lifecycle::LifecycleStatus::as_str
Returns the lowercase string representation.
pub fn as_str(&self) -> &'static str;Source line: 35.
lifecycle::LifecycleStatus::can_transition_to
Check whether transitioning from self to target is valid.
pub fn can_transition_to(&self, target: Self) -> bool;Source line: 47.
lifecycle::LifecycleStatus::is_resolvable
Returns true if the entry is resolvable (can be read).
pub fn is_resolvable(&self) -> bool;Source line: 66.
lifecycle::LifecycleStatus::allows_updates
Returns true if write operations are permitted.
pub fn allows_updates(&self) -> bool;Source line: 74.
lifecycle::RevocationReason
Reason for revoking an entry. Per MARS Specification Section 6.5.
#[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "contracts", derive(schemars::JsonSchema, utoipa::ToSchema))]
#[serde(rename_all = "camelCase")]
pub enum RevocationReason {
KeyCompromise,
MaliciousBehavior,
Voluntary,
Superseded,
ParentRevocation,
HumanRootRevocation,
}Source line: 92.
lifecycle::RevocationReason::as_str
pub fn as_str(&self) -> &'static str;Source line: 102.
Source provenance
Source: mars-protocol/src/lifecycle.rs · SHA-256 ffb40f6801609359728e88717eaf29b6373b53b2ce7e1b9c42a0679e821f2b2c. Package overview.