Enum comfy_table::ColumnConstraint
source · pub enum ColumnConstraint {
Hidden,
ContentWidth,
Absolute(Width),
LowerBoundary(Width),
UpperBoundary(Width),
Boundaries {
lower: Width,
upper: Width,
},
}
Expand description
A Constraint can be added to a columns.
They allow some control over Column widths as well as the dynamic arrangement process.
All percental boundaries will be ignored, if:
- you aren’t using one of ContentArrangement::{Dynamic, DynamicFullWidth}
- the width of the table/terminal cannot be determined.
Variants§
Hidden
This will completely hide a column.
ContentWidth
Force the column to be as long as it’s content. Use with caution! This can easily mess up your table formatting, if a column’s content is overly long.
Absolute(Width)
Enforce a absolute width for a column.
LowerBoundary(Width)
Specify a lower boundary, either fixed or as percentage of the total width.
UpperBoundary(Width)
Specify a upper boundary, either fixed or as percentage of the total width.
Boundaries
Specify both, an upper and a lower boundary.
Trait Implementations§
source§impl Clone for ColumnConstraint
impl Clone for ColumnConstraint
source§fn clone(&self) -> ColumnConstraint
fn clone(&self) -> ColumnConstraint
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ColumnConstraint
impl Debug for ColumnConstraint
source§impl PartialEq<ColumnConstraint> for ColumnConstraint
impl PartialEq<ColumnConstraint> for ColumnConstraint
source§fn eq(&self, other: &ColumnConstraint) -> bool
fn eq(&self, other: &ColumnConstraint) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ColumnConstraint
impl Eq for ColumnConstraint
impl StructuralEq for ColumnConstraint
impl StructuralPartialEq for ColumnConstraint
Auto Trait Implementations§
impl RefUnwindSafe for ColumnConstraint
impl Send for ColumnConstraint
impl Sync for ColumnConstraint
impl Unpin for ColumnConstraint
impl UnwindSafe for ColumnConstraint
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