pub enum FormatterConfig {
Disabled(bool),
Custom(FormatterOverrides),
}Expand description
Formatter configuration.
Controls auto-formatting of files after edit/write operations. Can disable all formatting, disable specific built-in formatters, or add custom formatters.
Variants§
Disabled(bool)
Set to false to disable all formatters.
Custom(FormatterOverrides)
Custom configuration with overrides.
Implementations§
Source§impl FormatterConfig
impl FormatterConfig
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
Check if this is the default (no overrides).
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Check if formatting is globally disabled.
Sourcepub fn overrides(&self) -> &HashMap<String, FormatterOverride>
pub fn overrides(&self) -> &HashMap<String, FormatterOverride>
Get custom formatter overrides (empty if disabled).
Trait Implementations§
Source§impl Clone for FormatterConfig
impl Clone for FormatterConfig
Source§fn clone(&self) -> FormatterConfig
fn clone(&self) -> FormatterConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 FormatterConfig
impl Debug for FormatterConfig
Source§impl Default for FormatterConfig
impl Default for FormatterConfig
Source§impl<'de> Deserialize<'de> for FormatterConfig
impl<'de> Deserialize<'de> for FormatterConfig
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 Freeze for FormatterConfig
impl RefUnwindSafe for FormatterConfig
impl Send for FormatterConfig
impl Sync for FormatterConfig
impl Unpin for FormatterConfig
impl UnsafeUnpin for FormatterConfig
impl UnwindSafe for FormatterConfig
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