pub struct Poll<'a> {
pub question: PollMedia<'a>,
pub answers: Vec<PollAnswer<'a>>,
pub expiry: Option<TitanString<'a>>,
pub allow_multiselect: bool,
pub layout_type: Option<u8>,
pub results: Option<PollResults>,
}Expand description
A poll object.
Fields§
§question: PollMedia<'a>The question of the poll.
answers: Vec<PollAnswer<'a>>Each of the answers available in the poll.
expiry: Option<TitanString<'a>>The expiration date of the poll.
allow_multiselect: boolWhether the poll allows multiple selections.
layout_type: Option<u8>The layout type of the poll.
results: Option<PollResults>The results of the poll.
Implementations§
Source§impl<'a> Poll<'a>
impl<'a> Poll<'a>
Sourcepub fn builder(question: impl Into<TitanString<'a>>) -> PollBuilder<'a>
pub fn builder(question: impl Into<TitanString<'a>>) -> PollBuilder<'a>
Create a builder for a Poll.
Trait Implementations§
Source§impl<'de, 'a> Deserialize<'de> for Poll<'a>
impl<'de, 'a> Deserialize<'de> for Poll<'a>
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
Auto Trait Implementations§
impl<'a> Freeze for Poll<'a>
impl<'a> RefUnwindSafe for Poll<'a>
impl<'a> Send for Poll<'a>
impl<'a> Sync for Poll<'a>
impl<'a> Unpin for Poll<'a>
impl<'a> UnwindSafe for Poll<'a>
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