pub struct PredictionKeyGenerator { /* private fields */ }Expand description
Monotonic prediction-key allocator.
Implementations§
Source§impl PredictionKeyGenerator
impl PredictionKeyGenerator
Sourcepub fn with_next(next: u64) -> NetcodeResult<Self>
pub fn with_next(next: u64) -> NetcodeResult<Self>
Creates a generator with an application-restored next key.
Sourcepub fn generate(&mut self) -> NetcodeResult<PredictionKey>
pub fn generate(&mut self) -> NetcodeResult<PredictionKey>
Allocates the next non-zero prediction key.
Trait Implementations§
Source§impl Clone for PredictionKeyGenerator
impl Clone for PredictionKeyGenerator
Source§fn clone(&self) -> PredictionKeyGenerator
fn clone(&self) -> PredictionKeyGenerator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PredictionKeyGenerator
impl Debug for PredictionKeyGenerator
Auto Trait Implementations§
impl Freeze for PredictionKeyGenerator
impl RefUnwindSafe for PredictionKeyGenerator
impl Send for PredictionKeyGenerator
impl Sync for PredictionKeyGenerator
impl Unpin for PredictionKeyGenerator
impl UnsafeUnpin for PredictionKeyGenerator
impl UnwindSafe for PredictionKeyGenerator
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