Struct hydroflow::scheduled::ticks::TickInstant
source · pub struct TickInstant(pub u64);
Expand description
A point in time during execution on transducer.
TickInstant
instances can be subtracted to calculate the TickDuration
between them.
assert_eq!(TickInstant(1) - TickInstant(0), TickDuration::SINGLE_TICK);
assert_eq!(TickInstant(0) - TickInstant(1), -TickDuration::SINGLE_TICK);
Tuple Fields§
§0: u64
Implementations§
Trait Implementations§
source§impl Add<TickDuration> for TickInstant
impl Add<TickDuration> for TickInstant
source§type Output = TickInstant
type Output = TickInstant
The resulting type after applying the
+
operator.source§impl AddAssign<TickDuration> for TickInstant
impl AddAssign<TickDuration> for TickInstant
source§fn add_assign(&mut self, rhs: TickDuration)
fn add_assign(&mut self, rhs: TickDuration)
Performs the
+=
operation. Read moresource§impl Clone for TickInstant
impl Clone for TickInstant
source§fn clone(&self) -> TickInstant
fn clone(&self) -> TickInstant
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 TickInstant
impl Debug for TickInstant
source§impl Default for TickInstant
impl Default for TickInstant
source§fn default() -> TickInstant
fn default() -> TickInstant
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for TickInstant
impl<'de> Deserialize<'de> for TickInstant
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Display for TickInstant
impl Display for TickInstant
source§impl From<TickInstant> for u64
impl From<TickInstant> for u64
source§fn from(value: TickInstant) -> Self
fn from(value: TickInstant) -> Self
Converts to this type from the input type.
source§impl Hash for TickInstant
impl Hash for TickInstant
source§impl Ord for TickInstant
impl Ord for TickInstant
source§fn cmp(&self, other: &TickInstant) -> Ordering
fn cmp(&self, other: &TickInstant) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TickInstant
impl PartialEq for TickInstant
source§impl PartialOrd for TickInstant
impl PartialOrd for TickInstant
source§impl Serialize for TickInstant
impl Serialize for TickInstant
source§impl Sub<TickDuration> for TickInstant
impl Sub<TickDuration> for TickInstant
source§type Output = TickInstant
type Output = TickInstant
The resulting type after applying the
-
operator.source§impl Sub for TickInstant
impl Sub for TickInstant
source§type Output = TickDuration
type Output = TickDuration
The resulting type after applying the
-
operator.source§impl SubAssign<TickDuration> for TickInstant
impl SubAssign<TickDuration> for TickInstant
source§fn sub_assign(&mut self, rhs: TickDuration)
fn sub_assign(&mut self, rhs: TickDuration)
Performs the
-=
operation. Read moreimpl Copy for TickInstant
impl Eq for TickInstant
impl StructuralPartialEq for TickInstant
Auto Trait Implementations§
impl Freeze for TickInstant
impl RefUnwindSafe for TickInstant
impl Send for TickInstant
impl Sync for TickInstant
impl Unpin for TickInstant
impl UnwindSafe for TickInstant
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
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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