Trait libafl::inputs::Input

source ·
pub trait Input: Clone + Serialize + DeserializeOwned + Debug {
    // Required method
    fn generate_name(&self, idx: usize) -> String;

    // Provided methods
    fn to_file<P>(&self, path: P) -> Result<(), Error>
       where P: AsRef<Path> { ... }
    fn from_file<P>(path: P) -> Result<Self, Error>
       where P: AsRef<Path> { ... }
    fn wrapped_as_testcase(&mut self) { ... }
}
Expand description

An input for the target

Required Methods§

source

fn generate_name(&self, idx: usize) -> String

Generate a name for this input, the user is responsible for making each name of testcase unique.

Provided Methods§

source

fn to_file<P>(&self, path: P) -> Result<(), Error>
where P: AsRef<Path>,

Write this input to the file

source

fn from_file<P>(path: P) -> Result<Self, Error>
where P: AsRef<Path>,

Load the content of this input from a file

source

fn wrapped_as_testcase(&mut self)

An hook executed if the input is stored as Testcase

Object Safety§

This trait is not object safe.

Implementors§