[][src]Struct livesplit_core::component::previous_segment::Component

pub struct Component { /* fields omitted */ }

The Previous Segment Component is a component that shows how much time was saved or lost during the previous segment based on the chosen comparison. Additionally, the potential time save for the previous segment can be displayed. This component switches to a Live Segment view that shows active time loss whenever the runner is losing time on the current segment.

Methods

impl Component[src]

pub fn new() -> Self[src]

Creates a new Previous Segment Component.

pub fn with_settings(settings: Settings) -> Self[src]

Creates a new Previous Segment Component with the given settings.

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

Accesses the settings of the component.

pub fn settings_mut(&mut self) -> &mut Settings[src]

Grants mutable access to the settings of the component.

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

Accesses the name of the component.

pub fn state(
    &self,
    timer: &Timer,
    layout_settings: &GeneralLayoutSettings
) -> State
[src]

Calculates the component's state based on the timer and the layout settings provided.

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

Accesses a generic description of the settings available for this component and their current values.

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

Sets a setting's value by its index to the given value.

Panics

This panics if the type of the value to be set is not compatible with the type of the setting's value. A panic can also occur if the index of the setting provided is out of bounds.

Trait Implementations

impl From<Component> for Component[src]

impl Clone for Component[src]

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

Performs copy-assignment from source. Read more

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