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
Error type from Transaction::execute() and Transactional::transact().
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>
impl<Txn> Clone for ExecuteError<Txn>
source§impl<Txn> Debug for ExecuteError<Txn>
impl<Txn> Debug for ExecuteError<Txn>
source§impl<Txn> Display for ExecuteError<Txn>
impl<Txn> Display for ExecuteError<Txn>
source§impl<Txn> Error for ExecuteError<Txn>
impl<Txn> Error for ExecuteError<Txn>
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl From<ExecuteError<SpaceTransaction>> for InGenError
impl From<ExecuteError<SpaceTransaction>> for InGenError
source§fn from(error: ExecuteError<SpaceTransaction>) -> Self
fn from(error: ExecuteError<SpaceTransaction>) -> Self
source§impl From<ExecuteError> for GenError
impl From<ExecuteError> for GenError
source§fn from(error: ExecuteError<UniverseTransaction>) -> Self
fn from(error: ExecuteError<UniverseTransaction>) -> Self
source§impl From<ExecuteError> for InGenError
impl From<ExecuteError> for InGenError
source§fn from(error: ExecuteError<UniverseTransaction>) -> Self
fn from(error: ExecuteError<UniverseTransaction>) -> Self
source§impl<Txn> PartialEq for ExecuteError<Txn>
impl<Txn> PartialEq for ExecuteError<Txn>
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.
Auto Trait Implementations§
impl<Txn> Freeze for ExecuteError<Txn>
impl<Txn = UniverseTransaction> !RefUnwindSafe for ExecuteError<Txn>
impl<Txn> Send for ExecuteError<Txn>
impl<Txn> Sync for ExecuteError<Txn>
impl<Txn> Unpin for ExecuteError<Txn>
impl<Txn = UniverseTransaction> !UnwindSafe for ExecuteError<Txn>
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> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
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)
fn as_any(&self) -> &(dyn Any + 'static)
&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)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&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
impl<T> DowncastSync for T
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