pub trait TimeInstant: Copy + PartialOrd {
type Duration;
// Required methods
fn difference(&self, other: &Self) -> Self::Duration;
fn add_duration(&self, duration: Self::Duration) -> Self;
}Expand description
Provides arithmetic on Time<S> values via seconds duration.
Used by root-finding algorithms that bisect over a time interval.
Required Associated Types§
Required Methods§
Sourcefn difference(&self, other: &Self) -> Self::Duration
fn difference(&self, other: &Self) -> Self::Duration
Signed duration from other to self (self − other).
Sourcefn add_duration(&self, duration: Self::Duration) -> Self
fn add_duration(&self, duration: Self::Duration) -> Self
Shift this instant forward by 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.