pub struct TickConfig {
pub rate: TickRate,
pub catch_up: CatchUp,
}Expand description
A game’s clock settings.
Fields§
§rate: TickRateTick length.
catch_up: CatchUpCatch-up policy.
Implementations§
Source§impl TickConfig
impl TickConfig
Sourcepub const fn new(rate: TickRate) -> TickConfig
pub const fn new(rate: TickRate) -> TickConfig
rate with unbounded catch-up.
Sourcepub const fn with_interleave(self, max_ticks: u16) -> TickConfig
pub const fn with_interleave(self, max_ticks: u16) -> TickConfig
At most max_ticks ticks per frame, the rest carried forward.
Sourcepub const fn with_cap(self, max_ticks: u16) -> TickConfig
pub const fn with_cap(self, max_ticks: u16) -> TickConfig
At most max_ticks ticks per frame, the rest dropped.
Trait Implementations§
Source§impl Clone for TickConfig
impl Clone for TickConfig
Source§fn clone(&self) -> TickConfig
fn clone(&self) -> TickConfig
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TickConfig
impl Debug for TickConfig
Source§impl PartialEq for TickConfig
impl PartialEq for TickConfig
impl Copy for TickConfig
impl Eq for TickConfig
impl StructuralPartialEq for TickConfig
Auto Trait Implementations§
impl Freeze for TickConfig
impl RefUnwindSafe for TickConfig
impl Send for TickConfig
impl Sync for TickConfig
impl Unpin for TickConfig
impl UnsafeUnpin for TickConfig
impl UnwindSafe for TickConfig
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)