Enum stybulate::Cell[][src]

pub enum Cell<'a> {
    Int(i32),
    Float(f64),
    Text(Box<dyn Unstyle + 'a>),
}
Expand description

The content of each cell of the table (either a string or a number)

Variants

Int(i32)

Integer variant

Tuple Fields of Int

0: i32
Float(f64)

Float variant

Tuple Fields of Float

0: f64
Text(Box<dyn Unstyle + 'a>)

Unstylable Text variant

Tuple Fields of Text

0: Box<dyn Unstyle + 'a>

Implementations

Creates a Text Cell from a simple &str

Warning

If the given &str contains ASCII escape sequences, they will mess with the generated layout. Use a Box<dyn Unstyle> like AsciiEscapedString.

Is it a number ?

Returns the unstylable content if it is a Text Variant, None otherwise

Returns the string representation of a number, None if it is a Text Variant

Same as to_string but formatted with a precision

Number of digits after the dot in a float, 0 otherwise

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.