Trait cw_multi_test::Stargate
source · pub trait Stargate {
// Provided methods
fn execute<ExecC, QueryC>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
type_url: String,
value: Binary
) -> AnyResult<AppResponse>
where ExecC: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static { ... }
fn query(
&self,
api: &dyn Api,
storage: &dyn Storage,
querier: &dyn Querier,
block: &BlockInfo,
path: String,
data: Binary
) -> AnyResult<Binary> { ... }
}Expand description
Stargate interface.
This trait provides the default behaviour for all functions that is equal to StargateFailing implementation.
Provided Methods§
sourcefn execute<ExecC, QueryC>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
type_url: String,
value: Binary
) -> AnyResult<AppResponse>where
ExecC: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
fn execute<ExecC, QueryC>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
type_url: String,
value: Binary
) -> AnyResult<AppResponse>where
ExecC: Debug + Clone + PartialEq + JsonSchema + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
Processes stargate messages.
The CosmosMsg::Stargate message is unwrapped before processing.
The type_url and value attributes of CosmosMsg::Stargate
are passed directly to this handler.
sourcefn query(
&self,
api: &dyn Api,
storage: &dyn Storage,
querier: &dyn Querier,
block: &BlockInfo,
path: String,
data: Binary
) -> AnyResult<Binary>
fn query( &self, api: &dyn Api, storage: &dyn Storage, querier: &dyn Querier, block: &BlockInfo, path: String, data: Binary ) -> AnyResult<Binary>
Processes stargate queries.
The QueryRequest::Stargate query request is unwrapped before processing.
The path and data attributes of QueryRequest::Stargate are passed
directly to this handler.
Object Safety§
This trait is not object safe.