[][src]Struct livesplit_core::timing::formatter::Delta

pub struct Delta(_, _);

The Delta Time Formatter formats Time Spans as a comparison of two durations, so that it visualizes the difference between both of them. Therefore it always shows whether it is a positive or negative difference, by prepending a plus or minus sign. You can choose how many digits of the fractional part are visualized. Additionally there's an option for removing the fractional part for deltas that are larger than 1 minute.

Example Formatting

  • Empty Time
  • Seconds +23.1
  • Minutes without Decimal Dropping +12:34.9
  • Minutes with Decimal Dropping +12:34
  • Hours without Decimal Dropping +12:34:56.1
  • Hours with Decimal Dropping +12:34:56
  • Negative Times −23.1

Methods

impl Delta[src]

pub fn new() -> Self[src]

Creates a new default Delta Time Formatter that drops the fractional part and uses tenths when showing the fractional part.

pub fn custom(drop_decimals: bool, accuracy: Accuracy) -> Self[src]

Creates a new custom Delta Time Formatter where you can specify whether the fractional part should be dropped for deltas that are larger than 1 minute and how many digits to show for the fractional part.

pub fn with_decimal_dropping() -> Self[src]

Creates a new Delta Time Formatter that drops the fractional part and uses tenths when showing the fractional part.

Trait Implementations

impl<'a> TimeFormatter<'a> for Delta[src]

type Inner = Inner

The actual type that can be displayed.

impl Default for Delta[src]

Auto Trait Implementations

impl Send for Delta

impl Sync for Delta

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<T>, 
[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]

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.