#[non_exhaustive]pub enum MutationOutcome {
Success {
entity: Value,
entity_type: Option<String>,
entity_id: Option<String>,
cascade: Option<Value>,
updated_fields: Vec<String>,
},
Error {
error_class: MutationErrorClass,
message: String,
http_status: Option<i16>,
entity_type: Option<String>,
metadata: Value,
},
}Expand description
Outcome of parsing a single mutation_response row.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Success
The mutation succeeded; the result entity is available.
Fields
Error
The mutation failed; error metadata is available.
Fields
§
error_class: MutationErrorClassTyped classification of the failure (mirrors app.mutation_error_class).
§
entity_type: Option<String>Concrete GraphQL type name for the failure (from the entity_type
column). On the error path a function stamps the declared error type it
produced (e.g. "DuplicateEmailError"), letting the executor route the
result onto the right is_error union member — symmetric with the
success arm’s use of entity_type (#465).
Trait Implementations§
Source§impl Clone for MutationOutcome
impl Clone for MutationOutcome
Source§fn clone(&self) -> MutationOutcome
fn clone(&self) -> MutationOutcome
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MutationOutcome
impl RefUnwindSafe for MutationOutcome
impl Send for MutationOutcome
impl Sync for MutationOutcome
impl Unpin for MutationOutcome
impl UnsafeUnpin for MutationOutcome
impl UnwindSafe for MutationOutcome
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
Mutably borrows from an owned value. Read more