Struct stc_ts_utils::comments::StcComments
source · [−]pub struct StcComments {
pub leading: Arc<DashMap<BytePos, Vec<Comment>, FxBuildHasher>>,
pub trailing: Arc<DashMap<BytePos, Vec<Comment>, FxBuildHasher>>,
}
Expand description
Multi-threaded implementation of Comments
Fields
leading: Arc<DashMap<BytePos, Vec<Comment>, FxBuildHasher>>
trailing: Arc<DashMap<BytePos, Vec<Comment>, FxBuildHasher>>
Trait Implementations
sourceimpl Clone for StcComments
impl Clone for StcComments
sourcefn clone(&self) -> StcComments
fn clone(&self) -> StcComments
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Comments for StcComments
impl Comments for StcComments
fn add_leading(&self, pos: BytePos, cmt: Comment)
fn add_leading_comments(&self, pos: BytePos, comments: Vec<Comment>)
fn has_leading(&self, pos: BytePos) -> bool
fn move_leading(&self, from: BytePos, to: BytePos)
fn take_leading(&self, pos: BytePos) -> Option<Vec<Comment>>
fn get_leading(&self, pos: BytePos) -> Option<Vec<Comment>>
fn add_trailing(&self, pos: BytePos, cmt: Comment)
fn add_trailing_comments(&self, pos: BytePos, comments: Vec<Comment>)
fn has_trailing(&self, pos: BytePos) -> bool
fn move_trailing(&self, from: BytePos, to: BytePos)
fn take_trailing(&self, pos: BytePos) -> Option<Vec<Comment>>
fn get_trailing(&self, pos: BytePos) -> Option<Vec<Comment>>
fn add_pure_comment(&self, pos: BytePos)
fn with_leading<F, Ret>(&self, pos: BytePos, f: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
fn with_trailing<F, Ret>(&self, pos: BytePos, f: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
sourceimpl Default for StcComments
impl Default for StcComments
sourcefn default() -> StcComments
fn default() -> StcComments
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl !RefUnwindSafe for StcComments
impl Send for StcComments
impl Sync for StcComments
impl Unpin for StcComments
impl !UnwindSafe for StcComments
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<C> CommentsExt for Cwhere
C: Comments,
impl<C> CommentsExt for Cwhere
C: Comments,
sourcefn with_leading<F, Ret>(&self, pos: BytePos, op: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
fn with_leading<F, Ret>(&self, pos: BytePos, op: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
👎Deprecated since 0.13.5:
helper methods are merged into Comments itself
sourcefn with_trailing<F, Ret>(&self, pos: BytePos, op: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
fn with_trailing<F, Ret>(&self, pos: BytePos, op: F) -> Retwhere
F: FnOnce(&[Comment]) -> Ret,
👎Deprecated since 0.13.5:
helper methods are merged into Comments itself