pub struct ActionPerformed { /* private fields */ }Expand description
An action the user performed on a notification, delivered to the handlers of
Notification::on_action and to the onAction listeners of the JavaScript API.
On desktop it is emitted when the user clicks the notification body (actionId = tap) or
one of the actions of its ActionType, as far as the notification server reports it.
Implementations§
Source§impl ActionPerformed
impl ActionPerformed
Sourcepub fn action_id(&self) -> &str
pub fn action_id(&self) -> &str
The identifier of the performed action: tap for a click on the notification itself,
dismiss for a dismissal reported on iOS, otherwise the identifier of the Action.
Sourcepub fn input_value(&self) -> Option<&str>
pub fn input_value(&self) -> Option<&str>
The text the user typed, for an Action with an input field (mobile only).
Sourcepub fn notification(&self) -> Option<&ActiveNotification>
pub fn notification(&self) -> Option<&ActiveNotification>
The notification the action was performed on, as far as the platform reports it.
Trait Implementations§
Source§impl Clone for ActionPerformed
impl Clone for ActionPerformed
Source§impl Debug for ActionPerformed
impl Debug for ActionPerformed
Source§impl<'de> Deserialize<'de> for ActionPerformed
impl<'de> Deserialize<'de> for ActionPerformed
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
Auto Trait Implementations§
impl Freeze for ActionPerformed
impl RefUnwindSafe for ActionPerformed
impl Send for ActionPerformed
impl Sync for ActionPerformed
impl Unpin for ActionPerformed
impl UnsafeUnpin for ActionPerformed
impl UnwindSafe for ActionPerformed
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