pub struct Poll {
pub id: String,
pub question: String,
pub options: Vec<PollOption>,
pub total_voter_count: i32,
pub is_closed: bool,
pub is_anonymous: bool,
pub kind: PollKind,
pub allows_multiple_answers: bool,
pub open_period: Option<i32>,
pub close_date: Option<i32>,
}Expand description
This object contains information about a poll.
Fields§
§id: StringUnique poll identifier
question: StringPoll question, 1-300 characters
options: Vec<PollOption>List of poll options
total_voter_count: i32Total number of users that voted in the poll
is_closed: boolTrue, if the poll is closed
is_anonymous: boolTrue, if the poll is anonymous
kind: PollKindPoll type, currently can be “regular” or “quiz”
allows_multiple_answers: boolTrue, if the poll allows multiple answers
open_period: Option<i32>Amount of time in seconds the poll will be active after creation
close_date: Option<i32>Point in time (Unix timestamp) when the poll will be automatically closed
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Poll
impl<'de> Deserialize<'de> for Poll
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
impl StructuralPartialEq for Poll
Auto Trait Implementations§
impl Freeze for Poll
impl RefUnwindSafe for Poll
impl Send for Poll
impl Sync for Poll
impl Unpin for Poll
impl UnwindSafe for Poll
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