pub enum BackgroundEvent {
MainButtonClicked,
BackButtonClicked,
SettingsButtonClicked,
WriteAccessRequested,
ContactRequested,
InvoiceClosed,
PopupClosed,
QrTextReceived,
ClipboardTextReceived,
RequestedChatSent,
RequestedChatFailed,
}Expand description
Background events delivered by Telegram when the Mini App runs in the background.
Variants§
MainButtonClicked
The main button was clicked. Payload: JsValue::UNDEFINED.
BackButtonClicked
The back button was clicked. Payload: JsValue::UNDEFINED.
SettingsButtonClicked
The settings button was clicked. Payload: JsValue::UNDEFINED.
WriteAccessRequested
User responded to a write access request. Payload: bool.
ContactRequested
User responded to a contact request. Payload: bool.
InvoiceClosed
An invoice was closed. Payload: status string.
PopupClosed
A popup was closed. Payload: object containing button_id.
QrTextReceived
Text was received from the QR scanner. Payload: scanned text.
ClipboardTextReceived
Text was read from the clipboard. Payload: clipboard text.
RequestedChatSent
User picked a chat in response to WebApp.requestChat
(Bot API 9.6+). Payload: JsValue::UNDEFINED.
RequestedChatFailed
WebApp.requestChat failed (user cancelled or Telegram error).
Payload: object containing error: String.
Trait Implementations§
Source§impl Clone for BackgroundEvent
impl Clone for BackgroundEvent
Source§fn clone(&self) -> BackgroundEvent
fn clone(&self) -> BackgroundEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more