pub struct FmtConfig {
pub width: usize,
pub goal: usize,
pub split_only: bool,
pub crown_margin: bool,
pub tagged: bool,
pub uniform_spacing: bool,
pub prefix: Option<String>,
}Expand description
Configuration for the fmt command.
Fields§
§width: usizeMaximum line width (default 75).
goal: usizeGoal width for line filling (default 93% of width).
split_only: boolOnly split long lines, do not refill short lines.
crown_margin: boolCrown margin mode: preserve the indentation of the first two lines.
tagged: boolTagged paragraph mode: first line indentation differs from subsequent lines.
uniform_spacing: boolUniform spacing: one space between words, two after sentence-ending punctuation.
prefix: Option<String>Only reformat lines beginning with this prefix.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FmtConfig
impl RefUnwindSafe for FmtConfig
impl Send for FmtConfig
impl Sync for FmtConfig
impl Unpin for FmtConfig
impl UnsafeUnpin for FmtConfig
impl UnwindSafe for FmtConfig
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> 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