Struct naia_shared::GameInstant
source · pub struct GameInstant { /* private fields */ }
Implementations§
source§impl GameInstant
impl GameInstant
pub fn new(start_instant: &Instant) -> Self
pub fn time_since(&self, previous_instant: &GameInstant) -> GameDuration
pub fn offset_from(&self, other: &GameInstant) -> i32
pub fn is_more_than(&self, other: &GameInstant) -> bool
pub fn as_millis(&self) -> u32
pub fn add_millis(&self, millis: u32) -> Self
pub fn sub_millis(&self, millis: u32) -> Self
pub fn add_signed_millis(&self, millis: i32) -> Self
Trait Implementations§
source§impl Clone for GameInstant
impl Clone for GameInstant
source§fn clone(&self) -> GameInstant
fn clone(&self) -> GameInstant
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ConstBitLength for GameInstant
impl ConstBitLength for GameInstant
fn const_bit_length() -> u32
source§impl PartialEq for GameInstant
impl PartialEq for GameInstant
source§fn eq(&self, other: &GameInstant) -> bool
fn eq(&self, other: &GameInstant) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serde for GameInstant
impl Serde for GameInstant
impl StructuralPartialEq for GameInstant
Auto Trait Implementations§
impl RefUnwindSafe for GameInstant
impl Send for GameInstant
impl Sync for GameInstant
impl Unpin for GameInstant
impl UnwindSafe for GameInstant
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