ColorBold

Trait ColorBold 

Source
pub trait ColorBold: ToString {
    // Provided methods
    fn dblackb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dredb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dgreenb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dyellowb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dblueb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dpurpleb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dgrblueb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dgrayb<const S: usize>(&self) -> BFRDYN<S> { ... }
    fn dwhiteb<const S: usize>(&self) -> BFRDYN<S> { ... }
}
Expand description

This trait receive const generic to specify the buffer size A trait that contain methods to format self with color and bold once this trait imported, &str, &String and String will have extension method to format it with color+bold on terminal.

§Example

use consclr::{ColorBold};
 
let text = "Lorem Ipsum";
println!("{}", text.dredb::<512>());

Provided Methods§

Source

fn dblackb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dredb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dgreenb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dyellowb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dblueb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dpurpleb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dgrblueb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dgrayb<const S: usize>(&self) -> BFRDYN<S>

Source

fn dwhiteb<const S: usize>(&self) -> BFRDYN<S>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ColorBold for &str

Source§

impl ColorBold for &String

Source§

impl ColorBold for String

Source§

impl ColorBold for BFRDYN

Implementors§