#[non_exhaustive]pub struct Background {
pub pause: bool,
pub audio: BackgroundAudio,
}Expand description
What a game does while its window has no focus
(GameSettings::BACKGROUND): whether it pauses, and what its sound
does. A game writes it from KEEP_RUNNING:
Background::KEEP_RUNNING.paused().muted().
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pause: boolWhether the game stops: no update, no steps and no time for its screens, its last frame shown again.
audio: BackgroundAudioWhat its sound does.
Implementations§
Source§impl Background
impl Background
Trait Implementations§
Source§impl Clone for Background
impl Clone for Background
Source§fn clone(&self) -> Background
fn clone(&self) -> Background
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 moreimpl Copy for Background
Source§impl Debug for Background
impl Debug for Background
Source§impl Default for Background
impl Default for Background
impl Eq for Background
Source§impl PartialEq for Background
impl PartialEq for Background
impl StructuralPartialEq for Background
Auto Trait Implementations§
impl Freeze for Background
impl RefUnwindSafe for Background
impl Send for Background
impl Sync for Background
impl Unpin for Background
impl UnsafeUnpin for Background
impl UnwindSafe for Background
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