[][src]Struct tcprint::BasicColors

pub struct BasicColors {
    pub green: ColorSpec,
    pub yellow: ColorSpec,
    pub red: ColorSpec,
    pub hl: ColorSpec,
}

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]

impl Debug for BasicColors[src]

impl Default for BasicColors[src]

impl Eq for BasicColors[src]

impl PartialEq<BasicColors> for BasicColors[src]

impl ReportingColors for BasicColors[src]

impl StructuralEq for BasicColors[src]

impl StructuralPartialEq for BasicColors[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.