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§

source

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.

source

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.

source

fn await_restart_safe(&mut self)

Block until we are safe to exit, usually called inside on_restart.

Implementors§

source§

impl<EM, M> EventRestarter for MonitorTypedEventManager<EM, M>
where EM: EventRestarter,

source§

impl<EM, SP> EventRestarter for CentralizedEventManager<EM, SP>
where EM: EventRestarter, SP: ShMemProvider + 'static,

source§

impl<EMH, S> EventRestarter for TcpEventManager<EMH, S>
where EMH: EventManagerHooksTuple<S>, S: State,

source§

impl<EMH, S, SP> EventRestarter for LlmpEventManager<EMH, S, SP>
where S: State, SP: ShMemProvider,

source§

impl<EMH, S, SP> EventRestarter for LlmpRestartingEventManager<EMH, S, SP>

source§

impl<EMH, S, SP> EventRestarter for TcpRestartingEventManager<EMH, S, SP>

source§

impl<MT, S> EventRestarter for SimpleEventManager<MT, S>
where MT: Monitor, S: State,

source§

impl<MT, S, SP> EventRestarter for SimpleRestartingEventManager<MT, S, SP>
where MT: Monitor, S: State, SP: ShMemProvider,

source§

impl<S> EventRestarter for NopEventManager<S>
where S: State,