pub struct ConfigurationBuilder { /* private fields */ }
Expand description
Formatting configuration builder.
Example
use dprint_plugin_sql::configuration::*;
let config = ConfigurationBuilder::new()
.uppercase(true)
.build();
Implementations§
source§impl ConfigurationBuilder
impl ConfigurationBuilder
sourcepub fn new() -> ConfigurationBuilder
pub fn new() -> ConfigurationBuilder
Constructs a new configuration builder.
sourcepub fn build(&self) -> Configuration
pub fn build(&self) -> Configuration
Gets the final configuration that can be used to format a file.
sourcepub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self
pub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self
Set the global configuration.
sourcepub fn use_tabs(&mut self, value: bool) -> &mut Self
pub fn use_tabs(&mut self, value: bool) -> &mut Self
Whether to use tabs (true) or spaces (false).
Default: false
sourcepub fn indent_width(&mut self, value: u8) -> &mut Self
pub fn indent_width(&mut self, value: u8) -> &mut Self
The number of columns for an indent.
Default: 4
sourcepub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self
pub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self
The kind of newline to use.
Default: NewLineKind::LineFeed
sourcepub fn uppercase(&mut self, value: bool) -> &mut Self
pub fn uppercase(&mut self, value: bool) -> &mut Self
Use ALL CAPS for reserved words.
Default: false
sourcepub fn lines_between_queries(&mut self, value: u8) -> &mut Self
pub fn lines_between_queries(&mut self, value: u8) -> &mut Self
Number of line breaks between queries.
Default: 1
Auto Trait Implementations§
impl RefUnwindSafe for ConfigurationBuilder
impl Send for ConfigurationBuilder
impl Sync for ConfigurationBuilder
impl Unpin for ConfigurationBuilder
impl UnwindSafe for ConfigurationBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more