Struct wasm_smith::InstructionKinds
source · pub struct InstructionKinds(/* private fields */);
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
source§impl FromStr for InstructionKinds
impl FromStr for InstructionKinds
impl Copy for InstructionKinds
Auto Trait Implementations§
impl Freeze for InstructionKinds
impl RefUnwindSafe for InstructionKinds
impl Send for InstructionKinds
impl Sync for InstructionKinds
impl Unpin for InstructionKinds
impl UnwindSafe for InstructionKinds
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