pub enum BadgeContent<'a> {
Dot,
Label(&'a str),
Text {
text: &'a str,
max_graphemes: usize,
},
Number {
value: u32,
max: u32,
},
FormattedNumber {
value: u32,
limit: BadgeNumberLimit,
format: BadgeNumberFormat<'a>,
},
}Expand description
Badge appearance; the accessible description is supplied separately.
Variants§
Dot
Label(&'a str)
Text
Shorten long text to at most max_graphemes, including an ellipsis.
Number
Show a number, or the configured maximum followed by + when exceeded.
FormattedNumber
Format digits and optionally derive the overflow maximum from a character limit.
Trait Implementations§
Source§impl<'a> Clone for BadgeContent<'a>
impl<'a> Clone for BadgeContent<'a>
impl<'a> Copy for BadgeContent<'a>
Auto Trait Implementations§
impl<'a> Forget for BadgeContent<'a>
impl<'a> Freeze for BadgeContent<'a>
impl<'a> Move for BadgeContent<'a>
impl<'a> RefUnwindSafe for BadgeContent<'a>
impl<'a> Send for BadgeContent<'a>
impl<'a> Sync for BadgeContent<'a>
impl<'a> Unpin for BadgeContent<'a>
impl<'a> UnsafeUnpin for BadgeContent<'a>where
&'a str: UnsafeUnpin,
impl<'a> UnwindSafe for BadgeContent<'a>where
&'a str: UnwindSafe,
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