pub enum CasError {
BlobNotFound(String),
HashMismatch {
expected: String,
actual: String,
},
LockPoisoned(String),
Io(Error),
CompressionError(String),
DecompressionError(String),
DecompressionTooLarge {
max: usize,
},
AlreadyExists(String),
InvalidPath(String),
Pack(PackError),
GcPathEscape(String),
TaskJoin(String),
}Expand description
Errors that can occur during CAS operations.
Variants§
BlobNotFound(String)
The requested blob does not exist in the store (loose or packed).
HashMismatch
The stored bytes did not hash to the requested address.
Fields
LockPoisoned(String)
A mutex protecting interior cache state was poisoned.
Io(Error)
An underlying filesystem operation failed.
CompressionError(String)
Zstd compression failed (requires the zstd feature).
DecompressionError(String)
Zstd decompression failed (requires the zstd feature).
DecompressionTooLarge
Decompressed data exceeded the configured safety limit (zip-bomb protection).
AlreadyExists(String)
crate::store::BlobStore::put_blob_new was called for an existing blob.
InvalidPath(String)
A derived path was not usable (e.g. malformed hex on disk).
Pack(PackError)
A packfile operation failed.
GcPathEscape(String)
A garbage-collection sweep was asked to trash or delete a path outside the store root (internal invariant violation).
TaskJoin(String)
A spawn_blocking task joined by an async GC wrapper panicked or
the tokio runtime was already shut down (requires the tokio
feature).
Trait Implementations§
Source§impl Error for CasError
impl Error for CasError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()