Struct ruma_common::events::poll::start::PollAnswers
source · [−]pub struct PollAnswers(_);
Available on crate features
events
and unstable-msc3381
only.Expand description
The answers to a poll.
Must include between 1 and 20 PollAnswer
s.
To build this, use the TryFrom
implementations.
Implementations
sourceimpl PollAnswers
impl PollAnswers
sourcepub const MIN_LENGTH: usize = 1usize
pub const MIN_LENGTH: usize = 1usize
The smallest number of values contained in a PollAnswers
.
sourcepub const MAX_LENGTH: usize = 20usize
pub const MAX_LENGTH: usize = 20usize
The largest number of values contained in a PollAnswers
.
sourcepub fn answers(&self) -> &[PollAnswer]
pub fn answers(&self) -> &[PollAnswer]
The answers of this PollAnswers
.
Trait Implementations
sourceimpl Clone for PollAnswers
impl Clone for PollAnswers
sourcefn clone(&self) -> PollAnswers
fn clone(&self) -> PollAnswers
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 PollAnswers
impl Debug for PollAnswers
sourceimpl<'de> Deserialize<'de> for PollAnswers
impl<'de> Deserialize<'de> for PollAnswers
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 PollAnswers
impl Serialize for PollAnswers
sourceimpl TryFrom<&[PollAnswer]> for PollAnswers
impl TryFrom<&[PollAnswer]> for PollAnswers
type Error = PollAnswersError
type Error = PollAnswersError
The type returned in the event of a conversion error.
sourcefn try_from(value: &[PollAnswer]) -> Result<Self, Self::Error>
fn try_from(value: &[PollAnswer]) -> Result<Self, Self::Error>
Performs the conversion.
sourceimpl TryFrom<Vec<PollAnswer, Global>> for PollAnswers
impl TryFrom<Vec<PollAnswer, Global>> for PollAnswers
type Error = PollAnswersError
type Error = PollAnswersError
The type returned in the event of a conversion error.
Auto Trait Implementations
impl RefUnwindSafe for PollAnswers
impl Send for PollAnswers
impl Sync for PollAnswers
impl Unpin for PollAnswers
impl UnwindSafe for PollAnswers
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