pub enum CommentMode {
Delete,
Preserve,
Auto,
}Expand description
How to handle comments during formatting.
Variants§
Delete
Delete all comments from output.
Preserve
Preserve comments. Line comments prevent ANY compaction.
Auto
Smart mode: preserve in multiline, convert // foo → /* foo */
only when depth/type rules force compaction. Length-based compaction
is still blocked by line comments.
Trait Implementations§
Source§impl Clone for CommentMode
impl Clone for CommentMode
Source§fn clone(&self) -> CommentMode
fn clone(&self) -> CommentMode
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 CommentMode
impl Debug for CommentMode
Source§impl Default for CommentMode
impl Default for CommentMode
Source§fn default() -> CommentMode
fn default() -> CommentMode
Returns the “default value” for a type. Read more
Source§impl PartialEq for CommentMode
impl PartialEq for CommentMode
impl Copy for CommentMode
impl Eq for CommentMode
impl StructuralPartialEq for CommentMode
Auto Trait Implementations§
impl Freeze for CommentMode
impl RefUnwindSafe for CommentMode
impl Send for CommentMode
impl Sync for CommentMode
impl Unpin for CommentMode
impl UnwindSafe for CommentMode
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> 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.