Struct libafl::corpus::RandCorpusScheduler[][src]

pub struct RandCorpusScheduler<C, I, R, S> where
    S: HasCorpus<C, I> + HasRand<R>,
    C: Corpus<I>,
    I: Input,
    R: Rand
{ /* fields omitted */ }

Feed the fuzzer simpply with a random testcase on request

Implementations

impl<C, I, R, S> RandCorpusScheduler<C, I, R, S> where
    S: HasCorpus<C, I> + HasRand<R>,
    C: Corpus<I>,
    I: Input,
    R: Rand
[src]

#[must_use]
pub fn new() -> Self
[src]

Create a new RandCorpusScheduler that just schedules randomly.

Trait Implementations

impl<C, I, R, S> CorpusScheduler<I, S> for RandCorpusScheduler<C, I, R, S> where
    S: HasCorpus<C, I> + HasRand<R>,
    C: Corpus<I>,
    I: Input,
    R: Rand
[src]

fn next(&self, state: &mut S) -> Result<usize, Error>[src]

Gets the next entry at random

fn on_add(&self, _state: &mut S, _idx: usize) -> Result<(), Error>[src]

Add an entry to the corpus and return its index

fn on_replace(
    &self,
    _state: &mut S,
    _idx: usize,
    _testcase: &Testcase<I>
) -> Result<(), Error>
[src]

Replaces the testcase at the given idx

fn on_remove(
    &self,
    _state: &mut S,
    _idx: usize,
    _testcase: &Option<Testcase<I>>
) -> Result<(), Error>
[src]

Removes an entry from the corpus, returning it if it was present.

impl<C, I, R, S> Default for RandCorpusScheduler<C, I, R, S> where
    S: HasCorpus<C, I> + HasRand<R>,
    C: Corpus<I>,
    I: Input,
    R: Rand
[src]

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

impl<C, I, R, S> RefUnwindSafe for RandCorpusScheduler<C, I, R, S> where
    C: RefUnwindSafe,
    I: RefUnwindSafe,
    R: RefUnwindSafe,
    S: RefUnwindSafe

impl<C, I, R, S> Send for RandCorpusScheduler<C, I, R, S> where
    C: Send,
    I: Send,
    R: Send,
    S: Send

impl<C, I, R, S> Sync for RandCorpusScheduler<C, I, R, S> where
    C: Sync,
    I: Sync,
    R: Sync,
    S: Sync

impl<C, I, R, S> Unpin for RandCorpusScheduler<C, I, R, S> where
    C: Unpin,
    I: Unpin,
    R: Unpin,
    S: Unpin

impl<C, I, R, S> UnwindSafe for RandCorpusScheduler<C, I, R, S> where
    C: UnwindSafe,
    I: UnwindSafe,
    R: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.