pub struct ConfigurationBuilder { /* private fields */ }Expand description
Formatting configuration builder.
§Example
use dprint_plugin_css::configuration::*;
let config = ConfigurationBuilder::new()
.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
Trait Implementations§
Source§impl Default for ConfigurationBuilder
impl Default for ConfigurationBuilder
Source§fn default() -> ConfigurationBuilder
fn default() -> ConfigurationBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConfigurationBuilder
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