[][src]Struct livesplit_core::HotkeyConfig

pub struct HotkeyConfig {
    pub split: Option<KeyCode>,
    pub reset: Option<KeyCode>,
    pub undo: Option<KeyCode>,
    pub skip: Option<KeyCode>,
    pub pause: Option<KeyCode>,
    pub undo_all_pauses: Option<KeyCode>,
    pub previous_comparison: Option<KeyCode>,
    pub next_comparison: Option<KeyCode>,
    pub toggle_timing_method: Option<KeyCode>,
}

The configuration to use for a Hotkey System. It describes with keys to use as hotkeys for the different actions.

Fields

split: Option<KeyCode>

The key to use for splitting and starting a new attempt.

reset: Option<KeyCode>

The key to use for resetting the current attempt.

undo: Option<KeyCode>

The key to use for undoing the last split.

skip: Option<KeyCode>

The key to use for skipping the current split.

pause: Option<KeyCode>

The key to use for pausing the current attempt and starting a new attempt.

undo_all_pauses: Option<KeyCode>

The key to use for removing all the pause times from the current time.

previous_comparison: Option<KeyCode>

The key to use for switching to the previous comparison.

next_comparison: Option<KeyCode>

The key to use for switching to the next comparison.

toggle_timing_method: Option<KeyCode>

The key to use for toggling between the Real Time and Game Time timing methods.

Methods

impl HotkeyConfig[src]

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

Accesses a generic description of the settings available for the hotkey configuration and their current values.

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

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

Errors

An error is returned if a hotkey is already in use by a different action.

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.

pub fn from_json<R>(reader: R) -> Result<Self> where
    R: Read
[src]

Decodes the hotkey configuration from JSON.

pub fn write_json<W>(&self, writer: W) -> Result<()> where
    W: Write
[src]

Encodes the hotkey configuration as JSON.

Trait Implementations

impl Copy for HotkeyConfig[src]

impl PartialEq<HotkeyConfig> for HotkeyConfig[src]

impl Clone for HotkeyConfig[src]

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

Performs copy-assignment from source. Read more

impl Eq for HotkeyConfig[src]

impl Default for HotkeyConfig[src]

impl Debug for HotkeyConfig[src]

impl Hash for HotkeyConfig[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for HotkeyConfig[src]

impl<'de> Deserialize<'de> for HotkeyConfig where
    HotkeyConfig: Default
[src]

Auto Trait Implementations

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]