[−][src]Struct livesplit_core::component::previous_segment::Component
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]
&self,
timer: &Timer,
layout_settings: &GeneralLayoutSettings
) -> State
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(&self) -> 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
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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]
D: AdaptFrom<S, Swp, Dwp, T>,
Dwp: WhitePoint,
Swp: WhitePoint,
T: Component + Float,
fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
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>,
T: Parameter<Self>,
Sets value
as a parameter of self
.