Trait rpf::Styled
[−]
[src]
pub trait Styled { fn bold(&self) -> ANSIString; fn underline(&self) -> ANSIString; fn paint(&self, color: Color) -> ANSIString; }
Trait for creating stylized console printing using ansi_term
Required Methods
fn bold(&self) -> ANSIString
fn underline(&self) -> ANSIString
Creates an underlined ANSIString
Example
use rpf::Styled; println!("{}", "Styled string test".underline());
fn paint(&self, color: Color) -> ANSIString
Paints a given string with the color given
Example
use rpf::Styled; use rpf::Color; println!("{}", "Styled string test".paint(Color::Yellow));