summaryrefslogtreecommitdiffstats
path: root/src/format.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/format.rs')
-rw-r--r--src/format.rs33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/format.rs b/src/format.rs
index 45405ca..4dec4fa 100644
--- a/src/format.rs
+++ b/src/format.rs
@@ -530,5 +530,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();
}
}