#[non_exhaustive]pub enum BackendError {
Valkey {
kind: BackendErrorKind,
message: String,
},
}Expand description
Backend-agnostic transport error carried across public ff-sdk / ff-server error surfaces (#88).
The Valkey variant is the only one populated today; additional
variants (e.g. Postgres) will be added additively as other
backends land. The enum is #[non_exhaustive] so consumers must
include a wildcard arm.
Construction from the Valkey-native ferriskey::Error lives in
ff_backend_valkey::backend_error_from_ferriskey — keeping that
conversion outside ff-core preserves ff-core’s ferriskey-free
public surface.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Valkey
Valkey-backend transport failure. Carries a backend-agnostic classification plus the backend-rendered message so downstream consumers can inspect without depending on ferriskey.
Implementations§
Source§impl BackendError
impl BackendError
Sourcepub fn kind(&self) -> BackendErrorKind
pub fn kind(&self) -> BackendErrorKind
Returns the classified backend kind if this error is a Valkey
transport fault. Forward-compatible with future backends:
non-Valkey variants return None on a call that names only the
Valkey kind; code that wants a backend-specific view should
match directly on BackendError.
Trait Implementations§
Source§impl Clone for BackendError
impl Clone for BackendError
Source§fn clone(&self) -> BackendError
fn clone(&self) -> BackendError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§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
1.30.0 · 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()