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
pub fn duration_since(&self, earlier: Self) -> Duration
Trait Implementations§
source§impl AddAssign<Duration> for Monotonic
impl AddAssign<Duration> for Monotonic
source§fn add_assign(&mut self, rhs: Duration)
fn add_assign(&mut self, rhs: Duration)
Performs the
+= operation. Read moresource§impl<'r> Decode<'r, Postgres> for Monotonic
impl<'r> Decode<'r, Postgres> for Monotonic
source§fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: PgValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
source§impl<'r> Decode<'r, Sqlite> for Monotonic
impl<'r> Decode<'r, Sqlite> for Monotonic
source§fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
fn decode(value: SqliteValueRef<'r>) -> Result<Self, BoxDynError>
Decode a new value of this type using a raw value from the database.
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
source§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
source§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 moresource§impl PgHasArrayType for Monotonic
impl PgHasArrayType for Monotonic
fn array_type_info() -> PgTypeInfo
fn array_compatible(ty: &PgTypeInfo) -> bool
source§impl SubAssign<Duration> for Monotonic
impl SubAssign<Duration> for Monotonic
source§fn sub_assign(&mut self, rhs: Duration)
fn sub_assign(&mut self, rhs: Duration)
Performs the
-= operation. Read moresource§impl Type<Sqlite> for Monotonic
impl Type<Sqlite> for Monotonic
source§fn type_info() -> SqliteTypeInfo
fn type_info() -> SqliteTypeInfo
Returns the canonical SQL type for this Rust type. Read more
source§fn compatible(ty: &SqliteTypeInfo) -> bool
fn compatible(ty: &SqliteTypeInfo) -> bool
Determines if this Rust type is compatible with the given SQL type. Read more
impl Copy for Monotonic
impl Eq for Monotonic
impl StructuralPartialEq for Monotonic
Auto Trait Implementations§
impl Freeze for Monotonic
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
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)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.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