/// A trait which is responsible for configuration of a [`Table`]. /// /// [`Table`]: crate::Table pub trait TableOption { /// The function allows modification of records and a grid configuration. fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D); } impl TableOption for &[T] where for<'a> &'a T: TableOption, { fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D) { for opt in self { opt.change(records, cfg, dimension) } } } #[cfg(feature = "std")] impl TableOption for Vec where T: TableOption, { fn change(self, records: &mut R, cfg: &mut C, dimension: &mut D) { for opt in self { opt.change(records, cfg, dimension) } } }