pub trait FunctionMiddleware<'a>: Debug {
// Provided methods
fn locals_info(&mut self, _locals: &[ValType]) { ... }
fn feed(
&mut self,
operator: Operator<'a>,
state: &mut MiddlewareReaderState<'a>,
) -> Result<(), MiddlewareError> { ... }
}Expand description
A function middleware specialized for a single function.
Provided Methods§
Sourcefn locals_info(&mut self, _locals: &[ValType])
fn locals_info(&mut self, _locals: &[ValType])
Provide info on the function’s locals. This is called before feed.
Sourcefn feed(
&mut self,
operator: Operator<'a>,
state: &mut MiddlewareReaderState<'a>,
) -> Result<(), MiddlewareError>
fn feed( &mut self, operator: Operator<'a>, state: &mut MiddlewareReaderState<'a>, ) -> Result<(), MiddlewareError>
Processes the given operator.