Trait libafl::corpus::Corpus [−][src]
pub trait Corpus<I>: Serialize + DeserializeOwned where
I: Input, {
fn count(&self) -> usize;
fn add(&mut self, testcase: Testcase<I>) -> Result<usize, Error>;
fn replace(
&mut self,
idx: usize,
testcase: Testcase<I>
) -> Result<(), Error>;
fn remove(&mut self, idx: usize) -> Result<Option<Testcase<I>>, Error>;
fn get(&self, idx: usize) -> Result<&RefCell<Testcase<I>>, Error>;
fn current(&self) -> &Option<usize>;
fn current_mut(&mut self) -> &mut Option<usize>;
fn is_empty(&self) -> bool { ... }
}
Expand description
Corpus with all current testcases
Required methods
Add an entry to the corpus and return its index
Replaces the testcase at the given idx
Removes an entry from the corpus, returning it if it was present.
fn current_mut(&mut self) -> &mut Option<usize>
fn current_mut(&mut self) -> &mut Option<usize>
Current testcase scheduled (mut)