pub struct Metadata<'a> {
pub style: Style,
pub label: &'a str,
pub message: &'a str,
pub font: FontArc,
pub font_family: FontFamily,
pub label_color: Option<&'a str>,
pub color: Option<&'a str>,
}
Expand description
Metadata represents all information required to build a badge.
Fields§
§style: Style
The desired badge style
label: &'a str
The text to be shown on the badge’s label (left side)
message: &'a str
The message to be shown on the badge’s message (right side)
font: FontArc
A FontArc to be used for measuring the final size of a badge.
font_family: FontFamily
The FontFamily to be used when rendering this badge.
label_color: Option<&'a str>
The color for the badge’s label background. When None
, a default
grayish tone is used. When provided, any CSS color may be used.
color: Option<&'a str>
The color for the badge’s message background. When None
, a default
greenish color is used. When provided, any CSS color may be used.
Auto Trait Implementations§
impl<'a> Freeze for Metadata<'a>
impl<'a> !RefUnwindSafe for Metadata<'a>
impl<'a> Send for Metadata<'a>
impl<'a> Sync for Metadata<'a>
impl<'a> Unpin for Metadata<'a>
impl<'a> !UnwindSafe for Metadata<'a>
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