Weave documentation
Rust referencel1fe-weave-core

l1fe-weave-core · error

Source declarations, signatures and documentation for error.

Reviewed implementation boundary: Some core wrappers derive transport keys from DID strings. Do not infer secret key custody or authenticated peers from a supplied DID string; inspect the chosen wrapper and transport configuration. See /libraries/weave-core/overview.

Source: sigil/weave/libs/weave-core/src/error.rs. SHA-256: 69e60276f74dfb9c1f659ffc39b926af2eaec24955d7d240fee23f762e94e411.

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

Main error type for the Weave

#[derive(Debug, Error)]
pub enum WeaveError {
    /// Identity-related errors
    #[error("Identity error: {0}")]
    Identity(String),

    /// Storage-related errors
    #[error("Storage error: {0}")]
    Storage(String),

    /// Network-related errors
    #[error("Network error: {0}")]
    Network(String),

    /// Filesystem-related errors
    #[error("Filesystem error: {0}")]
    FileSystem(String),

    /// Cryptographic errors
    #[error("Crypto error: {0}")]
    Crypto(String),

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

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

    /// Database errors
    #[error("Database error: {0}")]
    Database(String),

    /// Invalid DID format
    #[error("Invalid DID: {0}")]
    InvalidDid(String),

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

    /// Resource not found
    #[error("Not found: {0}")]
    NotFound(String),

    /// Operation timeout
    #[error("Operation timed out")]
    Timeout,

    /// Invalid configuration
    #[error("Invalid configuration: {0}")]
    InvalidConfig(String),

    /// Protocol error
    #[error("Protocol error: {0}")]
    Protocol(String),

    /// SDK errors from weave-identity
    #[error("SDK error: {0}")]
    Sdk(String),

    /// Initialization errors
    #[error("Initialization error: {0}")]
    Initialization(String),

    /// Resolution errors
    #[error("Resolution error: {0}")]
    Resolution(String),

    /// Not implemented
    #[error("Not implemented: {0}")]
    NotImplemented(String),

    /// Other errors
    #[error(transparent)]
    Other(#[from] Box<dyn std::error::Error + Send + Sync>),
}

Source line: 7.

error::Result

Result type alias for Weave operations

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

Source line: 86.

error::WeaveError::identity

Create a new identity error

pub fn identity(msg: impl Into<String>) -> Self;

Source line: 90.

error::WeaveError::storage

Create a new storage error

pub fn storage(msg: impl Into<String>) -> Self;

Source line: 95.

error::WeaveError::network

Create a new network error

pub fn network(msg: impl Into<String>) -> Self;

Source line: 100.

error::WeaveError::filesystem

Create a new filesystem error

pub fn filesystem(msg: impl Into<String>) -> Self;

Source line: 105.

error::WeaveError::crypto

Create a new crypto error

pub fn crypto(msg: impl Into<String>) -> Self;

Source line: 110.

error::WeaveError::database

Create a new database error

pub fn database(msg: impl Into<String>) -> Self;

Source line: 115.

error::WeaveError::protocol

Create a new protocol error

pub fn protocol(msg: impl Into<String>) -> Self;

Source line: 120.

error::WeaveError::sdk

Create a new SDK error

pub fn sdk(msg: impl Into<String>) -> Self;

Source line: 125.

error::WeaveError::initialization

Create a new initialization error

pub fn initialization(msg: impl Into<String>) -> Self;

Source line: 130.

error::WeaveError::resolution

Create a new resolution error

pub fn resolution(msg: impl Into<String>) -> Self;

Source line: 135.

error::WeaveError::not_implemented

Create a new not implemented error

pub fn not_implemented(msg: impl Into<String>) -> Self;

Source line: 140.

On this page