[−][src]Struct rtfm::Duration
A Duration
type to represent a span of time.
This data type is only available when the timer-queue
feature is enabled
Methods
impl Duration
[src]
pub fn as_cycles(&self) -> u32
[src]
Returns the total number of clock cycles contained by this Duration
Trait Implementations
impl PartialEq<Duration> for Duration
[src]
impl Eq for Duration
[src]
impl Ord for Duration
[src]
fn cmp(&self, other: &Duration) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
🔬 This is a nightly-only experimental API. (
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Duration> for Duration
[src]
fn partial_cmp(&self, other: &Duration) -> Option<Ordering>
[src]
fn lt(&self, other: &Duration) -> bool
[src]
fn le(&self, other: &Duration) -> bool
[src]
fn gt(&self, other: &Duration) -> bool
[src]
fn ge(&self, other: &Duration) -> bool
[src]
impl Copy for Duration
[src]
impl Add<Duration> for Instant
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, dur: Duration) -> Self
[src]
impl Add<Duration> for Duration
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, other: Self) -> Self
[src]
impl Sub<Duration> for Instant
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, dur: Duration) -> Self
[src]
impl Sub<Duration> for Duration
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self
[src]
impl AddAssign<Duration> for Instant
[src]
fn add_assign(&mut self, dur: Duration)
[src]
impl AddAssign<Duration> for Duration
[src]
fn add_assign(&mut self, dur: Duration)
[src]
impl SubAssign<Duration> for Instant
[src]
fn sub_assign(&mut self, dur: Duration)
[src]
impl SubAssign<Duration> for Duration
[src]
fn sub_assign(&mut self, rhs: Duration)
[src]
impl Clone for Duration
[src]
fn clone(&self) -> Duration
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Duration
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self