pub struct Notification {
pub id: NotificationId,
pub level: NotificationLevel,
pub scope: Option<String>,
pub text: String,
pub timeout: Option<Duration>,
pub actions: Vec<NotificationAction>,
}Expand description
One notification.
Not PartialEq: it carries an [Effect], which is not. Tests
compare the fields they care about, which is sharper anyway.
Fields§
§id: NotificationId§level: NotificationLevel§scope: Option<String>NC.2: where the work happened — a repository name, say. Drawn
in its own column ahead of text, so notifications from two
repositories cannot read the same.
text: StringOne line. Longer text belongs in *messages*, which this tees
to — a corner popup that needs scrolling is the wrong surface.
timeout: Option<Duration>None means “stays until dismissed”. Used by an operation that
is still running: it posts with no timeout and replaces itself
on completion with one that has a timeout.
actions: Vec<NotificationAction>What <CR> on this row in *notifications* runs. The first is
the default; the corner shows none of them, because a corner
popup you have to aim at is worse than one you read.
Trait Implementations§
Source§impl Clone for Notification
impl Clone for Notification
Source§fn clone(&self) -> Notification
fn clone(&self) -> Notification
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more