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 not all cases of failure due to handle access will return this error;
those means of transaction execution which are specifically asked to
act on a handle do, whereas handles read during the check phase will produce
ExecuteError::Check, and so on. 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>
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.
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§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