[][src]Struct alass_core::TimeDelta

pub struct TimeDelta(_);

This struct represents a time difference between two TimePoints. Internally its an integer type.

Methods

impl TimeDelta[src]

pub fn zero() -> TimeDelta[src]

No difference in time.

pub fn one() -> TimeDelta[src]

Smallest positive time difference the library can work with.

pub fn from_i64(v: i64) -> TimeDelta[src]

Create time delta as "TimeDelta::one() * v".

pub fn as_f64(&self) -> f64[src]

Return time difference as f64.

pub fn as_f32(&self) -> f32[src]

Return time difference as f64.

pub fn as_i64(&self) -> i64[src]

Return time difference as i64.

Trait Implementations

impl From<TimeDelta> for i32[src]

impl From<TimeDelta> for u32[src]

impl From<TimeDelta> for i64[src]

impl From<TimeDelta> for u64[src]

impl Clone for TimeDelta[src]

impl Copy for TimeDelta[src]

impl Eq for TimeDelta[src]

impl Ord for TimeDelta[src]

impl PartialEq<TimeDelta> for TimeDelta[src]

impl PartialOrd<TimeDelta> for TimeDelta[src]

impl Display for TimeDelta[src]

impl Debug for TimeDelta[src]

impl Sub<TimeDelta> for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the - operator.

impl Sub<TimeDelta> for TimePoint[src]

type Output = TimePoint

The resulting type after applying the - operator.

impl Add<TimeDelta> for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the + operator.

impl Add<TimeDelta> for TimePoint[src]

type Output = TimePoint

The resulting type after applying the + operator.

impl Add<TimeDelta> for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the + operator.

impl Mul<i64> for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the * operator.

impl Mul<TimeDelta> for i64[src]

type Output = TimeDelta

The resulting type after applying the * operator.

impl Neg for TimeDelta[src]

type Output = TimeDelta

The resulting type after applying the - operator.

impl AddAssign<TimeDelta> for TimeDelta[src]

impl AddAssign<TimeDelta> for TimePoint[src]

impl SubAssign<TimeDelta> for TimeDelta[src]

impl SubAssign<TimeDelta> for TimePoint[src]

impl MulAssign<i64> for TimeDelta[src]

impl Hash for TimeDelta[src]

impl Sum<TimeDelta> for TimeDelta[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

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<T> Borrow<T> for T where
    T: ?Sized
[src]

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

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