pub struct Cell {
pub contents: String,
pub width: Width,
pub alignment: Alignment,
}
Expand description
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§
§contents: String
The string to display when this cell gets rendered.
width: Width
The pre-computed length of the string.
alignment: Alignment
The side (left/right) to align the content if some filling is required.
Trait Implementations§
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnwindSafe for Cell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more