pub struct Badge { /* private fields */ }Expand description
Badges are valid and have all the necessary fields to construct an SVG without error. Use the BadgeBuilder to construct.
§Example
use badge_maker::BadgeBuilder;
let badge = BadgeBuilder::new()
.message("Example")
.build()?;
Implementations§
Source§impl Badge
impl Badge
pub fn svg(&self) -> String
pub fn label(&self) -> &Option<String>
pub fn message(&self) -> &str
pub fn label_color(&self) -> &str
pub fn color(&self) -> &str
pub fn style(&self) -> Style
pub fn links(&self) -> &Links
pub fn logo(&self) -> &Option<Logo>
pub fn ids(&self) -> &str
pub fn idr(&self) -> &str
pub fn id(&self) -> &str
Trait Implementations§
impl Eq for Badge
impl StructuralPartialEq for Badge
Auto Trait Implementations§
impl Freeze for Badge
impl RefUnwindSafe for Badge
impl Send for Badge
impl Sync for Badge
impl Unpin for Badge
impl UnwindSafe for Badge
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