pub trait EngineApiBuilder<Node>: Send + Syncwhere
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§
Sourcetype EngineApi: IntoEngineApiRpcModule + Send + Sync
type EngineApi: IntoEngineApiRpcModule + Send + Sync
The engine API RPC module. Only required to be convertible to an [jsonrpsee::RpcModule
].
Required Methods§
Sourcefn build_engine_api(
self,
ctx: &AddOnsContext<'_, Node>,
) -> impl Future<Output = Result<Self::EngineApi, Report>> + Send
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.