pub struct Games { /* private fields */ }Expand description
Ordered collections of available games.
Implementations§
Source§impl Games
impl Games
Sourcepub fn active_mut(&mut self) -> &mut dyn Game
pub fn active_mut(&mut self) -> &mut dyn Game
Returns a mutable reference to the active game.
Sourcepub fn iter(&self) -> impl Iterator<Item = &dyn Game>
pub fn iter(&self) -> impl Iterator<Item = &dyn Game>
Returns an iterator over the games in the collection.
Sourcepub fn set_active_name(&mut self, name: &str) -> bool
pub fn set_active_name(&mut self, name: &str) -> bool
Changes the active game by name.
Sourcepub fn set_active_index(&mut self, ix: usize) -> bool
pub fn set_active_index(&mut self, ix: usize) -> bool
Changes the active game by index.
Auto Trait Implementations§
impl Freeze for Games
impl !RefUnwindSafe for Games
impl !Send for Games
impl !Sync for Games
impl Unpin for Games
impl !UnwindSafe for Games
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more