[][src]Struct swc_common::comments::Comments

pub struct Comments { /* fields omitted */ }

Implementations

impl Comments[src]

pub fn add_leading(&self, pos: BytePos, cmt: Vec<Comment>)[src]

pub fn add_trailing(&self, pos: BytePos, cmt: Comment)[src]

pub fn take_trailing_comments(&self, pos: BytePos) -> Option<Vec<Comment>>[src]

pub fn trailing_comments(
    &self,
    pos: BytePos
) -> Option<Ref<BytePos, Vec<Comment>, FxBuildHasher>>
[src]

pub fn take_leading_comments(&self, pos: BytePos) -> Option<Vec<Comment>>[src]

pub fn leading_comments(
    &self,
    pos: BytePos
) -> Option<Ref<BytePos, Vec<Comment>, FxBuildHasher>>
[src]

pub fn move_leading(&self, from: BytePos, to: BytePos)[src]

pub fn move_trailing(&self, from: BytePos, to: BytePos)[src]

pub fn retain_leading(&self, f: impl FnMut(&BytePos, &mut Vec<Comment>) -> bool)[src]

pub fn retain_trailing(
    &self,
    f: impl FnMut(&BytePos, &mut Vec<Comment>) -> bool
)
[src]

pub fn take_all(self) -> (CommentMap, CommentMap)[src]

Takes all the comments as (leading, trailing).

Trait Implementations

impl Debug for Comments[src]

impl Default for Comments[src]

Auto Trait Implementations

impl !RefUnwindSafe for Comments

impl Send for Comments

impl Sync for Comments

impl Unpin for Comments

impl UnwindSafe for Comments

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.