strand-vault · error
Source declarations, signatures and documentation for error.
Reviewed implementation boundary: Vault construction does not automatically replay WAL entries. Snapshotting is a best-effort directory copy; replication mode/live settings are not implemented as runtime controls, and the capability preamble is not ACT authorization verification. See /libraries/strand-vault/overview.
Source: sigil/weave/libs/strand-vault/src/error.rs. SHA-256: 1202f599f433a4c7d5b403d99a7a4ecc4a9ad5b2d1eae4f73a17f13d82f54571.
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::VaultError
Vault-specific errors
#[derive(Debug, Error)]
pub enum VaultError {
#[error("Storage error: {0}")]
Storage(#[from] StorageError),
#[error("Strand error: {0}")]
Strand(#[from] strand_errors::StrandError),
#[error("No organization DID configured")]
NoOrganizationDid,
#[error("Unauthorized agent: {0}")]
UnauthorizedAgent(String),
#[error("Invalid namespace: {0}")]
InvalidNamespace(String),
#[error("Key derivation failed: {0}")]
KeyDerivation(String),
#[error("Strand not found: {0:?}")]
StrandNotFound(StrandId),
#[error("Permission denied: {0}")]
PermissionDenied(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
#[error("Quota exceeded: {0}")]
QuotaExceeded(String),
#[error("Throttled: {0}")]
Throttled(String),
#[error("Replication error: {0}")]
Replication(String),
#[error("Capability rejected")]
CapabilityRejected,
#[error("Replication divergence detected: {0}")]
DivergenceDetected(String),
#[error("Replication lag high: {0}")]
ReplicationLagHigh(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
// Identity errors are not used in core vault; keep variant for forward compat behind feature gates if needed
#[error("Strand creation error: {0}")]
StrandCreation(#[from] strand::StrandError),
#[error("Serialization error: {0}")]
Serialization(#[from] bincode::Error),
#[error("Not implemented: {0}")]
NotImplemented(&'static str),
#[error("Internal error: {0}")]
Internal(String),
}Source line: 9.
error::StorageError
Storage-specific errors
#[derive(Debug, Error)]
pub enum StorageError {
#[error("Backend unavailable: {0}")]
BackendUnavailable(String),
#[error("Metadata corrupted: {0}")]
MetadataCorrupted(String),
#[error("Storage full")]
StorageFull,
#[error("Invalid path: {0}")]
InvalidPath(String),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
}Source line: 80.
error::Result
Result type alias
pub type Result<T> = std::result::Result<T, VaultError>;Source line: 98.