pub trait Timestamp {
type Duration: PartialOrd;
type Error;
// Required methods
fn now() -> Self;
fn duration_since_epoch(self) -> Self::Duration;
fn duration_since(
&self,
other: &Self,
) -> Result<Self::Duration, Self::Error>;
}
Expand description
Represents a timestamp.
Required Associated Types§
type Duration: PartialOrd
type Error
Required Methods§
Sourcefn duration_since_epoch(self) -> Self::Duration
fn duration_since_epoch(self) -> Self::Duration
Get duration since start.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.