pub enum CloseReason {
Expired,
Dismissed,
CloseAction,
Other(u32),
}Expand description
Reason a notification was closed without an action being invoked.
§Platform notes
XDG (Linux/BSD): maps directly to NotificationClosed D-Bus signal reasons.
macOS: the system does not distinguish close reasons, so all closes are
reported as CloseReason::Dismissed.
Windows: UserCanceled → Dismissed,
TimedOut → Expired,
ApplicationHidden → CloseAction.
Variants§
Expired
The notification expired (timed out).
Dismissed
The notification was dismissed by the user.
CloseAction
The notification was closed programmatically.
Other(u32)
An unrecognised or reserved reason was reported by the platform.
Trait Implementations§
Source§impl Clone for CloseReason
impl Clone for CloseReason
Source§fn clone(&self) -> CloseReason
fn clone(&self) -> CloseReason
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<F> CloseHandler<CloseReason> for Fwhere
F: Fn(CloseReason),
impl<F> CloseHandler<CloseReason> for Fwhere
F: Fn(CloseReason),
Source§fn call(&self, reason: CloseReason)
fn call(&self, reason: CloseReason)
Called with the
CloseReason.impl Copy for CloseReason
Source§impl Debug for CloseReason
impl Debug for CloseReason
impl Eq for CloseReason
Source§impl From<u32> for CloseReason
impl From<u32> for CloseReason
Source§impl Hash for CloseReason
impl Hash for CloseReason
Source§impl PartialEq for CloseReason
impl PartialEq for CloseReason
Source§fn eq(&self, other: &CloseReason) -> bool
fn eq(&self, other: &CloseReason) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for CloseReason
Auto Trait Implementations§
impl Freeze for CloseReason
impl RefUnwindSafe for CloseReason
impl Send for CloseReason
impl Sync for CloseReason
impl Unpin for CloseReason
impl UnsafeUnpin for CloseReason
impl UnwindSafe for CloseReason
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