pub trait CrossPlatformInstant: Copy {
// Required methods
fn elapsed(&self) -> Duration;
fn checked_duration_since(&self, other: Self) -> Option<Duration>;
async fn sleep(duration: Duration);
}
Required Methods§
fn elapsed(&self) -> Duration
fn checked_duration_since(&self, other: Self) -> Option<Duration>
async fn sleep(duration: Duration)
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.