domain_service::providers

Trait RpcProvider

source
pub trait RpcProvider<Block, Client, TxPool, CA, BE, AccountId, CIDP>
where Block: BlockT, Client: ProvideRuntimeApi<Block> + StorageProvider<Block, BE>, Client::Api: AccountNonceApi<Block, AccountId, Nonce>, TxPool: TransactionPool<Block = Block> + Sync + Send + 'static, CA: ChainApi<Block = Block> + 'static, BE: Backend<Block> + 'static, AccountId: DeserializeOwned + Encode + Debug + Decode + Display + Clone + Sync + Send + 'static,
{ type Deps: Clone; // Required methods fn deps( &self, full_deps: FullDeps<Block, Client, TxPool, CA, BE, CIDP>, ) -> Result<Self::Deps, Error>; fn rpc_id(&self) -> Option<Box<dyn SubscriptionIdProvider>>; fn rpc_builder<SE>( &self, deps: Self::Deps, subscription_task_executor: SubscriptionTaskExecutor, essential_task_spawner: SE, ) -> Result<RpcModule<()>, Box<dyn Error + Send + Sync>> where SE: SpawnEssentialNamed + Clone; }
Expand description

Provides adding custom ID to the RPC module.

Required Associated Types§

Required Methods§

source

fn deps( &self, full_deps: FullDeps<Block, Client, TxPool, CA, BE, CIDP>, ) -> Result<Self::Deps, Error>

source

fn rpc_id(&self) -> Option<Box<dyn SubscriptionIdProvider>>

source

fn rpc_builder<SE>( &self, deps: Self::Deps, subscription_task_executor: SubscriptionTaskExecutor, essential_task_spawner: SE, ) -> Result<RpcModule<()>, Box<dyn Error + Send + Sync>>
where SE: SpawnEssentialNamed + Clone,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

source§

impl<Block, Client, BE, TxPool, CA, AccountId, CIDP> RpcProvider<Block, Client, TxPool, CA, BE, AccountId, CIDP> for DefaultProvider
where Block: BlockT, Client: ProvideRuntimeApi<Block> + BlockBackend<Block> + HeaderBackend<Block> + AuxStore + HeaderMetadata<Block, Error = Error> + StorageProvider<Block, BE> + Send + Sync + 'static, Client::Api: TransactionPaymentRuntimeApi<Block, Balance> + AccountNonceApi<Block, AccountId, Nonce> + BlockBuilder<Block>, TxPool: TransactionPool<Block = Block> + Sync + Send + 'static, CA: ChainApi<Block = Block> + 'static, BE: Backend<Block> + 'static, AccountId: DeserializeOwned + Encode + Debug + Decode + Display + Clone + Sync + Send + 'static, CIDP: Clone,

source§

type Deps = FullDeps<Block, Client, TxPool, CA, BE, CIDP>