From 47ae8e135b347df62b67a4b50210109fdea2d697 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 12 May 2024 20:19:57 +0200 Subject: [PATCH] feat: add setters for FormatOptions --- src/format.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/format.rs b/src/format.rs index f756b1b..9180f65 100644 --- a/src/format.rs +++ b/src/format.rs @@ -123,6 +123,11 @@ impl FormatOptions { self.numbers = numbers; } + /// set padding manually + pub fn set_padding(&mut self, value: bool) { + self.padding = value + } + /// get padding pub fn padding(&self) -> bool { self.padding @@ -132,6 +137,11 @@ impl FormatOptions { pub fn prefix(&self) -> bool { self.prefix } + + /// set prefix manually + pub fn set_prefix(&mut self, value: bool) { + self.prefix = value; + } } impl Default for FormatOptions {