pub struct ColorAdapter { /* private fields */ }Expand description
Color adapter that provides appropriate colors based on terminal background
Implementations§
Source§impl ColorAdapter
impl ColorAdapter
Sourcepub fn with_scheme(scheme: ColorScheme) -> Self
pub fn with_scheme(scheme: ColorScheme) -> Self
Create a ColorAdapter with a specific color scheme
Sourcepub fn scheme(&self) -> ColorScheme
pub fn scheme(&self) -> ColorScheme
Get the current color scheme
pub fn header_text(&self, text: &str) -> ColoredString
pub fn border(&self, text: &str) -> ColoredString
pub fn primary(&self, text: &str) -> ColoredString
pub fn secondary(&self, text: &str) -> ColoredString
pub fn language(&self, text: &str) -> ColoredString
pub fn framework(&self, text: &str) -> ColoredString
pub fn database(&self, text: &str) -> ColoredString
pub fn technology(&self, text: &str) -> ColoredString
pub fn info(&self, text: &str) -> ColoredString
pub fn success(&self, text: &str) -> ColoredString
pub fn warning(&self, text: &str) -> ColoredString
pub fn error(&self, text: &str) -> ColoredString
pub fn label(&self, text: &str) -> ColoredString
pub fn value(&self, text: &str) -> ColoredString
pub fn dimmed(&self, text: &str) -> ColoredString
pub fn architecture_pattern(&self, text: &str) -> ColoredString
pub fn project_type(&self, text: &str) -> ColoredString
pub fn metric(&self, text: &str) -> ColoredString
pub fn path(&self, text: &str) -> ColoredString
pub fn confidence_high(&self, text: &str) -> ColoredString
pub fn confidence_medium(&self, text: &str) -> ColoredString
pub fn confidence_low(&self, text: &str) -> ColoredString
Trait Implementations§
Source§impl Clone for ColorAdapter
impl Clone for ColorAdapter
Source§fn clone(&self) -> ColorAdapter
fn clone(&self) -> ColorAdapter
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ColorAdapter
impl Debug for ColorAdapter
Auto Trait Implementations§
impl Freeze for ColorAdapter
impl RefUnwindSafe for ColorAdapter
impl Send for ColorAdapter
impl Sync for ColorAdapter
impl Unpin for ColorAdapter
impl UnwindSafe for ColorAdapter
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more