pub struct Tick(_);
Expand description
A tick in time.
Implementations
sourceimpl Tick
impl Tick
sourcepub fn new(ts: OffsetDateTime) -> Self
pub fn new(ts: OffsetDateTime) -> Self
Create a new tick.
sourcepub fn ts(&self) -> Option<&OffsetDateTime>
pub fn ts(&self) -> Option<&OffsetDateTime>
Get the timestamp.
sourcepub fn with_value<T>(self, value: T) -> TickValue<T>
pub fn with_value<T>(self, value: T) -> TickValue<T>
With value.
Trait Implementations
sourceimpl From<OffsetDateTime> for Tick
impl From<OffsetDateTime> for Tick
sourcefn from(value: OffsetDateTime) -> Self
fn from(value: OffsetDateTime) -> Self
Converts to this type from the input type.
sourceimpl Ord for Tick
impl Ord for Tick
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 PartialOrd<Tick> for Tick
impl PartialOrd<Tick> for Tick
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
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 moreimpl Copy for Tick
impl Eq for Tick
impl StructuralEq for Tick
impl StructuralPartialEq for Tick
Auto Trait Implementations
impl RefUnwindSafe for Tick
impl Send for Tick
impl Sync for Tick
impl Unpin for Tick
impl UnwindSafe for Tick
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