[−][src]Struct livesplit_core::TimeSpan
A Time Span represents a certain span of time.
Methods
impl TimeSpan
[src]
pub fn zero() -> Self
[src]
Creates a new Time Span of zero length.
pub fn from_milliseconds(milliseconds: f64) -> Self
[src]
Creates a new Time Span from a given amount of milliseconds.
pub fn from_seconds(seconds: f64) -> Self
[src]
Creates a new Time Span from a given amount of seconds.
pub fn from_days(days: f64) -> Self
[src]
Creates a new Time Span from a given amount of days.
pub fn to_duration(&self) -> Duration
[src]
Converts the Time Span to a Duration from the chrono
crate.
pub fn total_seconds(&self) -> f64
[src]
Returns the total amount of seconds (including decimals) this Time Span represents.
pub fn total_milliseconds(&self) -> f64
[src]
Returns the total amount of milliseconds (including decimals) this Time Span represents.
pub fn parse_opt<S>(text: S) -> Result<Option<TimeSpan>, ParseError> where
S: AsRef<str>,
[src]
S: AsRef<str>,
Parses an optional Time Span from a given textual representation of the
Time Span. If the given text consists entirely of whitespace or is
empty, None
is returned.
Trait Implementations
impl Default for TimeSpan
[src]
impl Clone for TimeSpan
[src]
fn clone(&self) -> TimeSpan
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Ord for TimeSpan
[src]
fn cmp(&self, other: &TimeSpan) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl From<Duration> for TimeSpan
[src]
impl From<Duration> for TimeSpan
[src]
fn from(duration: StdDuration) -> Self
[src]
impl Eq for TimeSpan
[src]
impl Copy for TimeSpan
[src]
impl PartialOrd<TimeSpan> for TimeSpan
[src]
fn partial_cmp(&self, other: &TimeSpan) -> Option<Ordering>
[src]
fn lt(&self, other: &TimeSpan) -> bool
[src]
fn le(&self, other: &TimeSpan) -> bool
[src]
fn gt(&self, other: &TimeSpan) -> bool
[src]
fn ge(&self, other: &TimeSpan) -> bool
[src]
impl PartialEq<TimeSpan> for TimeSpan
[src]
impl Debug for TimeSpan
[src]
impl FromStr for TimeSpan
[src]
type Err = ParseError
The associated error which can be returned from parsing.
fn from_str(text: &str) -> Result<Self, ParseError>
[src]
impl Add<TimeSpan> for TimeSpan
[src]
type Output = TimeSpan
The resulting type after applying the +
operator.
fn add(self, rhs: TimeSpan) -> TimeSpan
[src]
impl Sub<TimeSpan> for TimeSpan
[src]
type Output = TimeSpan
The resulting type after applying the -
operator.
fn sub(self, rhs: TimeSpan) -> TimeSpan
[src]
impl Sub<TimeSpan> for TimeStamp
[src]
type Output = TimeStamp
The resulting type after applying the -
operator.
fn sub(self, rhs: TimeSpan) -> TimeStamp
[src]
impl Neg for TimeSpan
[src]
type Output = TimeSpan
The resulting type after applying the -
operator.
fn neg(self) -> TimeSpan
[src]
impl AddAssign<TimeSpan> for TimeSpan
[src]
fn add_assign(&mut self, rhs: TimeSpan)
[src]
impl SubAssign<TimeSpan> for TimeSpan
[src]
fn sub_assign(&mut self, rhs: TimeSpan)
[src]
impl<'de> Deserialize<'de> for TimeSpan
[src]
fn deserialize<D>(deserializer: D) -> Result<TimeSpan, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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, 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<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
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
.
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,