fn build_header_wide(cols: usize, op: &str, name: &str, status: &[impl AsRef<str>]) -> Table {
    let mut name_table =
        table!([" Name: ", format!("{:1$}", textwrap::fill(name.as_ref(), cols - 46), cols - 46),]);

    name_table.set_format(format_none());

    let mut header = table!([
        format!(
            "Operation: {:15}",
            if op.starts_with("Unimplemented(") {
                Red.bold().paint(op)
            } else {
                Blue.bold().paint(op)
            },
        ),
        name_table,
    ]);
    header.set_format(format_only_columns());

    let mut t = table![[header]];
    if status.len() > 0 {
        let status = pt::Row::new(
            status
                .iter()
                .map(|s| pt::Cell::new_align(s.as_ref(), pt::format::Alignment::CENTER))
                .collect(),
        );
        t.add_row(status);
    }
    t
}
/// Builds a box header conntaining the operation and name on one line, and a list
/// of status messages on the other.
Builds a box header conntaining the operation and name on one line, and a list
of status messages on the other.
Builds a box header conntaining the operation and name on one line and a list of status messages on the other .
fn build_header_wide(cols: usize, op: &str, name: &str, status: &[impl AsRef<str>]) -> Table {
    let mut name_table =
        table!([" Name: ", format!("{:1$}", textwrap::fill(name.as_ref(), cols - 46), cols - 46),]);
    name_table.set_format(format_none());
    let mut header = table!([
        format!(
            "Operation: {:15}",
            if op.starts_with("Unimplemented(") {
                Red.bold().paint(op)
            } else {
                Blue.bold().paint(op)
            },
        ),
        name_table,
    ]);
    header.set_format(format_only_columns());
    let mut t = table![[header]];
    if status.len() > 0 {
        let status = pt::Row::new(
            status
                .iter()
                .map(|s| pt::Cell::new_align(s.as_ref(), pt::format::Alignment::CENTER))
                .collect(),
        );
        t.add_row(status);
    }
    t
}
fn build_header_wide ( cols : usize , op : & str , name : & str , status : & [ impl AsRef < str > ] ) -> Table { let mut name_table = table ! ( [ " " format ( " " textwrap fill ( name as_ref ( ) cols 46 ) cols 46 ) ] ) ; name_table . set_format ( format_none ( ) ) ; let mut header = table ! ( [ format ( " " if op starts_with ( " " ) { Red bold ( ) paint ( op ) } else { Blue bold ( ) paint ( op ) } ) name_table ] ) ; header . set_format ( format_only_columns ( ) ) ; let mut t = table ! [ [ header ] ] ; if status . len ( ) > 0 { let status = pt :: Row :: new ( status . iter ( ) . map ( | s | pt :: Cell :: new_align ( s . as_ref ( ) , pt :: format :: Alignment :: CENTER ) ) . collect ( ) , ) ; t . add_row ( status ) ; } t }
Builds a box header conntaining the operation and name on one line, and a list
of status messages on the other.
Builds a box header conntaining the operation and name on one line and a list of status messages on the other .
cols
usize
op
&str
name
&str
status
&[impl AsRef<str>]
cols
usize
op
&str
name
&str
status
&[impl AsRef<str>]