pub enum NotificationId {
Xdg(u32),
Mac(String),
}Expand description
A platform-independent notification identifier.
On XDG (Linux/BSD) notifications are identified by a server-assigned u32.
On macOS (preview-macos-un) they use a caller-supplied String.
Both variants implement From, so you can pass either type directly to
Notification::id:
// XDG — pass a u32
Notification::new().id(42u32).show().unwrap();
// macOS — pass a &str or String
Notification::new().id("my-app.status").show().unwrap();Variants§
Xdg(u32)
XDG / D-Bus numeric identifier (Linux, BSD).
Mac(String)
macOS UNNotificationRequest string identifier.
Trait Implementations§
Source§impl Clone for NotificationId
impl Clone for NotificationId
Source§fn clone(&self) -> NotificationId
fn clone(&self) -> NotificationId
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NotificationId
impl Debug for NotificationId
impl Eq for NotificationId
Source§impl From<&str> for NotificationId
impl From<&str> for NotificationId
Source§impl From<String> for NotificationId
impl From<String> for NotificationId
Source§impl From<u32> for NotificationId
impl From<u32> for NotificationId
Source§impl PartialEq for NotificationId
impl PartialEq for NotificationId
Source§fn eq(&self, other: &NotificationId) -> bool
fn eq(&self, other: &NotificationId) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NotificationId
Auto Trait Implementations§
impl Freeze for NotificationId
impl RefUnwindSafe for NotificationId
impl Send for NotificationId
impl Sync for NotificationId
impl Unpin for NotificationId
impl UnsafeUnpin for NotificationId
impl UnwindSafe for NotificationId
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more