Weave documentation
Rust referenceweave-lens

weave-lens · error

Source declarations, signatures and documentation for error.

Reviewed implementation boundary: The current batching helper rejects multiple operations instead of implementing atomic batch commits. Cache/compaction/retention configuration fields do not establish running background compaction. See /libraries/lens/overview.

Source: sigil/weave/models/lens/src/error.rs. SHA-256: 580fc72c9a5a5fe2adbee88ee75f81c2af189ab97158bb9debeaeb7284e9ed2a.

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.

error::LensError

Errors that can occur during lens operations

#[derive(Debug, Error)]
pub enum LensError {
    #[error("Key not found")]
    KeyNotFound,

    #[error("Invalid B-tree structure: {0}")]
    InvalidStructure(String),

    #[error("Snapshot not found: {0}")]
    SnapshotNotFound(uuid::Uuid),

    #[error("Batch operation failed: {0}")]
    BatchFailed(String),

    #[error("Sub-database error: {0}")]
    SubDatabaseError(String),

    #[error("Cache error: {0}")]
    CacheError(String),

    #[error("Serialization error: {0}")]
    Serialization(#[from] serde_json::Error),

    #[error("Strand error: {0}")]
    Strand(#[from] StrandError),

    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),

    #[error("Access denied: agent {0} not authorized")]
    AccessDenied(String),

    #[error("Invalid key: {0}")]
    InvalidKey(String),

    #[error("Invalid value: {0}")]
    InvalidValue(String),

    #[error("Transaction conflict")]
    TransactionConflict,

    #[error("Compaction error: {0}")]
    CompactionError(String),
}

Source line: 8.

error::Result

Result type for lens operations

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

Source line: 53.

On this page