badgelib 0.5.2

Render customizable SVG badges with gradients, animations, and icons without a hosted service
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/// An error returned by badgelib.
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
  /// A color is neither a recognized name nor a valid hexadecimal value.
  #[error("invalid color '{0}'")]
  InvalidColor(String),

  /// A Simple Icons slug does not exist.
  #[error("unknown Simple Icons slug '{0}'")]
  UnknownLogo(String),
}

/// A result returned by badgelib.
pub type Result<T> = std::result::Result<T, Error>;