Skip to main content

Module builder

Module builder 

Source
Expand description

Badge builder module for shields crate.

Provides a builder-pattern API for constructing SVG badges with a fluent, ergonomic interface. This module is ideal for users who want to configure badges step-by-step or with method chaining.

§Example

use shields::{BadgeStyle};
use shields::builder::Badge;

let svg = Badge::style(BadgeStyle::Flat)
    .label("build")
    .message("passing")
    .label_color("green")
    .message_color("brightgreen")
    .logo("github")
    .build();
assert!(svg.contains("passing"));

See BadgeBuilder and Badge for details.

Structs§

Badge
Entry point for badge builder API.
BadgeBuilder
Builder for constructing SVG badges with a fluent API.