[][src]Struct dprint_plugin_markdown::configuration::ConfigurationBuilder

pub struct ConfigurationBuilder { /* fields omitted */ }

Markdown formatting configuration builder.

Example

use dprint_plugin_markdown::configuration::*;

let config = ConfigurationBuilder::new()
    .line_width(80)
    .build();

Methods

impl ConfigurationBuilder[src]

pub fn new() -> ConfigurationBuilder[src]

Constructs a new configuration builder.

pub fn build(&self) -> Configuration[src]

Gets the final configuration that can be used to format a file.

pub fn global_config(&mut self, global_config: GlobalConfiguration) -> &mut Self[src]

Set the global configuration.

pub fn line_width(&mut self, value: u32) -> &mut Self[src]

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

pub fn use_tabs(&mut self, value: bool) -> &mut Self[src]

Whether to use tabs (true) or spaces (false). Default: false

pub fn indent_width(&mut self, value: u8) -> &mut Self[src]

The number of columns for an indent. Default: 4

pub fn new_line_kind(&mut self, value: NewLineKind) -> &mut Self[src]

The kind of newline to use. Default: NewLineKind::Auto

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.