Struct stylua_lib::Config
source · [−]pub struct Config { /* private fields */ }
Expand description
The configuration to use when formatting.
Implementations
sourceimpl Config
impl Config
sourcepub fn with_column_width(self, column_width: usize) -> Self
pub fn with_column_width(self, column_width: usize) -> Self
Returns a new config with the given column width
sourcepub fn with_line_endings(self, line_endings: LineEndings) -> Self
pub fn with_line_endings(self, line_endings: LineEndings) -> Self
Returns a new config with the given line endings
sourcepub fn with_indent_type(self, indent_type: IndentType) -> Self
pub fn with_indent_type(self, indent_type: IndentType) -> Self
Returns a new config with the given indent type
sourcepub fn with_indent_width(self, indent_width: usize) -> Self
pub fn with_indent_width(self, indent_width: usize) -> Self
Returns a new config with the given indent width
sourcepub fn with_quote_style(self, quote_style: QuoteStyle) -> Self
pub fn with_quote_style(self, quote_style: QuoteStyle) -> Self
Returns a new config with the given quote style
sourcepub fn with_no_call_parentheses(self, no_call_parentheses: bool) -> Self
pub fn with_no_call_parentheses(self, no_call_parentheses: bool) -> Self
Returns a new config with the given value for [no_call_parentheses
]
sourcepub fn with_call_parentheses(self, call_parentheses: CallParenType) -> Self
pub fn with_call_parentheses(self, call_parentheses: CallParenType) -> Self
Returns a new config with the given call parentheses type
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Config where
Config: Default,
impl<'de> Deserialize<'de> for Config where
Config: Default,
sourcefn 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
impl Copy for Config
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more