tabled 0.20.0

An easy to use library for pretty print tables of Rust `struct`s and `enum`s.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crate::settings::TableOption;

/// This is a struct wrapper for a lambda which changes config.
#[derive(Debug)]
pub struct FormatConfig<F>(pub(crate) F);

impl<F, R, D, C> TableOption<R, C, D> for FormatConfig<F>
where
    F: FnMut(&mut C),
{
    fn change(mut self, _: &mut R, cfg: &mut C, _: &mut D) {
        (self.0)(cfg);
    }
}