pub struct SimpleTimestampGenerator {}
Expand description
Basic timestamp generator. Provides no guarantees, if system clock returns time before UNIX epoch it panics.
Implementations§
Trait Implementations§
Source§impl Default for SimpleTimestampGenerator
impl Default for SimpleTimestampGenerator
Source§fn default() -> SimpleTimestampGenerator
fn default() -> SimpleTimestampGenerator
Returns the “default value” for a type. Read more
Source§impl TimestampGenerator for SimpleTimestampGenerator
impl TimestampGenerator for SimpleTimestampGenerator
Source§fn next_timestamp(&self) -> i64
fn next_timestamp(&self) -> i64
This generates a new timestamp
Auto Trait Implementations§
impl Freeze for SimpleTimestampGenerator
impl RefUnwindSafe for SimpleTimestampGenerator
impl Send for SimpleTimestampGenerator
impl Sync for SimpleTimestampGenerator
impl Unpin for SimpleTimestampGenerator
impl UnwindSafe for SimpleTimestampGenerator
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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