pub struct EventTimestamp(/* private fields */);Expand description
Monotonic duration since the host’s documented time origin.
This is not a wall-clock timestamp and cannot represent negative durations. Hosts sharing envelopes must agree on the origin; the type does not enforce monotonic event order.
§Examples
use std::time::Duration;
use ailloli_ui_runtime::input::EventTimestamp;
assert_eq!(EventTimestamp::default().duration(), Duration::ZERO);
assert!(EventTimestamp::new(Duration::from_millis(2)) > EventTimestamp::new(Duration::from_millis(1)));Implementations§
Source§impl EventTimestamp
Provides the operations defined for EventTimestamp.
impl EventTimestamp
Provides the operations defined for EventTimestamp.
Trait Implementations§
Source§impl Clone for EventTimestamp
impl Clone for EventTimestamp
Source§fn clone(&self) -> EventTimestamp
fn clone(&self) -> EventTimestamp
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EventTimestamp
impl Debug for EventTimestamp
Source§impl Default for EventTimestamp
impl Default for EventTimestamp
Source§fn default() -> EventTimestamp
fn default() -> EventTimestamp
Returns the “default value” for a type. Read more
Source§impl Hash for EventTimestamp
impl Hash for EventTimestamp
Source§impl Ord for EventTimestamp
impl Ord for EventTimestamp
Source§fn cmp(&self, other: &EventTimestamp) -> Ordering
fn cmp(&self, other: &EventTimestamp) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EventTimestamp
impl PartialEq for EventTimestamp
Source§impl PartialOrd for EventTimestamp
impl PartialOrd for EventTimestamp
impl Copy for EventTimestamp
impl Eq for EventTimestamp
impl StructuralPartialEq for EventTimestamp
Auto Trait Implementations§
impl Freeze for EventTimestamp
impl RefUnwindSafe for EventTimestamp
impl Send for EventTimestamp
impl Sync for EventTimestamp
impl Unpin for EventTimestamp
impl UnwindSafe for EventTimestamp
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.