Struct git_repository::config::Color
source · [−]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
sourceimpl Ord for Color
impl Ord for Color
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<Color> for Color
impl PartialEq<Color> for Color
sourceimpl PartialOrd<Color> for Color
impl PartialOrd<Color> for Color
sourcefn partial_cmp(&self, other: &Color) -> Option<Ordering>
fn partial_cmp(&self, other: &Color) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
impl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToCompactString for T where
T: Display,
impl<T> ToCompactString for T where
T: Display,
fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a [CompactString
]. Read more