pub enum PlayerPos {
    P0,
    P1,
    P2,
    P3,
}
Expand description

A position in the table

Variants

P0

Player 0

P1

Player 1

P2

Player 2

P3

Player 3

Implementations

Returns the player’s team

Returns the position corresponding to the number (0 => P0, …).

Panics if n > 3.

Returns true if self and other and in the same team

Returns the next player in line

Returns the player n seats further

Returns the previous player.

Returns an iterator that iterates on n players, including this one.

Returns the number of turns after self to reach other.

Returns an iterator until the given player (self included, other excluded)

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.