pub enum PollKind {
Regular,
Quiz {
correct_option_id: Option<usize>,
explanation: Option<String>,
explanation_entities: Option<Vec<MessageEntity>>,
},
}Expand description
Poll type
Variants§
Regular
Quiz
Fields
§
correct_option_id: Option<usize>0-based identifier of the correct answer option. Available only for polls in the quiz mode, which are closed, or was sent (not forwarded) by the bot or to the private chat with the bot.
§
explanation: Option<String>Text that is shown when a user chooses an incorrect answer or taps on the lamp icon in a quiz-style poll, 0-200 characters
§
explanation_entities: Option<Vec<MessageEntity>>Special entities like usernames, URLs, bot commands, etc. that appear in the explanation
Implementations§
Source§impl PollKind
impl PollKind
pub fn correct_option_id(&self) -> Option<usize>
pub fn explanation(&self) -> Option<&str>
pub fn explanation_entities(&self) -> Option<&[MessageEntity]>
pub fn is_regular(&self) -> bool
pub fn is_quiz(&self) -> bool
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PollKind
impl<'de> Deserialize<'de> for PollKind
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 Freeze for PollKind
impl RefUnwindSafe for PollKind
impl Send for PollKind
impl Sync for PollKind
impl Unpin for PollKind
impl UnwindSafe for PollKind
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