pub enum Error {
Source(SharedError),
FallbackTimeout(Arc<FallbackTimeout>),
Panic(Arc<str>),
Config(ConfigError),
MissingRemote,
Remote(SharedError),
}Expand description
Every failure a cached call or maintenance operation can report.
Cache plumbing fails open, so a call fails only when its source fails, its source deadline elapses, a callback panics, or static configuration is rejected before execution. Maintenance operations surface their own remote failures.
Variants§
Source(SharedError)
The source returned an error. Every coalesced caller receives the same
shared error, so identity comparisons through Arc::ptr_eq work.
FallbackTimeout(Arc<FallbackTimeout>)
The source did not settle before its deadline. Followers of one execution share the leader’s error instance.
Panic(Arc<str>)
A source, codec, provider or comparator panicked.
Config(ConfigError)
Static operation or instance configuration was rejected before execution.
MissingRemote
Invalidation was requested without a configured remote adapter.
Remote(SharedError)
An explicit maintenance mutation failed at the remote adapter.
Implementations§
Source§impl Error
impl Error
Sourcepub fn source_error(&self) -> Option<&(dyn Error + Send + Sync + 'static)>
pub fn source_error(&self) -> Option<&(dyn Error + Send + Sync + 'static)>
The source error, when the source itself failed.
Sourcepub fn is_fallback_timeout(&self) -> bool
pub fn is_fallback_timeout(&self) -> bool
Whether this is a source deadline error: the library’s own, or one a
source propagated from a nested cached call, either as the bare
FallbackTimeout or boxed inside a nested Error.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()