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:
- create a custom execute enum, with your custom methods
- copy all desired endpoints of App
abstract_std::app::ExecuteMsg
or Adapterabstract_std::adapter::ExecuteMsg
- Add your custom type to the end of export_endpoints!() and cw_orch_interface!() macros
Required Associated Types§
Sourcetype ExecuteMsg
type ExecuteMsg
Module execute message (crate::msg::ExecuteMsg
of your module)
Required Methods§
Sourcefn try_into_base(self) -> Result<Self::ExecuteMsg, Self>
fn try_into_base(self) -> Result<Self::ExecuteMsg, Self>
Convert custom execute message to your module execute message, or if not possible return custom
Sourcefn custom_execute(
self,
deps: DepsMut<'_>,
env: Env,
info: MessageInfo,
module: Module,
) -> Result<Response, Module::Error>
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.