Enum tg_flows::ButtonRequest
source · pub enum ButtonRequest {
Location,
Contact,
Poll(KeyboardButtonPollType),
WebApp(WebAppInfo),
}Expand description
Request something from user, when a button is pressed.
See individual variants documentation for more info.
Variants§
Location
If this variant is used, the user’s current location will be sent when the button is pressed.
Note: this option will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Contact
If this variant is used, the user’s phone number will be sent as a contact when the button is pressed.
Note: this option will only work in Telegram versions released after 9 April, 2016. Older clients will display unsupported message.
Poll(KeyboardButtonPollType)
If this variant is used, the user will be asked to create a poll and send it to the bot when the button is pressed.
Note: this option will only work in Telegram versions released after 23 January, 2020. Older clients will display unsupported message.
WebApp(WebAppInfo)
If this variant is used, the described Web App will be launched when the button is pressed. The Web App will be able to send a “web_app_data” service message.
Note: this option will only work in Telegram versions released after 16 April, 2022. Older clients will display unsupported message.
Trait Implementations§
source§impl Clone for ButtonRequest
impl Clone for ButtonRequest
source§fn clone(&self) -> ButtonRequest
fn clone(&self) -> ButtonRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ButtonRequest
impl Debug for ButtonRequest
source§impl<'de> Deserialize<'de> for ButtonRequest
impl<'de> Deserialize<'de> for ButtonRequest
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>,
source§impl Hash for ButtonRequest
impl Hash for ButtonRequest
source§impl PartialEq<ButtonRequest> for ButtonRequest
impl PartialEq<ButtonRequest> for ButtonRequest
source§fn eq(&self, other: &ButtonRequest) -> bool
fn eq(&self, other: &ButtonRequest) -> bool
self and other values to be equal, and is used
by ==.