#[non_exhaustive]pub enum BackendError {
NotFound,
Serialization(String),
WireFormat(WireFormatError),
Network(String),
Other(Box<dyn Error + Send + Sync>),
}Expand description
Errors from the CacheBackend trait surface.
Backends choose the variant that best matches the underlying failure; consumers pattern-match on the variant rather than parsing the message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
The backend reports the entry is absent — distinct from a
transport failure. Surfaces as a None to the caller in most
flows; the dedicated variant exists so backends with strict
existence semantics can be unambiguous.
Serialization(String)
The backend could not serialize or deserialize a payload. The inner string is backend-supplied (e.g., serde error rendering).
WireFormat(WireFormatError)
The backend encountered a Sassi wire-envelope error.
Network(String)
Network / IO transport error. Inner string is backend-supplied.
Other(Box<dyn Error + Send + Sync>)
Anything that doesn’t fit the variants above. Boxed so the variant size stays small.
Trait Implementations§
Source§impl Debug for BackendError
impl Debug for BackendError
Source§impl Display for BackendError
impl Display for BackendError
Source§impl Error for BackendError
impl Error for BackendError
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<BackendError> for FetchError
impl From<BackendError> for FetchError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<BackendError> for InsertError
impl From<BackendError> for InsertError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Source§impl From<Error> for BackendError
Available on crate feature serde only.
impl From<Error> for BackendError
serde only.