1 | use crate::settings::TableOption; |
---|---|
2 | |
3 | /// This is a struct wrapper for a lambda which changes config. |
4 | #[derive(Debug)] |
5 | pub struct FormatConfig<F>(pub(crate) F); |
6 | |
7 | impl<F, R, D, C> TableOption<R, D, C> for FormatConfig<F> |
8 | where |
9 | F: FnMut(&mut C), |
10 | { |
11 | fn change(mut self, _: &mut R, cfg: &mut C, _: &mut D) { |
12 | (self.0)(cfg); |
13 | } |
14 | } |
15 |