Struct indigo::time::Duration[][src]

pub struct Duration { /* fields omitted */ }

A duration of time.

The duration is stored as a 64-bit floating point number of seconds and cannot be negative.

Implementations

impl Duration[src]

pub fn weeks(weeks: u64) -> Self[src]

Returns a duration of the given number of weeks.

pub fn days(days: u64) -> Self[src]

Returns a duration of the given number of days.

pub fn hours(hours: u64) -> Self[src]

Returns a duration of the given number of hours.

pub fn mins(mins: u64) -> Self[src]

Returns a duration of the given number of minutes.

pub fn secs(secs: u64) -> Self[src]

Returns a duration of the given number of seconds.

pub fn secs_f64(secs: f64) -> Self[src]

Returns a duration of the given number of seconds.

pub fn hz(hz: u64) -> Self[src]

Returns a duration of the given number of Hz.

pub fn ms(ms: u64) -> Duration[src]

Returns a duration of the given number of milliseconds.

pub fn as_weeks(self) -> f64[src]

Return the duration as a number of days.

pub fn as_days(self) -> f64[src]

Return the duration as a number of days.

pub fn as_hours(self) -> f64[src]

Return the duration as a number of hours.

pub fn as_mins(self) -> f64[src]

Return the duration as a number of minutes.

pub const fn as_secs(self) -> f64[src]

Return the duration as a number of seconds.

pub fn as_hz(self) -> f64[src]

Return the duration as a number of Hz.

pub fn as_ms(self) -> f64[src]

Return the duration as a number of milliseconds.

pub fn to_std(self) -> Duration[src]

Converts this duration to a std::time::Duration.

Trait Implementations

impl Add<Duration> for Time[src]

type Output = Self

The resulting type after applying the + operator.

impl Clone for Duration[src]

impl Copy for Duration[src]

impl Default for Duration[src]

impl<T> Div<T> for Duration where
    T: AsPrimitive<f64>, 
[src]

type Output = Self

The resulting type after applying the / operator.

impl Eq for Duration[src]

impl From<Duration> for Duration[src]

impl From<Duration> for Duration[src]

impl FromStr for Duration[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl<T> Mul<T> for Duration where
    T: AsPrimitive<f64>, 
[src]

type Output = Self

The resulting type after applying the * operator.

impl Ord for Duration[src]

impl PartialEq<Duration> for Duration[src]

impl PartialOrd<Duration> for Duration[src]

impl StructuralPartialEq for Duration[src]

impl Sub<Duration> for Time[src]

type Output = Self

The resulting type after applying the - operator.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,