pub trait Environment: AutoTraits {
type Storage: Storage<Context = Self::StorageContext>;
type Network: Network<Node = Self::ValidatorNode>;
type Signer: Signer;
type Wallet: Wallet;
type ValidatorNode: ValidatorNode + AutoTraits + Clone;
type StorageContext: Context<Extra: ExecutionRuntimeContext> + AutoTraits;
// Required methods
fn storage(&self) -> &Self::Storage;
fn network(&self) -> &Self::Network;
fn signer(&self) -> &Self::Signer;
fn wallet(&self) -> &Self::Wallet;
}Expand description
The collection of services (storage, network, signer and wallet) available to the client.
Required Associated Types§
Sourcetype Storage: Storage<Context = Self::StorageContext>
type Storage: Storage<Context = Self::StorageContext>
The persistent storage backend.
Sourcetype Network: Network<Node = Self::ValidatorNode>
type Network: Network<Node = Self::ValidatorNode>
The provider of validator nodes.
Sourcetype ValidatorNode: ValidatorNode + AutoTraits + Clone
type ValidatorNode: ValidatorNode + AutoTraits + Clone
The validator node type produced by the network provider.
Sourcetype StorageContext: Context<Extra: ExecutionRuntimeContext> + AutoTraits
type StorageContext: Context<Extra: ExecutionRuntimeContext> + AutoTraits
The storage context used by the storage backend.