pub trait Time:
PartialEq
+ PartialOrd
+ Clone
+ Copy {
type Duration: TimeDiff;
// Required methods
fn since(self, earlier: Self) -> Self::Duration;
fn advance(self, duration: Self::Duration) -> Self;
}Expand description
Time trait should be implemented for types that represent animation time.
It’s implemented for f32, f64, std::time::Instant, and std::time::SystemTime by default.
You can implement it for your own types.
Required Associated Types§
Required Methods§
Object Safety§
This trait is not object safe.