diff options
author | Pierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com> | 2018-09-24 11:07:01 +0200 |
---|---|---|
committer | Pierre-Henri Symoneaux <pierre.henri.symoneaux@gmail.com> | 2018-09-24 11:07:01 +0200 |
commit | b8fcf15e69db1622e8fc432b2bd1e2f4e199fc45 (patch) | |
tree | a01d0e0d15b7c2124fb101b081426ec0b383050e /src/format.rs | |
parent | 5beefd99dbfc48123d53c1e66fbde49d2589a202 (diff) | |
parent | 94a039ff3959d1459db2dd80518a56a729dc2929 (diff) |
Merge branch 'master' into lines_count
Diffstat (limited to 'src/format.rs')
-rw-r--r-- | src/format.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/format.rs b/src/format.rs index 7cf644e..ddf6713 100644 --- a/src/format.rs +++ b/src/format.rs @@ -522,5 +522,38 @@ pub mod consts { .separator(LinePosition::Title, *MINUS_PLUS_SEP) .column_separator('|') .build(); + + /// A table with borders and delimiters made with box characters + /// + /// # Example + /// ```text + /// ┌────┬────┬────┐ + /// │ t1 │ t2 │ t3 │ + /// ├────┼────┼────┤ + /// │ 1 │ 1 │ 1 │ + /// ├────┼────┼────┤ + /// │ 2 │ 2 │ 2 │ + /// └────┴────┴────┘ + /// ``` + pub static ref FORMAT_BOX_CHARS: TableFormat = FormatBuilder::new() + .column_separator('│') + .borders('│') + .separators(&[LinePosition::Top], + LineSeparator::new('─', + '┬', + '┌', + '┐')) + .separators(&[LinePosition::Intern], + LineSeparator::new('─', + '┼', + '├', + '┤')) + .separators(&[LinePosition::Bottom], + LineSeparator::new('─', + '┴', + '└', + '┘')) + .padding(1, 1) + .build(); } } |