Skip to main content

CallMiddleware

Trait CallMiddleware 

Source
pub trait CallMiddleware: Send + Sync {
    // Required methods
    fn before_call(
        &self,
        module: &str,
        method: &str,
        args: &[u8],
    ) -> Result<(), String>;
    fn after_call(
        &self,
        module: &str,
        method: &str,
        result: &Result<Vec<u8>, String>,
    );
}
Expand description

Middleware for intercepting module calls.

Required Methods§

Source

fn before_call( &self, module: &str, method: &str, args: &[u8], ) -> Result<(), String>

Called before a module call.

Source

fn after_call( &self, module: &str, method: &str, result: &Result<Vec<u8>, String>, )

Called after a module call.

Implementors§