pub struct GameSettings { /* private fields */ }Expand description
This struct allows you to configure how run_game works.
Implementations§
Source§impl GameSettings
impl GameSettings
Sourcepub fn new() -> GameSettings
pub fn new() -> GameSettings
Creates a default GameSettings struct.
Sourcepub fn tick_duration(self, tick_duration: Duration) -> GameSettings
pub fn tick_duration(self, tick_duration: Duration) -> GameSettings
Set the tick_duration.
Sourcepub fn quit_event(self, quit_event: Option<Event>) -> GameSettings
pub fn quit_event(self, quit_event: Option<Event>) -> GameSettings
Set a new key combination to quit the game (or disable it entirely).
Trait Implementations§
Source§impl Clone for GameSettings
impl Clone for GameSettings
Source§fn clone(&self) -> GameSettings
fn clone(&self) -> GameSettings
Returns a duplicate 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 Debug for GameSettings
impl Debug for GameSettings
Source§impl Default for GameSettings
impl Default for GameSettings
Source§fn default() -> GameSettings
fn default() -> GameSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GameSettings
impl RefUnwindSafe for GameSettings
impl Send for GameSettings
impl Sync for GameSettings
impl Unpin for GameSettings
impl UnwindSafe for GameSettings
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