Enum comfy_table::ColumnConstraint[][src]

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 break your table, if the column’s content is overly long.

Absolute

Enforce a absolute width for a column.

Tuple Fields of Absolute

0: Width
LowerBoundary

Specify a lower boundary, either fixed or as percentage of the total width.

Tuple Fields of LowerBoundary

0: Width
UpperBoundary

Specify a upper boundary, either fixed or as percentage of the total width.

Tuple Fields of UpperBoundary

0: Width
Boundaries

Specify both, an upper and a lower boundary.

Fields of Boundaries

lower: Widthupper: Width

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.