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>>§vote_history: HashMap<LobbyUpdatedEventDataVoteHistoryKey, Option<LobbyUpdatedEventDataVoteHistoryValue>>Implementations§
Source§impl LobbyUpdatedEventData
impl LobbyUpdatedEventData
pub fn builder() -> LobbyUpdatedEventData
Trait Implementations§
Source§impl Clone for LobbyUpdatedEventData
impl Clone for LobbyUpdatedEventData
Source§fn clone(&self) -> LobbyUpdatedEventData
fn clone(&self) -> LobbyUpdatedEventData
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LobbyUpdatedEventData
impl Debug for LobbyUpdatedEventData
Source§impl<'de> Deserialize<'de> for LobbyUpdatedEventData
impl<'de> Deserialize<'de> for LobbyUpdatedEventData
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 From<LobbyUpdatedEventData> for LobbyUpdatedEventData
impl From<LobbyUpdatedEventData> for LobbyUpdatedEventData
Source§fn from(value: LobbyUpdatedEventData) -> Self
fn from(value: LobbyUpdatedEventData) -> Self
Converts to this type from the input type.
Source§impl Serialize for LobbyUpdatedEventData
impl Serialize for LobbyUpdatedEventData
Source§impl TryFrom<LobbyUpdatedEventData> for LobbyUpdatedEventData
impl TryFrom<LobbyUpdatedEventData> for LobbyUpdatedEventData
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: LobbyUpdatedEventData) -> Result<Self, ConversionError>
fn try_from(value: LobbyUpdatedEventData) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for LobbyUpdatedEventData
impl RefUnwindSafe for LobbyUpdatedEventData
impl Send for LobbyUpdatedEventData
impl Sync for LobbyUpdatedEventData
impl Unpin for LobbyUpdatedEventData
impl UnsafeUnpin for LobbyUpdatedEventData
impl UnwindSafe for LobbyUpdatedEventData
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