pub struct Finished { /* private fields */ }Expand description
Represents the terminal state of a completed game.
This structure captures all information required to understand the final outcome, including the winning player, the final scoreboard, the roles assigned during the round, the hands as they existed at the end of play, the crib, and the starter card revealed during the play phase.
Implementations§
Source§impl Finished
impl Finished
Sourcepub const fn new(
winner: Player,
scoreboard: Scoreboard,
roles: Roles,
hands: Hands,
crib: Crib,
starter_cut: StarterCut,
) -> Self
pub const fn new( winner: Player, scoreboard: Scoreboard, roles: Roles, hands: Hands, crib: Crib, starter_cut: StarterCut, ) -> Self
Creates a new Finished state capturing the game’s final outcome.
All parameters must reflect valid final-game state. This constructor
does not perform validation; callers are responsible for ensuring
coherence (e.g., that winner matches the final scoreboard).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Finished
impl<'de> Deserialize<'de> for Finished
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HasHands for Finished
impl HasHands for Finished
Source§impl HasScoreboard for Finished
impl HasScoreboard for Finished
Source§fn scoreboard(&self) -> &Scoreboard
fn scoreboard(&self) -> &Scoreboard
Returns an immutable reference to the scoreboard.
Source§fn scoreboard_mut(&mut self) -> &mut Scoreboard
fn scoreboard_mut(&mut self) -> &mut Scoreboard
Returns a mutable reference to the scoreboard.
Source§impl HasStarterCut for Finished
impl HasStarterCut for Finished
Source§fn starter_cut(&self) -> &StarterCut
fn starter_cut(&self) -> &StarterCut
Returns the current starter card.
impl Eq for Finished
impl StructuralPartialEq for Finished
Auto Trait Implementations§
impl Freeze for Finished
impl RefUnwindSafe for Finished
impl Send for Finished
impl Sync for Finished
impl Unpin for Finished
impl UnwindSafe for Finished
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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