pub struct Timestamp(/* private fields */);Implementations§
Source§impl Timestamp
impl Timestamp
pub const EPOCH: Self
pub const MAX: Self
pub const fn from_micros(micros: u64) -> Self
pub const fn from_millis(millis: u64) -> Self
pub const fn from_secs(secs: u64) -> Self
pub const fn as_micros(&self) -> u64
pub const fn as_millis(&self) -> u64
pub const fn as_secs(&self) -> u64
pub const fn is_zero(&self) -> bool
pub const fn saturating_add(self, micros: u64) -> Self
pub const fn saturating_sub(self, micros: u64) -> Self
pub const fn duration_since(self, earlier: Self) -> u64
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Timestamp
impl<'de> Deserialize<'de> for Timestamp
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Timestamp
impl Ord for Timestamp
1.21.0 (const: unstable) · 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 PartialOrd for Timestamp
impl PartialOrd for Timestamp
impl Copy for Timestamp
impl Eq for Timestamp
impl StructuralPartialEq for Timestamp
Auto Trait Implementations§
impl Freeze for Timestamp
impl RefUnwindSafe for Timestamp
impl Send for Timestamp
impl Sync for Timestamp
impl Unpin for Timestamp
impl UnsafeUnpin for Timestamp
impl UnwindSafe for Timestamp
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