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 once they
exceed the configured column_width.
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 schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &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§impl Serialize for OptionsIncomplete
impl Serialize for OptionsIncomplete
impl Eq for OptionsIncomplete
impl StructuralPartialEq for OptionsIncomplete
Auto Trait Implementations§
impl Freeze for OptionsIncomplete
impl RefUnwindSafe for OptionsIncomplete
impl Send for OptionsIncomplete
impl Sync for OptionsIncomplete
impl Unpin for OptionsIncomplete
impl UnwindSafe for OptionsIncomplete
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
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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