Trait FunctionMiddleware

Source
pub trait FunctionMiddleware {
    type Error: Debug;

    // Required method
    fn feed_event<'a, 'b: 'a>(
        &mut self,
        op: Event<'a, 'b>,
        module_info: &ModuleInfo,
        sink: &mut EventSink<'a, 'b>,
        source_loc: u32,
    ) -> Result<(), Self::Error>;
}
Expand description

A trait that represents the signature required to implement middleware for a function.

Required Associated Types§

Source

type Error: Debug

The error type for this middleware’s functions.

Required Methods§

Source

fn feed_event<'a, 'b: 'a>( &mut self, op: Event<'a, 'b>, module_info: &ModuleInfo, sink: &mut EventSink<'a, 'b>, source_loc: u32, ) -> Result<(), Self::Error>

Processes the given event, module info and sink.

Implementors§