Struct comfy_table::Cell [−][src]
pub struct Cell { /* fields omitted */ }Expand description
A stylable table cell with content.
Implementations
Return a copy of the content contained in this cell.
Set the delimiter used to split text for this cell.
Normal text uses spaces ( ) as delimiters. This is necessary to help comfy-table
understand the concept of words.
Set the alignment of content for this cell.
Setting this overwrites alignment settings of the Column for this specific cell.
use comfy_table::CellAlignment;
use comfy_table::Cell;
let mut cell = Cell::new("Some content")
.set_alignment(CellAlignment::Center);Set the foreground text color for this cell.
comfy-table uses Crossterm Colors. Look at their documentation for all possible Colors.
use comfy_table::Color;
use comfy_table::Cell;
let mut cell = Cell::new("Some content")
.fg(Color::Red);Set the background color for this cell.
comfy-table uses Crossterm Colors. Look at their documentation for all possible Colors.
use comfy_table::Color;
use comfy_table::Cell;
let mut cell = Cell::new("Some content")
.bg(Color::Red);Add a styling attribute to the content cell.
Those can be bold, italic, blinking and many more.
comfy-table uses Crossterm Attributes. Look at their documentation for all possible Attributes.
use comfy_table::Attribute;
use comfy_table::Cell;
let mut cell = Cell::new("Some content")
.add_attribute(Attribute::Bold);Same as add_attribute, but you can pass a vector of Attributes
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Cell
impl UnwindSafe for Cell
Blanket Implementations
Mutably borrows from an owned value. Read more