pub struct InputPredictor { /* private fields */ }Expand description
Predicts missing remote player inputs by repeating the last known input.
Implementations§
Source§impl InputPredictor
impl InputPredictor
pub fn new() -> Self
pub fn confirm_input(&mut self, player: PlayerId, input: PlayerInput)
pub fn predict(&mut self, player: PlayerId, frame: Frame) -> PlayerInput
pub fn prediction_error(&self, player: PlayerId, actual: &PlayerInput) -> bool
pub fn streak(&self, player: PlayerId) -> u32
Auto Trait Implementations§
impl Freeze for InputPredictor
impl RefUnwindSafe for InputPredictor
impl Send for InputPredictor
impl Sync for InputPredictor
impl Unpin for InputPredictor
impl UnsafeUnpin for InputPredictor
impl UnwindSafe for InputPredictor
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