Enum sirpent::net::Msg
[−]
[src]
pub enum Msg {
Version {
sirpent: String,
protocol: String,
},
Register {
desired_name: String,
kind: ClientKind,
},
Welcome {
name: String,
grid: GridEnum,
timeout_millis: Option<Milliseconds>,
},
Game {
game: Box<GameState>,
},
Round {
round: Box<RoundState>,
game_uuid: Uuid,
},
Move {
direction: Direction,
},
Outcome {
winners: HashSet<String>,
conclusion: Box<RoundState>,
game_uuid: Uuid,
},
}Variants
VersionFields of Version
sirpent: String | |
protocol: String |
RegisterFields of Register
desired_name: String | |
kind: ClientKind |
WelcomeFields of Welcome
name: String | |
grid: GridEnum | |
timeout_millis: Option<Milliseconds> |
GameFields of Game
game: Box<GameState> |
RoundFields of Round
round: Box<RoundState> | |
game_uuid: Uuid |
MoveFields of Move
direction: Direction |
OutcomeFields of Outcome
winners: HashSet<String> | |
conclusion: Box<RoundState> | |
game_uuid: Uuid |
Methods
impl Msg[src]
fn version() -> Msg
fn welcome<G>(name: String,
grid: G,
timeout_millis: Option<Milliseconds>)
-> Msg where G: Into<GridEnum>
grid: G,
timeout_millis: Option<Milliseconds>)
-> Msg where G: Into<GridEnum>
fn outcome(final_round_state: RoundState, game_uuid: Uuid) -> Msg
Trait Implementations
impl PartialEq for Msg[src]
fn eq(&self, __arg_0: &Msg) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, __arg_0: &Msg) -> bool
This method tests for !=.
impl Clone for Msg[src]
fn clone(&self) -> Msg
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more