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.
Sourcepub fn without_floats(&self) -> Self
pub fn without_floats(&self) -> Self
Restrict each InstructionKind to its subset not involving floats
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<'de> Deserialize<'de> for InstructionKinds
impl<'de> Deserialize<'de> for InstructionKinds
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 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