Skip to main content

MinifyFeature

Trait MinifyFeature 

Source
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§

Source

fn ordering(&self) -> i32

Source

fn process_mode(&self) -> u32

Source

fn run( &mut self, arena: &AstArena, ast: u32, options: &ParserOptions, parent: u32, context: &mut MinifyContext, mode: u32, ) -> FeatureResult

Provided Methods§

Source

fn accept(&self) -> Option<&[u8]>

accepted node types, None: all

Source

fn has_cleanup(&self) -> bool

true if the feature has a cleanup() method

Source

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".

Implementors§