Struct taplo::formatter::OptionsIncomplete
source · pub struct OptionsIncomplete {Show 19 fields
pub align_entries: Option<bool>,
pub align_comments: Option<bool>,
pub align_single_comments: Option<bool>,
pub array_trailing_comma: Option<bool>,
pub array_auto_expand: Option<bool>,
pub inline_table_expand: Option<bool>,
pub array_auto_collapse: Option<bool>,
pub compact_arrays: Option<bool>,
pub compact_inline_tables: Option<bool>,
pub compact_entries: Option<bool>,
pub column_width: Option<usize>,
pub indent_tables: Option<bool>,
pub indent_entries: Option<bool>,
pub indent_string: Option<String>,
pub trailing_newline: Option<bool>,
pub reorder_keys: Option<bool>,
pub reorder_arrays: Option<bool>,
pub allowed_blank_lines: Option<usize>,
pub crlf: Option<bool>,
}
Expand description
All the formatting options.
Fields§
§align_entries: Option<bool>
Align entries vertically.
Entries that have table headers, comments, or blank lines between them are not aligned.
align_comments: Option<bool>
Align consecutive comments after entries and items vertically.
This applies to comments that are after entries or array items.
align_single_comments: Option<bool>
If align_comments
is true, apply the alignment in cases where
there’s only one comment.
array_trailing_comma: Option<bool>
Put trailing commas for multiline arrays.
array_auto_expand: Option<bool>
Automatically expand arrays to multiple lines if they’re too long.
inline_table_expand: Option<bool>
Expand values (e.g.) inside inline tables where possible.
array_auto_collapse: Option<bool>
Automatically collapse arrays if they fit in one line.
The array won’t be collapsed if it contains a comment.
compact_arrays: Option<bool>
Omit whitespace padding inside single-line arrays.
compact_inline_tables: Option<bool>
Omit whitespace padding inside inline tables.
compact_entries: Option<bool>
Omit whitespace around =
.
column_width: Option<usize>
Target maximum column width after which arrays are expanded into new lines.
This is best-effort and might not be accurate.
indent_tables: Option<bool>
Indent subtables if they come in order.
indent_entries: Option<bool>
Indent entries under tables.
indent_string: Option<String>
Indentation to use, should be tabs or spaces but technically could be anything.
trailing_newline: Option<bool>
Add trailing newline to the source.
reorder_keys: Option<bool>
Alphabetically reorder keys that are not separated by blank lines.
reorder_arrays: Option<bool>
Alphabetically reorder array values that are not separated by blank lines.
allowed_blank_lines: Option<usize>
The maximum amount of consecutive blank lines allowed.
crlf: Option<bool>
Use CRLF line endings
Implementations§
source§impl OptionsIncomplete
impl OptionsIncomplete
pub fn from_options(opts: Options) -> Self
Trait Implementations§
source§impl Clone for OptionsIncomplete
impl Clone for OptionsIncomplete
source§fn clone(&self) -> OptionsIncomplete
fn clone(&self) -> OptionsIncomplete
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OptionsIncomplete
impl Debug for OptionsIncomplete
source§impl Default for OptionsIncomplete
impl Default for OptionsIncomplete
source§fn default() -> OptionsIncomplete
fn default() -> OptionsIncomplete
source§impl<'de> Deserialize<'de> for OptionsIncomplete
impl<'de> Deserialize<'de> for OptionsIncomplete
source§fn 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>,
source§impl JsonSchema for OptionsIncomplete
impl JsonSchema for OptionsIncomplete
source§fn schema_name() -> String
fn schema_name() -> String
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq for OptionsIncomplete
impl PartialEq for OptionsIncomplete
source§fn eq(&self, other: &OptionsIncomplete) -> bool
fn eq(&self, other: &OptionsIncomplete) -> bool
self
and other
values to be equal, and is used
by ==
.