Struct deno_ast::CommentContainer
source · pub struct CommentContainer<'a> {
pub leading: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>,
pub trailing: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>,
/* private fields */
}
Fields§
§leading: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>
§trailing: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>
Implementations§
source§impl<'a> CommentContainer<'a>
impl<'a> CommentContainer<'a>
pub fn new( leading: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>, trailing: &'a HashMap<BytePos, Vec<Comment>, BuildHasherDefault<FxHasher>>, tokens: &'a TokenContainer<'a>, text_info: &'a SourceTextInfo ) -> CommentContainer<'a>
pub fn all_comments(&'a self) -> CommentsIterator<'a> ⓘ
pub fn leading_comments(&'a self, start: SourcePos) -> CommentsIterator<'a> ⓘ
pub fn trailing_comments(&'a self, end: SourcePos) -> CommentsIterator<'a> ⓘ
Auto Trait Implementations§
impl<'a> RefUnwindSafe for CommentContainer<'a>
impl<'a> Send for CommentContainer<'a>
impl<'a> Sync for CommentContainer<'a>
impl<'a> Unpin for CommentContainer<'a>
impl<'a> UnwindSafe for CommentContainer<'a>
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