pub trait MinifyFeature {
// Required methods
fn ordering(&self) -> i32;
fn process_mode(&self) -> u32;
fn run(
&mut self,
arena: &AstArena,
ast: u32,
options: &ParserOptions,
parent: u32,
context: &mut MinifyContext,
mode: u32,
) -> FeatureResult;
// Provided methods
fn accept(&self) -> Option<&[u8]> { ... }
fn has_cleanup(&self) -> bool { ... }
fn cleanup(
&mut self,
_arena: &AstArena,
_ast: u32,
_options: &ParserOptions,
_context: &mut MinifyContext,
_mode: u32,
) { ... }
}Expand description
minification feature (MinifyFeature)
Required Methods§
fn ordering(&self) -> i32
fn process_mode(&self) -> u32
fn run( &mut self, arena: &AstArena, ast: u32, options: &ParserOptions, parent: u32, context: &mut MinifyContext, mode: u32, ) -> FeatureResult
Provided Methods§
Sourcefn has_cleanup(&self) -> bool
fn has_cleanup(&self) -> bool
true if the feature has a cleanup() method
fn cleanup( &mut self, _arena: &AstArena, _ast: u32, _options: &ParserOptions, _context: &mut MinifyContext, _mode: u32, )
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".