pub struct LobbyUpdatedEventDataCurrentVote {
pub action: Option<VoteActions>,
pub id: String,
pub initiator: Option<UserId>,
pub majority: Option<NonZeroU64>,
pub quorum: Option<NonZeroU64>,
pub until: Option<UnixTime>,
pub voters: HashMap<LobbyUpdatedEventDataCurrentVoteVotersKey, LobbyUpdatedEventDataCurrentVoteVotersValue>,
}Expand description
LobbyUpdatedEventDataCurrentVote
JSON schema
{
"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"
]
}
}
}
}
}
}
}Fields§
§action: Option<VoteActions>§id: String§initiator: Option<UserId>§majority: Option<NonZeroU64>votes passes when number(yes) >= majority
quorum: Option<NonZeroU64>this many player must vote for the vote to be valid at all.
until: Option<UnixTime>§voters: HashMap<LobbyUpdatedEventDataCurrentVoteVotersKey, LobbyUpdatedEventDataCurrentVoteVotersValue>Implementations§
Trait Implementations§
Source§impl Clone for LobbyUpdatedEventDataCurrentVote
impl Clone for LobbyUpdatedEventDataCurrentVote
Source§fn clone(&self) -> LobbyUpdatedEventDataCurrentVote
fn clone(&self) -> LobbyUpdatedEventDataCurrentVote
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<'de> Deserialize<'de> for LobbyUpdatedEventDataCurrentVote
impl<'de> Deserialize<'de> for LobbyUpdatedEventDataCurrentVote
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<LobbyUpdatedEventDataCurrentVote> for LobbyUpdatedEventDataCurrentVote
impl From<LobbyUpdatedEventDataCurrentVote> for LobbyUpdatedEventDataCurrentVote
Source§fn from(value: LobbyUpdatedEventDataCurrentVote) -> Self
fn from(value: LobbyUpdatedEventDataCurrentVote) -> Self
Converts to this type from the input type.
Source§impl TryFrom<LobbyUpdatedEventDataCurrentVote> for LobbyUpdatedEventDataCurrentVote
impl TryFrom<LobbyUpdatedEventDataCurrentVote> for LobbyUpdatedEventDataCurrentVote
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(
value: LobbyUpdatedEventDataCurrentVote,
) -> Result<Self, ConversionError>
fn try_from( value: LobbyUpdatedEventDataCurrentVote, ) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for LobbyUpdatedEventDataCurrentVote
impl RefUnwindSafe for LobbyUpdatedEventDataCurrentVote
impl Send for LobbyUpdatedEventDataCurrentVote
impl Sync for LobbyUpdatedEventDataCurrentVote
impl Unpin for LobbyUpdatedEventDataCurrentVote
impl UnsafeUnpin for LobbyUpdatedEventDataCurrentVote
impl UnwindSafe for LobbyUpdatedEventDataCurrentVote
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