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 moreimpl 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 UnsafeUnpin for BackgroundEvent
impl UnwindSafe for BackgroundEvent
Blanket Implementations§
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> HasAllProps<(), T> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.