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§
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,
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.