pub trait MutatedTransform<I, S>: Sizedwhere
    I: Input,
{ type Post: MutatedTransformPost<S>; fn try_transform_from(
        base: &Testcase<I>,
        state: &S,
        corpus_idx: CorpusId
    ) -> Result<Self, Error>; fn try_transform_into(self, state: &S) -> Result<(I, Self::Post), Error>; }
Expand description

A type which may both be transformed from and into a given input type, used to perform mutations over inputs which are not necessarily performable on the underlying type

This trait is implemented such that all testcases inherently transform to their inputs, should the input be cloneable.

Required Associated Types§

source

type Post: MutatedTransformPost<S>

Type indicating actions to be taken after the post-transformation input is executed

Required Methods§

source

fn try_transform_from(
    base: &Testcase<I>,
    state: &S,
    corpus_idx: CorpusId
) -> Result<Self, Error>

Transform the provided testcase into this type

source

fn try_transform_into(self, state: &S) -> Result<(I, Self::Post), Error>

Transform this instance back into the original input type

Implementors§

source§

impl<I, S> MutatedTransform<I, S> for Iwhere
    I: Input + Clone,

§

type Post = ()

source§

impl<S> MutatedTransform<BytesInput, S> for GeneralizedInputMetadatawhere
    S: HasCorpus,