pub struct Event<T, C> {
time: T,
sense: EventSense,
payload: C,
}Fields§
§time: T§sense: EventSense§payload: CImplementations§
Source§impl<T: Copy, C: Copy> Event<T, C>
impl<T: Copy, C: Copy> Event<T, C>
pub fn sense(&self) -> EventSense
pub fn t(&self) -> T
pub fn cost(&self) -> C
pub fn count(&self) -> i32
pub fn is_enter(&self) -> bool
pub fn enter(time: T, payload: C) -> Self
pub fn exit(time: T, payload: C) -> Self
pub fn scan(time: T, payload: C) -> Self
Trait Implementations§
Source§impl<T: Ord, C: Ord> Ord for Event<T, C>
impl<T: Ord, C: Ord> Ord for Event<T, C>
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<T: PartialOrd, C: PartialOrd> PartialOrd for Event<T, C>
impl<T: PartialOrd, C: PartialOrd> PartialOrd for Event<T, C>
impl<T: Copy, C: Copy> Copy for Event<T, C>
impl<T: Eq, C: Eq> Eq for Event<T, C>
impl<T, C> StructuralPartialEq for Event<T, C>
Auto Trait Implementations§
impl<T, C> Freeze for Event<T, C>
impl<T, C> RefUnwindSafe for Event<T, C>where
T: RefUnwindSafe,
C: RefUnwindSafe,
impl<T, C> Send for Event<T, C>
impl<T, C> Sync for Event<T, C>
impl<T, C> Unpin for Event<T, C>
impl<T, C> UnsafeUnpin for Event<T, C>where
T: UnsafeUnpin,
C: UnsafeUnpin,
impl<T, C> UnwindSafe for Event<T, C>where
T: UnwindSafe,
C: UnwindSafe,
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
Checks if this value is equivalent to the given key. Read more
§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.§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
Checks if this value is equivalent to the given key. Read more