[][src]Struct livesplit_core::timing::Time

pub struct Time {
    pub real_time: Option<TimeSpan>,
    pub game_time: Option<TimeSpan>,
}

A time that can store a Real Time and a Game Time. Both of them are optional.

Fields

real_time: Option<TimeSpan>

The Real Time value.

game_time: Option<TimeSpan>

The Game Time value.

Methods

impl Time[src]

pub fn new() -> Self[src]

Creates a new Time with empty Real Time and Game Time.

pub fn zero() -> Self[src]

Creates a new Time where Real Time and Game Time are zero. Keep in mind that a zero Time Span is not the same as a None Time Span as created by Time::new().

pub fn with_real_time(self, real_time: Option<TimeSpan>) -> Self[src]

Creates a new Time based on the current one where the Real Time is replaced by the given Time Span.

pub fn with_game_time(self, game_time: Option<TimeSpan>) -> Self[src]

Creates a new Time based on the current one where the Game Time is replaced by the given Time Span.

pub fn with_timing_method(
    self,
    timing_method: TimingMethod,
    time: Option<TimeSpan>
) -> Self
[src]

Creates a new Time based on the current one where the specified timing method is replaced by the given Time Span.

pub fn op<F>(a: Time, b: Time, f: F) -> Time where
    F: FnMut(TimeSpan, TimeSpan) -> TimeSpan
[src]

Applies an operation to both Timing Methods of the two times provided and creates a new Time from the result.

Trait Implementations

impl From<Option<Duration>> for Time[src]

impl From<Option<RunTime>> for Time[src]

impl From<RealTime> for Time[src]

impl From<GameTime> for Time[src]

impl Copy for Time[src]

impl PartialEq<Time> for Time[src]

impl Eq for Time[src]

impl Clone for Time[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for Time[src]

impl Add<Time> for Time[src]

type Output = Time

The resulting type after applying the + operator.

impl Sub<Time> for Time[src]

type Output = Time

The resulting type after applying the - operator.

impl AddAssign<Time> for Time[src]

impl SubAssign<Time> for Time[src]

impl Index<TimingMethod> for Time[src]

type Output = Option<TimeSpan>

The returned type after indexing.

impl IndexMut<TimingMethod> for Time[src]

impl Debug for Time[src]

Auto Trait Implementations

impl Send for Time

impl Sync for Time

Blanket Implementations

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

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

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<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]

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

fn adapt_into(self) -> D[src]

Convert the source color to the destination color using the bradford method by default Read more

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]