pub enum AppBadge {
None,
Count(u32),
Text(String),
Dot,
}Expand description
What to show on the app’s icon in the Dock, launcher, home screen, or taskbar (docs/badge.md).
Distinct from NavItem::badge, which annotates a sidebar row inside the window. This one
decorates the application itself and is drawn by the shell, not by Day.
What each payload needs is asked separately (Cap::AppBadgeCount, AppBadgeText,
AppBadgeDot) because the platforms differ in what they accept more than in whether they have
a badge at all: macOS takes arbitrary text, iOS and the web take a number, Android takes nothing.
Variants§
None
Clear the badge.
Count(u32)
A count. Zero clears it, matching every platform’s own convention.
Text(String)
Short arbitrary text ("99+", "beta"). Only macOS renders it; probe Cap::AppBadgeText.
Dot
An indicator with no value.
Trait Implementations§
impl Eq for AppBadge
impl StructuralPartialEq for AppBadge
Auto Trait Implementations§
impl Freeze for AppBadge
impl RefUnwindSafe for AppBadge
impl Send for AppBadge
impl Sync for AppBadge
impl Unpin for AppBadge
impl UnsafeUnpin for AppBadge
impl UnwindSafe for AppBadge
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