Skip to main content

LobbyUpdatedEventData

Struct LobbyUpdatedEventData 

Source
pub struct LobbyUpdatedEventData {
Show 15 fields pub ally_team_config: HashMap<LobbyUpdatedEventDataAllyTeamConfigKey, Option<LobbyUpdatedEventDataAllyTeamConfigValue>>, pub bosses: HashMap<LobbyUpdatedEventDataBossesKey, Option<Map<String, Value>>>, pub bots: HashMap<LobbyUpdatedEventDataBotsKey, Option<LobbyUpdatedEventDataBotsValue>>, pub current_battle: Option<LobbyUpdatedEventDataCurrentBattle>, pub current_vote: Option<LobbyUpdatedEventDataCurrentVote>, pub engine_version: Option<String>, pub game_options: HashMap<LobbyUpdatedEventDataGameOptionsKey, Option<LobbyUpdatedEventDataGameOptionsValue>>, pub game_version: Option<String>, pub id: String, pub map_name: Option<String>, pub name: Option<String>, pub players: HashMap<LobbyUpdatedEventDataPlayersKey, Option<LobbyUpdatedEventDataPlayersValue>>, pub spectators: HashMap<LobbyUpdatedEventDataSpectatorsKey, Option<LobbyUpdatedEventDataSpectatorsValue>>, pub tags: HashMap<LobbyUpdatedEventDataTagsKey, Option<Map<String, Value>>>, pub vote_history: HashMap<LobbyUpdatedEventDataVoteHistoryKey, Option<LobbyUpdatedEventDataVoteHistoryValue>>,
}
Expand description

LobbyUpdatedEventData

JSON schema
{
 "title": "LobbyUpdatedEventData",
 "type": "object",
 "required": [
   "id"
 ],
 "properties": {
   "allyTeamConfig": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "description": "this represent an array, items should be sorted lexicographically on their keys",
             "type": "object",
             "required": [
               "teams"
             ],
             "properties": {
               "maxTeams": {
                 "type": "integer",
                 "minimum": 1.0
               },
               "startBox": {
                 "$ref": "#/definitions/startBox"
               },
               "teams": {
                 "type": "object",
                 "patternProperties": {
                   "^.*$": {
                     "anyOf": [
                       {
                         "type": "object",
                         "properties": {
                           "maxPlayers": {
                             "type": "integer",
                             "minimum": 1.0
                           }
                         }
                       },
                       {
                         "type": "null"
                       }
                     ]
                   }
                 }
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "bosses": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object"
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "bots": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object",
             "required": [
               "id",
               "options",
               "version"
             ],
             "properties": {
               "allyTeam": {
                 "type": "string"
               },
               "hostUserId": {
                 "$ref": "#/definitions/userId"
               },
               "id": {
                 "type": "string"
               },
               "name": {
                 "anyOf": [
                   {
                     "description": "name to display in the lobby",
                     "type": "string"
                   },
                   {
                     "type": "null"
                   }
                 ]
               },
               "options": {
                 "anyOf": [
                   {
                     "type": "object",
                     "patternProperties": {
                       "^.*$": {
                         "anyOf": [
                           {
                             "type": "string"
                           },
                           {
                             "type": "null"
                           }
                         ]
                       }
                     }
                   },
                   {
                     "type": "null"
                   }
                 ]
               },
               "player": {
                 "type": "string"
               },
               "shortName": {
                 "description": "Short name of the bot. Used to uniquely identify which bot to run",
                 "type": "string"
               },
               "team": {
                 "type": "string"
               },
               "version": {
                 "anyOf": [
                   {
                     "type": "string"
                   },
                   {
                     "type": "null"
                   }
                 ]
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "currentBattle": {
     "anyOf": [
       {
         "description": "If a battle is currently happening, here are the info",
         "type": "object",
         "required": [
           "id",
           "startedAt"
         ],
         "properties": {
           "id": {
             "type": "string"
           },
           "startedAt": {
             "$ref": "#/definitions/unixTime"
           }
         }
       },
       {
         "type": "null"
       }
     ]
   },
   "currentVote": {
     "anyOf": [
       {
         "type": "object",
         "required": [
           "id"
         ],
         "properties": {
           "action": {
             "$ref": "#/definitions/voteActions"
           },
           "id": {
             "type": "string"
           },
           "initiator": {
             "$ref": "#/definitions/userId"
           },
           "majority": {
             "description": "votes passes when number(yes) >= majority",
             "type": "integer",
             "minimum": 1.0
           },
           "quorum": {
             "description": "this many player must vote for the vote to be valid at all.",
             "type": "integer",
             "minimum": 1.0
           },
           "until": {
             "$ref": "#/definitions/unixTime"
           },
           "voters": {
             "type": "object",
             "patternProperties": {
               "^.*$": {
                 "type": "object",
                 "required": [
                   "vote"
                 ],
                 "properties": {
                   "vote": {
                     "enum": [
                       "pending",
                       "yes",
                       "no",
                       "abstain"
                     ]
                   }
                 }
               }
             }
           }
         }
       },
       {
         "type": "null"
       }
     ]
   },
   "engineVersion": {
     "type": "string"
   },
   "gameOptions": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object",
             "required": [
               "value"
             ],
             "properties": {
               "value": {
                 "type": "string"
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "gameVersion": {
     "type": "string"
   },
   "id": {
     "type": "string"
   },
   "mapName": {
     "type": "string"
   },
   "name": {
     "type": "string"
   },
   "players": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object",
             "required": [
               "id"
             ],
             "properties": {
               "allyTeam": {
                 "type": "string"
               },
               "assetStatus": {
                 "enum": [
                   "missing",
                   "downloading",
                   "complete"
                 ]
               },
               "id": {
                 "$ref": "#/definitions/userId"
               },
               "isReady": {
                 "type": "boolean"
               },
               "player": {
                 "type": "string"
               },
               "team": {
                 "type": "string"
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "spectators": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object",
             "required": [
               "id"
             ],
             "properties": {
               "id": {
                 "$ref": "#/definitions/userId"
               },
               "joinQueuePosition": {
                 "anyOf": [
                   {
                     "type": "number"
                   },
                   {
                     "type": "null"
                   }
                 ]
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "tags": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object"
           },
           {
             "type": "null"
           }
         ]
       }
     }
   },
   "voteHistory": {
     "type": "object",
     "patternProperties": {
       "^.*$": {
         "anyOf": [
           {
             "type": "object",
             "required": [
               "finishedAt",
               "outcome",
               "vote"
             ],
             "properties": {
               "finishedAt": {
                 "$ref": "#/definitions/unixTime"
               },
               "outcome": {
                 "$ref": "#/definitions/voteOutcomes"
               },
               "vote": {
                 "$ref": "#/definitions/voteActions"
               }
             }
           },
           {
             "type": "null"
           }
         ]
       }
     }
   }
 }
}

Fields§

§ally_team_config: HashMap<LobbyUpdatedEventDataAllyTeamConfigKey, Option<LobbyUpdatedEventDataAllyTeamConfigValue>>§bosses: HashMap<LobbyUpdatedEventDataBossesKey, Option<Map<String, Value>>>§bots: HashMap<LobbyUpdatedEventDataBotsKey, Option<LobbyUpdatedEventDataBotsValue>>§current_battle: Option<LobbyUpdatedEventDataCurrentBattle>§current_vote: Option<LobbyUpdatedEventDataCurrentVote>§engine_version: Option<String>§game_options: HashMap<LobbyUpdatedEventDataGameOptionsKey, Option<LobbyUpdatedEventDataGameOptionsValue>>§game_version: Option<String>§id: String§map_name: Option<String>§name: Option<String>§players: HashMap<LobbyUpdatedEventDataPlayersKey, Option<LobbyUpdatedEventDataPlayersValue>>§spectators: HashMap<LobbyUpdatedEventDataSpectatorsKey, Option<LobbyUpdatedEventDataSpectatorsValue>>§tags: HashMap<LobbyUpdatedEventDataTagsKey, Option<Map<String, Value>>>§vote_history: HashMap<LobbyUpdatedEventDataVoteHistoryKey, Option<LobbyUpdatedEventDataVoteHistoryValue>>

Implementations§

Trait Implementations§

Source§

impl Clone for LobbyUpdatedEventData

Source§

fn clone(&self) -> LobbyUpdatedEventData

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LobbyUpdatedEventData

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for LobbyUpdatedEventData

Source§

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 From<LobbyUpdatedEventData> for LobbyUpdatedEventData

Source§

fn from(value: LobbyUpdatedEventData) -> Self

Converts to this type from the input type.
Source§

impl Serialize for LobbyUpdatedEventData

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl TryFrom<LobbyUpdatedEventData> for LobbyUpdatedEventData

Source§

type Error = ConversionError

The type returned in the event of a conversion error.
Source§

fn try_from(value: LobbyUpdatedEventData) -> Result<Self, ConversionError>

Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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