Struct termstyle::Text [] [src]

pub struct Text { /* fields omitted */ }

A piece of text, may be colored, etc

Methods

impl Text
[src]

[src]

Instantiate the Text as just plain text.

Use the builder pattern to construct the rest.

Examples

use termstyle::{Color, Text};

let t = Text::new("bold and blue text".into())
    .bold()
    .color(Color::Blue);

// write it to stdout
t.paint(&mut ::std::io::stdout()).unwrap();

[src]

Make the text styled as bold

[src]

Make the text styled as italic

[src]

Set the color style of the text

[src]

[src]

[src]

[src]

[src]

[src]

Clears all formatting.

Trait Implementations

impl Debug for Text
[src]

[src]

Formats the value using the given formatter.

impl Default for Text
[src]

[src]

Returns the "default value" for a type. Read more

impl Eq for Text
[src]

impl PartialEq for Text
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl From<TextRaw> for Text
[src]

[src]

Performs the conversion.