pub struct TimePoint(/* private fields */);
Expand description
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);
Implementations§
Trait Implementations§
Source§impl AddAssign<TimeDelta> for TimePoint
impl AddAssign<TimeDelta> for TimePoint
Source§fn add_assign(&mut self, rhs: TimeDelta)
fn add_assign(&mut self, rhs: TimeDelta)
Performs the
+=
operation. Read moreSource§impl Ord for TimePoint
impl Ord for TimePoint
Source§impl PartialOrd for TimePoint
impl PartialOrd for TimePoint
Source§impl SubAssign<TimeDelta> for TimePoint
impl SubAssign<TimeDelta> for TimePoint
Source§fn sub_assign(&mut self, rhs: TimeDelta)
fn sub_assign(&mut self, rhs: TimeDelta)
Performs the
-=
operation. Read moreimpl Copy for TimePoint
impl Eq for TimePoint
impl StructuralPartialEq for TimePoint
Auto Trait Implementations§
impl Freeze for TimePoint
impl RefUnwindSafe for TimePoint
impl Send for TimePoint
impl Sync for TimePoint
impl Unpin for TimePoint
impl UnwindSafe for TimePoint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more