pub struct Notification { /* private fields */ }
Expand description
A notification
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn markup_body<'a>(self, markup_body: impl Into<Option<&'a str>>) -> Self
pub fn markup_body<'a>(self, markup_body: impl Into<Option<&'a str>>) -> Self
Same as Notification::body
but supports markup formatting.
Sourcepub fn sound<S>(self, sound: impl Into<Option<S>>) -> Selfwhere
S: AsFd,
pub fn sound<S>(self, sound: impl Into<Option<S>>) -> Selfwhere
S: AsFd,
Sets the notification sound.
Sourcepub fn category(self, category: impl Into<Option<Category>>) -> Self
pub fn category(self, category: impl Into<Option<Category>>) -> Self
Sets the notification category.
Sourcepub fn display_hint(self, hints: impl IntoIterator<Item = DisplayHint>) -> Self
pub fn display_hint(self, hints: impl IntoIterator<Item = DisplayHint>) -> Self
Sets the notification display hints.
Sourcepub fn priority(self, priority: impl Into<Option<Priority>>) -> Self
pub fn priority(self, priority: impl Into<Option<Priority>>) -> Self
Sets the notification priority.
Sourcepub fn default_action<'a>(
self,
default_action: impl Into<Option<&'a str>>,
) -> Self
pub fn default_action<'a>( self, default_action: impl Into<Option<&'a str>>, ) -> Self
Sets the default action when the user clicks on the notification.
Sourcepub fn default_action_target<'a, T: Into<Value<'a>>>(
self,
default_action_target: impl Into<Option<T>>,
) -> Self
pub fn default_action_target<'a, T: Into<Value<'a>>>( self, default_action_target: impl Into<Option<T>>, ) -> Self
Sets a value to be sent in the action_invoked
signal.
Adds a new button to the notification.
Trait Implementations§
Source§impl Debug for Notification
impl Debug for Notification
Source§impl Serialize for Notification
impl Serialize for Notification
Auto Trait Implementations§
impl Freeze for Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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