Trait wasmer_compiler::ModuleMiddlewareChain

source ·
pub trait ModuleMiddlewareChain {
    // Required methods
    fn generate_function_middleware_chain(
        &self,
        local_function_index: LocalFunctionIndex,
    ) -> Vec<Box<dyn FunctionMiddleware>>;
    fn apply_on_module_info(
        &self,
        module_info: &mut ModuleInfo,
    ) -> Result<(), MiddlewareError>;
}
Expand description

Trait for generating middleware chains from “prototype” (generator) chains.

Required Methods§

source

fn generate_function_middleware_chain( &self, local_function_index: LocalFunctionIndex, ) -> Vec<Box<dyn FunctionMiddleware>>

Generates a function middleware chain.

source

fn apply_on_module_info( &self, module_info: &mut ModuleInfo, ) -> Result<(), MiddlewareError>

Applies the chain on a ModuleInfo struct.

Implementations on Foreign Types§

source§

impl<T: Deref<Target = dyn ModuleMiddleware>> ModuleMiddlewareChain for [T]

source§

fn generate_function_middleware_chain( &self, local_function_index: LocalFunctionIndex, ) -> Vec<Box<dyn FunctionMiddleware>>

Generates a function middleware chain.

source§

fn apply_on_module_info( &self, module_info: &mut ModuleInfo, ) -> Result<(), MiddlewareError>

Applies the chain on a ModuleInfo struct.

Implementors§