pub struct EventQueue { /* private fields */ }Expand description
A queue of Events ordered by their times.
Implementations§
Source§impl EventQueue
 
impl EventQueue
pub fn new() -> Self
Sourcepub fn push(&mut self, event: Event)
 
pub fn push(&mut self, event: Event)
Push a new Event on to the queue.
Will panic if two events are pushed that have no relative order
(event_a.partial_cmp(&event_b) == None). Will be non-deterministic if two events are
pushed that are equal (event_a == event_b).
Will panic if the event time is earlier than the last popped event time (time moves backward).
Sourcepub fn next_event_time(&self) -> Option<EmulatedTime>
 
pub fn next_event_time(&self) -> Option<EmulatedTime>
The time of the next Event (the time of the earliest event in the queue).
Trait Implementations§
Source§impl Debug for EventQueue
 
impl Debug for EventQueue
Auto Trait Implementations§
impl Freeze for EventQueue
impl !RefUnwindSafe for EventQueue
impl Send for EventQueue
impl Sync for EventQueue
impl Unpin for EventQueue
impl !UnwindSafe for EventQueue
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> 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>
Converts 
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>
Converts 
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