pub trait TimerQueueTicks:
Copy
+ PartialEq
+ Eq {
const ONE_TICK: Self;
// Required methods
fn compare(self, other: Self) -> Ordering;
fn wrapping_add(self, other: Self) -> Self;
// Provided method
fn is_at_least(self, other: Self) -> bool { ... }
}
Expand description
The ticks of a timer.
Required Associated Constants§
Required Methods§
Sourcefn compare(self, other: Self) -> Ordering
fn compare(self, other: Self) -> Ordering
Compares to another tick count.
Takes into account timer wrapping; if the difference is more than half the value range, the result will be flipped.
Sourcefn wrapping_add(self, other: Self) -> Self
fn wrapping_add(self, other: Self) -> Self
Wrapping addition.
Provided Methods§
Sourcefn is_at_least(self, other: Self) -> bool
fn is_at_least(self, other: Self) -> bool
True if self
is at the same time as other
or later.
Takes into account timer wrapping; if the difference is more than half the value range, the result will be negated.
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.