pub struct Notification {Show 14 fields
pub id: u32,
pub app_name: String,
pub app_icon: String,
pub summary: String,
pub body: String,
pub actions: Vec<(String, String)>,
pub urgency: Urgency,
pub timeout: Timeout,
pub image: Option<IconSource>,
pub desktop_entry: String,
pub category: String,
pub resident: bool,
pub transient: bool,
pub received: SystemTime,
}Expand description
One notification an app sent.
Fields§
§id: u32Never 0, and unique among those kept. The key to give
children_keyed, and what Notifications::dismiss and
Notifications::invoke take.
app_name: StringThe app’s name for itself, such as Firefox, or empty.
app_icon: StringThe app’s icon as it sent it: an icon name, a file:// URI, or
empty.
summary: StringOne line about it, at most 1 KiB.
body: StringThe text under that, at most 4 KiB, as plain text: tags an app sent are taken out and entities decoded.
actions: Vec<(String, String)>The actions the user can pick, as (key, label), at most 16. The
app means default for a click on the notification itself.
urgency: UrgencyHow urgent it is.
timeout: TimeoutHow long its popup shows.
image: Option<IconSource>The picture to show: the app’s pixels, an image file, or else its
icon. None when it has none.
desktop_entry: StringThe app’s desktop entry, such as org.mozilla.firefox, or empty.
category: StringWhat kind it is, such as email.arrived, or empty.
resident: boolWhether it stays after one of its actions is picked.
transient: boolWhether it goes once its popup expires, instead of staying in the history.
received: SystemTimeWhen it arrived, or was last replaced.