#[non_exhaustive]pub struct PollOption {
pub text: String,
pub voter_count: i64,
pub text_entities: Option<Vec<MessageEntity>>,
pub persistent_id: Option<String>,
pub added_by_user: Option<User>,
pub added_by_chat: Option<Chat>,
pub addition_date: Option<i64>,
}Expand description
One answer option in a received poll.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: StringOption text; 1-100 characters.
voter_count: i64Number of users that voted for this option.
text_entities: Option<Vec<MessageEntity>>Special entities that appear in the option text.
persistent_id: Option<String>Persistent identifier for the option.
Added in Bot API 9.6.
added_by_user: Option<User>User that added the option. Absent for options created with the poll.
Added in Bot API 9.6.
added_by_chat: Option<Chat>Chat that added the option. Absent for options created with the poll.
Added in Bot API 9.6.
addition_date: Option<i64>Unix timestamp when the option was added.
Added in Bot API 9.6.
Trait Implementations§
Source§impl Clone for PollOption
impl Clone for PollOption
Source§fn clone(&self) -> PollOption
fn clone(&self) -> PollOption
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 PollOption
impl Debug for PollOption
Source§impl<'de> Deserialize<'de> for PollOption
impl<'de> Deserialize<'de> for PollOption
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<PollOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<PollOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for PollOption
impl PartialEq for PollOption
Source§impl Serialize for PollOption
impl Serialize for PollOption
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for PollOption
Auto Trait Implementations§
impl Freeze for PollOption
impl RefUnwindSafe for PollOption
impl Send for PollOption
impl Sync for PollOption
impl Unpin for PollOption
impl UnsafeUnpin for PollOption
impl UnwindSafe for PollOption
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