pub struct ActionHandle { /* private fields */ }Expand description
A handle which represents a notification action.
Notification actions are typically presented as buttons in UI that allow user to interact with the application which sent the notification.
Implementations§
Source§impl ActionHandle
impl ActionHandle
Sourcepub fn notification_id(&self) -> u32
pub fn notification_id(&self) -> u32
Returns the ID of the notification this action belongs to.
Sourcepub fn label(&self) -> String
pub fn label(&self) -> String
Returns the localized string which should be displayed to the user.
Sourcepub fn action_key(&self) -> String
pub fn action_key(&self) -> String
Returns the identifier of the action.
"default" means that the action is default.
Sourcepub async fn invoke(&self) -> Result<()>
pub async fn invoke(&self) -> Result<()>
Invoke the action.
It is a shortcut to NotificationService::invoke_action.
§Errors
Returns Error::DBusError
Trait Implementations§
Source§impl Clone for ActionHandle
impl Clone for ActionHandle
Source§fn clone(&self) -> ActionHandle
fn clone(&self) -> ActionHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ActionHandle
impl !UnwindSafe for ActionHandle
impl Freeze for ActionHandle
impl Send for ActionHandle
impl Sync for ActionHandle
impl Unpin for ActionHandle
impl UnsafeUnpin for ActionHandle
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