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

Fields§

§bank: Bank§custom: Custom§staking: Staking§distribution: Distr§ibc: Ibc§gov: Gov

Implementations§

source§

impl<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT> Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>where CustomT::ExecT: Clone + Debug + PartialEq + JsonSchema + 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,

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>

Trait Implementations§

source§

impl<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT> CosmosRouter for Router<BankT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>where CustomT::ExecT: Debug + Clone + PartialEq + JsonSchema + 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,

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 QueryC = <CustomT as Module>::QueryT

source§

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

source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<U> As for U

§

fn as_<T>(self) -> Twhere 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 Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere 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> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for Twhere 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 Twhere 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.