pub struct GameSession<TRng> { /* private fields */ }
Implementations§
Source§impl<TRng> GameSession<TRng>where
TRng: Rng,
impl<TRng> GameSession<TRng>where
TRng: Rng,
pub fn new(multiplayer_count: MultiplayerCount, rng: TRng) -> Self
pub fn round(&self) -> Option<&Round<TRng>>
pub fn with_turn<TurnF, SummaryF, TRet>(
&mut self,
turn_func: TurnF,
summary_func: SummaryF,
) -> Result<Option<TRet>>where
TurnF: FnOnce(Turn<'_, TRng>) -> TakenAction<'_, TRng>,
SummaryF: FnOnce(&TurnSummary<TRng>) -> TRet,
pub fn players(&self) -> &GamePlayers
Trait Implementations§
Source§impl<TRng: Clone> Clone for GameSession<TRng>
impl<TRng: Clone> Clone for GameSession<TRng>
Source§fn clone(&self) -> GameSession<TRng>
fn clone(&self) -> GameSession<TRng>
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 moreAuto Trait Implementations§
impl<TRng> Freeze for GameSession<TRng>where
TRng: Freeze,
impl<TRng> RefUnwindSafe for GameSession<TRng>where
TRng: RefUnwindSafe,
impl<TRng> Send for GameSession<TRng>where
TRng: Send,
impl<TRng> Sync for GameSession<TRng>where
TRng: Sync,
impl<TRng> Unpin for GameSession<TRng>where
TRng: Unpin,
impl<TRng> UnwindSafe for GameSession<TRng>where
TRng: UnwindSafe,
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