Trait libafl::feedbacks::Feedback[][src]

pub trait Feedback<I>: Named + Serialize + DeserializeOwned where
    I: Input
{ fn is_interesting<OT>(
        &mut self,
        input: &I,
        observers: &OT,
        exit_kind: &ExitKind
    ) -> Result<bool, Error>
    where
        OT: ObserversTuple
; fn append_metadata(
        &mut self,
        _testcase: &mut Testcase<I>
    ) -> Result<(), Error> { ... }
fn discard_metadata(&mut self, _input: &I) -> Result<(), Error> { ... } }

Feedbacks evaluate the observers. Basically, they reduce the information provided by an observer to a value, indicating the “interestingness” of the last run.

Required methods

fn is_interesting<OT>(
    &mut self,
    input: &I,
    observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

is_interesting should return the “Interestingness” from 0 to 255 (percent times 2.55)

Loading content...

Provided methods

fn append_metadata(&mut self, _testcase: &mut Testcase<I>) -> Result<(), Error>[src]

Append to the testcase the generated metadata in case of a new corpus item

fn discard_metadata(&mut self, _input: &I) -> Result<(), Error>[src]

Discard the stored metadata in case that the testcase is not added to the corpus

Loading content...

Implementations on Foreign Types

impl<I> Feedback<I> for () where
    I: Input
[src]

Hack to use () as empty Feedback

fn is_interesting<OT>(
    &mut self,
    _input: &I,
    _observers: &OT,
    _exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

Loading content...

Implementors

impl<A, B, I> Feedback<I> for AndFeedback<A, B, I> where
    A: Feedback<I>,
    B: Feedback<I>,
    I: Input
[src]

fn is_interesting<OT>(
    &mut self,
    input: &I,
    observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

fn discard_metadata(&mut self, input: &I) -> Result<(), Error>[src]

impl<A, B, I> Feedback<I> for OrFeedback<A, B, I> where
    A: Feedback<I>,
    B: Feedback<I>,
    I: Input
[src]

fn is_interesting<OT>(
    &mut self,
    input: &I,
    observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

fn discard_metadata(&mut self, input: &I) -> Result<(), Error>[src]

impl<A, I> Feedback<I> for NotFeedback<A, I> where
    A: Feedback<I>,
    I: Input
[src]

fn is_interesting<OT>(
    &mut self,
    input: &I,
    observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

fn discard_metadata(&mut self, input: &I) -> Result<(), Error>[src]

impl<I> Feedback<I> for CrashFeedback where
    I: Input
[src]

fn is_interesting<OT>(
    &mut self,
    _input: &I,
    _observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

impl<I> Feedback<I> for TimeFeedback where
    I: Input
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

Append to the testcase the generated metadata in case of a new corpus item

fn discard_metadata(&mut self, _input: &I) -> Result<(), Error>[src]

Discard the stored metadata in case that the testcase is not added to the corpus

fn is_interesting<OT>(
    &mut self,
    _input: &I,
    observers: &OT,
    _exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

impl<I> Feedback<I> for TimeoutFeedback where
    I: Input
[src]

fn is_interesting<OT>(
    &mut self,
    _input: &I,
    _observers: &OT,
    exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

impl<I, O> Feedback<I> for ReachabilityFeedback<O> where
    I: Input,
    O: MapObserver<usize>, 
[src]

fn is_interesting<OT: ObserversTuple>(
    &mut self,
    _input: &I,
    observers: &OT,
    _exit_kind: &ExitKind
) -> Result<bool, Error>
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

fn discard_metadata(&mut self, _input: &I) -> Result<(), Error>[src]

impl<O, R, T, I> Feedback<I> for MapFeedback<O, R, T> where
    T: Integer + Default + Copy + 'static + Serialize + DeserializeOwned,
    R: Reducer<T>,
    O: MapObserver<T>,
    I: Input
[src]

fn discard_metadata(&mut self, _input: &I) -> Result<(), Error>[src]

Discard the stored metadata in case that the testcase is not added to the corpus

fn is_interesting<OT>(
    &mut self,
    _input: &I,
    observers: &OT,
    _exit_kind: &ExitKind
) -> Result<bool, Error> where
    OT: ObserversTuple
[src]

fn append_metadata(&mut self, testcase: &mut Testcase<I>) -> Result<(), Error>[src]

Loading content...