[][src]Trait sc_service::RpcExtensionBuilder

pub trait RpcExtensionBuilder {
    type Output: RpcExtension<Metadata>;
    fn build(
        &self,
        deny: DenyUnsafe,
        subscription_executor: SubscriptionTaskExecutor
    ) -> Self::Output; }

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>

The type of the RPC extension that will be built.

Loading content...

Required methods

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.

Loading content...

Implementors

impl<F, R> RpcExtensionBuilder for F where
    F: Fn(DenyUnsafe, SubscriptionTaskExecutor) -> R,
    R: RpcExtension<Metadata>, 
[src]

type Output = R

impl<R> RpcExtensionBuilder for NoopRpcExtensionBuilder<R> where
    R: Clone + RpcExtension<Metadata>, 
[src]

type Output = R

Loading content...