Skip to main content

OnStateHook

Trait OnStateHook 

Source
pub trait OnStateHook: Send + 'static {
    // Required method
    fn on_state(&mut self, state: &HashMap<Address, Account, FbBuildHasher<20>>);
}
Expand description

A hook that is called when state changes are committed.

Required Methods§

Source

fn on_state(&mut self, state: &HashMap<Address, Account, FbBuildHasher<20>>)

Invoked with the state being committed.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl OnStateHook for NoopHook

Source§

impl<F> OnStateHook for F
where F: FnMut(&HashMap<Address, Account, FbBuildHasher<20>>) + Send + 'static,