[][src]Enum livesplit_core::Component

pub enum Component {
    BlankSpace(Component),
    CurrentComparison(Component),
    CurrentPace(Component),
    Delta(Component),
    DetailedTimer(Box<Component>),
    Graph(Component),
    PossibleTimeSave(Component),
    PreviousSegment(Component),
    Separator(Component),
    Splits(Component),
    SumOfBest(Component),
    Text(Component),
    Timer(Component),
    Title(Component),
    TotalPlaytime(Component),
}

A Component provides information about a run in a way that is easy to visualize. This type can store any of the components provided by this crate.

Variants

BlankSpace(Component)

The Blank Space Component.

CurrentComparison(Component)

The Current Comparison Component.

CurrentPace(Component)

The Current Pace Component.

Delta(Component)

The Delta Component.

DetailedTimer(Box<Component>)

The Detailed Timer Component.

Graph(Component)

The Graph Component.

PossibleTimeSave(Component)

The Possible Time Save Component.

PreviousSegment(Component)

The Previous Segment Component.

Separator(Component)

The Separator Component.

Splits(Component)

The Splits Component.

SumOfBest(Component)

The Sum of Best Component.

Text(Component)

The Text Component.

Timer(Component)

The Timer Component.

Title(Component)

The Title Component.

TotalPlaytime(Component)

The Total Playtime Component.

Methods

impl Component[src]

pub fn state(
    &mut self,
    timer: &Timer,
    layout_settings: &GeneralSettings
) -> ComponentState
[src]

Calculates the component's state based on the timer and settings provided. The timer provides the information to visualize and the layout settings provide general information about how to expose that information in the state.

pub fn settings(&self) -> ComponentSettings[src]

Accesses the settings of the component. Each component has different settings, so you need to handle them on a case by case basis. If you want to access a more general description of the settings, access the Settings Description instead.

pub fn name(&self) -> Cow<str>[src]

Accesses the name of the component.

pub fn scroll_up(&mut self)[src]

Tells the component to scroll up. This may be interpreted differently based on the kind of component. Most components will ignore this.

pub fn scroll_down(&mut self)[src]

Tells the component to scroll down. This may be interpreted differently based on the kind of component. Most components will ignore this.

pub fn remount(&mut self)[src]

Some component states provide relative information based on information they already provided. Remounting forces the components to provide absolute information again, as if they provide the state for the first time.

pub fn settings_description(&self) -> SettingsDescription[src]

Provides a general description of the settings. Such a Settings Description entirely describes all the settings that are available, what type they are and what value they currently have. This provides a user interface independent way of changing the settings.

pub fn set_value(&mut self, index: usize, value: Value)[src]

Changes a setting of the component based on its Settings Description index.

Panics

This may panic if the index doesn't match any setting provided by the Settings Description of this component. Additionally, the value needs to have a compatible type.

Trait Implementations

impl Clone for Component[src]

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

Performs copy-assignment from source. Read more

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Box<Component>> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<Component> for Component[src]

impl From<ComponentSettings> for Component[src]

Auto Trait Implementations

impl Send for Component

impl Sync for Component

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