Weave documentation
Rust referenceweave-loom

weave-loom · commands::mandate

Source declarations, signatures and documentation for commands::mandate.

Source: sigil/weave/tools/loom/src/commands/mandate.rs. SHA-256: 39e4fbc598932e692660e07810c866c574fca78134f6700df8096f32336e8fac.

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.

commands::mandate::MandateArgs

Arguments for loom mandate.

#[derive(Debug, clap::Args)]
pub struct MandateArgs {
/// Subcommand.

#[command(subcommand)]
pub action: MandateAction
}

Source line: 27.

commands::mandate::MandateAction

loom mandate <subcommand>.

#[derive(Debug, Subcommand)]
pub enum MandateAction {
    /// Issue a new mandate granting `--grant` to `--subject`.
    Issue {
        /// Subject DID receiving the grant.
        #[arg(long)]
        subject: String,
        /// Permission being granted: read | write | approve | admin | mint.
        #[arg(long)]
        grant: String,
        /// Min approvals (only meaningful for `approve` / `mint`).
        #[arg(long)]
        min_approvals: Option<u32>,
        /// Optional comma-separated allow-list of approver DIDs.
        #[arg(long)]
        allowed_approvers: Option<String>,
        /// Optional millisecond expiry-from-now (e.g. 30 days = 2592000000).
        #[arg(long)]
        expires_in_ms: Option<u64>,
    },

    /// List every mandate in this repo.
    List,

    /// Revoke a mandate by id.
    Revoke {
        /// Mandate id (16-hex prefix).
        id: String,
    },
}

Source line: 35.

commands::mandate::run

Execute loom mandate.

pub async fn run(args: MandateArgs) -> Result<()>;

Source line: 66.

On this page