pub struct Config {
pub max_width: usize,
pub max_inline_level: usize,
pub normalize_comments: NormalizeComments,
pub wrap_comments: bool,
pub preserve_empty_lines: PreserveEmptyLines,
pub inherit: bool,
pub line_ending: LineEnding,
pub indent: usize,
pub hard_tab: bool,
}
Expand description
Configuration for rsnfmt
Fields§
§max_width: usize
Max line width
max_inline_level: usize
Max level of inline nesting
normalize_comments: NormalizeComments
Normalize all comments to a specific format
wrap_comments: bool
Wrap comments longer than max_width
preserve_empty_lines: PreserveEmptyLines
Should formatting preserve empty lines
inherit: bool
Inherit parent/global configuration
line_ending: LineEnding
Line ending
indent: usize
Indentation width
hard_tab: bool
Use \t
to indent
Trait Implementations§
source§impl<'de> Deserialize<'de> for Configwhere
Config: Default,
impl<'de> Deserialize<'de> for Configwhere Config: Default,
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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