pub trait InstantiateEndpoint: Handler {
type InstantiateMsg: Serialize + JsonSchema;
// Required method
fn instantiate(
self,
deps: DepsMut<'_>,
env: Env,
info: MessageInfo,
msg: Self::InstantiateMsg,
) -> Result<Response, Self::Error>;
}
Expand description
Trait for a contract’s Instantiate entry point.
Required Associated Types§
Sourcetype InstantiateMsg: Serialize + JsonSchema
type InstantiateMsg: Serialize + JsonSchema
The message type for the Instantiate entry point.
Required Methods§
Sourcefn instantiate(
self,
deps: DepsMut<'_>,
env: Env,
info: MessageInfo,
msg: Self::InstantiateMsg,
) -> Result<Response, Self::Error>
fn instantiate( self, deps: DepsMut<'_>, env: Env, info: MessageInfo, msg: Self::InstantiateMsg, ) -> Result<Response, Self::Error>
Handler for the Instantiate endpoint.
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.