#[non_exhaustive]pub enum BackendErrorKind {
Transport,
Protocol,
Timeout,
Auth,
Cluster,
BusyLoading,
ScriptNotLoaded,
Other,
}Expand description
Classified backend transport errors, kept backend-agnostic on purpose (#88). Each variant maps a family of native backend error kinds into a stable, consumer-matchable shape.
Consumers requiring the exact native kind for a Valkey backend
must go through ff_backend_valkey explicitly; ff-sdk/ff-server’s
public surface will only ever hand out BackendErrorKind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transport
Network / I/O failure: the request may or may not have been processed. Typically retryable with backoff.
Protocol
Backend rejected the request on protocol / parse grounds. Not retryable without a fix.
Timeout
Backend timed out responding to the request. Retryable.
Auth
Authentication / authorization failure. Not retryable.
Cluster
Cluster topology churn (MOVED, ASK, CLUSTERDOWN, MasterDown, CrossSlot, ConnectionNotFoundForRoute, AllConnectionsUnavailable). Retryable after topology settles.
BusyLoading
Backend is temporarily busy loading state (e.g. Valkey
LOADING). Retryable.
ScriptNotLoaded
Backend indicates the referenced script/function does not exist. Typically handled by the caller via re-load.
Other
Any other classified error from the backend. Fallback bucket for native kinds outside the curated set above.
Implementations§
Source§impl BackendErrorKind
impl BackendErrorKind
Sourcepub fn as_stable_str(&self) -> &'static str
pub fn as_stable_str(&self) -> &'static str
Stable, lowercase-kebab label suitable for log fields / HTTP
kind body slots. Guaranteed not to change across releases
for the existing variants.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether a caller should consider this kind retryable with backoff. Conservative — auth + protocol + other are terminal.
Trait Implementations§
Source§impl Clone for BackendErrorKind
impl Clone for BackendErrorKind
Source§fn clone(&self) -> BackendErrorKind
fn clone(&self) -> BackendErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BackendErrorKind
impl Debug for BackendErrorKind
Source§impl PartialEq for BackendErrorKind
impl PartialEq for BackendErrorKind
impl Copy for BackendErrorKind
impl Eq for BackendErrorKind
impl StructuralPartialEq for BackendErrorKind
Auto Trait Implementations§
impl Freeze for BackendErrorKind
impl RefUnwindSafe for BackendErrorKind
impl Send for BackendErrorKind
impl Sync for BackendErrorKind
impl Unpin for BackendErrorKind
impl UnsafeUnpin for BackendErrorKind
impl UnwindSafe for BackendErrorKind
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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