Skip to main content

MutationProgramError

Enum MutationProgramError 

Source
#[non_exhaustive]
pub enum MutationProgramError {
Show 20 variants EmptyName(&'static str), ZeroVersion(&'static str), InvalidProgramId, PathTooDeep { segments: usize, max: usize, }, ExpressionTooDeep { depth: usize, max: usize, }, TooManyOperations { count: usize, max: usize, }, ValueTooLarge { kind: &'static str, len: usize, max: usize, }, DuplicateOrdinal { kind: &'static str, ordinal: u32, }, NonContiguousOrdinal { kind: &'static str, expected: u32, actual: u32, }, DuplicateName { kind: &'static str, name: String, }, RequiredValueAbsent { path: String, }, UnsetNotAllowed { field: String, }, InvalidKeyValue { field: String, }, InvalidOperation { operation: String, reason: String, }, AmbiguousMutation { model: String, reason: String, }, InvalidReturning { reason: String, }, InvalidConflictTarget { reason: String, }, CanonicalJson(String), MissingInput { path: String, }, Adapter(String),
}
Expand description

A typed validation, binding, or interpretation failure for a mutation program.

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.
§

EmptyName(&'static str)

A stable name, identifier, field, or storage name was empty.

§

ZeroVersion(&'static str)

A declared version must be non-zero.

§

InvalidProgramId

A mutation program ID was not in canonical form.

§

PathTooDeep

An input path exceeded the portable segment limit.

Fields

§segments: usize

Observed segment count.

§max: usize

Supported segment ceiling.

§

ExpressionTooDeep

A portable expression or constant exceeded the nesting limit.

Fields

§depth: usize

Observed nesting depth.

§max: usize

Supported nesting ceiling.

§

TooManyOperations

A program declared too many operations.

Fields

§count: usize

Observed operation count.

§max: usize

Supported operation ceiling.

§

ValueTooLarge

A key, partition, or other bounded canonical value was too large.

Fields

§kind: &'static str

Kind of bounded logical encoding.

§len: usize

Observed encoded byte length.

§max: usize

Supported byte ceiling.

§

DuplicateOrdinal

Two declarations used the same explicit ordinal.

Fields

§kind: &'static str

Kind of ordered declaration.

§ordinal: u32

Repeated ordinal.

§

NonContiguousOrdinal

Ordinals did not form a contiguous zero-based sequence.

Fields

§kind: &'static str

Kind of ordered declaration.

§expected: u32

Required next ordinal.

§actual: u32

Observed ordinal.

§

DuplicateName

Two declarations used the same stable name.

Fields

§kind: &'static str

Kind of named declaration.

§name: String

Repeated name.

§

RequiredValueAbsent

A required expression evaluated as absent.

Fields

§path: String

Stable expression or field description.

§

UnsetNotAllowed

unset appeared where the operation cannot represent it.

Fields

§field: String

Field or expression position.

§

InvalidKeyValue

A key component was null, absent, unset, or structurally invalid.

Fields

§field: String

Key component name.

§

InvalidOperation

An operation shape was incompatible with its semantic kind.

Fields

§operation: String

Stable operation identifier.

§reason: String

Validation reason.

§

AmbiguousMutation

Two operations could not deterministically become one final mutation.

Fields

§model: String

Affected logical model.

§reason: String

Validation reason.

§

InvalidReturning

Returning selection was empty or ambiguous.

Fields

§reason: String

Validation reason.

§

InvalidConflictTarget

Conflict target was incomplete or unknown.

Fields

§reason: String

Validation reason.

§

CanonicalJson(String)

Canonical JSON encoding failed.

§

MissingInput

A bound input path was missing from the supplied input object.

Fields

§path: String

Missing input path.

§

Adapter(String)

A binding or interpreter failed while adapting to projection IR.

Trait Implementations§

Source§

impl Clone for MutationProgramError

Source§

fn clone(&self) -> MutationProgramError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MutationProgramError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for MutationProgramError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for MutationProgramError

Source§

impl Error for MutationProgramError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ProjectionProgramError> for MutationProgramError

Source§

fn from(error: ProjectionProgramError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for MutationProgramError

Source§

fn eq(&self, other: &MutationProgramError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MutationProgramError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> AggregateBuilder for T

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Queueable for T

Source§

fn queued(self) -> QueuedRepository<Self, InMemoryLockManager>

Wrap with the default async lock manager. Pair with .aggregate::<T>() for per-aggregate serialization over the async repository surface.
Source§

fn queued_with<L: LockManager>( self, lock_manager: L, ) -> QueuedRepository<Self, L>

Wrap with a custom async lock manager.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.