[−][src]Struct comfy_table::column::Column
The Column struct mainly exists for styling purposes. It's used to determine how much horizontal space each column should get and allows users to manipulate this option. On top of this, the column determines how much padding each cell should get.
Fields
index: usizeThe index of the column
Methods
impl Column[src]
pub fn new(index: usize) -> Self[src]
pub fn set_padding(&mut self, padding: (u16, u16)) -> &mut Self[src]
Set the padding for all cells of this column Padding is provided in the form of (left, right). Default is (1, 1)
pub fn get_max_content_width(&self) -> u16[src]
Get the width in characters of the widest line in this column.
pub fn set_constraint(&mut self, constraint: Constraint) -> &mut Self[src]
Set the constraint for this column. Adding a constraint allows to define some additional styling parameters for columns This can be useful to counter undesired auto-formatting of content in tables.
pub fn get_constraint(&mut self) -> Option<&Constraint>[src]
Get the constraint that is used for this column.
pub fn set_cell_alignment(&mut self, alignment: Option<CellAlignment>)[src]
Set the alignment for content inside of cells for this column If the alignment attribute is set on a cell in this column as well, The cell's alighment value will overwrite the column's setting.
Auto Trait Implementations
impl RefUnwindSafe for Column
impl Send for Column
impl Sync for Column
impl Unpin for Column
impl UnwindSafe for Column
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,