pub struct AppBuilder<Bank, Api, Storage, Custom, Wasm, Staking, Distr> { /* private fields */ }
Expand description

Utility to build App in stages. If particular items wont be set, defaults would be used

Implementations

Creates builder with default components working with empty exec and query messages.

Creates builder with default components designed to work with custom exec and query messages.

Overwrites 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.

Also it is possible to completely abandon trait bounding here which would not be bad idea, however it might make the message on build creepy in many cases, so as for properly build App we always want Wasm to be Wasm, some checks are done early.

Overwrites default bank interface

Overwrites default api interface

Overwrites default storage interface

Overwrites 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.

Also it is possible to completely abandon trait bounding here which would not be bad idea, however it might make the message on build creepy in many cases, so as for properly build App we always want Wasm to be Wasm, some checks are done early.

Overwrites default bank interface

Overwrites default bank interface

Overwrites default initial block

Builds final App. At this point all components type have to be properly related to each other. If there are some generics related compilation error make sure, that all components are properly relating to each other.

Trait Implementations

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.