Trait libafl::observers::ObserversTuple
source · pub trait ObserversTuple<S>: MatchName + Debugwhere
S: UsesInput,{
fn pre_exec_all(
&mut self,
state: &mut S,
input: &S::Input
) -> Result<(), Error>;
fn post_exec_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>;
fn pre_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input
) -> Result<(), Error>;
fn post_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>;
fn observes_stdout(&self) -> bool;
fn observes_stderr(&self) -> bool;
fn observe_stdout(&mut self, stdout: &[u8]);
fn observe_stderr(&mut self, stderr: &[u8]);
}
Expand description
A haskell-style tuple of observers
Required Methods§
sourcefn pre_exec_all(&mut self, state: &mut S, input: &S::Input) -> Result<(), Error>
fn pre_exec_all(&mut self, state: &mut S, input: &S::Input) -> Result<(), Error>
This is called right before the next execution.
sourcefn post_exec_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>
fn post_exec_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>
This is called right after the last execution
sourcefn pre_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input
) -> Result<(), Error>
fn pre_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input
) -> Result<(), Error>
This is called right before the next execution in the child process, if any.
sourcefn post_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>
fn post_exec_child_all(
&mut self,
state: &mut S,
input: &S::Input,
exit_kind: &ExitKind
) -> Result<(), Error>
This is called right after the last execution in the child process, if any.
sourcefn observes_stdout(&self) -> bool
fn observes_stdout(&self) -> bool
Returns true if a stdout
observer was added to the list
sourcefn observes_stderr(&self) -> bool
fn observes_stderr(&self) -> bool
Returns true if a stderr
observer was added to the list
sourcefn observe_stdout(&mut self, stdout: &[u8])
fn observe_stdout(&mut self, stdout: &[u8])
Runs observe_stdout
for all stdout observers in the list
sourcefn observe_stderr(&mut self, stderr: &[u8])
fn observe_stderr(&mut self, stderr: &[u8])
Runs observe_stderr
for all stderr observers in the list
Implementations on Foreign Types§
source§impl<S> ObserversTuple<S> for ()where
S: UsesInput,
impl<S> ObserversTuple<S> for ()where
S: UsesInput,
source§fn observes_stdout(&self) -> bool
fn observes_stdout(&self) -> bool
Returns true if a stdout
observer was added to the list
source§fn observes_stderr(&self) -> bool
fn observes_stderr(&self) -> bool
Returns true if a stderr
observer was added to the list
source§fn observe_stdout(&mut self, stdout: &[u8])
fn observe_stdout(&mut self, stdout: &[u8])
Runs observe_stdout
for all stdout observers in the list
source§fn observe_stderr(&mut self, stderr: &[u8])
fn observe_stderr(&mut self, stderr: &[u8])
Runs observe_stderr
for all stderr observers in the list
fn pre_exec_all(&mut self, _state: &mut S, _input: &S::Input) -> Result<(), Error>
fn post_exec_all(
&mut self,
_state: &mut S,
_input: &S::Input,
_exit_kind: &ExitKind
) -> Result<(), Error>
fn pre_exec_child_all(
&mut self,
_state: &mut S,
_input: &S::Input
) -> Result<(), Error>
fn post_exec_child_all(
&mut self,
_state: &mut S,
_input: &S::Input,
_exit_kind: &ExitKind
) -> Result<(), Error>
source§impl<Head, Tail, S> ObserversTuple<S> for (Head, Tail)where
Head: Observer<S>,
Tail: ObserversTuple<S>,
S: UsesInput,
impl<Head, Tail, S> ObserversTuple<S> for (Head, Tail)where
Head: Observer<S>,
Tail: ObserversTuple<S>,
S: UsesInput,
source§fn observes_stdout(&self) -> bool
fn observes_stdout(&self) -> bool
Returns true if a stdout
observer was added to the list
source§fn observes_stderr(&self) -> bool
fn observes_stderr(&self) -> bool
Returns true if a stderr
observer was added to the list
source§fn observe_stdout(&mut self, stdout: &[u8])
fn observe_stdout(&mut self, stdout: &[u8])
Runs observe_stdout
for all stdout observers in the list
source§fn observe_stderr(&mut self, stderr: &[u8])
fn observe_stderr(&mut self, stderr: &[u8])
Runs observe_stderr
for all stderr observers in the list