pub enum BackgroundEvent {
MainButtonClicked,
BackButtonClicked,
SettingsButtonClicked,
WriteAccessRequested,
ContactRequested,
PhoneRequested,
InvoiceClosed,
PopupClosed,
QrTextReceived,
ClipboardTextReceived,
}
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
.
PhoneRequested
User responded to a phone number 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.
Trait Implementations§
Source§impl Clone for BackgroundEvent
impl Clone for BackgroundEvent
Source§fn clone(&self) -> BackgroundEvent
fn clone(&self) -> BackgroundEvent
Returns a duplicate 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 BackgroundEvent
impl Debug for BackgroundEvent
impl Copy for BackgroundEvent
Auto Trait Implementations§
impl Freeze for BackgroundEvent
impl RefUnwindSafe for BackgroundEvent
impl Send for BackgroundEvent
impl Sync for BackgroundEvent
impl Unpin for BackgroundEvent
impl UnwindSafe for BackgroundEvent
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