[][src]Enum wasmdome_protocol::events::MatchEvent

pub enum MatchEvent {
    MatchCreated {
        match_id: String,
        actors: Vec<String>,
        board_height: u32,
        board_width: u32,
    },
    ActorStarted {
        actor: String,
        match_id: String,
        name: String,
        avatar: String,
        team: String,
    },
    MatchStarted {
        match_id: String,
    },
    TurnRequested {
        actor: String,
        match_id: String,
        turn: u32,
        commands: Vec<MechCommand>,
    },
    TurnEvent {
        actor: String,
        match_id: String,
        turn: u32,
        turn_event: GameEvent,
    },
}

Variants

MatchCreated

Fields of MatchCreated

match_id: Stringactors: Vec<String>board_height: u32board_width: u32
ActorStarted

Fields of ActorStarted

actor: Stringmatch_id: Stringname: Stringavatar: Stringteam: String
MatchStarted

Fields of MatchStarted

match_id: String
TurnRequested

Published in response to a TakeTurn command. The command processor will be listening for this event

Fields of TurnRequested

actor: Stringmatch_id: Stringturn: u32commands: Vec<MechCommand>
TurnEvent

Emitted by the command processor so that downstream listeners (e.g. historian, leaderboard) can process

Fields of TurnEvent

actor: Stringmatch_id: Stringturn: u32turn_event: GameEvent

Trait Implementations

impl Clone for MatchEvent[src]

impl Debug for MatchEvent[src]

impl<'de> Deserialize<'de> for MatchEvent[src]

impl Serialize for MatchEvent[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.