pub struct BlockDefTransaction { /* private fields */ }Expand description
A Transaction which replaces (or checks) the Block stored in a BlockDef.
Implementations§
Trait Implementations§
Source§impl Clone for BlockDefTransaction
impl Clone for BlockDefTransaction
Source§fn clone(&self) -> BlockDefTransaction
fn clone(&self) -> BlockDefTransaction
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BlockDefTransaction
impl Debug for BlockDefTransaction
Source§impl Default for BlockDefTransaction
impl Default for BlockDefTransaction
Source§fn default() -> BlockDefTransaction
fn default() -> BlockDefTransaction
Returns the “default value” for a type. Read more
Source§impl Hash for BlockDefTransaction
impl Hash for BlockDefTransaction
Source§impl Merge for BlockDefTransaction
impl Merge for BlockDefTransaction
Source§type MergeCheck = ()
type MergeCheck = ()
Type of a value passed from
Merge::check_merge to Merge::commit_merge.
This may be used to pass precalculated values to speed up the merge phase,
but also makes it difficult to accidentally merge without checking.Source§type Conflict = BlockDefConflict
type Conflict = BlockDefConflict
Error type giving the reason why a merge was not possible. Read more
Source§fn check_merge(&self, other: &Self) -> Result<Self::MergeCheck, Self::Conflict>
fn check_merge(&self, other: &Self) -> Result<Self::MergeCheck, Self::Conflict>
Checks whether two transactions can be merged into a single transaction.
If so, returns
Ok containing data which may be passed to Self::commit_merge(). Read moreSource§fn commit_merge(&mut self, other: Self, (): Self::MergeCheck)
fn commit_merge(&mut self, other: Self, (): Self::MergeCheck)
Combines
other into self so that it has both effects simultaneously.
This operation must be commutative and have Default::default() as the identity. Read moreSource§impl PartialEq for BlockDefTransaction
impl PartialEq for BlockDefTransaction
Source§impl Transaction for BlockDefTransaction
impl Transaction for BlockDefTransaction
Source§type Context<'a> = ReadTicket<'a>
type Context<'a> = ReadTicket<'a>
Data which must be passed when checking the transaction.
Use
() if none is needed.Source§type CommitCheck = Check
type CommitCheck = Check
Type of a value passed from
Transaction::check to Transaction::commit.
This may be used to pass precalculated values to speed up the commit phase,
or even lock guards or similar, but also makes it slightly harder to accidentally
call commit without check.Source§type Output = Infallible
type Output = Infallible
The results of a
Transaction::commit() or Transaction::execute().
Each commit may produce any number of these messages. Read moreSource§type Mismatch = BlockDefMismatch
type Mismatch = BlockDefMismatch
Error type describing a precondition not met, returned by
Self::check(). Read moreSource§fn check(
&self,
target: &BlockDef,
read_ticket: Self::Context<'_>,
) -> Result<Self::CommitCheck, Self::Mismatch>
fn check( &self, target: &BlockDef, read_ticket: Self::Context<'_>, ) -> Result<Self::CommitCheck, Self::Mismatch>
Source§fn commit(
self,
target: &mut BlockDef,
check: Self::CommitCheck,
_outputs: &mut dyn FnMut(Self::Output),
) -> Result<(), CommitError>
fn commit( self, target: &mut BlockDef, check: Self::CommitCheck, _outputs: &mut dyn FnMut(Self::Output), ) -> Result<(), CommitError>
Perform the mutations specified by this transaction. The
check value should have
been created by a prior call to Transaction::check(). Read moreimpl Eq for BlockDefTransaction
impl StructuralPartialEq for BlockDefTransaction
Auto Trait Implementations§
impl Freeze for BlockDefTransaction
impl RefUnwindSafe for BlockDefTransaction
impl Send for BlockDefTransaction
impl Sync for BlockDefTransaction
impl Unpin for BlockDefTransaction
impl UnwindSafe for BlockDefTransaction
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
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>,
Casts the value.
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>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
Source§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates Self using default().
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>
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 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>
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 moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.