[−][src]Struct livesplit_core::Attempt
An Attempt describes information about an attempt to run a specific category by a specific runner in the past. Every time a new attempt is started and then reset, an Attempt describing general information about it is created.
Methods
impl Attempt
[src]
pub fn new(
index: i32,
time: Time,
started: Option<AtomicDateTime>,
ended: Option<AtomicDateTime>,
pause_time: Option<TimeSpan>
) -> Self
[src]
index: i32,
time: Time,
started: Option<AtomicDateTime>,
ended: Option<AtomicDateTime>,
pause_time: Option<TimeSpan>
) -> Self
Creates a new Attempt, logging an attempt to speedrun a category. You need the provide a unique index for the attempt (The index needs to be unique for the Run, not across all the Run objects). Additionally you provide the split time of the last segment. If it is empty, the attempt is considered being reset early. If there's information available about when the attempt was started and when it ended, this information can be provided. Both of these should be provided for unfinished attempts as well, if possible. If it is known that the attempt was paused for a certain amount of time, this can be provided as well.
pub fn duration(&self) -> Option<TimeSpan>
[src]
Returns the total duration of the attempt, from the point in time it started to the point in time it ended. This is different from the real time of the run, as it includes all the pause times and the timer offset at the beginning of the run. If not enough information is known to derive this, the real time is used as a fallback. So if for example the timer started at -2s, the runner paused it for 5s and the timer ended at a real time value of 10s, then the actual duration of the attempt was 17s.
pub fn index(&self) -> i32
[src]
Accesses the unique index of the attempt. This index is unique for the Run, not for all of them.
pub fn time(&self) -> Time
[src]
Accesses the split time of the last segment. If the attempt got reset early and didn't finish, this may be empty.
pub fn pause_time(&self) -> Option<TimeSpan>
[src]
Accesses the amount of time the attempt has been paused for. If it is
not known, this returns None
. This means that it may not necessarily
be possible to differentiate whether a Run has not been paused or it
simply wasn't stored.
pub fn started(&self) -> Option<AtomicDateTime>
[src]
Accesses the point in time the attempt was started at. This returns
None
if this information is not known.
pub fn ended(&self) -> Option<AtomicDateTime>
[src]
Accesses the point in time the attempt was ended at. This returns None
if this information is not known.
Trait Implementations
impl PartialEq<Attempt> for Attempt
[src]
impl Clone for Attempt
[src]
fn clone(&self) -> Attempt
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Attempt
[src]
Auto Trait Implementations
Blanket Implementations
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
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
.