pub enum CommentLinePosition {
EndOfLine,
OwnLine,
}Expand description
The position of a comment in the source text.
Variants§
EndOfLine
A comment that is on the same line as the preceding token and is separated by at least one line break from the following token.
§Examples
§End of line
a; # comment
b;# comment is an end of line comments because it is separated by at least one line break from the following token b.
Comments that not only end, but also start on a new line are OwnLine comments.
OwnLine
A Comment that is separated by at least one line break from the preceding token.
§Examples
a;
# comment
b;# comment line comments because they are separated by one line break from the preceding token a.
Implementations§
Source§impl CommentLinePosition
impl CommentLinePosition
pub const fn is_own_line(self) -> bool
pub const fn is_end_of_line(self) -> bool
Trait Implementations§
Source§impl Clone for CommentLinePosition
impl Clone for CommentLinePosition
Source§fn clone(&self) -> CommentLinePosition
fn clone(&self) -> CommentLinePosition
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 CommentLinePosition
impl Debug for CommentLinePosition
Source§impl PartialEq for CommentLinePosition
impl PartialEq for CommentLinePosition
impl Copy for CommentLinePosition
impl Eq for CommentLinePosition
impl StructuralPartialEq for CommentLinePosition
Auto Trait Implementations§
impl Freeze for CommentLinePosition
impl RefUnwindSafe for CommentLinePosition
impl Send for CommentLinePosition
impl Sync for CommentLinePosition
impl Unpin for CommentLinePosition
impl UnsafeUnpin for CommentLinePosition
impl UnwindSafe for CommentLinePosition
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<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>
Converts
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>
Converts
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