swc_core::common::pass::util::map

Trait Map

pub trait Map<T> {
    // Required method
    fn map<F>(self, f: F) -> Self
       where F: FnOnce(T) -> T;
}
Available on crate feature __common only.
Expand description

Copied from syntax::ptr::P of rustc.

Required Methods§

fn map<F>(self, f: F) -> Self
where F: FnOnce(T) -> T,

Transform the inner value, consuming self and producing a new P<T>.

§Memory leak

This will leak self if the given closure panics.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

§

impl<T> Map<T> for Box<T>

§

fn map<F>(self, f: F) -> Box<T>
where F: FnOnce(T) -> T,

Implementors§