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
Fields
§
comment: DocCommentTag
The single comment tag of the line.
A line doc comment.
/// doc comment
Block
Fields
§
comments: Vec<DocCommentTag>
The list of doc comment tags of the block.
A block doc comment.
/**
* block doc comment
*/
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 StructuralEq for DocComment
impl StructuralPartialEq for DocComment
Auto Trait Implementations§
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