Struct tc_transact::TxnId
source · [−]pub struct TxnId { /* private fields */ }
Expand description
The unique ID of a transaction, used for identity and ordering.
Implementations
sourceimpl TxnId
impl TxnId
sourcepub fn new(time: NetworkTime) -> Self
pub fn new(time: NetworkTime) -> Self
Construct a new TxnId
.
sourcepub fn prev(&self) -> Self
pub fn prev(&self) -> Self
Return the last valid TxnId before this one (e.g. to construct a range).
sourcepub fn time(&self) -> NetworkTime
pub fn time(&self) -> NetworkTime
Return the timestamp of this TxnId
.
Trait Implementations
sourceimpl FromStream for TxnId
impl FromStream for TxnId
sourceimpl<'en> IntoStream<'en> for TxnId
impl<'en> IntoStream<'en> for TxnId
sourceimpl Ord for TxnId
impl Ord for TxnId
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<TxnId> for TxnId
impl PartialEq<TxnId> for TxnId
sourceimpl PartialOrd<TxnId> for TxnId
impl PartialOrd<TxnId> for TxnId
sourcefn partial_cmp(&self, other: &TxnId) -> Option<Ordering>
fn partial_cmp(&self, other: &TxnId) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for TxnId
impl Eq for TxnId
impl StructuralEq for TxnId
impl StructuralPartialEq for TxnId
Auto Trait Implementations
impl RefUnwindSafe for TxnId
impl Send for TxnId
impl Sync for TxnId
impl Unpin for TxnId
impl UnwindSafe for TxnId
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
fn matches<T>(&self) -> boolwhere
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for Twhere
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err>where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err>where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for Fwhere
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err>where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err>where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.