pub struct Config {
pub tab_spaces: usize,
pub max_width: usize,
pub blank_lines_upper_bound: usize,
pub reorder_import_items: bool,
pub wrap_text: bool,
}
Expand description
Configuration Options for Typstyle Printer.
Fields§
§tab_spaces: usize
Number of spaces per tab
max_width: usize
Maximum width of each line.
blank_lines_upper_bound: usize
Maximum number of blank lines which can be put between items.
reorder_import_items: bool
Whether to reorder import items. When enabled, import items will be sorted alphabetically.
wrap_text: bool
Whether to wrap texts in the markup.
Implementations§
Source§impl Config
impl Config
pub fn new() -> Self
pub fn with_width(self, max_width: usize) -> Self
pub fn with_tab_spaces(self, tab_spaces: usize) -> Self
pub fn chain_width(&self) -> usize
pub fn with_wrap_text(self, wrap_text: bool) -> Self
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
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
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.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more