Struct wasm_smith::InstructionKinds
source · pub struct InstructionKinds(_);
Expand description
A container for the kinds of instructions that wasm-smith is allowed to emit.
Example
let kinds = InstructionKinds::new(&[InstructionKind::Numeric, InstructionKind::Memory]);
assert!(kinds.contains(InstructionKind::Memory));
Implementations§
source§impl InstructionKinds
impl InstructionKinds
sourcepub fn new(kinds: &[InstructionKind]) -> Self
pub fn new(kinds: &[InstructionKind]) -> Self
Create a new container.
sourcepub fn all() -> Self
pub fn all() -> Self
Include all InstructionKinds.
sourcepub fn none() -> Self
pub fn none() -> Self
Include no InstructionKinds.
sourcepub fn contains(&self, kind: InstructionKind) -> bool
pub fn contains(&self, kind: InstructionKind) -> bool
Check if the InstructionKind is contained in this set.
Trait Implementations§
source§impl Clone for InstructionKinds
impl Clone for InstructionKinds
source§fn clone(&self) -> InstructionKinds
fn clone(&self) -> InstructionKinds
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for InstructionKinds
impl Debug for InstructionKinds
source§impl Default for InstructionKinds
impl Default for InstructionKinds
source§fn default() -> InstructionKinds
fn default() -> InstructionKinds
Returns the “default value” for a type. Read more