pub struct Poll {
pub id: i64,
pub question: String,
pub options: Vec<PollOption>,
pub total_voter_count: i32,
pub recent_voter_ids: Vec<MessageSender>,
pub is_anonymous: bool,
pub type: PollType,
pub open_period: i32,
pub close_date: i32,
pub is_closed: bool,
}
Expand description
Describes a poll
Fields§
§id: i64
Unique poll identifier
question: String
Poll question; 1-300 characters
options: Vec<PollOption>
List of poll answer options
total_voter_count: i32
Total number of voters, participating in the poll
recent_voter_ids: Vec<MessageSender>
Identifiers of recent voters, if the poll is non-anonymous
is_anonymous: bool
True, if the poll is anonymous
type: PollType
Type of the poll
open_period: i32
Amount of time the poll will be active after creation, in seconds
close_date: i32
Point in time (Unix timestamp) when the poll will automatically be closed
is_closed: bool
True, if the poll is 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