pub trait Time: Copy {
const FIXED: bool = false;
// Required method
fn limit(self, timeout: Option<Duration>) -> Option<Duration>;
// Provided methods
fn sample_at(self, wall: Instant) -> Sample { ... }
fn start(self) -> Sample { ... }
fn tick(self) -> Result<Sample, Error> { ... }
fn quiesce(self) -> Result<Sample, Error> { ... }
fn timeout(self, deadline: Deadline<'_>) -> Duration { ... }
}Provided Associated Constants§
Required Methods§
Provided Methods§
fn sample_at(self, wall: Instant) -> Sample
fn start(self) -> Sample
fn tick(self) -> Result<Sample, Error>
fn quiesce(self) -> Result<Sample, Error>
fn timeout(self, deadline: Deadline<'_>) -> Duration
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".