Trait libafl::events::EventFirer
source · pub trait EventFirer: UsesState {
fn fire(
&mut self,
state: &mut Self::State,
event: Event<<Self::State as UsesInput>::Input>
) -> Result<(), Error>;
fn log(
&mut self,
state: &mut Self::State,
severity_level: LogSeverity,
message: String
) -> Result<(), Error> { ... }
fn serialize_observers<OT>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error>
where
OT: ObserversTuple<Self::State> + Serialize,
{ ... }
fn configuration(&self) -> EventConfig { ... }
}
Expand description
EventFirer
fire an event.
Required Methods§
sourcefn fire(
&mut self,
state: &mut Self::State,
event: Event<<Self::State as UsesInput>::Input>
) -> Result<(), Error>
fn fire(
&mut self,
state: &mut Self::State,
event: Event<<Self::State as UsesInput>::Input>
) -> Result<(), Error>
Send off an Event
to the broker
For multi-processed managers, such as llmp::LlmpEventManager
,
this serializes the Event
and commits it to the llmp
page.
In this case, if you fire
faster than the broker can consume
(for example for each Input
, on multiple cores)
the llmp
shared map may fill up and the client will eventually OOM or panic
.
This should not happen for a normal use-case.
Provided Methods§
sourcefn log(
&mut self,
state: &mut Self::State,
severity_level: LogSeverity,
message: String
) -> Result<(), Error>
fn log(
&mut self,
state: &mut Self::State,
severity_level: LogSeverity,
message: String
) -> Result<(), Error>
Send off an Event::Log
event to the broker.
This is a shortcut for EventFirer::fire
with Event::Log
as argument.
sourcefn serialize_observers<OT>(&mut self, observers: &OT) -> Result<Vec<u8>, Error>where
OT: ObserversTuple<Self::State> + Serialize,
fn serialize_observers<OT>(&mut self, observers: &OT) -> Result<Vec<u8>, Error>where
OT: ObserversTuple<Self::State> + Serialize,
Serialize all observers for this type and manager
sourcefn configuration(&self) -> EventConfig
fn configuration(&self) -> EventConfig
Get the configuration