Enum PublicErrorKind
pub enum PublicErrorKind {
Show 14 variants
Validation,
IdempotencyKeyReuse,
AuthorizationDenied,
ConcurrencyDeadlineExceeded,
ContractMismatch,
StorageUnavailable,
OutcomeUnknown,
InternalDefect,
CommandExecutionFailed,
HistoryIncarnationMismatch,
HistoryPruned,
Overloaded,
FollowerMode,
PrimaryFenced,
}Expand description
The closed set of failures that RiffDB may expose to an untrusted caller.
Variants§
Validation
A request failed bounded validation.
IdempotencyKeyReuse
An idempotency identity was reused with different canonical input.
AuthorizationDenied
Authorization denied the operation.
ConcurrencyDeadlineExceeded
Logical conflict acquisition exceeded its deadline, or the fixed v1 command reevaluation budget was exhausted.
ContractMismatch
The requested contract version or plan is not current.
Authoritative storage is temporarily unavailable.
OutcomeUnknown
A submitted command may have completed, but its outcome is not known.
InternalDefect
An internal defect occurred and details were retained only internally.
CommandExecutionFailed
Deterministic evaluation failed before an application commit was formed.
HistoryIncarnationMismatch
Observed history predates a database restore.
HistoryPruned
Requested history was retired by retention prune.
Overloaded
The service is over capacity and rejected admission.
FollowerMode
This node is a follower and cannot execute a write operation.
PrimaryFenced
Durable source fencing permanently refuses new command admission.
Implementations§
§impl PublicErrorKind
impl PublicErrorKind
pub const fn code(self) -> &'static str
pub const fn code(self) -> &'static str
Returns the stable ASCII identifier exposed by every transport.
pub const fn safe_message(self) -> &'static str
pub const fn safe_message(self) -> &'static str
Returns the stable, caller-safe ASCII message for this failure.
pub const fn class(self) -> ErrorClass
pub const fn class(self) -> ErrorClass
Returns the protocol-neutral class for this failure.
pub const fn status_code(self) -> PublicErrorStatusCode
pub const fn status_code(self) -> PublicErrorStatusCode
Returns the one authoritative public status code for this kind.
Server encoding and client validation must both use this mapping. Do not
re-derive the wire code from Self::class alone: some kinds deliberately
diverge (for example, overload keeps class ErrorClass::Unavailable while
carrying [PublicErrorStatusCode::ResourceExhausted]).
This match is the sole wire-code authority and must remain exhaustive over
every PublicErrorKind variant.
pub const fn recovery_action(self) -> RecoveryAction
pub const fn recovery_action(self) -> RecoveryAction
Returns safe recovery guidance for this failure.
Trait Implementations§
§impl Clone for PublicErrorKind
impl Clone for PublicErrorKind
§fn clone(&self) -> PublicErrorKind
fn clone(&self) -> PublicErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PublicErrorKind
§impl Debug for PublicErrorKind
impl Debug for PublicErrorKind
impl Eq for PublicErrorKind
§impl Hash for PublicErrorKind
impl Hash for PublicErrorKind
§impl PartialEq for PublicErrorKind
impl PartialEq for PublicErrorKind
impl StructuralPartialEq for PublicErrorKind
Auto Trait Implementations§
impl Freeze for PublicErrorKind
impl RefUnwindSafe for PublicErrorKind
impl Send for PublicErrorKind
impl Sync for PublicErrorKind
impl Unpin for PublicErrorKind
impl UnsafeUnpin for PublicErrorKind
impl UnwindSafe for PublicErrorKind
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].