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
sourceimpl 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
sourceimpl Clone for PollStartContent
impl Clone for PollStartContent
sourcefn clone(&self) -> PollStartContent
fn clone(&self) -> PollStartContent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresourceimpl Debug for PollStartContent
impl Debug for PollStartContent
sourceimpl<'de> Deserialize<'de> for PollStartContent
impl<'de> Deserialize<'de> for PollStartContent
sourcefn 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
sourceimpl Serialize for PollStartContent
impl Serialize for PollStartContent
Auto Trait Implementations
impl RefUnwindSafe for PollStartContent
impl Send for PollStartContent
impl Sync for PollStartContent
impl Unpin for PollStartContent
impl UnwindSafe for PollStartContent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
