pub trait ReactiveHandler<N: Network = Ethereum>: Send + Sync {
// Required methods
fn id(&self) -> HandlerId;
fn interests(&self) -> Vec<ReactiveInterest<N>>;
fn handle(
&self,
ctx: &ReactiveContext,
input: &ReactiveInput<N>,
state: &dyn StateView,
) -> Result<HandlerOutcome, HandlerError>;
}Expand description
Pure synchronous handler for reactive inputs.
Required Methods§
Sourcefn interests(&self) -> Vec<ReactiveInterest<N>>
fn interests(&self) -> Vec<ReactiveInterest<N>>
Interests used by subscribers and the local router.
Sourcefn handle(
&self,
ctx: &ReactiveContext,
input: &ReactiveInput<N>,
state: &dyn StateView,
) -> Result<HandlerOutcome, HandlerError>
fn handle( &self, ctx: &ReactiveContext, input: &ReactiveInput<N>, state: &dyn StateView, ) -> Result<HandlerOutcome, HandlerError>
Handle one input against a read-only cache view.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".