pub struct FormatConfig {
pub max_width: usize,
pub indent_width: usize,
pub use_tabs: bool,
pub trailing_comma: TrailingComma,
pub newline: NewlineStyle,
}Expand description
Configuration options for the Eure formatter.
Fields§
§max_width: usizeMaximum line width (guideline, not strict limit). Default: 100
indent_width: usizeNumber of spaces per indentation level. Default: 2
use_tabs: boolUse tabs instead of spaces for indentation. Default: false
trailing_comma: TrailingCommaTrailing comma policy for multiline arrays/objects. Default: TrailingComma::Always
newline: NewlineStyleNewline style. Default: NewlineStyle::Lf
Implementations§
Source§impl FormatConfig
impl FormatConfig
Sourcepub fn with_max_width(self, width: usize) -> Self
pub fn with_max_width(self, width: usize) -> Self
Set max width.
Sourcepub fn with_indent_width(self, width: usize) -> Self
pub fn with_indent_width(self, width: usize) -> Self
Set indent width.
Sourcepub fn with_trailing_comma(self, policy: TrailingComma) -> Self
pub fn with_trailing_comma(self, policy: TrailingComma) -> Self
Set trailing comma policy.
Sourcepub fn with_newline(self, style: NewlineStyle) -> Self
pub fn with_newline(self, style: NewlineStyle) -> Self
Set newline style.
Trait Implementations§
Source§impl Clone for FormatConfig
impl Clone for FormatConfig
Source§fn clone(&self) -> FormatConfig
fn clone(&self) -> FormatConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FormatConfig
impl Debug for FormatConfig
Source§impl Default for FormatConfig
impl Default for FormatConfig
impl Eq for FormatConfig
Source§impl PartialEq for FormatConfig
impl PartialEq for FormatConfig
impl StructuralPartialEq for FormatConfig
Auto Trait Implementations§
impl Freeze for FormatConfig
impl RefUnwindSafe for FormatConfig
impl Send for FormatConfig
impl Sync for FormatConfig
impl Unpin for FormatConfig
impl UnsafeUnpin for FormatConfig
impl UnwindSafe for FormatConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.