pub enum TriviaBlankLineSpacingPolicy {
RemoveTrailingBlanks,
Always,
}Expand description
The policy for Trivia::BlankLine line spacing.
Blank lines before comments and between comments are always permitted.
Variants§
RemoveTrailingBlanks
Blank lines are allowed before and between comments, but not after.
e.g. a comment, then a blank line, then code, followed by another blank line, would have the trailing blank (between the comment and the code) removed but any blank line before the comment would be preserved.
Always
Blank lines are always allowed.
Trait Implementations§
Source§impl Clone for TriviaBlankLineSpacingPolicy
impl Clone for TriviaBlankLineSpacingPolicy
Source§fn clone(&self) -> TriviaBlankLineSpacingPolicy
fn clone(&self) -> TriviaBlankLineSpacingPolicy
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TriviaBlankLineSpacingPolicy
impl Debug for TriviaBlankLineSpacingPolicy
Source§impl Default for TriviaBlankLineSpacingPolicy
impl Default for TriviaBlankLineSpacingPolicy
Source§fn default() -> TriviaBlankLineSpacingPolicy
fn default() -> TriviaBlankLineSpacingPolicy
Returns the “default value” for a type. Read more
Source§impl PartialEq for TriviaBlankLineSpacingPolicy
impl PartialEq for TriviaBlankLineSpacingPolicy
Source§fn eq(&self, other: &TriviaBlankLineSpacingPolicy) -> bool
fn eq(&self, other: &TriviaBlankLineSpacingPolicy) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for TriviaBlankLineSpacingPolicy
impl Eq for TriviaBlankLineSpacingPolicy
impl StructuralPartialEq for TriviaBlankLineSpacingPolicy
Auto Trait Implementations§
impl Freeze for TriviaBlankLineSpacingPolicy
impl RefUnwindSafe for TriviaBlankLineSpacingPolicy
impl Send for TriviaBlankLineSpacingPolicy
impl Sync for TriviaBlankLineSpacingPolicy
impl Unpin for TriviaBlankLineSpacingPolicy
impl UnwindSafe for TriviaBlankLineSpacingPolicy
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