diff options
author | Pierre-Henri Symoneaux <phsym@users.noreply.github.com> | 2018-08-09 17:14:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-09 17:14:09 +0200 |
commit | f7289e77802545e3699b0da45c56f89c8556354b (patch) | |
tree | 6827feb12146395b2177609d4441168bba24503d | |
parent | d4943f23488c181888a627dffb27df7bf96f6dc0 (diff) | |
parent | f954041e04a033c6f845779e60efa5bd4a35029f (diff) |
Merge pull request #80 from liautaud/separate-border-styling
Added the possibility to style the left and right border separately.
-rw-r--r-- | src/format.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/format.rs b/src/format.rs index 25f07ea..2f4b4a0 100644 --- a/src/format.rs +++ b/src/format.rs @@ -176,6 +176,16 @@ impl TableFormat { self.rborder = Some(border); } + /// Set the character used for left table border + pub fn left_border(&mut self, border: char) { + self.lborder = Some(border); + } + + /// Set the character used for right table border + pub fn right_border(&mut self, border: char) { + self.rborder = Some(border); + } + /// Set a line separator pub fn separator(&mut self, what: LinePosition, separator: LineSeparator) { *match what { @@ -295,6 +305,18 @@ impl FormatBuilder { self } + /// Set the character used for left table border + pub fn left_border(mut self, border: char) -> Self { + self.format.left_border(border); + self + } + + /// Set the character used for right table border + pub fn right_border(mut self, border: char) -> Self { + self.format.right_border(border); + self + } + /// Set a line separator format pub fn separator(mut self, what: LinePosition, separator: LineSeparator) -> Self { self.format.separator(what, separator); |