Trait libafl::events::EventRestarter
source · pub trait EventRestarter: UsesState {
// Provided methods
fn on_restart(&mut self, state: &mut Self::State) -> Result<(), Error> { ... }
fn send_exiting(&mut self) -> Result<(), Error> { ... }
fn await_restart_safe(&mut self) { ... }
}
Expand description
Restartable trait
Provided Methods§
sourcefn on_restart(&mut self, state: &mut Self::State) -> Result<(), Error>
fn on_restart(&mut self, state: &mut Self::State) -> Result<(), Error>
For restarting event managers, implement a way to forward state to their next peers.
You must ensure that HasCurrentStage::on_restart
will be invoked in this method, by you
or an internal EventRestarter
, before the state is saved for recovery.
sourcefn send_exiting(&mut self) -> Result<(), Error>
fn send_exiting(&mut self) -> Result<(), Error>
Send information that this client is exiting. No need to restart us any longer, and no need to print an error, either.
sourcefn await_restart_safe(&mut self)
fn await_restart_safe(&mut self)
Block until we are safe to exit, usually called inside on_restart
.