Struct stybulate::Headers[][src]

pub struct Headers { /* fields omitted */ }
Expand description

The Headers structure is a list of headers (per column)

Example

use stybulate::{AsciiEscapedString, Headers};
// simple example with only strings
let simple = Headers::from(vec!["foo", "bar"]);
// more elaborated example with a mix of a styled string and a simple string
let mut with_style = Headers::with_capacity(2);
with_style
    .push(AsciiEscapedString::from("\x1b[1;35mfoo\x1b[0m bar"))
    .push(String::from("baz"));

Implementations

Headers constructor: creates an empty header

Headers constructor from a vec of &str

Headers constructor with capacity

Add a header to the Headers

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.