Weave documentation
Rust referenceloom-mars

loom-mars · store

Source declarations, signatures and documentation for store.

Source: sigil/weave/tools/loom-mars/src/store.rs. SHA-256: 22a596289f3b9c85115e887e1d18b2422434a19d0f39db47a17c55f26f57af2d.

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.

store::MARS_LENS

Canonical Lens database name for MARS.

pub const MARS_LENS: &str;

Source line: 8.

store::MarsError

Errors raised by the MARS store.

#[derive(Debug, Error)]
pub enum MarsError {
    /// Underlying Weave error.
    #[error("weave error: {0}")]
    Weave(String),
    /// Serialization failure.
    #[error("serialization: {0}")]
    Json(#[from] serde_json::Error),
    /// Anchor with the requested DID not found.
    #[error("anchor not found: {0}")]
    NotFound(String),
}

Source line: 12.

store::Result

Result alias.

pub type Result<T> = std::result::Result<T, MarsError>;

Source line: 31.

store::MarsStore

Store handle.

pub struct MarsStore<'a> {

}

Source line: 53.

store::MarsStore<'a>::open

Idempotently open the MARS Lens.

pub async fn open(node: &'a WeaveNode) -> Result<Self>;

Source line: 59.

store::MarsStore<'a>::register

Persist an anchor (registration).

pub async fn register(&self, anchor: &MarsAnchor) -> Result<()>;

Source line: 65.

store::MarsStore<'a>::get

Look up by DID.

pub async fn get(&self, did: &str) -> Result<MarsAnchor>;

Source line: 73.

store::MarsStore<'a>::try_get

Soft get.

pub async fn try_get(&self, did: &str) -> Result<Option<MarsAnchor>>;

Source line: 84.

store::MarsStore<'a>::put_update

Append an update event.

pub async fn put_update(&self, update: &MarsUpdate) -> Result<()>;

Source line: 93.

store::MarsStore<'a>::put_revocation

Append a revocation event.

pub async fn put_revocation(&self, rev: &MarsRevocation) -> Result<()>;

Source line: 101.

store::MarsStore<'a>::put_transfer

Append a transfer event.

pub async fn put_transfer(&self, t: &MarsTransfer) -> Result<()>;

Source line: 109.

store::MarsStore<'a>::list_all

List every registered anchor. Range-scans the anchor: key namespace; ignores update / revocation / transfer / attestation events. Output is unordered — caller sorts as needed.

pub async fn list_all(&self) -> Result<Vec<MarsAnchor>>;

Source line: 119.

store::MarsStore<'a>::put_attestation

Append an attestation event.

pub async fn put_attestation(&self, a: &MarsAttestation) -> Result<()>;

Source line: 151.

On this page