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 more