Struct swc_common::comments::SingleThreadedComments[][src]

pub struct SingleThreadedComments { /* fields omitted */ }

Single-threaded storage for comments.

Implementations

impl SingleThreadedComments[src]

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

Takes all the comments as (leading, trailing).

pub fn borrow_all<'a>(
    &'a self
) -> (Ref<'a, SingleThreadedCommentsMapInner>, Ref<'a, SingleThreadedCommentsMapInner>)
[src]

Borrows all the comments as (leading, trailing).

pub fn with_leading<F, Ret>(&self, pos: BytePos, op: F) -> Ret where
    F: FnOnce(&[Comment]) -> Ret, 
[src]

pub fn with_trailing<F, Ret>(&self, pos: BytePos, op: F) -> Ret where
    F: FnOnce(&[Comment]) -> Ret, 
[src]

Trait Implementations

impl Clone for SingleThreadedComments[src]

impl Comments for SingleThreadedComments[src]

impl Debug for SingleThreadedComments[src]

impl Default for SingleThreadedComments[src]

Auto Trait Implementations

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<C> CommentsExt for C where
    C: Comments
[src]

impl<T> Erased for T[src]

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.