[−][src]Struct tcprint::BasicColors
A basic selection of colors for printing to the terminal.
This type provides a simple, built-in palette for colorized printing. You
typically won’t need to ever explicitly instantiate it, since it
implements Default
and so does ColorPrintState
:
#[macro_use] extern crate tcprint; use tcprint::{BasicColors, ColorPrintState}; let mut state = ColorPrintState::<BasicColors>::default(); tcprintln!(state, ("Conditions are "), [green: "green"], ("!"));
The listing of fields below shows which colors are available.
This type implements the ReportingColors
trait. It returns bold green
for ReportType::Info
, bold yellow for ReportType::Warning
, and bold
red for ReportType::Error
.
Fields
green: ColorSpec
Bold green.
yellow: ColorSpec
Bold yellow.
red: ColorSpec
Bold red.
hl: ColorSpec
"Highlight": bold white.
Trait Implementations
impl Clone for BasicColors
[src]
fn clone(&self) -> BasicColors
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for BasicColors
[src]
impl Default for BasicColors
[src]
impl Eq for BasicColors
[src]
impl PartialEq<BasicColors> for BasicColors
[src]
fn eq(&self, other: &BasicColors) -> bool
[src]
fn ne(&self, other: &BasicColors) -> bool
[src]
impl ReportingColors for BasicColors
[src]
fn get_color_for_report(&self, reptype: ReportType) -> &ColorSpec
[src]
impl StructuralEq for BasicColors
[src]
impl StructuralPartialEq for BasicColors
[src]
Auto Trait Implementations
impl RefUnwindSafe for BasicColors
impl Send for BasicColors
impl Sync for BasicColors
impl Unpin for BasicColors
impl UnwindSafe for BasicColors
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>,