Struct term_grid::Cell [] [src]

pub struct Cell {
    pub contents: String,
    pub width: Width,
}

A Cell is the combination of a string and its pre-computed length.

The easiest way to create a Cell is just by using string.into(), which uses the unicode width of the string (see the unicode_width crate). However, the fields are public, if you wish to provide your own length.

Fields

The string to display when this cell gets rendered.

The pre-computed length of the string.

Trait Implementations

impl PartialEq for Cell
[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 Debug for Cell
[src]

[src]

Formats the value using the given formatter. Read more

impl From<String> for Cell
[src]

[src]

Performs the conversion.

impl<'a> From<&'a str> for Cell
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Cell

impl Sync for Cell