pub struct FormattingConfigBuilder { /* private fields */ }Expand description
Builder for creating formatting configurations
Implementations§
Source§impl FormattingConfigBuilder
impl FormattingConfigBuilder
Sourcepub fn new() -> FormattingConfigBuilder
pub fn new() -> FormattingConfigBuilder
Create a new configuration builder
Sourcepub fn check_rustfmt(self, enable: bool) -> FormattingConfigBuilder
pub fn check_rustfmt(self, enable: bool) -> FormattingConfigBuilder
Enable or disable rustfmt checking
Sourcepub fn check_clippy(self, enable: bool) -> FormattingConfigBuilder
pub fn check_clippy(self, enable: bool) -> FormattingConfigBuilder
Enable or disable clippy checking
Sourcepub fn clippy_lints(self, lints: Vec<String>) -> FormattingConfigBuilder
pub fn clippy_lints(self, lints: Vec<String>) -> FormattingConfigBuilder
Add custom clippy lints
Sourcepub fn max_line_length(self, length: usize) -> FormattingConfigBuilder
pub fn max_line_length(self, length: usize) -> FormattingConfigBuilder
Set maximum line length
Sourcepub fn require_docs(self, require: bool) -> FormattingConfigBuilder
pub fn require_docs(self, require: bool) -> FormattingConfigBuilder
Enable or disable documentation requirements
Sourcepub fn ml_rules(self, rules: MLFormattingRules) -> FormattingConfigBuilder
pub fn ml_rules(self, rules: MLFormattingRules) -> FormattingConfigBuilder
Set ML-specific formatting rules
Sourcepub fn build(self) -> FormattingConfig
pub fn build(self) -> FormattingConfig
Build the configuration
Trait Implementations§
Source§impl Default for FormattingConfigBuilder
impl Default for FormattingConfigBuilder
Source§fn default() -> FormattingConfigBuilder
fn default() -> FormattingConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FormattingConfigBuilder
impl RefUnwindSafe for FormattingConfigBuilder
impl Send for FormattingConfigBuilder
impl Sync for FormattingConfigBuilder
impl Unpin for FormattingConfigBuilder
impl UnwindSafe for FormattingConfigBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more