Struct mist_core::Run [−][src]
pub struct Run { /* fields omitted */ }
Expand description
Holds information about a speedrun and a user’s times.
Implementations
impl Run
[src]
impl Run
[src]pub fn new<S>(
game_title: S,
category: S,
offset: Option<u128>,
pb: u128,
splits: &Vec<String>,
pb_times: &Vec<u128>,
gold_times: &Vec<u128>,
sum_times: &Vec<(u128, u128)>
) -> Self where
S: ToString,
[src]
game_title: S,
category: S,
offset: Option<u128>,
pb: u128,
splits: &Vec<String>,
pb_times: &Vec<u128>,
gold_times: &Vec<u128>,
sum_times: &Vec<(u128, u128)>
) -> Self where
S: ToString,
pub fn game_title(&self) -> &str
[src]
pub fn game_title(&self) -> &str
[src]Get the game title.
pub fn offset(&self) -> Option<u128>
[src]
pub fn offset(&self) -> Option<u128>
[src]Get start offset of run in milliseconds. None means no offset.
pub fn pb_times(&self) -> &Vec<u128>
[src]
pub fn pb_times(&self) -> &Vec<u128>
[src]Returns the times that were set on each split on the last personal best.
pub fn gold_times(&self) -> &Vec<u128>
[src]
pub fn gold_times(&self) -> &Vec<u128>
[src]Returns the best time that the runner has achieved on each split.
pub fn sum_times(&self) -> &Vec<(u128, u128)>
[src]
pub fn sum_times(&self) -> &Vec<(u128, u128)>
[src]Returns tuples of attempt count and total number of milliseconds spent for each split. First element is attempt count and second is the total time.
Useful for calculating averages.
pub fn set_game_title<S>(&mut self, new: S) where
S: ToString,
[src]
pub fn set_game_title<S>(&mut self, new: S) where
S: ToString,
[src]Sets the game title field.
pub fn set_category<S>(&mut self, new: S) where
S: ToString,
[src]
pub fn set_category<S>(&mut self, new: S) where
S: ToString,
[src]Sets the name of the category.
pub fn set_offset(&mut self, new: Option<u128>)
[src]
pub fn set_offset(&mut self, new: Option<u128>)
[src]Sets the start offset of the run.
pub fn set_splits(&mut self, new: &Vec<String>)
[src]
pub fn set_splits(&mut self, new: &Vec<String>)
[src]Set the names of all splits.
pub fn set_pb_times(&mut self, new: &Vec<u128>)
[src]
pub fn set_pb_times(&mut self, new: &Vec<u128>)
[src]Set the times for each split that were achieved on the current pb.
pub fn set_gold_times(&mut self, new: &Vec<u128>)
[src]
pub fn set_gold_times(&mut self, new: &Vec<u128>)
[src]Set the best times on each split..
pub fn set_gold_time(&mut self, new: u128, idx: usize)
[src]
Trait Implementations
impl<'de> Deserialize<'de> for Run
[src]
impl<'de> Deserialize<'de> for Run
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Run
impl Send for Run
impl Sync for Run
impl Unpin for Run
impl UnwindSafe for Run
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,