pub enum Comment {
Block {
lines: Vec<String>,
align: bool,
},
Line(String),
Break,
}
Expand description
Represents the variations of allowable comments.
Variants§
Block
Represents a comment read from a /* */
pattern.
Fields
§
align: bool
align
(if true) indicates that all comment lines
started in a column after the
star’s column in the opening /*
. For each subsequent line in lines, the spaces from
column 0 to the star’s column will be stripped, allowing the indent spaces to be
restored, during format, relative to the block’s new horizontal position. Otherwise, the
original indentation will not be stripped, and the lines will be restored at their
original horizontal position. In either case, lines after the opening /*
will retain
their original horizontal alignment, relative to one another.
Line(String)
Represents a comment read from a line starting with //
.
Break
Represents a blank line between data.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Comment
impl RefUnwindSafe for Comment
impl Send for Comment
impl Sync for Comment
impl Unpin for Comment
impl UnwindSafe for Comment
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)