Struct lay_rs::engine::TransactionRef
source · pub struct TransactionRef {
pub value_id: usize,
/* private fields */
}
Fields§
§value_id: usize
Implementations§
source§impl TransactionRef
impl TransactionRef
sourcepub fn on_start<F: Into<TransactionCallback>>(
&self,
handler: F,
once: bool,
) -> &Self
pub fn on_start<F: Into<TransactionCallback>>( &self, handler: F, once: bool, ) -> &Self
Add a callback that is triggered when the transaction is started. The callback is removed when the transaction is finished.
§Arguments
handler
: the callback function to be calledonce
: if true, the callback is removed after it is triggered
sourcepub fn on_finish<F: Into<TransactionCallback>>(
&self,
handler: F,
once: bool,
) -> &Self
pub fn on_finish<F: Into<TransactionCallback>>( &self, handler: F, once: bool, ) -> &Self
Add a callback that is triggered when the transaction is finished. The callback is removed when the transaction is finished.
§Arguments
handler
: the callback function to be calledonce
: if true, the callback is removed after it is triggered
sourcepub fn on_update<F: Into<TransactionCallback>>(
&self,
handler: F,
once: bool,
) -> &Self
pub fn on_update<F: Into<TransactionCallback>>( &self, handler: F, once: bool, ) -> &Self
Add a callback that is triggered when the transaction is updated. The callback is removed when the transaction is finished.
§Arguments
handler
: the callback function to be calledonce
: if true, the callback is removed after it is triggered
sourcepub fn then<F: Into<TransactionCallback>>(&self, handler: F) -> &Self
pub fn then<F: Into<TransactionCallback>>(&self, handler: F) -> &Self
Alias for on_finish
the callback is added with the once flag set to true ie. the callback is removed after it is triggered
Trait Implementations§
source§impl Clone for TransactionRef
impl Clone for TransactionRef
source§fn clone(&self) -> TransactionRef
fn clone(&self) -> TransactionRef
Returns a copy 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 TransactionRef
impl Debug for TransactionRef
impl Copy for TransactionRef
Auto Trait Implementations§
impl Freeze for TransactionRef
impl RefUnwindSafe for TransactionRef
impl Send for TransactionRef
impl Sync for TransactionRef
impl Unpin for TransactionRef
impl UnwindSafe for TransactionRef
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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 more