Struct clone_cw_multi_test::AppBuilder
source · pub struct AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> { /* private fields */ }Expand description
Utility to build App in stages. When particular properties are not explicitly set, then default values are used.
Implementations§
source§impl AppBuilder<BankKeeper, MockApi, MockStorage, FailingModule<Empty, Empty, Empty>, WasmKeeper<Empty, Empty>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule>
impl AppBuilder<BankKeeper, MockApi, MockStorage, FailingModule<Empty, Empty, Empty>, WasmKeeper<Empty, Empty>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule>
source§impl<ExecC, QueryC> AppBuilder<BankKeeper, MockApi, MockStorage, FailingModule<ExecC, QueryC, Empty>, WasmKeeper<ExecC, QueryC>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule>where
ExecC: CustomMsg + DeserializeOwned + 'static,
QueryC: Debug + CustomQuery + DeserializeOwned + 'static,
impl<ExecC, QueryC> AppBuilder<BankKeeper, MockApi, MockStorage, FailingModule<ExecC, QueryC, Empty>, WasmKeeper<ExecC, QueryC>, StakeKeeper, DistributionKeeper, IbcFailingModule, GovFailingModule>where
ExecC: CustomMsg + DeserializeOwned + 'static,
QueryC: Debug + CustomQuery + DeserializeOwned + 'static,
sourcepub fn new_custom() -> Self
pub fn new_custom() -> Self
Creates builder with default components designed to work with custom exec and query messages.
source§impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
impl<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
sourcepub fn with_wasm<NewWasm: Wasm<CustomT::ExecT, CustomT::QueryT>>(
self,
wasm: NewWasm,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, NewWasm, StakingT, DistrT, IbcT, GovT>
pub fn with_wasm<NewWasm: Wasm<CustomT::ExecT, CustomT::QueryT>>( self, wasm: NewWasm, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, NewWasm, StakingT, DistrT, IbcT, GovT>
Overwrites the default wasm executor.
At this point it is needed that new wasm implements some Wasm trait, but it doesn’t need
to be bound to Bank or Custom yet - as those may change. The cross-components validation is
done on final building.
sourcepub fn with_bank<NewBank: Bank>(
self,
bank: NewBank,
) -> AppBuilder<NewBank, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
pub fn with_bank<NewBank: Bank>( self, bank: NewBank, ) -> AppBuilder<NewBank, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
Overwrites the default bank interface.
sourcepub fn with_api<NewApi: Api>(
self,
api: NewApi,
) -> AppBuilder<BankT, NewApi, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
pub fn with_api<NewApi: Api>( self, api: NewApi, ) -> AppBuilder<BankT, NewApi, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
Overwrites the default api interface.
sourcepub fn with_storage<NewStorage: Storage>(
self,
storage: NewStorage,
) -> AppBuilder<BankT, ApiT, NewStorage, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
pub fn with_storage<NewStorage: Storage>( self, storage: NewStorage, ) -> AppBuilder<BankT, ApiT, NewStorage, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
Overwrites the default storage interface.
sourcepub fn with_custom<NewCustom: Module>(
self,
custom: NewCustom,
) -> AppBuilder<BankT, ApiT, StorageT, NewCustom, WasmT, StakingT, DistrT, IbcT, GovT>
pub fn with_custom<NewCustom: Module>( self, custom: NewCustom, ) -> AppBuilder<BankT, ApiT, StorageT, NewCustom, WasmT, StakingT, DistrT, IbcT, GovT>
Overwrites the default custom messages handler.
At this point it is needed that new custom implements some Module trait, but it doesn’t need
to be bound to ExecC or QueryC yet - as those may change. The cross-components validation is
done on final building.
sourcepub fn with_staking<NewStaking: Staking>(
self,
staking: NewStaking,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, NewStaking, DistrT, IbcT, GovT>
pub fn with_staking<NewStaking: Staking>( self, staking: NewStaking, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, NewStaking, DistrT, IbcT, GovT>
Overwrites the default staking interface.
sourcepub fn with_distribution<NewDistribution: Distribution>(
self,
distribution: NewDistribution,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, NewDistribution, IbcT, GovT>
pub fn with_distribution<NewDistribution: Distribution>( self, distribution: NewDistribution, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, NewDistribution, IbcT, GovT>
Overwrites the default distribution interface.
sourcepub fn with_ibc<NewIbc: Ibc>(
self,
ibc: NewIbc,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, NewIbc, GovT>
pub fn with_ibc<NewIbc: Ibc>( self, ibc: NewIbc, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, NewIbc, GovT>
Overwrites the default ibc interface.
If you wish to simply ignore/drop all returned IBC Messages,
you can use the IbcAcceptingModule type:
builder.with_ibc(IbcAcceptingModule::new())
sourcepub fn with_gov<NewGov: Gov>(
self,
gov: NewGov,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, NewGov>
pub fn with_gov<NewGov: Gov>( self, gov: NewGov, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, NewGov>
Overwrites the default gov interface.
sourcepub fn with_remote(
self,
remote: RemoteChannel,
) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
pub fn with_remote( self, remote: RemoteChannel, ) -> AppBuilder<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>
Sets the chain of the app
sourcepub fn with_block(self, block: BlockInfo) -> Self
pub fn with_block(self, block: BlockInfo) -> Self
Overwrites the initial block.
sourcepub fn build<F>(
self,
init_fn: F,
) -> AnyResult<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>>
pub fn build<F>( self, init_fn: F, ) -> AnyResult<App<BankT, ApiT, StorageT, CustomT, WasmT, StakingT, DistrT, IbcT, GovT>>
Builds final App. At this point all components type have to be properly related to each
other. If there are some generics related compilation errors, make sure that all components
are properly relating to each other.
Trait Implementations§
Auto Trait Implementations§
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> Freeze for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> !RefUnwindSafe for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> Send for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> Sync for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> Unpin for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
impl<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov> !UnwindSafe for AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr, Ibc, Gov>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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