Trait libafl::events::EventManager [−][src]
pub trait EventManager<I, S> where
I: Input, { fn process<CS, E, OT>(
&mut self,
state: &mut S,
executor: &mut E,
scheduler: &CS
) -> Result<usize, Error>
where
CS: CorpusScheduler<I, S>,
E: Executor<I> + HasObservers<OT>,
OT: ObserversTuple; fn fire(&mut self, state: &mut S, event: Event<I>) -> Result<(), Error>; fn serialize_observers<OT>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error>
where
OT: ObserversTuple, { ... } fn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error>
where
OT: ObserversTuple, { ... } fn on_restart(&mut self, _state: &mut S) -> Result<(), Error> { ... } fn await_restart_safe(&mut self) { ... } }
EventManager
is the main communications hub.
For the “normal” multi-processed mode, you may want to look into RestartingEventManager
Required methods
fn process<CS, E, OT>(
&mut self,
state: &mut S,
executor: &mut E,
scheduler: &CS
) -> Result<usize, Error> where
CS: CorpusScheduler<I, S>,
E: Executor<I> + HasObservers<OT>,
OT: ObserversTuple,
[src]
&mut self,
state: &mut S,
executor: &mut E,
scheduler: &CS
) -> Result<usize, Error> where
CS: CorpusScheduler<I, S>,
E: Executor<I> + HasObservers<OT>,
OT: ObserversTuple,
Fire an Event Lookup for incoming events and process them. Return the number of processes events or an error
fn fire(&mut self, state: &mut S, event: Event<I>) -> Result<(), Error>
[src]
Send off an event to the broker
Provided methods
fn serialize_observers<OT>(&mut self, observers: &OT) -> Result<Vec<u8>, Error> where
OT: ObserversTuple,
[src]
OT: ObserversTuple,
Serialize all observers for this type and manager
fn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error> where
OT: ObserversTuple,
[src]
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error> where
OT: ObserversTuple,
Deserialize all observers for this type and manager
fn on_restart(&mut self, _state: &mut S) -> Result<(), Error>
[src]
For restarting event managers, implement a way to forward state to their next peers.
fn await_restart_safe(&mut self)
[src]
Block until we are safe to exit.
Implementors
impl<I, S> EventManager<I, S> for NopEventManager<I, S> where
I: Input,
[src]
impl<I, S> EventManager<I, S> for NopEventManager<I, S> where
I: Input,
[src]impl<I, S, SP, ST> EventManager<I, S> for LlmpEventManager<I, S, SP, ST> where
I: Input,
S: IfInteresting<I>,
SP: ShMemProvider,
ST: Stats,
[src]
impl<I, S, SP, ST> EventManager<I, S> for LlmpEventManager<I, S, SP, ST> where
I: Input,
S: IfInteresting<I>,
SP: ShMemProvider,
ST: Stats,
[src]fn await_restart_safe(&mut self)
[src]
fn await_restart_safe(&mut self)
[src]The llmp client needs to wait until a broker mapped all pages, before shutting down. Otherwise, the OS may already have removed the shared maps,
impl<I, S, SP, ST> EventManager<I, S> for LlmpRestartingEventManager<I, S, SP, ST> where
I: Input,
S: IfInteresting<I> + Serialize,
SP: ShMemProvider,
ST: Stats,
[src]
impl<I, S, SP, ST> EventManager<I, S> for LlmpRestartingEventManager<I, S, SP, ST> where
I: Input,
S: IfInteresting<I> + Serialize,
SP: ShMemProvider,
ST: Stats,
[src]fn await_restart_safe(&mut self)
[src]
fn await_restart_safe(&mut self)
[src]The llmp client needs to wait until a broker mapped all pages, before shutting down. Otherwise, the OS may already have removed the shared maps,
impl<I, S, ST> EventManager<I, S> for SimpleEventManager<I, S, ST> where
I: Input,
ST: Stats,
[src]
impl<I, S, ST> EventManager<I, S> for SimpleEventManager<I, S, ST> where
I: Input,
ST: Stats,
[src]