pub enum PointerUptime {
Platform {
millis: i64,
},
FrameClock {
nanos: u64,
},
Delivery {
nanos: u64,
},
}Expand description
When a pointer sample happened, in the clock that timed it, as Compose’s
PointerInputChange.uptimeMillis. PointerEvent::uptime gives it.
Times of one clock compare with each other and with no other clock, so a gesture that measures the time between two events never mixes clocks.
Variants§
Platform
The platform’s sample time: Android’s MotionEvent time or the
browser’s event time stamp.
FrameClock
The frame-clock time at which the shell took the event, on a platform that gives no sample time: desktop, iOS and watchOS.
Delivery
The time at which a handler read an event that carries neither time, such as one built by a test and passed straight to a handler.
Implementations§
Source§impl PointerUptime
impl PointerUptime
Sourcepub fn millis_since(self, earlier: PointerUptime) -> Option<i64>
pub fn millis_since(self, earlier: PointerUptime) -> Option<i64>
The milliseconds from earlier to this time, negative when earlier
is the later one. None when the two times come from different clocks.
Trait Implementations§
Source§impl Clone for PointerUptime
impl Clone for PointerUptime
Source§fn clone(&self) -> PointerUptime
fn clone(&self) -> PointerUptime
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for PointerUptime
Source§impl Debug for PointerUptime
impl Debug for PointerUptime
impl Eq for PointerUptime
Source§impl PartialEq for PointerUptime
impl PartialEq for PointerUptime
impl StructuralPartialEq for PointerUptime
Auto Trait Implementations§
impl Forget for PointerUptime
impl Freeze for PointerUptime
impl Move for PointerUptime
impl RefUnwindSafe for PointerUptime
impl Send for PointerUptime
impl Sync for PointerUptime
impl Unpin for PointerUptime
impl UnsafeUnpin for PointerUptime
impl UnwindSafe for PointerUptime
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more