pub struct InputMessagePoll {
pub question: FormattedText,
pub options: Vec<FormattedText>,
pub is_anonymous: bool,
pub type: PollType,
pub open_period: i32,
pub close_date: i32,
pub is_closed: bool,
}
Expand description
A message with a poll. Polls can’t be sent to secret chats. Polls can be sent only to a private chat with a bot
Fields§
§question: FormattedText
Poll question; 1-255 characters (up to 300 characters for bots). Only custom emoji entities are allowed to be added and only by Premium users
options: Vec<FormattedText>
List of poll answer options, 2-10 strings 1-100 characters each. Only custom emoji entities are allowed to be added and only by Premium users
is_anonymous: bool
True, if the poll voters are anonymous. Non-anonymous polls can’t be sent or forwarded to channels
type: PollType
Type of the poll
open_period: i32
Amount of time the poll will be active after creation, in seconds; for bots only
close_date: i32
Point in time (Unix timestamp) when the poll will automatically be closed; for bots only
is_closed: bool
True, if the poll needs to be sent already closed; for bots only
Trait Implementations§
Source§impl Clone for InputMessagePoll
impl Clone for InputMessagePoll
Source§fn clone(&self) -> InputMessagePoll
fn clone(&self) -> InputMessagePoll
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InputMessagePoll
impl Debug for InputMessagePoll
Source§impl<'de> Deserialize<'de> for InputMessagePoll
impl<'de> Deserialize<'de> for InputMessagePoll
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
Source§impl PartialEq for InputMessagePoll
impl PartialEq for InputMessagePoll
Source§impl Serialize for InputMessagePoll
impl Serialize for InputMessagePoll
impl StructuralPartialEq for InputMessagePoll
Auto Trait Implementations§
impl Freeze for InputMessagePoll
impl RefUnwindSafe for InputMessagePoll
impl Send for InputMessagePoll
impl Sync for InputMessagePoll
impl Unpin for InputMessagePoll
impl UnwindSafe for InputMessagePoll
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