pub struct ConfigurationBuilder { /* private fields */ }
Expand description
Formatting configuration builder.
§Example
use dprint_plugin_dockerfile::configuration::*;
let config = ConfigurationBuilder::new()
.line_width(80)
.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 line_width(&mut self, value: u32) -> &mut Self
pub fn line_width(&mut self, value: u32) -> &mut Self
The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases. Default: 120
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
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