pub trait TableOption<R, C, D> {
    // Required method
    fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D);

    // Provided method
    fn hint_change(&self) -> Option<Entity> { ... }
}
Expand description

A trait which is responsible for configuration of a Table.

Required Methods§

source

fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D)

The function modificaties of records and a grid configuration.

Provided Methods§

source

fn hint_change(&self) -> Option<Entity>

A hint whether an TableOption is going to change table layout.

Return None if no changes are being done. Otherwise return:

  • Entity::Global - a grand layout changed. (a change which MIGHT require height/width update)
  • Entity::Row - a certain row was changed. (a change which MIGHT require height update)
  • Entity::Column - a certain column was changed. (a change which MIGHT require width update)
  • Entity::Cell - a certain cell was changed. (a local change, no width/height update)

By default it’s considered to be a grand change.

This methods primarily is used as an optimization, to not make unnessary calculations if they’re not needed, after using the TableOption.

Implementations on Foreign Types§

source§

impl<T, R, C, D> TableOption<R, C, D> for &[T]
where for<'a> &'a T: TableOption<R, C, D>,

source§

fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D)

source§

impl<T, R, D, C> TableOption<R, C, D> for Vec<T>
where T: TableOption<R, C, D>,

Available on crate feature std only.
source§

fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D)

Implementors§

source§

impl TableOption<VecRecords<CellInfo<String>>, ColoredConfig, CompleteDimensionVecRecords<'_>> for ColumnNames

Available on crate feature std only.
source§

impl<Data, D, T, B, L, R> TableOption<Data, ColoredConfig, D> for BorderColor<T, B, L, R>
where Data: Records + ExactRecords,

Available on crate feature std only.
source§

impl<Dst, Src, R, D, C> TableOption<R, C, D> for Dup<Dst, Src>

Available on crate feature std only.
source§

impl<F, R, D, C> TableOption<R, C, D> for FormatConfig<F>
where F: FnMut(&mut C),

Available on crate feature std only.
source§

impl<F, R, D, C> TableOption<R, C, D> for FormatContent<F>

Available on crate feature std only.
source§

impl<F, R, D, C> TableOption<R, C, D> for FormatContentPositioned<F>

Available on crate feature std only.
source§

impl<L, R, D, C> TableOption<R, C, D> for Disable<L, TargetColumn>
where L: Location<R, Coordinate = usize>, R: Records + Resizable,

Available on crate feature std only.
source§

impl<L, R, D, C> TableOption<R, C, D> for Disable<L, TargetRow>
where L: Location<R, Coordinate = usize>, R: ExactRecords + Resizable,

Available on crate feature std only.
source§

impl<O, M, R, D, C> TableOption<R, C, D> for ModifyList<O, M>
where O: Object<R>, M: CellOption<R, C> + Clone, R: Records + ExactRecords,

Available on crate feature std only.
source§

impl<O, R, D> TableOption<R, ColoredConfig, D> for Highlight<O>
where O: Object<R>, R: Records + ExactRecords,

Available on crate feature std only.
source§

impl<R, C> TableOption<R, C, CompleteDimensionVecRecords<'_>> for HeightList
where R: ExactRecords + Records,

Available on crate feature std only.
source§

impl<R, C> TableOption<R, C, CompleteDimensionVecRecords<'_>> for WidthList
where R: Records,

Available on crate feature std only.
source§

impl<R, C> TableOption<R, C, PoolTableDimension> for PoolTableDimension

Available on crate feature std only.
source§

impl<R, C, RR, D, Cfg> TableOption<RR, Cfg, D> for Extract<R, C>

source§

impl<R, D> TableOption<R, ColoredConfig, D> for &SpannedConfig

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for AlignmentStrategy

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for TrimStrategy

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Borders<char>

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for ColoredConfig

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for CompactConfig

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for SpannedConfig

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Justification

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for MergeDuplicatesHorizontal

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for MergeDuplicatesVertical

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Alignment

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Color

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Shadow

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for BorderSpanCorrection
where R: Records + ExactRecords,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<Column>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<FirstColumn>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<FirstRow>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<LastColumn>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<LastRow>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for LineText<Row>
where R: Records + ExactRecords, for<'a> &'a R: Records, for<'a> D: Estimate<&'a R, ColoredConfig> + Dimension,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Colorization
where R: Records + ExactRecords,

Available on crate feature std only.
source§

impl<R, D> TableOption<R, ColoredConfig, D> for Theme

Available on crate feature std only.
source§

impl<R, D> TableOption<R, CompactConfig, D> for Borders<char>

source§

impl<R, D> TableOption<R, CompactConfig, D> for CompactConfig

source§

impl<R, D> TableOption<R, CompactConfig, D> for Alignment

source§

impl<R, D> TableOption<R, CompactConfig, D> for Theme

Available on crate feature std only.
source§

impl<R, D> TableOption<R, CompactMultilineConfig, D> for AlignmentStrategy

Available on crate feature std only.
source§

impl<R, D> TableOption<R, CompactMultilineConfig, D> for Borders<char>

source§

impl<R, D> TableOption<R, CompactMultilineConfig, D> for CompactMultilineConfig

Available on crate feature std only.
source§

impl<R, D> TableOption<R, CompactMultilineConfig, D> for Alignment

source§

impl<R, D> TableOption<R, CompactMultilineConfig, D> for Theme

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, ColoredConfig, D> for Margin<C>
where C: Into<ANSIBuf> + Clone,

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, ColoredConfig, D> for Padding<C>
where C: Into<ANSIBuf> + Clone,

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, CompactConfig, D> for Margin<C>
where C: Into<ANSIStr<'static>> + Clone,

source§

impl<R, D, C> TableOption<R, CompactConfig, D> for Padding<C>
where C: Into<ANSIStr<'static>> + Clone,

source§

impl<R, D, C> TableOption<R, CompactMultilineConfig, D> for Margin<C>
where C: Into<ANSIStr<'static>> + Clone,

source§

impl<R, D, C> TableOption<R, CompactMultilineConfig, D> for Padding<C>
where C: Into<ANSIStr<'static>> + Clone,

source§

impl<R, D, C> TableOption<R, C, D> for Rotate

source§

impl<R, D, C> TableOption<R, C, D> for CleanCharset

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, C, D> for TabSize

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, C, D> for Split

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, C, D> for Concat

Available on crate feature std only.
source§

impl<R, D, C> TableOption<R, C, D> for EmptySettings

source§

impl<R, D, C> TableOption<R, C, D> for Reverse

source§

impl<R, D, C, A, B> TableOption<R, C, D> for Settings<A, B>
where A: TableOption<R, C, D>, B: TableOption<R, C, D>,

source§

impl<R, D, O> TableOption<R, ColoredConfig, D> for ExactColorization<O>
where O: Object<R>,

Available on crate feature std only.
source§

impl<R, D, W> TableOption<R, ColoredConfig, D> for Justify<W>

Available on crate feature std only.
source§

impl<R, W> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for CellHeightIncrease<W>

Available on crate feature std only.
source§

impl<R, W> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for CellHeightLimit<W>

Available on crate feature std only.
source§

impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for TableHeightIncrease<W, P>

Available on crate feature std only.
source§

impl<R, W, P> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for TableHeightLimit<W, P>

Available on crate feature std only.
source§

impl<S, R, D> TableOption<R, ColoredConfig, D> for Footer<S>

Available on crate feature std only.
source§

impl<S, R, D> TableOption<R, ColoredConfig, D> for Header<S>

Available on crate feature std only.
source§

impl<S, R, D> TableOption<R, ColoredConfig, D> for HorizontalPanel<S>

Available on crate feature std only.
source§

impl<S, R, D> TableOption<R, ColoredConfig, D> for VerticalPanel<S>

Available on crate feature std only.
source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, ColoredConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

Available on crate feature std only.
source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

source§

impl<T, B, L, R, H, V, Data, Dims, const HSIZE: usize, const VSIZE: usize> TableOption<Data, CompactMultilineConfig, Dims> for Style<T, B, L, R, H, V, HSIZE, VSIZE>

source§

impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for MinWidth<W, P>

Available on crate feature std only.
source§

impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for Truncate<'_, W, P>

Available on crate feature std only.
source§

impl<W, P, R> TableOption<R, ColoredConfig, CompleteDimensionVecRecords<'_>> for Wrap<W, P>

Available on crate feature std only.