pub struct Monotonic(/* private fields */);Implementations§
source§impl Monotonic
impl Monotonic
pub fn abs_diff(self, other: Monotonic) -> Duration
pub fn as_secs(self) -> u64
pub fn from_secs(value: u64) -> Self
pub fn as_secs_f64(self) -> f64
pub fn from_secs_f64(value: f64) -> Self
pub fn as_secs_f32(self) -> f32
pub fn from_secs_f32(value: f32) -> Self
pub fn as_micros(self) -> u128
pub fn from_micros(value: u64) -> Self
pub fn as_millis(self) -> u128
pub fn from_millis(value: u64) -> Self
pub fn as_nanos(self) -> u128
pub fn from_nanos(value: u64) -> Self
pub fn as_duration(self) -> Duration
source§impl Monotonic
impl Monotonic
sourcepub fn now() -> Self
pub fn now() -> Self
On non-UNIX platforms returns time since the first access
§Panics
On UNIX platforms will panic if the system monotonic clock is not available
sourcepub fn now_rounded() -> Self
pub fn now_rounded() -> Self
§Panics
On UNIX platforms will panic if the system monotonic clock is not available
pub fn elapsed(&self) -> Duration
Trait Implementations§
source§impl<'de> Deserialize<'de> for Monotonic
impl<'de> Deserialize<'de> for Monotonic
source§fn deserialize<D>(deserializer: D) -> Result<Monotonic, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Monotonic, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Encode<'_, Postgres> for Monotonic
impl Encode<'_, Postgres> for Monotonic
source§fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn encode_by_ref(&self, buf: &mut PgArgumentBuffer) -> IsNull
fn size_hint(&self) -> usize
§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
source§impl<'q> Encode<'q, Sqlite> for Monotonic
impl<'q> Encode<'q, Sqlite> for Monotonic
source§fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull
fn encode_by_ref(&self, args: &mut Vec<SqliteArgumentValue<'q>>) -> IsNull
§fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
fn encode(self, buf: &mut <DB as HasArguments<'q>>::ArgumentBuffer) -> IsNullwhere
Self: Sized,
Writes the value of
self into buf in the expected format for the database.fn produces(&self) -> Option<<DB as Database>::TypeInfo>
fn size_hint(&self) -> usize
source§impl Ord for Monotonic
impl Ord for Monotonic
source§impl PartialEq for Monotonic
impl PartialEq for Monotonic
source§impl PartialOrd for Monotonic
impl PartialOrd for Monotonic
1.0.0 · source§fn 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 Monotonic
impl Eq for Monotonic
impl StructuralPartialEq for Monotonic
Auto Trait Implementations§
impl RefUnwindSafe for Monotonic
impl Send for Monotonic
impl Sync for Monotonic
impl Unpin for Monotonic
impl UnwindSafe for Monotonic
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<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
Checks if this value is equivalent to the given key. Read more
§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.