Skip to main content

BlobCacheError

Enum BlobCacheError 

Source
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

§path: PathBuf
§source: FileError

The underlying read failure — a missing file or a real I/O error, preserved rather than collapsed so the host sees why the read failed.

§

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.

Fields

§path: PathBuf
§

LocalSizeMismatch

A local-store blob has a different length from its stored declaration.

Fields

§path: PathBuf
§expected_size: u64
§actual_size: u64
§

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.

Fields

§namespace: String
§

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.

Fields

§

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.

Fields

§

LocalIntegrity

An authoritative local plaintext file exists at the exact path but its bytes differ from the row’s signed size/hash.

Fields

§path: PathBuf
§expected_size: u64
§actual_size: u64
§expected_hash: ObjectHash
§actual_hash: ObjectHash
§

RangeOverflow

Adding the requested range length overflowed its offset.

Fields

§offset: u64
§len: u64
§

RangeOutOfBounds

The requested range lies outside the opened blob.

Fields

§offset: u64
§end: u64
§size: u64

Trait Implementations§

Source§

impl Debug for BlobCacheError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for BlobCacheError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for BlobCacheError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<BlobCacheError> for StoreError

Source§

fn from(source: BlobCacheError) -> Self

Converts to this type from the input type.
Source§

impl From<CachedLocatorRemovalError> for BlobCacheError

Source§

fn from(error: CachedLocatorRemovalError) -> Self

Converts to this type from the input type.
Source§

impl From<DbError> for BlobCacheError

Source§

fn from(error: DbError) -> Self

Converts to this type from the input type.
Source§

impl From<LocalBlobStoreError> for BlobCacheError

Source§

fn from(e: LocalBlobStoreError) -> Self

Converts to this type from the input type.
Source§

impl From<PathTokenError> for BlobCacheError

Source§

fn from(e: PathTokenError) -> Self

Converts to this type from the input type.
Source§

impl From<RequiredLocalBlobPathError> for BlobCacheError

Source§

fn from(error: RequiredLocalBlobPathError) -> Self

Converts to this type from the input type.
Source§

impl From<StorageError> for BlobCacheError

Source§

fn from(e: StorageError) -> Self

Converts to this type from the input type.
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.

Source§

fn from(e: StorageSetupError) -> Self

Converts to this type from the input type.
Source§

impl From<StoreBlobFileError> for BlobCacheError

Source§

fn from(error: StoreBlobFileError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,