pub struct SimQueue { /* private fields */ }Expand description
SimQueue represents the queue of events that are to be processed by the simulator. It is a wrapper around an EventQueue for the client and an EventQueue for the server. The goal is to never have to search through any of the queues, but to be able to directly access the next event that is to be processed with as little work as possible.
Implementations§
Source§impl SimQueue
impl SimQueue
pub fn new() -> SimQueue
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn no_normal_packets(&self) -> bool
pub fn get_max_pps(&self) -> Option<usize>
pub fn push( &mut self, event: TriggerEvent, is_client: bool, contains_padding: bool, time: Instant, delay: Duration, )
pub fn push_sim(&mut self, item: SimEvent)
pub fn peek( &self, client_network_delay_sum: Duration, server_network_delay_sum: Duration, current_time: Instant, ) -> (Option<&SimEvent>, Queue, Duration)
pub fn pop( &mut self, q: Queue, is_client: bool, network_delay_sum: Duration, ) -> Option<SimEvent>
pub fn peek_blocking( &self, active_blocking_bypassable: bool, is_client: bool, ) -> (Option<&SimEvent>, Queue)
pub fn pop_blocking( &mut self, q: Queue, bypassable: bool, is_client: bool, network_delay_sum: Duration, ) -> Option<SimEvent>
pub fn peek_non_blocking( &self, bypassable: bool, is_client: bool, network_delay_sum: Duration, ) -> (Option<&SimEvent>, Queue)
pub fn get_first_time(&self) -> Option<Instant>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SimQueue
impl RefUnwindSafe for SimQueue
impl Send for SimQueue
impl Sync for SimQueue
impl Unpin for SimQueue
impl UnsafeUnpin for SimQueue
impl UnwindSafe for SimQueue
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