pub struct TerserCompressorOptions {Show 56 fields
pub arguments: bool,
pub arrows: Option<bool>,
pub booleans: Option<bool>,
pub booleans_as_integers: bool,
pub collapse_vars: Option<bool>,
pub comparisons: Option<bool>,
pub computed_props: Option<bool>,
pub conditionals: Option<bool>,
pub dead_code: Option<bool>,
pub defaults: bool,
pub directives: Option<bool>,
pub drop_console: bool,
pub drop_debugger: Option<bool>,
pub ecma: TerserEcmaVersion,
pub evaluate: Option<bool>,
pub expression: bool,
pub global_defs: AHashMap<JsWord, Value>,
pub hoist_funs: bool,
pub hoist_props: Option<bool>,
pub hoist_vars: bool,
pub ie8: bool,
pub if_return: Option<bool>,
pub inline: Option<TerserInlineOption>,
pub join_vars: Option<bool>,
pub keep_classnames: bool,
pub keep_fargs: bool,
pub keep_fnames: bool,
pub keep_infinity: bool,
pub loops: Option<bool>,
pub negate_iife: Option<bool>,
pub passes: usize,
pub properties: Option<bool>,
pub pure_getters: TerserPureGetterOption,
pub pure_funcs: Vec<String>,
pub reduce_funcs: Option<bool>,
pub reduce_vars: Option<bool>,
pub sequences: Option<TerserSequenceOptions>,
pub side_effects: Option<bool>,
pub switches: Option<bool>,
pub top_retain: Option<TerserTopRetainOption>,
pub toplevel: Option<TerserTopLevelOptions>,
pub typeofs: Option<bool>,
pub unsafe_passes: bool,
pub unsafe_arrows: bool,
pub unsafe_comps: bool,
pub unsafe_function: bool,
pub unsafe_math: bool,
pub unsafe_symbols: bool,
pub unsafe_methods: bool,
pub unsafe_proto: bool,
pub unsafe_regexp: bool,
pub unsafe_undefined: bool,
pub unused: Option<bool>,
pub module: bool,
pub const_to_let: Option<bool>,
pub pristine_globals: Option<bool>,
}
Fields§
§arguments: bool
§arrows: Option<bool>
§booleans: Option<bool>
§booleans_as_integers: bool
§collapse_vars: Option<bool>
§comparisons: Option<bool>
§computed_props: Option<bool>
§conditionals: Option<bool>
§dead_code: Option<bool>
§defaults: bool
§directives: Option<bool>
§drop_console: bool
§drop_debugger: Option<bool>
§ecma: TerserEcmaVersion
§evaluate: Option<bool>
§expression: bool
§global_defs: AHashMap<JsWord, Value>
§hoist_funs: bool
§hoist_props: Option<bool>
§hoist_vars: bool
§ie8: bool
§if_return: Option<bool>
§inline: Option<TerserInlineOption>
§join_vars: Option<bool>
§keep_classnames: bool
§keep_fargs: bool
§keep_fnames: bool
§keep_infinity: bool
§loops: Option<bool>
§negate_iife: Option<bool>
§passes: usize
§properties: Option<bool>
§pure_getters: TerserPureGetterOption
§pure_funcs: Vec<String>
§reduce_funcs: Option<bool>
§reduce_vars: Option<bool>
§sequences: Option<TerserSequenceOptions>
§side_effects: Option<bool>
§switches: Option<bool>
§top_retain: Option<TerserTopRetainOption>
§toplevel: Option<TerserTopLevelOptions>
§typeofs: Option<bool>
§unsafe_passes: bool
§unsafe_arrows: bool
§unsafe_comps: bool
§unsafe_function: bool
§unsafe_math: bool
§unsafe_symbols: bool
§unsafe_methods: bool
§unsafe_proto: bool
§unsafe_regexp: bool
§unsafe_undefined: bool
§unused: Option<bool>
§module: bool
§const_to_let: Option<bool>
§pristine_globals: Option<bool>
Implementations§
source§impl TerserCompressorOptions
impl TerserCompressorOptions
pub fn into_config(self, cm: Lrc<SourceMap>) -> CompressOptions
Trait Implementations§
source§impl Clone for TerserCompressorOptions
impl Clone for TerserCompressorOptions
source§fn clone(&self) -> TerserCompressorOptions
fn clone(&self) -> TerserCompressorOptions
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TerserCompressorOptions
impl Debug for TerserCompressorOptions
source§impl Default for TerserCompressorOptions
impl Default for TerserCompressorOptions
source§impl<'de> Deserialize<'de> for TerserCompressorOptions
impl<'de> Deserialize<'de> for TerserCompressorOptions
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TerserCompressorOptions
impl RefUnwindSafe for TerserCompressorOptions
impl Send for TerserCompressorOptions
impl Sync for TerserCompressorOptions
impl Unpin for TerserCompressorOptions
impl UnwindSafe for TerserCompressorOptions
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more