Weave documentation
Rust referenceweave-weft

weave-weft · error

Source declarations, signatures and documentation for error.

Reviewed implementation boundary: Producer signatures must be computed over the exact manifest before validate/from_bytes or publication; an empty signature is rejected. Reader interfaces do not establish constant-memory storage, and chain reference metadata alone does not submit or prove anchoring. See /libraries/weft/publish.

Source: sigil/weave/models/weft/src/error.rs. SHA-256: 0d3153589074cd0f3d6f03d25e2af91366454721cdc95cf97839f16352b04f8c.

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

Result type for Weft operations.

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

Source line: 4.

error::WeftError

Errors produced by Weft chunking, verification, fetch, and discovery.

#[derive(Debug, Error)]
pub enum WeftError {
    /// Chunk size was outside supported bounds.
    #[error("invalid chunk size {size}; expected 1..={max}")]
    InvalidChunkSize {
        /// Requested chunk size.
        size: usize,
        /// Maximum supported chunk size.
        max: usize,
    },

    /// Hash text did not decode to a 32-byte digest.
    #[error("invalid hash: {0}")]
    InvalidHash(String),

    /// A read from an input stream failed.
    #[error("I/O error: {0}")]
    Io(#[from] std::io::Error),

    /// Serialization or deserialization failed.
    #[error("serialization error: {0}")]
    Serialization(#[from] serde_json::Error),

    /// Merkle tree or proof verification failed.
    #[error("merkle error: {0}")]
    Merkle(String),

    /// Manifest fields are inconsistent or unsupported.
    #[error("manifest error: {0}")]
    Manifest(String),

    /// Fetched bytes failed integrity checks.
    #[error("integrity error: {0}")]
    Integrity(String),

    /// Required data was not available from any advertised peer.
    #[error("not found: {0}")]
    NotFound(String),

    /// Discovery or advertisement data is invalid.
    #[error("discovery error: {0}")]
    Discovery(String),

    /// Adapter boundary is intentionally not linked.
    #[error("unsupported: {0}")]
    Unsupported(String),
}

Source line: 8.

On this page