pub enum KeyboardButtonType {
RequestLocation(KeyboardButtonTypeRequestLocation),
RequestPhoneNumber(KeyboardButtonTypeRequestPhoneNumber),
RequestPoll(KeyboardButtonTypeRequestPoll),
Text(KeyboardButtonTypeText),
// some variants omitted
}
Expand description
Describes a keyboard button type
Variants§
RequestLocation(KeyboardButtonTypeRequestLocation)
A button that sends the user’s location when pressed; available only in private chats
RequestPhoneNumber(KeyboardButtonTypeRequestPhoneNumber)
A button that sends the user’s phone number when pressed; available only in private chats
RequestPoll(KeyboardButtonTypeRequestPoll)
A button that allows the user to create and send a poll when pressed; available only in private chats
Text(KeyboardButtonTypeText)
A simple button, with text that must be sent when the button is pressed
Implementations§
Trait Implementations§
Source§impl AsRef<KeyboardButtonType> for KeyboardButtonType
impl AsRef<KeyboardButtonType> for KeyboardButtonType
Source§fn as_ref(&self) -> &KeyboardButtonType
fn as_ref(&self) -> &KeyboardButtonType
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for KeyboardButtonType
impl Clone for KeyboardButtonType
Source§fn clone(&self) -> KeyboardButtonType
fn clone(&self) -> KeyboardButtonType
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 KeyboardButtonType
impl Debug for KeyboardButtonType
Source§impl Default for KeyboardButtonType
impl Default for KeyboardButtonType
Source§fn default() -> KeyboardButtonType
fn default() -> KeyboardButtonType
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for KeyboardButtonType
impl<'de> Deserialize<'de> for KeyboardButtonType
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 KeyboardButtonType
impl RefUnwindSafe for KeyboardButtonType
impl Send for KeyboardButtonType
impl Sync for KeyboardButtonType
impl Unpin for KeyboardButtonType
impl UnwindSafe for KeyboardButtonType
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