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 TimePoints (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]

Formats the value using the given formatter. Read more

impl Copy for TimePoint
[src]

impl Clone for TimePoint
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TimePoint
[src]

Formats the value using the given formatter.

impl PartialOrd for TimePoint
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

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]

This method returns an Ordering between self and other. Read more

impl PartialEq for TimePoint
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for TimePoint
[src]

impl Hash for TimePoint
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl From<i64> for TimePoint
[src]

Performs the conversion.

impl Sub for TimePoint
[src]

The resulting type after applying the - operator

The method for the - operator

impl Add<TimeDelta> for TimePoint
[src]

The resulting type after applying the + operator

The method for the + operator

impl AddAssign<TimeDelta> for TimePoint
[src]

The method for the += operator

impl Sub<TimeDelta> for TimePoint
[src]

The resulting type after applying the - operator

The method for the - operator

impl SubAssign<TimeDelta> for TimePoint
[src]

The method for the -= operator