pub struct PingStore { /* private fields */ }Expand description
Circular buffer that records the send time of outstanding pings indexed by PingIndex.
Implementations§
Source§impl PingStore
impl PingStore
Sourcepub fn push_new(&mut self, now: GameInstant) -> PingIndex
pub fn push_new(&mut self, now: GameInstant) -> PingIndex
Records a new ping sent at now and returns its assigned index.
Sourcepub fn remove(&mut self, ping_index: PingIndex) -> Option<GameInstant>
pub fn remove(&mut self, ping_index: PingIndex) -> Option<GameInstant>
Removes and returns the send-time for the given ping_index, or None if not found.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PingStore
impl RefUnwindSafe for PingStore
impl Send for PingStore
impl Sync for PingStore
impl Unpin for PingStore
impl UnsafeUnpin for PingStore
impl UnwindSafe for PingStore
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