[−][src]Struct alass_core::TimePoint
Represents a timepoint in your own metric.
A timepoint is internally represented by an integer (because the align
algorithm needs discrete
time steps). You will have to choose your own metric: for example 1i64 means
2ms. The internal algorithm does not use any non-user given TimePoint
s
(so its interpretation is
up to you).
This is the reason this library works with TimePoint
and TimeDelta
: to
enforce
an absolute and delta relationship an a own metric.
The only way to create a new TimePoint
is with TimePoint::from({i64})
.
use alass_core::TimePoint; let p = TimePoint::from(10); // to get that i64 again let i1: i64 = p.into(); let i2 = i64::from(p);
Methods
impl TimePoint
[src]
pub fn as_f32(self) -> f32
[src]
Returns a f32 for the given time point.
pub fn as_f64(self) -> f64
[src]
Returns a f32 for the given time point.
pub fn as_i64(self) -> i64
[src]
Returns a i64 for the given time point.
Trait Implementations
impl From<i64> for TimePoint
[src]
impl From<TimePoint> for i64
[src]
impl Clone for TimePoint
[src]
impl Copy for TimePoint
[src]
impl Eq for TimePoint
[src]
impl Ord for TimePoint
[src]
fn cmp(&self, other: &TimePoint) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<TimePoint> for TimePoint
[src]
impl PartialOrd<TimePoint> for TimePoint
[src]
fn partial_cmp(&self, other: &TimePoint) -> Option<Ordering>
[src]
fn lt(&self, other: &TimePoint) -> bool
[src]
fn le(&self, other: &TimePoint) -> bool
[src]
fn gt(&self, other: &TimePoint) -> bool
[src]
fn ge(&self, other: &TimePoint) -> bool
[src]
impl Display for TimePoint
[src]
impl Debug for TimePoint
[src]
impl Sub<TimePoint> for TimePoint
[src]
type Output = TimeDelta
The resulting type after applying the -
operator.
fn sub(self, rhs: TimePoint) -> TimeDelta
[src]
impl Sub<TimeDelta> for TimePoint
[src]
type Output = TimePoint
The resulting type after applying the -
operator.
fn sub(self, rhs: TimeDelta) -> TimePoint
[src]
impl Add<TimeDelta> for TimePoint
[src]
type Output = TimePoint
The resulting type after applying the +
operator.
fn add(self, rhs: TimeDelta) -> TimePoint
[src]
impl AddAssign<TimeDelta> for TimePoint
[src]
fn add_assign(&mut self, rhs: TimeDelta)
[src]
impl SubAssign<TimeDelta> for TimePoint
[src]
fn sub_assign(&mut self, rhs: TimeDelta)
[src]
impl Hash for TimePoint
[src]
Auto Trait Implementations
impl Send for TimePoint
impl Sync for TimePoint
impl Unpin for TimePoint
impl UnwindSafe for TimePoint
impl RefUnwindSafe for TimePoint
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,