Struct indigo::time::Duration [−][src]
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.
fn add(self, rhs: Duration) -> Self::Output
[src]
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]
T: AsPrimitive<f64>,
type Output = Self
The resulting type after applying the /
operator.
fn div(self, rhs: T) -> Self::Output
[src]
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.
fn from_str(s: &str) -> Result<Self, Self::Err>
[src]
impl<T> Mul<T> for Duration where
T: AsPrimitive<f64>,
[src]
T: AsPrimitive<f64>,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: T) -> Self::Output
[src]
impl Ord for Duration
[src]
fn cmp(&self, other: &Self) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<Duration> for Duration
[src]
impl PartialOrd<Duration> for Duration
[src]
fn partial_cmp(&self, other: &Duration) -> Option<Ordering>
[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralPartialEq for Duration
[src]
impl Sub<Duration> for Time
[src]
Auto Trait Implementations
impl RefUnwindSafe for Duration
impl Send for Duration
impl Sync for Duration
impl Unpin for Duration
impl UnwindSafe for Duration
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut Tⓘ
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut 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.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
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.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,