feat: add setters for FormatOptions
cargo devel CI / cargo CI (push) Has been cancelled Details

This commit is contained in:
Christoph J. Scherr 2024-05-12 20:19:57 +02:00
parent 8b419048ef
commit 47ae8e135b
1 changed files with 10 additions and 0 deletions

View File

@ -123,6 +123,11 @@ impl FormatOptions {
self.numbers = numbers; self.numbers = numbers;
} }
/// set padding manually
pub fn set_padding(&mut self, value: bool) {
self.padding = value
}
/// get padding /// get padding
pub fn padding(&self) -> bool { pub fn padding(&self) -> bool {
self.padding self.padding
@ -132,6 +137,11 @@ impl FormatOptions {
pub fn prefix(&self) -> bool { pub fn prefix(&self) -> bool {
self.prefix self.prefix
} }
/// set prefix manually
pub fn set_prefix(&mut self, value: bool) {
self.prefix = value;
}
} }
impl Default for FormatOptions { impl Default for FormatOptions {