pub enum CacheError {
Io(Error),
PathNotFound(String),
Signing(String),
NotImplemented(&'static str),
NarInfo(String),
TooLarge {
limit: u64,
at_least: u64,
},
SchemaMissing(String),
}Expand description
CacheError is now sui_castore::StoreError (same variants, same derives).
This type alias preserves every existing sui_cache::CacheError use site.
Error type for content-addressed store operations.
Variants§
Io(Error)
An I/O operation failed.
PathNotFound(String)
A store path was not found on the local filesystem.
Signing(String)
A signing or verification operation failed.
NotImplemented(&'static str)
A feature is not yet implemented (missing Cargo feature flag).
NarInfo(String)
A narinfo could not be parsed or was invalid UTF-8.
TooLarge
A value exceeded a tier’s configured byte cap and was refused rather than buffered.
This is a bound, not a failure of the cache: the refusing tier is always a best-effort hot tier, and the durable tiers below it stream the same content without a cap. Refusing is the whole point — a tier that buffers whatever it is handed is exactly how a 6 GiB pod is killed by one large NAR.
at_least is a lower bound, not the true size: collection stops the
moment the cap is crossed, so the rest of the value is never read.
Fields
SchemaMissing(String)
The backend’s schema is absent — its tables do not exist (e.g. a durable tier came back up on a fresh volume, or its database was dropped/recreated under a live connection pool).
Kept as its own variant, distinct from Io, precisely
because it is self-healable: the owning backend’s DDL is idempotent
(CREATE TABLE IF NOT EXISTS), so a consumer that sees this can re-run
it and retry rather than failing the request. A backend that cannot
re-create its own schema must return Io instead — never round a
permanent failure up into a healable one.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
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()
Source§impl From<Error> for StoreError
impl From<Error> for StoreError
Source§fn from(source: Error) -> StoreError
fn from(source: Error) -> StoreError
Auto Trait Implementations§
impl !RefUnwindSafe for StoreError
impl !UnwindSafe for StoreError
impl Freeze for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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