Trait EngineApiBuilder

Source
pub trait EngineApiBuilder<Node>: Send + Sync
where Node: FullNodeComponents,
{ type EngineApi: IntoEngineApiRpcModule + Send + Sync; // Required method fn build_engine_api( self, ctx: &AddOnsContext<'_, Node>, ) -> impl Future<Output = Result<Self::EngineApi, Report>> + Send; }
Expand description

Builder for engine API RPC module.

This builder type is responsible for providing an instance of IntoEngineApiRpcModule, which is effectively a helper trait that provides the type erased [jsonrpsee::RpcModule] instance that contains the method handlers for the engine API. See EngineApi for an implementation of IntoEngineApiRpcModule.

Required Associated Types§

Source

type EngineApi: IntoEngineApiRpcModule + Send + Sync

The engine API RPC module. Only required to be convertible to an [jsonrpsee::RpcModule].

Required Methods§

Source

fn build_engine_api( self, ctx: &AddOnsContext<'_, Node>, ) -> impl Future<Output = Result<Self::EngineApi, Report>> + Send

Builds the engine API instance given the provided AddOnsContext.

Self::EngineApi will be converted into the method handlers of the authenticated RPC server (engine API).

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§