pub trait EngineRequestHandler: Send + Sync {
type Event: Send;
type Request;
// Required methods
fn on_event(&mut self, event: FromEngine<Self::Request>);
fn poll(
&mut self,
cx: &mut Context<'_>,
) -> Poll<RequestHandlerEvent<Self::Event>>;
}
Expand description
A type that processes incoming requests (e.g. requests from the consensus layer, engine API, such as newPayload).
§Control flow
Requests and certain updates, such as a change in backfill sync status, are delegated to this
type via EngineRequestHandler::on_event
. This type is responsible for processing the
incoming requests and advancing the chain and emit events when it is polled.
Required Associated Types§
Required Methods§
Sourcefn on_event(&mut self, event: FromEngine<Self::Request>)
fn on_event(&mut self, event: FromEngine<Self::Request>)
Informs the handler about an event from the EngineHandler
.