pub struct SendPoll {
pub chat_id: PolymorphChatId,
pub question: String,
pub options: Vec<String>,
pub disable_notification: Option<bool>,
pub reply_to_message_id: Option<i64>,
pub reply_markup: Option<PolymorphReplyMarkup>,
}Expand description
Use this method to send a native poll. A native poll can’t be sent to a private chat. On success, the sent Message is returned.
Fields§
§chat_id: PolymorphChatIdUnique identifier for the target chat or username of the target channel (in the format @channelusername). A native poll can’t be sent to a private chat.
question: StringPoll question, 1-255 characters
options: Vec<String>List of answer options, 2-10 strings 1-100 characters each
disable_notification: Option<bool>Sends the message silently. Users will receive a notification with no sound.
reply_to_message_id: Option<i64>If the message is a reply, ID of the original message
reply_markup: Option<PolymorphReplyMarkup>Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SendPoll
impl<'de> Deserialize<'de> for SendPoll
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 PartialOrd for SendPoll
impl PartialOrd for SendPoll
impl StructuralPartialEq for SendPoll
Auto Trait Implementations§
impl Freeze for SendPoll
impl RefUnwindSafe for SendPoll
impl Send for SendPoll
impl Sync for SendPoll
impl Unpin for SendPoll
impl UnwindSafe for SendPoll
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