[][src]Struct livesplit_core::TimeSpan

pub struct TimeSpan(_);

A Time Span represents a certain span of time.

Methods

impl TimeSpan[src]

pub fn zero() -> Self[src]

Creates a new Time Span of zero length.

pub fn from_milliseconds(milliseconds: f64) -> Self[src]

Creates a new Time Span from a given amount of milliseconds.

pub fn from_seconds(seconds: f64) -> Self[src]

Creates a new Time Span from a given amount of seconds.

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

Creates a new Time Span from a given amount of days.

pub fn to_duration(&self) -> Duration[src]

Converts the Time Span to a Duration from the chrono crate.

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

Returns the total amount of seconds (including decimals) this Time Span represents.

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

Returns the total amount of milliseconds (including decimals) this Time Span represents.

pub fn parse_opt<S>(text: S) -> Result<Option<TimeSpan>, ParseError> where
    S: AsRef<str>, 
[src]

Parses an optional Time Span from a given textual representation of the Time Span. If the given text consists entirely of whitespace or is empty, None is returned.

Trait Implementations

impl Default for TimeSpan[src]

impl Clone for TimeSpan[src]

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

Performs copy-assignment from source. Read more

impl Ord for TimeSpan[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.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 From<Duration> for TimeSpan[src]

impl From<Duration> for TimeSpan[src]

impl Eq for TimeSpan[src]

impl Copy for TimeSpan[src]

impl PartialOrd<TimeSpan> for TimeSpan[src]

impl PartialEq<TimeSpan> for TimeSpan[src]

impl Debug for TimeSpan[src]

impl FromStr for TimeSpan[src]

type Err = ParseError

The associated error which can be returned from parsing.

impl Add<TimeSpan> for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the + operator.

impl Sub<TimeSpan> for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the - operator.

impl Sub<TimeSpan> for TimeStamp[src]

type Output = TimeStamp

The resulting type after applying the - operator.

impl Neg for TimeSpan[src]

type Output = TimeSpan

The resulting type after applying the - operator.

impl AddAssign<TimeSpan> for TimeSpan[src]

impl SubAssign<TimeSpan> for TimeSpan[src]

impl<'de> Deserialize<'de> for TimeSpan[src]

Auto Trait Implementations

impl Send for TimeSpan

impl Sync for TimeSpan

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

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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]