[−][src]Enum badgen::Color
Possible colors for use in a badge.
Variants
green
blue
red
yellow
orange
purple
pink
grey
cyan
black
Custom(&'a str)
A custom hex color in the form RGB
or RRGGBB
.
Implementations
impl<'a> Color<'a>
[src]
pub fn parse(s: &'a str) -> Option<Self>
[src]
Parses a color value.
This can be either a RGB hex value, or a named color.
pub fn as_str(&'a self) -> &str
[src]
Returns a RGB hex string for the color.
pub fn fmt<W>(&self, w: W) -> Result where
W: Write,
[src]
W: Write,
Writes the color to a fmt::Write
.
Trait Implementations
impl<'a> Clone for Color<'a>
[src]
impl<'a> Copy for Color<'a>
[src]
impl<'a> Debug for Color<'a>
[src]
impl<'a> PartialEq<Color<'a>> for Color<'a>
[src]
impl<'a> StructuralPartialEq for Color<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Color<'a>
impl<'a> Send for Color<'a>
impl<'a> Sync for Color<'a>
impl<'a> Unpin for Color<'a>
impl<'a> UnwindSafe for Color<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,