Struct i_slint_core::animations::Instant
source · [−]#[repr(transparent)]pub struct Instant(pub u64);
Expand description
Represent an instant, in milliseconds since the AnimationDriver’s initial_instant
Tuple Fields
0: u64
Implementations
sourceimpl Instant
impl Instant
sourcepub fn duration_since(self, earlier: Instant) -> Duration
pub fn duration_since(self, earlier: Instant) -> Duration
Returns the amount of time elapsed since an other instant.
Equivalent to self - earlier
sourcepub fn now() -> Self
pub fn now() -> Self
Wrapper around std::time::Instant::now()
that delegates to the backend
and allows working in no_std environments.
Trait Implementations
sourceimpl AddAssign<Duration> for Instant
impl AddAssign<Duration> for Instant
sourcefn add_assign(&mut self, other: Duration)
fn add_assign(&mut self, other: Duration)
Performs the +=
operation. Read more
sourceimpl Ord for Instant
impl Ord for Instant
sourceimpl PartialOrd<Instant> for Instant
impl PartialOrd<Instant> for Instant
sourcefn partial_cmp(&self, other: &Instant) -> Option<Ordering>
fn partial_cmp(&self, other: &Instant) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl SubAssign<Duration> for Instant
impl SubAssign<Duration> for Instant
sourcefn sub_assign(&mut self, other: Duration)
fn sub_assign(&mut self, other: Duration)
Performs the -=
operation. Read more
impl Copy for Instant
impl Eq for Instant
impl StructuralEq for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnwindSafe for Instant
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more