Struct taplo::formatter::Options[][src]

pub struct Options {
Show fields pub align_entries: bool, pub array_trailing_comma: bool, pub array_auto_expand: bool, pub array_auto_collapse: bool, pub compact_arrays: bool, pub compact_inline_tables: bool, pub column_width: usize, pub indent_tables: bool, pub indent_string: String, pub trailing_newline: bool, pub reorder_keys: bool, pub allowed_blank_lines: usize, pub crlf: bool,
}

All the formatting options.

Fields

align_entries: bool

Align entries vertically.

Entries that have table headers, comments, or blank lines between them are not aligned.

array_trailing_comma: bool

Put trailing commas for multiline arrays

array_auto_expand: bool

Automatically expand arrays to multi lines if they’re too long.

array_auto_collapse: bool

Automatically collapse arrays if they fit in one line.

The array won’t be collapsed if it contains a comment.

compact_arrays: bool

Omit whitespace padding inside single-line arrays.

compact_inline_tables: bool

Omit whitespace padding inside inline tables.

column_width: usize

Target maximum column width after which arrays are expanded into new lines.

This is best-effort, and currently doesn’t take whitespace into account.

indent_tables: bool

Indent subtables if they come in order.

indent_string: String

Indentation to use, should be tabs or spaces but technically could be anything.

trailing_newline: bool

Add trailing newline to the source.

reorder_keys: bool

Alphabetically reorder keys that are not separated by blank lines.

allowed_blank_lines: usize

The maximum amount of consecutive blank lines allowed.

crlf: bool

Use CRLF line endings

Implementations

impl Options[src]

pub fn update_from_str<S: AsRef<str>, I: Iterator<Item = (S, S)>>(
    &mut self,
    values: I
) -> Result<(), OptionParseError>
[src]

Trait Implementations

impl Clone for Options[src]

impl Debug for Options[src]

impl Default for Options[src]

impl<'de> Deserialize<'de> for Options[src]

impl Eq for Options[src]

impl JsonSchema for Options[src]

impl PartialEq<Options> for Options[src]

impl Serialize for Options[src]

impl StructuralEq for Options[src]

impl StructuralPartialEq for Options[src]

Auto Trait Implementations

impl RefUnwindSafe for Options

impl Send for Options

impl Sync for Options

impl Unpin for Options

impl UnwindSafe for Options

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.