Trait sc_service::RpcExtensionBuilder
source · [−]pub trait RpcExtensionBuilder {
type Output: RpcExtension<Metadata>;
fn build(
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output;
}
Expand description
A utility trait for building an RPC extension given a DenyUnsafe
instance.
This is useful since at service definition time we don’t know whether the
specific interface where the RPC extension will be exposed is safe or not.
This trait allows us to lazily build the RPC extension whenever we bind the
service to an interface.
Associated Types
type Output: RpcExtension<Metadata>
type Output: RpcExtension<Metadata>
The type of the RPC extension that will be built.
Required methods
fn build(
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
fn build(
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
Returns an instance of the RPC extension for a particular DenyUnsafe
value, e.g. the RPC extension might not expose some unsafe methods.