Skip to main content

OnStateHook

Trait OnStateHook 

Source
pub trait OnStateHook: Send + 'static {
    // Required method
    fn on_state(&mut self, state: StateUpdate);
}
Available on crate feature evm only.
Expand description

Receives per-transaction state changes streamed from block execution.

Required Methods§

Source

fn on_state(&mut self, state: StateUpdate)

Observes one committed state update.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl OnStateHook for StateRootUpdateHook

Source§

fn on_state(&mut self, state: StateUpdate)

Implementors§

Source§

impl<F> OnStateHook for F
where F: FnMut(StateUpdate) + Send + 'static,