pub struct Color {
pub foreground: Option<Name>,
pub background: Option<Name>,
pub attributes: Attribute,
}
Expand description
Any value that may contain a foreground color, background color, a
collection of color (text) modifiers, or a combination of any of the
aforementioned values, like red
or brightgreen
.
Note that git-config
allows color values to simply be a collection of
color::Attribute
s, and does not require a color::Name
for either the
foreground or background color.
Fields§
§foreground: Option<Name>
A provided foreground color
background: Option<Name>
A provided background color
attributes: Attribute
A potentially empty set of text attributes
Trait Implementations§
§impl Ord for Color
impl Ord for Color
§impl PartialOrd for Color
impl PartialOrd for Color
§fn partial_cmp(&self, other: &Color) -> Option<Ordering>
fn partial_cmp(&self, other: &Color) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more