Expand description
A simple, single-threaded event manager that just logs
Implementations
sourceimpl<I, MT, S> SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcepub fn new(monitor: MT) -> Self
pub fn new(monitor: MT) -> Self
Creates a new SimpleEventManager
.
Trait Implementations
sourceimpl<I, MT, S> EventFirer<I> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> EventFirer<I> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn log<S>(
&mut self,
state: &mut S,
severity_level: LogSeverity,
message: String
) -> Result<(), Error>
fn log<S>(
&mut self,
state: &mut S,
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. Read moresourcefn serialize_observers<OT, S>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error>where
OT: ObserversTuple<I, S> + Serialize,
fn serialize_observers<OT, S>(
&mut self,
observers: &OT
) -> Result<Vec<u8>, Error>where
OT: ObserversTuple<I, S> + Serialize,
Serialize all observers for this type and manager
sourcefn configuration(&self) -> EventConfig
fn configuration(&self) -> EventConfig
Get the configuration
sourceimpl<E, I, MT, S, Z> EventProcessor<E, I, S, Z> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<E, I, MT, S, Z> EventProcessor<E, I, S, Z> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn process(
&mut self,
_fuzzer: &mut Z,
state: &mut S,
_executor: &mut E
) -> Result<usize, Error>
fn process(
&mut self,
_fuzzer: &mut Z,
state: &mut S,
_executor: &mut E
) -> Result<usize, Error>
Lookup for incoming events and process them.
Return the number of processes events or an error Read more
sourcefn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error>where
OT: ObserversTuple<I, S> + DeserializeOwned,
fn deserialize_observers<OT>(
&mut self,
observers_buf: &[u8]
) -> Result<OT, Error>where
OT: ObserversTuple<I, S> + DeserializeOwned,
Deserialize all observers for this type and manager
sourceimpl<I, MT, S> EventRestarter<S> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> EventRestarter<S> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn on_restart(&mut self, _state: &mut S) -> Result<(), Error>
fn on_restart(&mut self, _state: &mut S) -> Result<(), Error>
For restarting event managers, implement a way to forward state to their next peers.
sourcefn await_restart_safe(&mut self)
fn await_restart_safe(&mut self)
Block until we are safe to exit.
sourceimpl<I, MT, S> HasCustomBufHandlers<S> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> HasCustomBufHandlers<S> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn add_custom_buf_handler(
&mut self,
handler: Box<dyn FnMut(&mut S, &String, &[u8]) -> Result<CustomBufEventResult, Error>>
)
fn add_custom_buf_handler(
&mut self,
handler: Box<dyn FnMut(&mut S, &String, &[u8]) -> Result<CustomBufEventResult, Error>>
)
Adds a custom buffer handler that will run for each incoming CustomBuf
event.
sourceimpl<I, MT, S> HasEventManagerId for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> HasEventManagerId for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn mgr_id(&self) -> EventManagerId
fn mgr_id(&self) -> EventManagerId
The id of this manager. For Multiprocessed
EventManager
s,
each client should have a unique ids. Read moresourceimpl<I, MT, S> ProgressReporter<I> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
impl<I, MT, S> ProgressReporter<I> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
sourcefn maybe_report_progress<S>(
&mut self,
state: &mut S,
last_report_time: Duration,
monitor_timeout: Duration
) -> Result<Duration, Error>where
S: HasExecutions + HasClientPerfMonitor + HasMetadata,
fn maybe_report_progress<S>(
&mut self,
state: &mut S,
last_report_time: Duration,
monitor_timeout: Duration
) -> Result<Duration, Error>where
S: HasExecutions + HasClientPerfMonitor + HasMetadata,
Given the last time, if
monitor_timeout
seconds passed, send off an info/monitor/heartbeat message to the broker.
Returns the new last
time (so the old one, unless monitor_timeout
time has passed and monitor have been sent)
Will return an crate::Error
, if the stats could not be sent. Read moreimpl<E, I, MT, S, Z> EventManager<E, I, S, Z> for SimpleEventManager<I, MT, S>where
I: Input,
MT: Monitor + Debug,
Auto Trait Implementations
impl<I, MT, S> !RefUnwindSafe for SimpleEventManager<I, MT, S>
impl<I, MT, S> !Send for SimpleEventManager<I, MT, S>
impl<I, MT, S> !Sync for SimpleEventManager<I, MT, S>
impl<I, MT, S> Unpin for SimpleEventManager<I, MT, S>where
I: Unpin,
MT: Unpin,
S: Unpin,
impl<I, MT, S> !UnwindSafe for SimpleEventManager<I, MT, S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.