#[non_exhaustive]pub struct InputPollOption {
pub text: String,
pub text_parse_mode: Option<String>,
pub text_entities: Option<Vec<MessageEntity>>,
}Expand description
One answer option in a poll to be sent.
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.
text_parse_mode: Option<String>Mode for parsing entities in the text.
text_entities: Option<Vec<MessageEntity>>Special entities that appear in the option text.
Implementations§
Source§impl InputPollOption
impl InputPollOption
Sourcepub fn new(text: impl Into<String>) -> InputPollOption
pub fn new(text: impl Into<String>) -> InputPollOption
Creates a new instance with the given required fields; optional fields
are initialised to their Default values.
Trait Implementations§
Source§impl Clone for InputPollOption
impl Clone for InputPollOption
Source§fn clone(&self) -> InputPollOption
fn clone(&self) -> InputPollOption
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 InputPollOption
impl Debug for InputPollOption
Source§impl Default for InputPollOption
impl Default for InputPollOption
Source§fn default() -> InputPollOption
fn default() -> InputPollOption
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InputPollOption
impl<'de> Deserialize<'de> for InputPollOption
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<InputPollOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<InputPollOption, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for InputPollOption
impl PartialEq for InputPollOption
Source§impl Serialize for InputPollOption
impl Serialize for InputPollOption
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 InputPollOption
Auto Trait Implementations§
impl Freeze for InputPollOption
impl RefUnwindSafe for InputPollOption
impl Send for InputPollOption
impl Sync for InputPollOption
impl Unpin for InputPollOption
impl UnsafeUnpin for InputPollOption
impl UnwindSafe for InputPollOption
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