Struct aligner::TimePoint
[−]
[src]
pub struct 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 aligner::TimePoint; let p = TimePoint::from(10); // to get that i64 again let i1: i64 = p.into(); let i2 = i64::from(p);
Trait Implementations
impl Display for TimePoint
[src]
impl Copy for TimePoint
[src]
impl Clone for TimePoint
[src]
fn clone(&self) -> TimePoint
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for TimePoint
[src]
impl PartialOrd for TimePoint
[src]
fn partial_cmp(&self, __arg_0: &TimePoint) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &TimePoint) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &TimePoint) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &TimePoint) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &TimePoint) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for TimePoint
[src]
fn cmp(&self, __arg_0: &TimePoint) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialEq for TimePoint
[src]
fn eq(&self, __arg_0: &TimePoint) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &TimePoint) -> bool
This method tests for !=
.
impl Eq for TimePoint
[src]
impl Hash for TimePoint
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<i64> for TimePoint
[src]
impl Sub for TimePoint
[src]
type Output = TimeDelta
The resulting type after applying the -
operator
fn sub(self, rhs: TimePoint) -> TimeDelta
The method for the -
operator
impl Add<TimeDelta> for TimePoint
[src]
type Output = TimePoint
The resulting type after applying the +
operator
fn add(self, rhs: TimeDelta) -> TimePoint
The method for the +
operator
impl AddAssign<TimeDelta> for TimePoint
[src]
fn add_assign(&mut self, rhs: TimeDelta)
The method for the +=
operator
impl Sub<TimeDelta> for TimePoint
[src]
type Output = TimePoint
The resulting type after applying the -
operator
fn sub(self, rhs: TimeDelta) -> TimePoint
The method for the -
operator
impl SubAssign<TimeDelta> for TimePoint
[src]
fn sub_assign(&mut self, rhs: TimeDelta)
The method for the -=
operator