#[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()
Source§impl From<BackendError> for SdkError
impl From<BackendError> for SdkError
Source§fn from(source: BackendError) -> Self
fn from(source: BackendError) -> Self
Auto Trait Implementations§
impl Freeze for BackendError
impl RefUnwindSafe for BackendError
impl Send for BackendError
impl Sync for BackendError
impl Unpin for BackendError
impl UnsafeUnpin for BackendError
impl UnwindSafe for BackendError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.