Enum solang_parser::doccomment::DocComment
source · pub enum DocComment {
Line {
comment: DocCommentTag,
},
Block {
comments: Vec<DocCommentTag>,
},
}
Expand description
A Solidity parsed doc comment.
Variants§
Line
A line doc comment.
/// doc comment
Fields
§
comment: DocCommentTag
The single comment tag of the line.
Block
A block doc comment.
/**
* block doc comment
*/
Fields
§
comments: Vec<DocCommentTag>
The list of doc comment tags of the block.
Implementations§
source§impl DocComment
impl DocComment
sourcepub fn comments(&self) -> Vec<&DocCommentTag>
pub fn comments(&self) -> Vec<&DocCommentTag>
Returns the inner comments.
sourcepub fn into_comments(self) -> Vec<DocCommentTag>
pub fn into_comments(self) -> Vec<DocCommentTag>
Consumes self
to return the inner comments.
Trait Implementations§
source§impl Clone for DocComment
impl Clone for DocComment
source§fn clone(&self) -> DocComment
fn clone(&self) -> DocComment
Returns a copy 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 DocComment
impl Debug for DocComment
source§impl PartialEq for DocComment
impl PartialEq for DocComment
source§fn eq(&self, other: &DocComment) -> bool
fn eq(&self, other: &DocComment) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for DocComment
impl StructuralPartialEq for DocComment
Auto Trait Implementations§
impl Freeze for DocComment
impl RefUnwindSafe for DocComment
impl Send for DocComment
impl Sync for DocComment
impl Unpin for DocComment
impl UnwindSafe for DocComment
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> 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