#[non_exhaustive]pub enum FormatRule {
Imports,
Layout,
Spacing,
SyntaxNormalization,
}Expand description
A discrete formatter rule that can be enabled or disabled.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Imports
Organize import declarations into formatter-defined groups.
Layout
Apply AST-guided structural layout and indentation.
Spacing
Normalize whitespace gaps and type-annotation colon spacing.
SyntaxNormalization
Rewrite layout forms into canonical multiline shapes.
Implementations§
Trait Implementations§
Source§impl Clone for FormatRule
impl Clone for FormatRule
Source§fn clone(&self) -> FormatRule
fn clone(&self) -> FormatRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FormatRule
Source§impl Debug for FormatRule
impl Debug for FormatRule
Source§impl Display for FormatRule
impl Display for FormatRule
impl Eq for FormatRule
Source§impl FromStr for FormatRule
impl FromStr for FormatRule
Source§impl Hash for FormatRule
impl Hash for FormatRule
Source§impl Ord for FormatRule
impl Ord for FormatRule
Source§fn cmp(&self, other: &FormatRule) -> Ordering
fn cmp(&self, other: &FormatRule) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FormatRule
impl PartialEq for FormatRule
Source§fn eq(&self, other: &FormatRule) -> bool
fn eq(&self, other: &FormatRule) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for FormatRule
impl PartialOrd for FormatRule
impl StructuralPartialEq for FormatRule
Auto Trait Implementations§
impl Freeze for FormatRule
impl RefUnwindSafe for FormatRule
impl Send for FormatRule
impl Sync for FormatRule
impl Unpin for FormatRule
impl UnsafeUnpin for FormatRule
impl UnwindSafe for FormatRule
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> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
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.