pub struct InputQueue { /* private fields */ }Expand description
Deduplicates input redundancy and bounds per-client simulation backlog.
Implementations§
Source§impl InputQueue
impl InputQueue
pub fn push(&mut self, input: InputFrame) -> bool
pub fn pop(&mut self) -> Option<InputFrame>
Sourcepub fn pop_latest(&mut self) -> Option<InputFrame>
pub fn pop_latest(&mut self) -> Option<InputFrame>
Coalesce a burst to its newest movement/look sample without losing a queued action press. The authority still simulates exactly one fixed step. This prevents redundant commands recovered after loss from adding permanent control latency. Previously consumed commands cannot re-enter the queue.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Debug for InputQueue
impl Debug for InputQueue
Source§impl Default for InputQueue
impl Default for InputQueue
Source§fn default() -> InputQueue
fn default() -> InputQueue
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InputQueue
impl RefUnwindSafe for InputQueue
impl Send for InputQueue
impl Sync for InputQueue
impl Unpin for InputQueue
impl UnwindSafe for InputQueue
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