[][src]Struct livesplit_core::RunMetadata

pub struct RunMetadata {
    pub run_id: String,
    pub platform_name: String,
    pub uses_emulator: bool,
    pub region_name: String,
    pub variables: IndexMap<String, String>,
}

The Run Metadata stores additional information about a run, like the platform and region of the game. All of this information is optional.

Fields

run_id: String

The speedrun.com Run ID of the run. You need to ensure that the record on speedrun.com matches up with the Personal Best of this run. This may be empty if there's no association.

platform_name: String

The name of the platform this game is run on. This may be empty if it's not specified.

uses_emulator: bool

Specifies whether this speedrun is done on an emulator. Keep in mind that false may also mean that this information is simply not known.

region_name: String

The name of the region this game is from. This may be empty if it's not specified.

variables: IndexMap<String, String>

Stores all the variables. A variable is an arbitrary key value pair storing additional information about the category. An example of this may be whether Amiibos are used in this category.

Methods

impl RunMetadata[src]

pub fn new() -> Self[src]

Creates a new empty Run Metadata.

pub fn run_id(&self) -> &str[src]

Accesses the speedrun.com Run ID of the run. This Run ID specify which Record on speedrun.com this run is associated with. This should be changed once the Personal Best doesn't match up with that record anymore. This may be empty if there's no association.

pub fn set_run_id<S>(&mut self, id: S) where
    S: AsRef<str>, 
[src]

Sets the speedrun.com Run ID of the run. You need to ensure that the record on speedrun.com matches up with the Personal Best of this run. This may be empty if there's no association.

pub fn platform_name(&self) -> &str[src]

Accesses the name of the platform this game is run on. This may be empty if it's not specified.

pub fn set_platform_name<S>(&mut self, name: S) where
    S: AsRef<str>, 
[src]

Sets the name of the platform this game is run on. This may be empty if it's not specified.

pub fn uses_emulator(&self) -> bool[src]

Returns true if this speedrun is done on an emulator. However false may also indicate that this information is simply not known.

pub fn set_emulator_usage(&mut self, uses_emulator: bool)[src]

Specifies whether this speedrun is done on an emulator. Keep in mind that false may also mean that this information is simply not known.

pub fn region_name(&self) -> &str[src]

Accesses the name of the region this game is from. This may be empty if it's not specified.

pub fn set_region_name<S>(&mut self, region_name: S) where
    S: AsRef<str>, 
[src]

Sets the name of the region this game is from. This may be empty if it's not specified.

pub fn set_variable<N, V>(&mut self, name: N, value: V) where
    N: Into<String>,
    V: Into<String>, 
[src]

Sets the variable with the name specified to the value specified. A variable is an arbitrary key value pair storing additional information about the category. An example of this may be whether Amiibos are used in this category. If the variable doesn't exist yet, it is being inserted.

pub fn remove_variable<S>(&mut self, name: S) where
    S: AsRef<str>, 
[src]

Removes the variable with the name specified.

pub fn variables(&self) -> Iter<String, String>[src]

Returns an iterator iterating over all the variables and their values that have been specified.

pub fn clear(&mut self)[src]

Resets all the Metadata Information.

Trait Implementations

impl Default for RunMetadata[src]

impl Clone for RunMetadata[src]

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

Performs copy-assignment from source. Read more

impl PartialEq<RunMetadata> for RunMetadata[src]

impl Debug for RunMetadata[src]

impl Serialize for RunMetadata[src]

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

Auto Trait Implementations

impl Send for RunMetadata

impl Sync for RunMetadata

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