pub struct TimestampMillis(i64);
Expand description
Unix timestamp in millisecond resolution.
Negative timestamp is allowed, which represents timestamp before ‘1970-01-01T00:00:00’.
Tuple Fields§
§0: i64
Implementations§
source§impl TimestampMillis
impl TimestampMillis
sourcepub const INF: TimestampMillis = _
pub const INF: TimestampMillis = _
Positive infinity.
sourcepub const MAX: TimestampMillis = _
pub const MAX: TimestampMillis = _
Maximum value of a timestamp.
The maximum value of i64 is reserved for infinity.
sourcepub const MIN: TimestampMillis = _
pub const MIN: TimestampMillis = _
Minimum value of a timestamp.
sourcepub const fn new(ms: i64) -> TimestampMillis
pub const fn new(ms: i64) -> TimestampMillis
Create a new timestamp from unix timestamp in milliseconds.
Trait Implementations§
source§impl Clone for TimestampMillis
impl Clone for TimestampMillis
source§fn clone(&self) -> TimestampMillis
fn clone(&self) -> TimestampMillis
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 TimestampMillis
impl Debug for TimestampMillis
source§impl Default for TimestampMillis
impl Default for TimestampMillis
source§fn default() -> TimestampMillis
fn default() -> TimestampMillis
Returns the “default value” for a type. Read more
source§impl From<TimestampMillis> for i64
impl From<TimestampMillis> for i64
source§fn from(ts: TimestampMillis) -> Self
fn from(ts: TimestampMillis) -> Self
Converts to this type from the input type.
source§impl From<i64> for TimestampMillis
impl From<i64> for TimestampMillis
source§fn from(ms: i64) -> TimestampMillis
fn from(ms: i64) -> TimestampMillis
Converts to this type from the input type.
source§impl Hash for TimestampMillis
impl Hash for TimestampMillis
source§impl Ord for TimestampMillis
impl Ord for TimestampMillis
source§fn cmp(&self, other: &TimestampMillis) -> Ordering
fn cmp(&self, other: &TimestampMillis) -> 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<TimestampMillis> for i64
impl PartialEq<TimestampMillis> for i64
source§impl PartialEq<i64> for TimestampMillis
impl PartialEq<i64> for TimestampMillis
source§impl PartialEq for TimestampMillis
impl PartialEq for TimestampMillis
source§impl PartialOrd<TimestampMillis> for i64
impl PartialOrd<TimestampMillis> for i64
source§impl PartialOrd<i64> for TimestampMillis
impl PartialOrd<i64> for TimestampMillis
source§impl PartialOrd for TimestampMillis
impl PartialOrd for TimestampMillis
impl Copy for TimestampMillis
impl Eq for TimestampMillis
impl StructuralPartialEq for TimestampMillis
Auto Trait Implementations§
impl Freeze for TimestampMillis
impl RefUnwindSafe for TimestampMillis
impl Send for TimestampMillis
impl Sync for TimestampMillis
impl Unpin for TimestampMillis
impl UnwindSafe for TimestampMillis
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
§impl<T> CallHasher for T
impl<T> CallHasher for T
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§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
Compare self to
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request