pub struct Testcase<I>where
I: Input,{ /* private fields */ }
Expand description
An entry in the Testcase Corpus
Implementations
sourceimpl<I> Testcase<I>where
I: Input,
impl<I> Testcase<I>where
I: Input,
Impl of a testcase
sourcepub fn load_input(&mut self) -> Result<&I, Error>
pub fn load_input(&mut self) -> Result<&I, Error>
Returns this testcase with a loaded input
sourcepub fn store_input(&mut self) -> Result<bool, Error>
pub fn store_input(&mut self) -> Result<bool, Error>
Store the input to disk if possible
sourcepub fn filename_mut(&mut self) -> &mut Option<String>
pub fn filename_mut(&mut self) -> &mut Option<String>
Get the filename, if any (mutable)
sourcepub fn set_filename(&mut self, filename: String)
pub fn set_filename(&mut self, filename: String)
Set the filename
sourcepub fn exec_time_mut(&mut self) -> &mut Option<Duration>
pub fn exec_time_mut(&mut self) -> &mut Option<Duration>
Get the execution time of the testcase (mutable)
sourcepub fn set_exec_time(&mut self, time: Duration)
pub fn set_exec_time(&mut self, time: Duration)
Sets the execution time of the current testcase
sourcepub fn executions(&self) -> &usize
pub fn executions(&self) -> &usize
Get the executions
sourcepub fn executions_mut(&mut self) -> &mut usize
pub fn executions_mut(&mut self) -> &mut usize
Get the executions (mutable)
sourcepub fn fuzz_level(&self) -> usize
pub fn fuzz_level(&self) -> usize
Get the fuzz_level
sourcepub fn set_fuzz_leve(&mut self, fuzz_level: usize)
pub fn set_fuzz_leve(&mut self, fuzz_level: usize)
Set the fuzz_level
sourcepub fn set_fuzzed(&mut self, fuzzed: bool)
pub fn set_fuzzed(&mut self, fuzzed: bool)
Set if it was fuzzed
sourcepub fn with_filename(input: I, filename: String) -> Self
pub fn with_filename(input: I, filename: String) -> Self
Create a new Testcase instance given an Input
and a filename
sourcepub fn with_executions(input: I, executions: usize) -> Self
pub fn with_executions(input: I, executions: usize) -> Self
Create a new Testcase instance given an Input
and the number of executions
Trait Implementations
sourceimpl<'de, I> Deserialize<'de> for Testcase<I>where
I: Input,
I: DeserializeOwned,
impl<'de, I> Deserialize<'de> for Testcase<I>where
I: Input,
I: DeserializeOwned,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<I> HasMetadata for Testcase<I>where
I: Input,
impl<I> HasMetadata for Testcase<I>where
I: Input,
sourcefn metadata(&self) -> &SerdeAnyMap
fn metadata(&self) -> &SerdeAnyMap
Get all the metadata into an hashbrown::HashMap
sourcefn metadata_mut(&mut self) -> &mut SerdeAnyMap
fn metadata_mut(&mut self) -> &mut SerdeAnyMap
Get all the metadata into an hashbrown::HashMap
(mutable)
sourcefn add_metadata<M>(&mut self, meta: M)where
M: SerdeAny,
fn add_metadata<M>(&mut self, meta: M)where
M: SerdeAny,
Add a metadata to the metadata map
sourcefn has_metadata<M>(&self) -> boolwhere
M: SerdeAny,
fn has_metadata<M>(&self) -> boolwhere
M: SerdeAny,
Check for a metadata
Auto Trait Implementations
impl<I> !RefUnwindSafe for Testcase<I>
impl<I> !Send for Testcase<I>
impl<I> !Sync for Testcase<I>
impl<I> Unpin for Testcase<I>where
I: Unpin,
impl<I> !UnwindSafe for Testcase<I>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Tail, T> Prepend<T> for Tail
impl<Tail, T> Prepend<T> for Tail
type PreprendResult = Tail
type PreprendResult = Tail
sourcefn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
fn prepend(self, value: T) -> (T, <Tail as Prepend<T>>::PreprendResult)
Prepend a value to this tuple, returning a new tuple with prepended value.