Struct cw_multi_test::Router

source ·
pub struct Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> {
    pub bank: Bank,
    pub custom: Custom,
    pub staking: Staking,
    pub distribution: Distr,
    pub ibc: Ibc,
    pub gov: Gov,
    pub stargate: Stargate,
    /* private fields */
}
Expand description

The Router plays a critical role in managing and directing transactions within the Cosmos blockchain.

Fields§

§bank: Bank

Bank module instance to be used in this Router.

§custom: Custom

Custom module instance to be used in this Router.

§staking: Staking

Staking module instance to be used in this Router.

§distribution: Distr

Distribution module instance to be used in this Router.

§ibc: Ibc

IBC module instance to be used in this Router.

§gov: Gov

Governance module instance to be used in this Router.

§stargate: Stargate

Stargate handler instance to be used in this Router.

Implementations§

source§

impl<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
where CustomT::ExecT: CustomMsg + DeserializeOwned + 'static, CustomT::QueryT: CustomQuery + DeserializeOwned + 'static, CustomT: Module, WasmT: Wasm<CustomT::ExecT, CustomT::QueryT>, BankT: Bank, StakingT: Staking, DistrT: Distribution, IbcT: Ibc, GovT: Gov, StargateT: Stargate,

source

pub fn querier<'a>( &'a self, api: &'a dyn Api, storage: &'a dyn Storage, block_info: &'a BlockInfo ) -> RouterQuerier<'a, CustomT::ExecT, CustomT::QueryT>

Returns a querier populated with the instance of this Router.

Trait Implementations§

source§

impl<Bank: Clone, Custom: Clone, Wasm: Clone, Staking: Clone, Distr: Clone, Ibc: Clone, Gov: Clone, Stargate: Clone> Clone for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>

source§

fn clone( &self ) -> Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT> CosmosRouter for Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT, StargateT>
where CustomT::ExecT: CustomMsg + DeserializeOwned + 'static, CustomT::QueryT: CustomQuery + DeserializeOwned + 'static, CustomT: Module, WasmT: Wasm<CustomT::ExecT, CustomT::QueryT>, BankT: Bank, StakingT: Staking, DistrT: Distribution, IbcT: Ibc, GovT: Gov, StargateT: Stargate,

source§

fn query( &self, api: &dyn Api, storage: &dyn Storage, block: &BlockInfo, request: QueryRequest<Self::QueryC> ) -> AnyResult<Binary>

This is used by RouterQuerier to actual implement the Querier interface. you most likely want to use router.querier(storage, block).wrap() to get a QuerierWrapper to interact with

§

type ExecC = <CustomT as Module>::ExecT

Type of the executed custom message.
§

type QueryC = <CustomT as Module>::QueryT

Type of the query custom message.
source§

fn execute( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, sender: Addr, msg: CosmosMsg<Self::ExecC> ) -> AnyResult<AppResponse>

Executes messages.
source§

fn sudo( &self, api: &dyn Api, storage: &mut dyn Storage, block: &BlockInfo, msg: SudoMsg ) -> AnyResult<AppResponse>

Evaluates privileged actions.

Auto Trait Implementations§

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> Freeze for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: Freeze, Bank: Freeze, Custom: Freeze, Staking: Freeze, Distr: Freeze, Ibc: Freeze, Gov: Freeze, Stargate: Freeze,

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> RefUnwindSafe for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: RefUnwindSafe, Bank: RefUnwindSafe, Custom: RefUnwindSafe, Staking: RefUnwindSafe, Distr: RefUnwindSafe, Ibc: RefUnwindSafe, Gov: RefUnwindSafe, Stargate: RefUnwindSafe,

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> Send for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: Send, Bank: Send, Custom: Send, Staking: Send, Distr: Send, Ibc: Send, Gov: Send, Stargate: Send,

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> Sync for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: Sync, Bank: Sync, Custom: Sync, Staking: Sync, Distr: Sync, Ibc: Sync, Gov: Sync, Stargate: Sync,

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> Unpin for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: Unpin, Bank: Unpin, Custom: Unpin, Staking: Unpin, Distr: Unpin, Ibc: Unpin, Gov: Unpin, Stargate: Unpin,

§

impl<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate> UnwindSafe for Router<Bank, Custom, Wasm, Staking, Distr, Ibc, Gov, Stargate>
where Wasm: UnwindSafe, Bank: UnwindSafe, Custom: UnwindSafe, Staking: UnwindSafe, Distr: UnwindSafe, Ibc: UnwindSafe, Gov: UnwindSafe, Stargate: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<U> As for U

source§

fn as_<T>(self) -> T
where T: CastFrom<U>,

Casts self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.