Trait CustomExecuteHandler

Source
pub trait CustomExecuteHandler<Module: Handler>: Sized {
    type ExecuteMsg;

    // Required methods
    fn try_into_base(self) -> Result<Self::ExecuteMsg, Self>;
    fn custom_execute(
        self,
        deps: DepsMut<'_>,
        env: Env,
        info: MessageInfo,
        module: Module,
    ) -> Result<Response, Module::Error>;
}
Expand description

Trait for a custom contract Execute entry point

To use it:

Required Associated Types§

Source

type ExecuteMsg

Module execute message (crate::msg::ExecuteMsg of your module)

Required Methods§

Source

fn try_into_base(self) -> Result<Self::ExecuteMsg, Self>

Convert custom execute message to your module execute message, or if not possible return custom

Source

fn custom_execute( self, deps: DepsMut<'_>, env: Env, info: MessageInfo, module: Module, ) -> Result<Response, Module::Error>

Handle of custom execute methods of the module.

This method is used if [CustomExecuteHandler::into_execute_msg] returned Error

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§