mac-usernotifications 0.2.0

Thin wrapper around macOS UserNotifications.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/// Errors returned by this crate.
#[derive(Debug, Clone, thiserror::Error, PartialEq, Eq)]
#[non_exhaustive]
pub enum Error {
    /// No bundle identifier (need valid `.app` bundle).
    #[error("No bundle identifier found. UNUserNotificationCenter requires a valid .app bundle.")]
    NoBundleIdentifier,

    /// macOS rejected the request.
    #[error("macOS rejected the notification request")]
    NotificationRejected,

    /// Delivery was interrupted.
    #[error("Response delivery was interrupted")]
    ResponseDeliveryInterupted(#[from] futures_channel::oneshot::Canceled),
}