Enum all_is_cubes::transaction::ExecuteError

source ·
pub enum ExecuteError<Txn: Transaction = UniverseTransaction> {
    Merge(<Txn as Merge>::Conflict),
    Check(<Txn as Transaction>::Mismatch),
    Commit(CommitError),
    Handle(HandleError),
}
Expand description

Variants§

§

Merge(<Txn as Merge>::Conflict)

A conflict was discovered between parts that were to be assembled into the transaction.

This error cannot be produced by Transaction::execute(), but only by Transactional::transact().

§

Check(<Txn as Transaction>::Mismatch)

The transaction’s preconditions were not met; it does not apply to the current state of the target. No change has been made.

§

Commit(CommitError)

An unexpected error occurred while applying the transaction’s effects. See the documentation of Transaction::commit() for the unfortunate implications of this.

§

Handle(HandleError)

Executing the transaction required accessing a Handle that was unavailable.

The HandleError will include the name of the problematic handle.

This error may be transient, and unlike ExecuteError::Commit, does not indicate data corruption, but code which triggers it should generally be considered incorrect.

Note that this error is returned by Handle::execute(), but transactions whose check involves accessing handles will instead produce ExecuteError::Checks. This may change in the future.

Trait Implementations§

source§

impl<Txn> Clone for ExecuteError<Txn>
where Txn: Transaction<Mismatch: Clone> + Merge<Conflict: Clone>,

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<Txn> Debug for ExecuteError<Txn>
where Txn: Transaction<Mismatch: Debug> + Merge<Conflict: Debug>,

source§

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

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

impl<Txn> Display for ExecuteError<Txn>
where Txn: Transaction<Mismatch: Display> + Merge<Conflict: Display>,

source§

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

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

impl<Txn> Error for ExecuteError<Txn>
where Txn: Transaction<Mismatch: Error + 'static> + Merge<Conflict: Error + 'static>,

source§

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

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<ExecuteError<SpaceTransaction>> for InGenError

source§

fn from(error: ExecuteError<SpaceTransaction>) -> Self

Converts to this type from the input type.
source§

impl From<ExecuteError> for GenError

source§

fn from(error: ExecuteError<UniverseTransaction>) -> Self

Converts to this type from the input type.
source§

impl From<ExecuteError> for InGenError

source§

fn from(error: ExecuteError<UniverseTransaction>) -> Self

Converts to this type from the input type.
source§

impl<Txn> PartialEq for ExecuteError<Txn>
where Txn: Transaction<Mismatch: PartialEq> + Merge<Conflict: PartialEq>,

Note: ExecuteError::Commit never compares equal, because it contains arbitrary errors which may not implement PartialEq. TODO: push this down to impl PartialEq for CommitError for more precision.

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<Txn> Freeze for ExecuteError<Txn>
where <Txn as Merge>::Conflict: Freeze, <Txn as Transaction>::Mismatch: Freeze,

§

impl<Txn = UniverseTransaction> !RefUnwindSafe for ExecuteError<Txn>

§

impl<Txn> Send for ExecuteError<Txn>
where <Txn as Merge>::Conflict: Send, <Txn as Transaction>::Mismatch: Send,

§

impl<Txn> Sync for ExecuteError<Txn>
where <Txn as Merge>::Conflict: Sync, <Txn as Transaction>::Mismatch: Sync,

§

impl<Txn> Unpin for ExecuteError<Txn>
where <Txn as Merge>::Conflict: Unpin, <Txn as Transaction>::Mismatch: Unpin,

§

impl<Txn = UniverseTransaction> !UnwindSafe for ExecuteError<Txn>

Blanket Implementations§

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> Az for T

source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

source§

fn cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> CheckedAs for T

source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
source§

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

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

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

impl<T> Downcast for T
where T: Any,

source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

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

§

type EqTo = T

source§

impl<T> OverflowingAs for T

source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
source§

impl<T> SaturatingAs for T

source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
source§

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

§

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§

default 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>,

§

type Error = Infallible

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>,

§

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

impl<T> UnwrappedAs for T

source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
source§

impl<T> WrappingAs for T

source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.