Trait sc_service::RpcExtensionBuilder [−][src]
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>
[src]
The type of the RPC extension that will be built.
Required methods
fn build(
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
[src]
&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.
Implementors
impl<F, R> RpcExtensionBuilder for F where
F: Fn(DenyUnsafe, SubscriptionTaskExecutor) -> R,
R: RpcExtension<Metadata>,
[src]
F: Fn(DenyUnsafe, SubscriptionTaskExecutor) -> R,
R: RpcExtension<Metadata>,
type Output = R
fn build(
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
[src]
&self,
deny: DenyUnsafe,
subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
impl<R> RpcExtensionBuilder for NoopRpcExtensionBuilder<R> where
R: Clone + RpcExtension<Metadata>,
[src]
R: Clone + RpcExtension<Metadata>,
type Output = R
fn build(
&self,
_deny: DenyUnsafe,
_subscription_executor: SubscriptionTaskExecutor
) -> Self::Output
[src]
&self,
_deny: DenyUnsafe,
_subscription_executor: SubscriptionTaskExecutor
) -> Self::Output