Skip to content

v6.0.0

Choose a tag to compare

@Nukesor Nukesor released this 26 Sep 12:21
· 309 commits to main since this release
c32a346

Added

  • Add Table::style_text_only(), which prevents non-delimiter whitespaces in cells to be styled.
  • Add the Table::discover_columns function and add info on when to use it to Row::add_cell.

Breaking Changes

  • Renaming of several functions to be Rust idiomatic:
    • Cell::get_content -> Cell::content
    • Column::get_padding_width -> Column::padding_width
    • Column::get_constraint -> Column::constraint
    • Table::get_header -> Table::header
    • Table::get_table_width -> Table::width
    • Table::set_table_width -> Table::set_width
    • Table::set_style -> Table::style
    • Table::get_column -> Table::column
    • Table::get_column_mut -> Table::column_mut
    • Table::get_row -> Table::row
    • Table::get_row_mut -> Table::row_mut
  • Column::get_max_width and Column::get_max_content_width have been removed as we cannot guarantee that these numbers are always correct.
    Use Table::column_max_content_widths instead

Changed

  • Table::column_max_content_widths now performs a full scan of the table's content when called.
  • Don't include Table::is_tty, Table::force_no_tty and Table::should_style if tty feature isn't enabled.