#[non_exhaustive]pub enum MutationErrorClass {
Validation,
Conflict,
NotFound,
Unauthorized,
Forbidden,
Internal,
TransactionFailed,
Timeout,
RateLimited,
ServiceUnavailable,
}Expand description
Classification of a failed mutation.
Mirrors app.mutation_error_class in PostgreSQL. Variants serialize to the
snake_case form used in the PG enum so rows containing error_class strings
deserialize directly. NULL in the PG column corresponds to
Option::None in the parent struct.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Validation
Input failed schema or business-rule validation.
Conflict
Uniqueness, optimistic-concurrency, or state conflict.
NotFound
Target entity does not exist or the caller cannot see it.
Caller is unauthenticated.
Forbidden
Caller is authenticated but lacks permission.
Internal
Unhandled server-side failure. Implementation details must not leak.
TransactionFailed
Transaction was rolled back (serialization, deadlock, explicit abort).
Timeout
Operation exceeded a deadline.
RateLimited
Caller exceeded quota.
Downstream dependency unreachable.
Implementations§
Source§impl MutationErrorClass
impl MutationErrorClass
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The snake_case string that identifies this class on the wire.
Mirrors the app.mutation_error_class PostgreSQL enum label and the
serde(rename_all = "snake_case") serialisation form used in v2 rows.
Sourcepub const fn to_cascade_code(self) -> CascadeErrorCode
pub const fn to_cascade_code(self) -> CascadeErrorCode
Map the error class to its graphql-cascade wire code (1:1, no fallbacks).
Trait Implementations§
Source§impl Clone for MutationErrorClass
impl Clone for MutationErrorClass
Source§fn clone(&self) -> MutationErrorClass
fn clone(&self) -> MutationErrorClass
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MutationErrorClass
impl Debug for MutationErrorClass
Source§impl<'de> Deserialize<'de> for MutationErrorClass
impl<'de> Deserialize<'de> for MutationErrorClass
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for MutationErrorClass
impl Hash for MutationErrorClass
Source§impl PartialEq for MutationErrorClass
impl PartialEq for MutationErrorClass
impl Copy for MutationErrorClass
impl Eq for MutationErrorClass
impl StructuralPartialEq for MutationErrorClass
Auto Trait Implementations§
impl Freeze for MutationErrorClass
impl RefUnwindSafe for MutationErrorClass
impl Send for MutationErrorClass
impl Sync for MutationErrorClass
impl Unpin for MutationErrorClass
impl UnsafeUnpin for MutationErrorClass
impl UnwindSafe for MutationErrorClass
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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