Trait CellOption

Source
pub trait CellOption<R, C> {
    // Required method
    fn change(self, records: &mut R, cfg: &mut C, entity: Entity);

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

A trait for configuring a single cell.

A cell is represented by row and column indexes.

A cell can be targeted by Cell.

Required Methods§

Source

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Modification function of a certail part of a grid targeted by Entity.

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:

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

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

Implementations on Foreign Types§

Source§

impl<'a, R, C> CellOption<R, C> for &'a str
where R: Records + ExactRecords + RecordsMut<&'a str>,

Source§

fn change(self, records: &mut R, _: &mut C, entity: Entity)

Source§

impl<R, C> CellOption<R, C> for &String

Source§

fn change(self, records: &mut R, _: &mut C, entity: Entity)

Source§

impl<R, C> CellOption<R, C> for String

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>> CellOption<R, C> for (T0, T1)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>, T5: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4, T5)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>, T5: CellOption<R, C>, T6: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4, T5, T6)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>, T5: CellOption<R, C>, T6: CellOption<R, C>, T7: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4, T5, T6, T7)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>, T5: CellOption<R, C>, T6: CellOption<R, C>, T7: CellOption<R, C>, T8: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Source§

impl<R, C, T0: CellOption<R, C>, T1: CellOption<R, C>, T2: CellOption<R, C>, T3: CellOption<R, C>, T4: CellOption<R, C>, T5: CellOption<R, C>, T6: CellOption<R, C>, T7: CellOption<R, C>, T8: CellOption<R, C>, T9: CellOption<R, C>> CellOption<R, C> for (T0, T1, T2, T3, T4, T5, T6, T7, T8, T9)

Source§

fn change(self, records: &mut R, cfg: &mut C, entity: Entity)

Source§

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

Implementors§

Source§

impl<Data> CellOption<Data, ColoredConfig> for BorderColor
where Data: Records + ExactRecords,

Source§

impl<F, R, C> CellOption<R, C> for FormatContent<F>

Source§

impl<F, R, C> CellOption<R, C> for FormatContentPositioned<F>

Source§

impl<R> CellOption<R, ColoredConfig> for &Color

Source§

impl<R> CellOption<R, ColoredConfig> for AlignmentStrategy

Source§

impl<R> CellOption<R, ColoredConfig> for TrimStrategy

Source§

impl<R> CellOption<R, ColoredConfig> for PaddingExpand
where R: Records + ExactRecords + PeekableRecords, for<'a> &'a R: Records, for<'a> <<&'a R as Records>::Iter as IntoRecords>::Cell: AsRef<str>,

Source§

impl<R> CellOption<R, ColoredConfig> for tabled::grid::config::Border<char>
where R: Records + ExactRecords,

Source§

impl<R> CellOption<R, ColoredConfig> for Justification

Source§

impl<R> CellOption<R, ColoredConfig> for ColumnSpan

Source§

impl<R> CellOption<R, ColoredConfig> for RowSpan

Source§

impl<R> CellOption<R, ColoredConfig> for Alignment

Source§

impl<R> CellOption<R, ColoredConfig> for Color

Source§

impl<R> CellOption<R, ColoredConfig> for Padding

Source§

impl<R> CellOption<R, ColoredConfig> for LineChar
where R: Records + ExactRecords,

Source§

impl<R, C> CellOption<R, ColoredConfig> for PaddingColor<C>
where C: Into<ANSIBuf> + Clone,

Source§

impl<R, C> CellOption<R, C> for CleanCharset

Source§

impl<R, C> CellOption<R, C> for EmptySettings

Source§

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

Source§

impl<T, B, L, R, Data> CellOption<Data, ColoredConfig> for tabled::settings::style::Border<T, B, L, R>
where Data: Records + ExactRecords,

Source§

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

Source§

impl<W, R> CellOption<R, ColoredConfig> for CellHeightIncrease<W>

Source§

impl<W, R> CellOption<R, ColoredConfig> for CellHeightLimit<W>

Source§

impl<W, R, P> CellOption<R, ColoredConfig> for MinWidth<W, P>

Source§

impl<W, R, P> CellOption<R, ColoredConfig> for Wrap<W, P>