pub enum BlobCacheError {
Show 17 variants
Path(PathTokenError),
Storage(StorageError),
NoCloudHome,
File(FileError),
Commit(CommitNewFileError),
Metadata(DbError),
StorageSetup(StorageSetupError),
OpeningAuthority(BlobOpeningAuthorityError),
ExternalMissing {
id: String,
path: PathBuf,
source: FileError,
},
ExternalSizeMismatch {
id: String,
path: PathBuf,
},
LocalSizeMismatch {
path: PathBuf,
expected_size: u64,
actual_size: u64,
},
NoLocalCopy {
namespace: String,
id: String,
},
LocalityUnresolved {
id: String,
},
NoExternalRef {
id: String,
},
LocalIntegrity {
path: PathBuf,
expected_size: u64,
actual_size: u64,
expected_hash: ObjectHash,
actual_hash: ObjectHash,
},
RangeOverflow {
id: String,
offset: u64,
len: u64,
},
RangeOutOfBounds {
id: String,
offset: u64,
end: u64,
size: u64,
},
}Expand description
Why a blob-cache operation failed.
Variants§
Path(PathTokenError)
A blob id/namespace/cloud_path that can’t form a safe path — bad data
that could escape the store dir or can’t be partitioned. The blob is
refused before any path is built (the same gate the pull runs).
Storage(StorageError)
A cloud read failed: the blob isn’t in the cloud, or the backend errored
(surfaced from the exact blob operations on CloudSyncObjectStorage).
NoCloudHome
A Remote blob’s bytes were needed from the cloud but no cloud home is connected, so there is no storage to fetch them from. A home-less store holds only Local blobs (external refs + the local store), which serve straight off disk and never reach the cloud-miss path; reaching here means a Remote blob was read with no provider connected — a real fault, surfaced rather than masked.
File(FileError)
A local-disk failure: a cache write, a folder move, or a test cache reset.
Commit(CommitNewFileError)
Publishing a staged cache file failed.
Metadata(DbError)
A blob-metadata query failed — resolving the blob’s locality, looking up its external ref, or reading its cache budget or expected size. A database read the blob path depends on, distinct from a disk I/O failure.
StorageSetup(StorageSetupError)
Building the sync storage from config failed — missing credentials or cloud configuration — when a Remote blob needed it. A configuration fault, not a disk I/O error.
OpeningAuthority(BlobOpeningAuthorityError)
The blob’s declared authority cannot open its stored representation.
ExternalMissing
A registered external blob ref (a user-provided Local blob’s user-owned file) points at a file that is no longer there — the user moved, renamed, or deleted it. Terminal: an external blob has no cloud copy to fall back to, so this never re-fetches. The host surfaces a “files missing / moved” state whose actions are relocate (pick the new folder, re-register) or re-import.
Fields
ExternalSizeMismatch
A registered external blob’s file is present but its length no longer matches
the registered size — the user truncated it or replaced it with a
different-length file. Terminal like Self::ExternalMissing: a mismatch
means this is not the exact file coven registered.
LocalSizeMismatch
A local-store blob has a different length from its stored declaration.
NoLocalCopy
A Local blob (its gated locality root’s gate is off) has no copy in the local store. A Local blob has no cloud copy, so there is nothing to fall back to: the state is broken, not a cache miss. Surfaced loud rather than silently fetching from the cloud — a make_local rollback leftover, an interrupted materialize, or a lost local file would otherwise be papered over. The host re-materializes or repairs.
LocalityUnresolved
A blob could not be resolved to a locality: its namespace declares no blob-bearing table, or that table has no row with the id, or the row reaches no gated root or remote root — so the source of Local-vs-Remote truth can’t be read. In a consistent store every readable blob has a locality root, so this is a real fault — surfaced rather than guessing a source by probing.
NoExternalRef
The gate resolved a blob to Local + user-provided, but no external-ref row is registered for it. A user-provided Local blob’s bytes live only at the user’s path, tracked by that ref; its absence is corruption (a lost or never-written ref), not a cache miss to fall through — surfaced loud so the host repairs or re-imports.
LocalIntegrity
An authoritative local plaintext file exists at the exact path but its bytes differ from the row’s signed size/hash.
RangeOverflow
Adding the requested range length overflowed its offset.
RangeOutOfBounds
The requested range lies outside the opened blob.
Trait Implementations§
Source§impl Debug for BlobCacheError
impl Debug for BlobCacheError
Source§impl Display for BlobCacheError
impl Display for BlobCacheError
Source§impl Error for BlobCacheError
impl Error for BlobCacheError
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
Source§impl From<BlobCacheError> for StoreError
impl From<BlobCacheError> for StoreError
Source§fn from(source: BlobCacheError) -> Self
fn from(source: BlobCacheError) -> Self
Source§impl From<CachedLocatorRemovalError> for BlobCacheError
impl From<CachedLocatorRemovalError> for BlobCacheError
Source§fn from(error: CachedLocatorRemovalError) -> Self
fn from(error: CachedLocatorRemovalError) -> Self
Source§impl From<DbError> for BlobCacheError
impl From<DbError> for BlobCacheError
Source§impl From<LocalBlobStoreError> for BlobCacheError
impl From<LocalBlobStoreError> for BlobCacheError
Source§fn from(e: LocalBlobStoreError) -> Self
fn from(e: LocalBlobStoreError) -> Self
Source§impl From<PathTokenError> for BlobCacheError
impl From<PathTokenError> for BlobCacheError
Source§fn from(e: PathTokenError) -> Self
fn from(e: PathTokenError) -> Self
Source§impl From<RequiredLocalBlobPathError> for BlobCacheError
impl From<RequiredLocalBlobPathError> for BlobCacheError
Source§fn from(error: RequiredLocalBlobPathError) -> Self
fn from(error: RequiredLocalBlobPathError) -> Self
Source§impl From<StorageError> for BlobCacheError
impl From<StorageError> for BlobCacheError
Source§fn from(e: StorageError) -> Self
fn from(e: StorageError) -> Self
Source§impl From<StorageSetupError> for BlobCacheError
A Remote blob read needs sync storage; if building it from config fails
(missing credentials or cloud configuration) the read surfaces that as a
configuration fault, not a disk I/O error. The cache error preserves the
setup failure’s message at this API boundary.
impl From<StorageSetupError> for BlobCacheError
A Remote blob read needs sync storage; if building it from config fails (missing credentials or cloud configuration) the read surfaces that as a configuration fault, not a disk I/O error. The cache error preserves the setup failure’s message at this API boundary.
Source§fn from(e: StorageSetupError) -> Self
fn from(e: StorageSetupError) -> Self
Source§impl From<StoreBlobFileError> for BlobCacheError
impl From<StoreBlobFileError> for BlobCacheError
Source§fn from(error: StoreBlobFileError) -> Self
fn from(error: StoreBlobFileError) -> Self
Auto Trait Implementations§
impl Freeze for BlobCacheError
impl !RefUnwindSafe for BlobCacheError
impl Send for BlobCacheError
impl Sync for BlobCacheError
impl Unpin for BlobCacheError
impl UnsafeUnpin for BlobCacheError
impl !UnwindSafe for BlobCacheError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more