DefaultTableStyle

Trait DefaultTableStyle 

Source
pub trait DefaultTableStyle<const N: usize> {
    // Required method
    fn default_table_style() -> [Column<'static>; N];
}
Expand description

Indicates that this type has a “default column style” so columns can be auto-generated for a TableFormatter. This trait may be derived using #[derive(DefaultTableStyle)] if column style customization is unnecessary.

This trait is automatically implemented for arrays and tuples.

Required Methods§

Source

fn default_table_style() -> [Column<'static>; N]

Generates an array of Columns that indicate the default/preferred column format for this type. It may, for example, make column titles match with a type’s field names, or right-align numbers while left-aligning other data, etc.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<A> DefaultTableStyle<1> for (A,)

Source§

impl<A, B> DefaultTableStyle<2> for (A, B)

Source§

impl<A, B, C> DefaultTableStyle<3> for (A, B, C)

Source§

impl<A, B, C, D> DefaultTableStyle<4> for (A, B, C, D)

Source§

impl<A, B, C, D, E> DefaultTableStyle<5> for (A, B, C, D, E)

Source§

impl<A, B, C, D, E, F> DefaultTableStyle<6> for (A, B, C, D, E, F)

Source§

impl<A, B, C, D, E, F, G> DefaultTableStyle<7> for (A, B, C, D, E, F, G)

Source§

impl<A, B, C, D, E, F, G, H> DefaultTableStyle<8> for (A, B, C, D, E, F, G, H)

Source§

impl<A, B, C, D, E, F, G, H, I> DefaultTableStyle<9> for (A, B, C, D, E, F, G, H, I)

Source§

impl<A, B, C, D, E, F, G, H, I, J> DefaultTableStyle<10> for (A, B, C, D, E, F, G, H, I, J)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> DefaultTableStyle<11> for (A, B, C, D, E, F, G, H, I, J, K)

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> DefaultTableStyle<12> for (A, B, C, D, E, F, G, H, I, J, K, L)

Source§

impl<T, const N: usize> DefaultTableStyle<N> for [T; N]

Implementors§