Struct cw_iper_test::IperStargateModule
source · pub struct IperStargateModule { /* private fields */ }
Expand description
The IperStargateModule
is the default struct used in an IperApp
as an Stargate module
and contains all StargateApplication
.
This structure implements the Module
and Stargate
traits
from cw-multi-test
.
When an AnyMsg
needs to be handled, the IperStargateModule
attempts to find a
StargateApplication
that manages the type_url
of the AnyMsg
and call StargateApplication::stargate_msg
.
StargateApplication
instances must be added to the IperStargateModule
during the creation of the App
via the AppBuilder
. This is achieved using one of the following function:
AppBuilderIperExt::with_ibc_app
if theStargateApplication
is alsoIbcApplication
;AppBuilderStargateExt::with_stargate_app
if theStargateApplication
is notIbcApplication
.
It is essential that the Stargate module
in the AppBuilder
is set to IperStargateModule
for this integration
to function correctly.
Implementations§
source§impl IperStargateModule
impl IperStargateModule
sourcepub fn try_add_application(
&mut self,
application: Rc<RefCell<dyn StargateApplication>>
) -> Result<(), Error>
pub fn try_add_application( &mut self, application: Rc<RefCell<dyn StargateApplication>> ) -> Result<(), Error>
Try add a StargateApplication.
If another StargateApplication alredy implements one of the
Trait Implementations§
source§impl Default for IperStargateModule
impl Default for IperStargateModule
source§fn default() -> IperStargateModule
fn default() -> IperStargateModule
source§impl Module for IperStargateModule
impl Module for IperStargateModule
source§fn execute<ExecC, QueryC>(
&self,
api: &dyn Api,
storage: &mut dyn Storage,
router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
block: &BlockInfo,
sender: Addr,
msg: Self::ExecT
) -> Result<AppResponse, Error>where
ExecC: CustomMsg + 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,
msg: Self::ExecT
) -> Result<AppResponse, Error>where
ExecC: CustomMsg + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
source§fn query(
&self,
api: &dyn Api,
storage: &dyn Storage,
querier: &dyn Querier,
block: &BlockInfo,
request: Self::QueryT
) -> Result<Binary, Error>
fn query( &self, api: &dyn Api, storage: &dyn Storage, querier: &dyn Querier, block: &BlockInfo, request: Self::QueryT ) -> Result<Binary, Error>
source§fn sudo<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_msg: Self::SudoT
) -> Result<AppResponse, Error>where
ExecC: CustomMsg + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
fn sudo<ExecC, QueryC>(
&self,
_api: &dyn Api,
_storage: &mut dyn Storage,
_router: &dyn CosmosRouter<ExecC = ExecC, QueryC = QueryC>,
_block: &BlockInfo,
_msg: Self::SudoT
) -> Result<AppResponse, Error>where
ExecC: CustomMsg + DeserializeOwned + 'static,
QueryC: CustomQuery + DeserializeOwned + 'static,
impl Stargate for IperStargateModule
Auto Trait Implementations§
impl Freeze for IperStargateModule
impl !RefUnwindSafe for IperStargateModule
impl !Send for IperStargateModule
impl !Sync for IperStargateModule
impl Unpin for IperStargateModule
impl !UnwindSafe for IperStargateModule
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request