[][src]Enum notify_rust::Urgency

pub enum Urgency {
    Low,
    Normal,
    Critical,
}

Levels of Urgency.

Specification

Developers must use their own judgement when deciding the urgency of a notification. Typically, if the majority of programs are using the same level for a specific type of urgency, other applications should follow them.

For low and normal urgencies, server implementations may display the notifications how they choose. They should, however, have a sane expiration timeout dependent on the urgency level.

Critical notifications should not automatically expire, as they are things that the user will most likely want to know about. They should only be closed when the user dismisses them, for example, by clicking on the notification.

— see Galago or Gnome specification.

Example

Notification::new()
    .summary("oh no")
    .icon("dialog-warning")
    .urgency(Urgency::Critical)
    .show()?;

Variants

Low

The behaviour for Low urgency depends on the notification server.

Normal

The behaviour for Normal urgency depends on the notification server.

Critical

A critical notification will not time out.

Trait Implementations

impl Clone for Urgency[src]

impl Copy for Urgency[src]

impl Debug for Urgency[src]

impl Eq for Urgency[src]

impl From<Option<u64>> for Urgency[src]

impl From<u64> for Urgency[src]

impl Hash for Urgency[src]

impl PartialEq<Urgency> for Urgency[src]

impl StructuralEq for Urgency[src]

impl StructuralPartialEq for Urgency[src]

impl<'_> TryFrom<&'_ str> for Urgency[src]

type Error = Error

The type returned in the event of a conversion error.

Auto Trait Implementations

impl RefUnwindSafe for Urgency

impl Send for Urgency

impl Sync for Urgency

impl Unpin for Urgency

impl UnwindSafe for Urgency

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.