pub struct RichMessageButton {
pub text: RichText,
pub style: Option<ButtonStyle>,
pub url: Option<String>,
pub callback_data: Option<String>,
pub web_app: Option<WebAppInfo>,
pub login_url: Option<LoginUrl>,
pub switch_inline_query: Option<String>,
pub switch_inline_query_current_chat: Option<String>,
pub switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>,
pub copy_text: Option<CopyTextButton>,
pub disabled: Option<DisabledButton>,
}Expand description
A button in a rich message.
Exactly one of the fields other than text and style must be set.
Fields§
§text: RichTextText of the button; only plain text, custom emoji and date-time entities.
style: Option<ButtonStyle>Optional. Style of the button.
url: Option<String>Optional. HTTP or tg:// URL to be opened when the button is pressed.
callback_data: Option<String>Optional. Data sent in a callback query, 1-64 bytes.
web_app: Option<WebAppInfo>Optional. Web App launched when the button is pressed (private chats only).
login_url: Option<LoginUrl>Optional. HTTPS URL used to automatically authorize the user.
switch_inline_query: Option<String>Optional. Switch to inline mode in a chosen chat.
switch_inline_query_current_chat: Option<String>Optional. Switch to inline mode in the current chat.
switch_inline_query_chosen_chat: Option<SwitchInlineQueryChosenChat>Optional. Switch to inline mode in a chat of the specified type.
copy_text: Option<CopyTextButton>Optional. Copy the specified text to the clipboard.
disabled: Option<DisabledButton>Optional. The button is disabled and does nothing.
Implementations§
Source§impl RichMessageButton
impl RichMessageButton
Trait Implementations§
Source§impl Clone for RichMessageButton
impl Clone for RichMessageButton
Source§impl Debug for RichMessageButton
impl Debug for RichMessageButton
Source§impl<'de> Deserialize<'de> for RichMessageButton
impl<'de> Deserialize<'de> for RichMessageButton
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 PartialEq for RichMessageButton
impl PartialEq for RichMessageButton
Source§impl Serialize for RichMessageButton
impl Serialize for RichMessageButton
impl StructuralPartialEq for RichMessageButton
Auto Trait Implementations§
impl Forget for RichMessageButton
impl Freeze for RichMessageButton
impl Move for RichMessageButton
impl RefUnwindSafe for RichMessageButton
impl Send for RichMessageButton
impl Sync for RichMessageButton
impl Unpin for RichMessageButton
impl UnsafeUnpin for RichMessageButton
impl UnwindSafe for RichMessageButton
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