1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/// 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`](crate::Notification::id):
///
/// ```no_run
/// # use notify_rust::Notification;
/// // XDG — pass a u32
/// # #[cfg(all(unix, not(target_os = "macos")))]
/// Notification::new().id(42u32).show().unwrap();
///
/// // macOS — pass a &str or String
/// # #[cfg(all(target_os = "macos", feature = "preview-macos-un"))]
/// Notification::new().id("my-app.status").show().unwrap();
/// ```