pub enum SuppressReason {
WorkWindow,
Dnd,
Camera,
Video,
AppPause,
}Expand description
Which auto-suppression rule is currently silencing breaks, exposed to the tray so the user can tell why the icon is inactive.
Set by run_loop whenever a guard branch fires (DND / camera /
video / app-pause / outside work-window); cleared at the top of
every tick before the guards re-evaluate. None (encoded as 0)
means “not auto-suppressed”.
Idle isn’t tracked here because it can be partial (only one of
micro/long suppressed at a time) and the user isn’t watching the
tray when idle anyway. Explicit user pause goes through
PauseState, not this enum.
Variants§
Implementations§
Source§impl SuppressReason
impl SuppressReason
Sourcepub const fn as_u8(self) -> u8
pub const fn as_u8(self) -> u8
Stable u8 encoding for the AtomicU8 round-trip. 0 is reserved
for “not suppressed” — the inverse of from_u8.
Sourcepub fn from_u8(b: u8) -> Option<Self>
pub fn from_u8(b: u8) -> Option<Self>
Decode from the AtomicU8. Anything outside the encoded range
(including 0) returns None — treat as “not suppressed”.
Sourcepub fn short_label(self) -> &'static str
pub fn short_label(self) -> &'static str
Short label for the always-visible tray title (macOS / Linux). Kept under ~12 chars so the menu-bar doesn’t blow out.
Trait Implementations§
Source§impl Clone for SuppressReason
impl Clone for SuppressReason
Source§fn clone(&self) -> SuppressReason
fn clone(&self) -> SuppressReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SuppressReason
impl Debug for SuppressReason
Source§impl PartialEq for SuppressReason
impl PartialEq for SuppressReason
impl Copy for SuppressReason
impl Eq for SuppressReason
impl StructuralPartialEq for SuppressReason
Auto Trait Implementations§
impl Freeze for SuppressReason
impl RefUnwindSafe for SuppressReason
impl Send for SuppressReason
impl Sync for SuppressReason
impl Unpin for SuppressReason
impl UnsafeUnpin for SuppressReason
impl UnwindSafe for SuppressReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.