Struct ruma_common::events::poll::start::PollStartContent
source · pub struct PollStartContent {
pub question: MessageContent,
pub kind: PollKind,
pub max_selections: UInt,
pub answers: PollAnswers,
}Available on crate features
events and unstable-msc3381 only.Expand description
Poll start content.
Fields§
§question: MessageContentThe question of the poll.
kind: PollKindThe kind of the poll.
max_selections: UIntThe maximum number of responses a user is able to select.
Must be greater or equal to 1.
Defaults to 1.
answers: PollAnswersThe possible answers to the poll.
Implementations§
source§impl PollStartContent
impl PollStartContent
sourcepub fn new(question: MessageContent, kind: PollKind, answers: PollAnswers) -> Self
pub fn new(question: MessageContent, kind: PollKind, answers: PollAnswers) -> Self
Creates a new PollStartContent with the given question, kind, and answers.
Trait Implementations§
source§impl Clone for PollStartContent
impl Clone for PollStartContent
source§fn clone(&self) -> PollStartContent
fn clone(&self) -> PollStartContent
Returns a copy 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 PollStartContent
impl Debug for PollStartContent
source§impl<'de> Deserialize<'de> for PollStartContent
impl<'de> Deserialize<'de> for PollStartContent
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