pub trait CosmosRouter {
type ExecC;
type QueryC: CustomQuery;
// Required methods
fn execute(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
block: &BlockInfo,
sender: Addr,
msg: CosmosMsg<Self::ExecC>,
) -> AnyResult<AppResponse>;
fn query(
&self,
api: &dyn Api,
storage: &dyn Storage,
block: &BlockInfo,
request: QueryRequest<Self::QueryC>,
) -> AnyResult<Binary>;
fn sudo(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
block: &BlockInfo,
msg: SudoMsg,
) -> AnyResult<AppResponse>;
fn get_querier_storage(
&self,
storage: &dyn Storage,
) -> AnyResult<QuerierStorage>;
}Required Associated Types§
type ExecC
type QueryC: CustomQuery
Required Methods§
fn execute( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, sender: Addr, msg: CosmosMsg<Self::ExecC>, ) -> AnyResult<AppResponse>
fn query( &self, api: &dyn Api, storage: &dyn Storage, block: &BlockInfo, request: QueryRequest<Self::QueryC>, ) -> AnyResult<Binary>
fn sudo( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, msg: SudoMsg, ) -> AnyResult<AppResponse>
fn get_querier_storage( &self, storage: &dyn Storage, ) -> AnyResult<QuerierStorage>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".