pub enum InterruptionLevel {
Passive,
Active,
TimeSensitive,
Critical,
}Expand description
Controls how a notification interrupts the user.
Maps to UNNotificationInterruptionLevel. Available on macOS 12+.
On older systems the value is silently ignored by the OS.
Variants§
Passive
Adds to the notification list without lighting the screen or playing a sound.
Active
Presents immediately, lights the screen, and can play a sound. The default.
TimeSensitive
Presents immediately and bypasses Focus settings.
Critical
Presents immediately, bypasses mute and Do Not Disturb. Requires a special entitlement.
Trait Implementations§
Source§impl Clone for InterruptionLevel
impl Clone for InterruptionLevel
Source§fn clone(&self) -> InterruptionLevel
fn clone(&self) -> InterruptionLevel
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 moreimpl Copy for InterruptionLevel
Source§impl Debug for InterruptionLevel
impl Debug for InterruptionLevel
impl Eq for InterruptionLevel
Source§impl Hash for InterruptionLevel
impl Hash for InterruptionLevel
Source§impl PartialEq for InterruptionLevel
impl PartialEq for InterruptionLevel
Source§fn eq(&self, other: &InterruptionLevel) -> bool
fn eq(&self, other: &InterruptionLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for InterruptionLevel
Auto Trait Implementations§
impl Freeze for InterruptionLevel
impl RefUnwindSafe for InterruptionLevel
impl Send for InterruptionLevel
impl Sync for InterruptionLevel
impl Unpin for InterruptionLevel
impl UnsafeUnpin for InterruptionLevel
impl UnwindSafe for InterruptionLevel
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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