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 column_width(&self) -> usize
pub fn column_width(&self) -> usize
Returns the current configured column width
sourcepub fn line_endings(&self) -> LineEndings
pub fn line_endings(&self) -> LineEndings
Returns the current configured line endings
sourcepub fn indent_type(&self) -> IndentType
pub fn indent_type(&self) -> IndentType
Returns the current configured indent type
sourcepub fn indent_width(&self) -> usize
pub fn indent_width(&self) -> usize
Returns the current configured indent width
sourcepub fn quote_style(&self) -> QuoteStyle
pub fn quote_style(&self) -> QuoteStyle
Returns the current configured quote style
sourcepub fn call_parentheses(&self) -> CallParenType
pub fn call_parentheses(&self) -> CallParenType
Returns the current configured call parentheses style
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 · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more