pub struct ExceptionOps { /* private fields */ }Expand description
A description of a Wasm module that exercises exception throw/catch.
Implementations§
Source§impl ExceptionOps
impl ExceptionOps
Sourcepub fn to_wasm_binary(&mut self) -> Vec<u8> ⓘ
pub fn to_wasm_binary(&mut self) -> Vec<u8> ⓘ
Encode as a Wasm module.
Sourcepub fn expected_result(&mut self) -> i32
pub fn expected_result(&mut self) -> i32
Number of scenarios; expected return value from “run” when all catches succeed.
Trait Implementations§
Source§impl Clone for ExceptionOps
impl Clone for ExceptionOps
Source§impl Debug for ExceptionOps
impl Debug for ExceptionOps
Source§impl Default for ExceptionOps
impl Default for ExceptionOps
Source§impl DefaultMutate for ExceptionOps
impl DefaultMutate for ExceptionOps
Source§type DefaultMutate = ExceptionOpsMutator
type DefaultMutate = ExceptionOpsMutator
The default mutator for this type.
Source§impl<'de> Deserialize<'de> for ExceptionOps
impl<'de> Deserialize<'de> for ExceptionOps
Source§fn 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
Source§impl<MutatorT0, MutatorT1, MutatorT2> Generate<ExceptionOps> for ExceptionOpsMutator<MutatorT0, MutatorT1, MutatorT2>where
MutatorT0: Mutate<ExceptionOpsLimits> + Generate<ExceptionOpsLimits>,
MutatorT1: Mutate<Vec<TagSig>> + Generate<Vec<TagSig>>,
MutatorT2: Mutate<Vec<Scenario>> + Generate<Vec<Scenario>>,
impl<MutatorT0, MutatorT1, MutatorT2> Generate<ExceptionOps> for ExceptionOpsMutator<MutatorT0, MutatorT1, MutatorT2>where
MutatorT0: Mutate<ExceptionOpsLimits> + Generate<ExceptionOpsLimits>,
MutatorT1: Mutate<Vec<TagSig>> + Generate<Vec<TagSig>>,
MutatorT2: Mutate<Vec<Scenario>> + Generate<Vec<Scenario>>,
Source§fn generate(&mut self, cx: &mut Context) -> Result<ExceptionOps>
fn generate(&mut self, cx: &mut Context) -> Result<ExceptionOps>
Generate a random
T value from scratch. Read moreSource§impl<MutatorT0, MutatorT1, MutatorT2> Mutate<ExceptionOps> for ExceptionOpsMutator<MutatorT0, MutatorT1, MutatorT2>where
MutatorT0: Mutate<ExceptionOpsLimits>,
MutatorT1: Mutate<Vec<TagSig>>,
MutatorT2: Mutate<Vec<Scenario>>,
impl<MutatorT0, MutatorT1, MutatorT2> Mutate<ExceptionOps> for ExceptionOpsMutator<MutatorT0, MutatorT1, MutatorT2>where
MutatorT0: Mutate<ExceptionOpsLimits>,
MutatorT1: Mutate<Vec<TagSig>>,
MutatorT2: Mutate<Vec<Scenario>>,
Source§fn mutate(
&mut self,
mutations: &mut Candidates<'_>,
value: &mut ExceptionOps,
) -> Result<()>
fn mutate( &mut self, mutations: &mut Candidates<'_>, value: &mut ExceptionOps, ) -> Result<()>
Pseudo-randomly mutate the given value. Read more
Source§fn mutation_count(&self, value: &ExceptionOps, shrink: bool) -> Option<u32>
fn mutation_count(&self, value: &ExceptionOps, shrink: bool) -> Option<u32>
Return the number of mutations that [
mutate][Mutate::mutate] would
register for the given value. Read more§fn generate_via_mutate(
&mut self,
context: &mut Context,
iters: usize,
) -> Result<T, Error>
fn generate_via_mutate( &mut self, context: &mut Context, iters: usize, ) -> Result<T, Error>
Generate a new value by mutating its default value
iters times. Read more§fn or<M>(self, other: M) -> Or<Self, M>where
Self: Sized,
fn or<M>(self, other: M) -> Or<Self, M>where
Self: Sized,
Create a new mutator that performs either this mutation or the
other
mutation. Read more§fn map<F>(self, f: F) -> Map<Self, F>
fn map<F>(self, f: F) -> Map<Self, F>
Map a function over the mutations produced by this mutator. Read more
Auto Trait Implementations§
impl Freeze for ExceptionOps
impl RefUnwindSafe for ExceptionOps
impl Send for ExceptionOps
impl Sync for ExceptionOps
impl Unpin for ExceptionOps
impl UnsafeUnpin for ExceptionOps
impl UnwindSafe for ExceptionOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more