pub fn quick_column<C, D, F>(
        painter: &dyn PaintAs<D, C>, header: &str, values: &[C],
        width: usize, mut show: F,
    ) -> Columns
    where
        C: PartialOrd,
        F: FnMut(&C) -> D,
        D: fmt::Display,
    { Columns {
        header: format!("{:^width$}", header, width = width),
        entries: values.iter().map(|x| format!("{}", painter.paint_as(x, show(x)))).collect(),
    }}
/// Factors out logic common between the majority of columns.
///
/// Values are string-formatted by some mapping function, and optionally colorized
/// according to the magnitude of their value.
Factors out logic common between the majority of columns.
Values are string-formatted by some mapping function, and optionally colorized
according to the magnitude of their value.
Factors out logic common between the majority of columns . Values are string - formatted by some mapping function and optionally colorized according to the magnitude of their value .
pub fn quick_column<C, D, F>(
        painter: &dyn PaintAs<D, C>, header: &str, values: &[C],
        width: usize, mut show: F,
    ) -> Columns
    where
        C: PartialOrd,
        F: FnMut(&C) -> D,
        D: fmt::Display,
    { Columns {
        header: format!("{:^width$}", header, width = width),
        entries: values.iter().map(|x| format!("{}", painter.paint_as(x, show(x)))).collect(),
    }}
pub fn quick_column < C , D , F > ( painter : & dyn PaintAs < D , C > , header : & str , values : & [ C ] , width : usize , mut show : F , ) -> Columns where C : PartialOrd , F : FnMut ( & C ) -> D , D : fmt :: Display , { Columns { header : format ! ( " " header width width ) , entries : values . iter ( ) . map ( | x | format ! ( " " painter paint_as ( x show ( x ) ) ) ) . collect ( ) , } }
Factors out logic common between the majority of columns.
Factors out logic common between the majority of columns .
painter
&dyn PaintAs<D, C>
header
&str
values
&[C]
width
usize
show
F
painter
&dyn PaintAs<D, C>
header
&str
values
&[C]
width
usize
show
F