Enum rsbadges::BadgeError
source · pub enum BadgeError {
BadCommandLineArgs(String),
ColorNotValid(String),
CannotSaveToFile(String),
CannotEmbedLogo(String),
CannotLoadFont,
InvalidStyle(String),
}
Expand description
Error types that may occur on badge generation.
Badges are lazily evaluated, in a fashion; their data is not verified until they are actually generated into SVGs. RSBadges tries to be loud about malformed data or prevented actions via the error types below.
Variants§
BadCommandLineArgs(String)
The arguments passed to the command line cannot be successfully parsed.
ColorNotValid(String)
A color assigned to the Badge does not have a valid CSS color format. See the CSS color picker for valid examples.
CannotSaveToFile(String)
RSBadges is unable to save the generated badge to an SVG. This is usually a file system error, not an error with badge generation.
CannotEmbedLogo(String)
RSBadges is unable to download the logo specified, and therefore cannot embed the data into the SVG. This is usually due to a malformed logo URI.
CannotLoadFont
RSBadges can’t load the font file it uses to measure out the width of the badge. This probably means the file has somehow become corrupted.
InvalidStyle(String)
RSBadges has received a request to create a badge type it does not know about. This can only happen from the command line, since a Style is an enum via the API.
Trait Implementations§
source§impl Debug for BadgeError
impl Debug for BadgeError
source§impl Display for BadgeError
impl Display for BadgeError
source§impl Error for BadgeError
impl Error for BadgeError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
source§impl PartialEq<BadgeError> for BadgeError
impl PartialEq<BadgeError> for BadgeError
source§fn eq(&self, other: &BadgeError) -> bool
fn eq(&self, other: &BadgeError) -> bool
self
and other
values to be equal, and is used
by ==
.