Predictable

Trait Predictable 

Source
pub trait Predictable: SyncState {
    type Input;

    // Required methods
    fn predict(&mut self, input: &Self::Input);
    fn reconcile(&mut self, authoritative: &Self);
}
Expand description

Optional trait for states that support client-side prediction.

See 4-EXTENSIONS.md for prediction specification.

Required Associated Types§

Source

type Input

User input type (e.g., keystrokes).

Required Methods§

Source

fn predict(&mut self, input: &Self::Input)

Apply speculative input locally.

Source

fn reconcile(&mut self, authoritative: &Self)

Reconcile with authoritative server state.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§