pub struct NotificationMessage {
pub msg_type: NotificationMessageType,
pub summary: String,
pub body: String,
pub urgency: u8,
pub app_name: String,
pub notification_id: u32,
}Expand description
A notification IPC message sent from user-space to the notification service.
Fields§
§msg_type: NotificationMessageTypeThe type of operation requested.
summary: StringNotification summary / title (used by Notify).
body: StringNotification body text (used by Notify).
urgency: u8Urgency level: 0 = Low, 1 = Normal, 2 = Critical (used by Notify).
app_name: StringName of the sending application (used by Notify).
notification_id: u32Notification ID (used by Dismiss).
Implementations§
Source§impl NotificationMessage
impl NotificationMessage
Sourcepub fn new_notify(
summary: &str,
body: &str,
urgency: u8,
app_name: &str,
) -> Self
pub fn new_notify( summary: &str, body: &str, urgency: u8, app_name: &str, ) -> Self
Create a Notify message.
Sourcepub fn new_dismiss(id: u32) -> Self
pub fn new_dismiss(id: u32) -> Self
Create a Dismiss message for a specific notification.
Sourcepub fn new_dismiss_all() -> Self
pub fn new_dismiss_all() -> Self
Create a DismissAll message.
Sourcepub fn new_get_active() -> Self
pub fn new_get_active() -> Self
Create a GetActive query message.
Trait Implementations§
Source§impl Clone for NotificationMessage
impl Clone for NotificationMessage
Source§fn clone(&self) -> NotificationMessage
fn clone(&self) -> NotificationMessage
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for NotificationMessage
impl RefUnwindSafe for NotificationMessage
impl Send for NotificationMessage
impl Sync for NotificationMessage
impl Unpin for NotificationMessage
impl UnwindSafe for NotificationMessage
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)