#[non_exhaustive]pub struct BodyTransaction { /* private fields */ }Expand description
The Transaction type for Body.
TODO: Very incomplete; just a sketch of what eventually needs to exist.
Implementations§
Source§impl BodyTransaction
impl BodyTransaction
pub fn with_position(self, position: FreePoint) -> Self
pub fn with_look_direction(self, direction: FreeVector) -> Self
Trait Implementations§
Source§impl Clone for BodyTransaction
impl Clone for BodyTransaction
Source§fn clone(&self) -> BodyTransaction
fn clone(&self) -> BodyTransaction
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 BodyTransaction
impl Debug for BodyTransaction
Source§impl Default for BodyTransaction
impl Default for BodyTransaction
Source§fn default() -> BodyTransaction
fn default() -> BodyTransaction
Returns the “default value” for a type. Read more
Source§impl Merge for BodyTransaction
impl Merge for BodyTransaction
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 = BodyConflict
type Conflict = BodyConflict
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 BodyTransaction
impl PartialEq for BodyTransaction
Source§impl Transaction for BodyTransaction
impl Transaction for BodyTransaction
Source§type Context<'a> = ()
type Context<'a> = ()
Data which must be passed when checking the transaction.
Use
() if none is needed.Source§type CommitCheck = ()
type CommitCheck = ()
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 = BodyMismatch
type Mismatch = BodyMismatch
Error type describing a precondition not met, returned by
Self::check(). Read moreSource§fn check(
&self,
_body: &Body,
(): Self::Context<'_>,
) -> Result<Self::CommitCheck, Self::Mismatch>
fn check( &self, _body: &Body, (): Self::Context<'_>, ) -> Result<Self::CommitCheck, Self::Mismatch>
Source§fn commit(
self,
body: &mut Body,
(): Self::CommitCheck,
_outputs: &mut dyn FnMut(Self::Output),
) -> Result<(), CommitError>
fn commit( self, body: &mut Body, (): 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 StructuralPartialEq for BodyTransaction
Auto Trait Implementations§
impl Freeze for BodyTransaction
impl RefUnwindSafe for BodyTransaction
impl Send for BodyTransaction
impl Sync for BodyTransaction
impl Unpin for BodyTransaction
impl UnwindSafe for BodyTransaction
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<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.