Weave documentation
Rust referenceloom-deploy

loom-deploy · intent

Source declarations, signatures and documentation for intent.

Source: sigil/weave/tools/loom-deploy/src/intent.rs. SHA-256: 05a9875e3fc9820224546d19ef266ae4bcb1854f5cebc3b871982e813b2a0cf5.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

intent::DeployStatus

Lifecycle.

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum DeployStatus {
    /// Written but not yet picked up by the marketplace.
    Pending,
    /// Marketplace accepted the intent and is provisioning.
    Accepted,
    /// Provisioning succeeded; the workload is live.
    Running,
    /// Provisioning failed; reason in `error`.
    Failed,
    /// Operator stopped it.
    Stopped,
}

Source line: 11.

intent::DeployIntent

One deploy attempt.

#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
pub struct DeployIntent {
/// 16-hex content-addressed id (BLAKE3 over canonical bytes).

pub id: String,
/// Loom repo id this deploy comes from.

pub repo_id: String,
/// Commit being deployed (loom commit hash, hex).

pub commit_hash: String,
/// Branch the deploy is from (informational).

pub branch: String,
/// Author DID — who initiated the deploy.

pub author_did: String,
/// The deploy spec.

pub spec: DeploySpec,
/// UNIX millis the intent was minted.

pub minted_at_ms: u64,
/// Current status.

pub status: DeployStatus,
/// Optional failure reason.

#[serde(default)]
pub error: Option<String>
}

Source line: 26.

intent::DeployIntent::compute_id

Compute the content-addressed id from a fully-formed intent.

pub fn compute_id(
        repo_id: &str,
        commit_hash: &str,
        branch: &str,
        author_did: &str,
        spec: &DeploySpec,
        minted_at_ms: u64,
    ) -> Result<String, serde_json::Error>;

Source line: 50.

intent::DeployIntent::new_pending

Build a fresh Pending intent.

pub fn new_pending(
        repo_id: String,
        commit_hash: String,
        branch: String,
        author_did: String,
        spec: DeploySpec,
        minted_at_ms: u64,
    ) -> Result<Self, serde_json::Error>;

Source line: 72.

On this page