pub struct ConfigurationBuilder { /* private fields */ }Expand description
Markdown formatting configuration builder.
Example
use dprint_plugin_markdown::configuration::*;
let config = ConfigurationBuilder::new()
.line_width(80)
.build();Implementations
sourceimpl ConfigurationBuilder
impl ConfigurationBuilder
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: 80
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 text_wrap(&mut self, value: TextWrap) -> &mut Self
pub fn text_wrap(&mut self, value: TextWrap) -> &mut Self
The kind of text wrapping to use.
Default: TextWrap::Maintain
sourcepub fn emphasis_kind(&mut self, value: EmphasisKind) -> &mut Self
pub fn emphasis_kind(&mut self, value: EmphasisKind) -> &mut Self
The character to use for emphasis/italics.
Default: EmphasisKind::Underscores
sourcepub fn strong_kind(&mut self, value: StrongKind) -> &mut Self
pub fn strong_kind(&mut self, value: StrongKind) -> &mut Self
The character to use for strong emphasis/bold.
Default: StrongKind::Underscores
sourcepub fn ignore_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_directive(&mut self, value: &str) -> &mut Self
The directive used to ignore a line.
Default: dprint-ignore
sourcepub fn ignore_file_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_file_directive(&mut self, value: &str) -> &mut Self
The directive used to ignore a file.
Default: dprint-ignore-file
sourcepub fn ignore_start_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_start_directive(&mut self, value: &str) -> &mut Self
The directive used to mark start of ignored section.
Default: dprint-ignore-start
sourcepub fn ignore_end_directive(&mut self, value: &str) -> &mut Self
pub fn ignore_end_directive(&mut self, value: &str) -> &mut Self
The directive used to mark end of ignored section.
Default: dprint-ignore-end
pub fn deno(&mut self) -> &mut Self
Trait Implementations
sourceimpl Default for ConfigurationBuilder
impl Default for ConfigurationBuilder
sourcefn default() -> ConfigurationBuilder
fn default() -> ConfigurationBuilder
Returns the “default value” for a type. Read more
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more