pub struct Notification {
pub id: u32,
pub summary: String,
pub body: String,
pub urgency: NotificationUrgency,
pub app_name: String,
pub created_tick: u64,
pub expire_ticks: u64,
pub dismissed: bool,
}Expand description
A single desktop notification.
Fields§
§id: u32Unique notification ID.
summary: StringShort summary / title line.
body: StringLonger body text (may be empty).
urgency: NotificationUrgencyUrgency level.
app_name: StringName of the application that sent this notification.
created_tick: u64Tick count when the notification was created.
expire_ticks: u64Number of ticks after creation when the notification expires.
dismissed: boolWhether the notification has been dismissed by the user.
Implementations§
Source§impl Notification
impl Notification
Sourcepub fn is_expired(&self, current_tick: u64) -> bool
pub fn is_expired(&self, current_tick: u64) -> bool
Returns true if the notification has expired at current_tick.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
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 Notification
impl RefUnwindSafe for Notification
impl Send for Notification
impl Sync for Notification
impl Unpin for Notification
impl UnwindSafe for Notification
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)