Weave documentation
Rust referenceweave-locus

weave-locus · error

Source declarations, signatures and documentation for error.

Reviewed implementation boundary: Rollback records a marker; mount descriptions and governance metadata alone do not execute mounting or enforce signature authorization. Operations can have separate metadata/blob failure points. See /libraries/locus/overview.

Source: sigil/weave/models/locus/src/error.rs. SHA-256: 4aff4b17ec852789194d8768a67822e6c9647eeb12a3a559942aad0f8da06ac8.

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::LocusError

Errors that can occur during locus operations

#[derive(Debug, Error)]
pub enum LocusError {
    #[error("File not found: {0}")]
    FileNotFound(String),

    #[error("Directory not found: {0}")]
    DirectoryNotFound(String),

    #[error("Path already exists: {0}")]
    AlreadyExists(String),

    #[error("Not a directory: {0}")]
    NotADirectory(String),

    #[error("Not a file: {0}")]
    NotAFile(String),

    #[error("Directory not empty: {0}")]
    DirectoryNotEmpty(String),

    #[error("Invalid path: {0}")]
    InvalidPath(String),

    #[error("Permission denied: {0}")]
    PermissionDenied(String),

    #[error("Symlink loop detected")]
    SymlinkLoop,

    #[error("Mount point error: {0}")]
    MountError(String),

    #[error("Version conflict: expected {expected}, got {actual}")]
    VersionConflict { expected: u64, actual: u64 },

    #[error("Blob error: {0}")]
    BlobError(String),

    #[error("Metadata error: {0}")]
    MetadataError(String),

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

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

    #[error("Lens error: {0}")]
    Lens(#[from] lens::LensError),

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

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

    #[error("Invalid operation: {0}")]
    InvalidOperation(String),
}

Source line: 8.

error::Result

Result type for locus operations

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

Source line: 68.

On this page