[][src]Enum livesplit_core::settings::Value

pub enum Value {
    Bool(bool),
    UInt(u64),
    Int(i64),
    String(String),
    OptionalString(Option<String>),
    Float(f64),
    Accuracy(Accuracy),
    DigitsFormat(DigitsFormat),
    OptionalTimingMethod(Option<TimingMethod>),
    Color(Color),
    OptionalColor(Option<Color>),
    Gradient(Gradient),
    ListGradient(ListGradient),
    Alignment(Alignment),
    ColumnStartWith(ColumnStartWith),
    ColumnUpdateWith(ColumnUpdateWith),
    ColumnUpdateTrigger(ColumnUpdateTrigger),
    Hotkey(Option<KeyCode>),
    LayoutDirection(LayoutDirection),
}

Describes a setting's value. Such a value can be of a variety of different types.

Variants

Bool(bool)

A boolean value.

UInt(u64)

An unsigned integer.

Int(i64)

An integer.

String(String)

A string.

OptionalString(Option<String>)

An optional string.

Float(f64)

A floating point number.

Accuracy(Accuracy)

An accuracy, describing how many digits to show for the fractional part of a time.

DigitsFormat(DigitsFormat)

A digits format, describing how many digits to show for the main part of a time.

OptionalTimingMethod(Option<TimingMethod>)

An optional timing method.

Color(Color)

A color.

OptionalColor(Option<Color>)

An optional color.

Gradient(Gradient)

A gradient.

ListGradient(ListGradient)

A gradient designed for use with lists.

Alignment(Alignment)

An alignment for the Title Component's title.

ColumnStartWith(ColumnStartWith)

A value describing what a column of the Splits Component starts out with.

ColumnUpdateWith(ColumnUpdateWith)

A value describing what a column of the Splits Component gets updated with.

ColumnUpdateTrigger(ColumnUpdateTrigger)

A value describing when to update a column of the Splits Component.

Hotkey(Option<KeyCode>)

A value describing what hotkey to press to trigger a certain action.

LayoutDirection(LayoutDirection)

A value describing the direction of a layout.

Methods

impl Value[src]

pub fn into_bool(self) -> Result<bool>[src]

Tries to convert the value into a boolean.

pub fn into_uint(self) -> Result<u64>[src]

Tries to convert the value into an unsigned integer.

pub fn into_int(self) -> Result<i64>[src]

Tries to convert the value into an integer.

pub fn into_string(self) -> Result<String>[src]

Tries to convert the value into a string.

pub fn into_optional_string(self) -> Result<Option<String>>[src]

Tries to convert the value into an optional string.

pub fn into_float(self) -> Result<f64>[src]

Tries to convert the value into a floating point number.

pub fn into_accuracy(self) -> Result<Accuracy>[src]

Tries to convert the value into an accuracy.

pub fn into_digits_format(self) -> Result<DigitsFormat>[src]

Tries to convert the value into a digits format.

pub fn into_optional_timing_method(self) -> Result<Option<TimingMethod>>[src]

Tries to convert the value into an optional timing method.

pub fn into_color(self) -> Result<Color>[src]

Tries to convert the value into a color.

pub fn into_optional_color(self) -> Result<Option<Color>>[src]

Tries to convert the value into an optional color.

pub fn into_gradient(self) -> Result<Gradient>[src]

Tries to convert the value into a gradient.

pub fn into_list_gradient(self) -> Result<ListGradient>[src]

Tries to convert the value into a list gradient.

pub fn into_alignment(self) -> Result<Alignment>[src]

Tries to convert the value into an alignment.

pub fn into_column_start_with(self) -> Result<ColumnStartWith>[src]

Tries to convert the value into a value describing what a splits component's column starts out with.

pub fn into_column_update_with(self) -> Result<ColumnUpdateWith>[src]

Tries to convert the value into a value describing what a splits component's column gets updated with.

pub fn into_column_update_trigger(self) -> Result<ColumnUpdateTrigger>[src]

Tries to convert the value into a Column Update Trigger.

pub fn into_hotkey(self) -> Result<Option<KeyCode>>[src]

Tries to convert the value into a hotkey.

pub fn into_layout_direction(self) -> Result<LayoutDirection>[src]

Tries to convert the value into a layout direction.

Trait Implementations

impl From<bool> for Value[src]

impl From<u64> for Value[src]

impl From<i64> for Value[src]

impl From<String> for Value[src]

impl From<Option<String>> for Value[src]

impl From<f64> for Value[src]

impl From<Accuracy> for Value[src]

impl From<DigitsFormat> for Value[src]

impl From<Option<TimingMethod>> for Value[src]

impl From<Color> for Value[src]

impl From<Option<Color>> for Value[src]

impl From<Gradient> for Value[src]

impl From<ListGradient> for Value[src]

impl From<Alignment> for Value[src]

impl From<ColumnStartWith> for Value[src]

impl From<ColumnUpdateWith> for Value[src]

impl From<ColumnUpdateTrigger> for Value[src]

impl From<Option<KeyCode>> for Value[src]

impl From<LayoutDirection> for Value[src]

impl Into<bool> for Value[src]

impl Into<u64> for Value[src]

impl Into<i64> for Value[src]

impl Into<String> for Value[src]

impl Into<Option<String>> for Value[src]

impl Into<f64> for Value[src]

impl Into<Accuracy> for Value[src]

impl Into<DigitsFormat> for Value[src]

impl Into<Option<TimingMethod>> for Value[src]

impl Into<Color> for Value[src]

impl Into<Option<Color>> for Value[src]

impl Into<Gradient> for Value[src]

impl Into<ListGradient> for Value[src]

impl Into<Alignment> for Value[src]

impl Into<ColumnStartWith> for Value[src]

impl Into<ColumnUpdateWith> for Value[src]

impl Into<ColumnUpdateTrigger> for Value[src]

impl Into<Option<KeyCode>> for Value[src]

impl Into<LayoutDirection> for Value[src]

impl Serialize for Value[src]

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

Auto Trait Implementations

impl Send for Value

impl Sync for Value

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