pub struct InputMessagePoll { /* private fields */ }
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
Implementations§
Source§impl InputMessagePoll
impl InputMessagePoll
pub fn from_json<S: AsRef<str>>(json: S) -> Result<Self>
pub fn builder() -> InputMessagePollBuilder
pub fn question(&self) -> &String
pub fn options(&self) -> &Vec<String>
pub fn is_anonymous(&self) -> bool
pub fn type_(&self) -> &PollType
pub fn open_period(&self) -> i32
pub fn close_date(&self) -> i32
pub fn is_closed(&self) -> bool
Trait Implementations§
Source§impl AsRef<InputMessagePoll> for InputMessagePoll
impl AsRef<InputMessagePoll> for InputMessagePoll
Source§fn as_ref(&self) -> &InputMessagePoll
fn as_ref(&self) -> &InputMessagePoll
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for InputMessagePoll
impl Clone for InputMessagePoll
Source§fn clone(&self) -> InputMessagePoll
fn clone(&self) -> InputMessagePoll
Returns a copy 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 Default for InputMessagePoll
impl Default for InputMessagePoll
Source§fn default() -> InputMessagePoll
fn default() -> InputMessagePoll
Returns the “default value” for a type. Read more
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 Serialize for InputMessagePoll
impl Serialize for InputMessagePoll
impl TDInputMessageContent 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