Struct swc::PassBuilder
source · [−]pub struct PassBuilder<'a, 'b, P: Fold> { /* private fields */ }
Expand description
Builder is used to create a high performance Compiler
.
Implementations
sourceimpl<'a, 'b, P: Fold> PassBuilder<'a, 'b, P>
impl<'a, 'b, P: Fold> PassBuilder<'a, 'b, P>
pub fn new(
cm: &'a Arc<SourceMap>,
handler: &'b Handler,
loose: bool,
assumptions: Assumptions,
top_level_mark: Mark,
pass: P
) -> Self
pub fn then<N>(self, next: N) -> PassBuilder<'a, 'b, AndThen<P, N>> where
N: Fold,
pub fn skip_helper_injection(self, skip: bool) -> Self
pub fn minify(self, options: Option<JsMinifyOptions>) -> Self
sourcepub fn hygiene(self, config: Option<Config>) -> Self
pub fn hygiene(self, config: Option<Config>) -> Self
Note: hygiene is enabled by default.
If you pass None to this method, the hygiene
pass will be disabled.
pub fn const_modules(
self,
globals: HashMap<JsWord, HashMap<JsWord, String>>
) -> PassBuilder<'a, 'b, impl Fold>
pub fn inline_globals(
self,
c: GlobalPassOption
) -> PassBuilder<'a, 'b, impl Fold>
pub fn target(self, target: EsVersion) -> Self
pub fn preset_env(self, env: Option<Config>) -> Self
pub fn regenerator(self, config: Config) -> Self
Auto Trait Implementations
impl<'a, 'b, P> !RefUnwindSafe for PassBuilder<'a, 'b, P>
impl<'a, 'b, P> Send for PassBuilder<'a, 'b, P> where
P: Send,
impl<'a, 'b, P> Sync for PassBuilder<'a, 'b, P> where
P: Sync,
impl<'a, 'b, P> Unpin for PassBuilder<'a, 'b, P> where
P: Unpin,
impl<'a, 'b, P> !UnwindSafe for PassBuilder<'a, 'b, P>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more