Enum alure::Instr [−][src]
#[non_exhaustive] pub enum Instr<Extension = NOp> where
Extension: InstructionSet, { ControlFlow(ControlFlowOp), Put(PutOp), Move(MoveOp), Cmp(CmpOp), Arithmetic(ArithmeticOp), Bitwise(BitwiseOp), Bytes(BytesOp), Digest(DigestOp), ExtensionCodes(Extension), Nop, }
Expand description
Full set of instructions
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
ControlFlow(ControlFlowOp)
Control-flow instructions
Put(PutOp)
Instructions setting register values
Move(MoveOp)
Instructions moving and swapping register values
Cmp(CmpOp)
Instructions comparing register values
Arithmetic(ArithmeticOp)
Arithmetic instructions
Bitwise(BitwiseOp)
Bit operations & boolean algebra instructions
Bytes(BytesOp)
Operations on byte strings
Digest(DigestOp)
Cryptographic hashing functions
Extension operations which can be provided by a host environment
No-operation instruction
Trait Implementations
impl<Extension> Bytecode for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension> Bytecode for Instr<Extension> where
Extension: InstructionSet,
[src]fn byte_count(&self) -> u16
[src]
fn byte_count(&self) -> u16
[src]Returns number of bytes which instruction and its argument occupies
fn instr_range() -> RangeInclusive<u8>
[src]
fn instr_range() -> RangeInclusive<u8>
[src]Returns range of instruction btecodes covered by a set of operations
fn instr_byte(&self) -> u8
[src]
fn instr_byte(&self) -> u8
[src]Returns byte representing instruction code (without its arguments)
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write_args<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes instruction arguments as bytecode, omitting instruction code byte
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]
fn read<R>(reader: &mut R) -> Result<Self, DecodeError> where
R: Read,
DecodeError: From<<R as Read>::Error>,
[src]Reads the instruction from bytecode
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]
fn write<W>(&self, writer: &mut W) -> Result<(), EncodeError> where
W: Write,
EncodeError: From<<W as Write>::Error>,
[src]Writes the instruction as bytecode
impl<Extension: Clone> Clone for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension: Clone> Clone for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension: Debug> Debug for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension: Debug> Debug for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension> Display for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension> Display for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension: Hash> Hash for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension: Hash> Hash for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension> InstructionSet for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension> InstructionSet for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension: PartialEq> PartialEq<Instr<Extension>> for Instr<Extension> where
Extension: InstructionSet,
[src]
impl<Extension: PartialEq> PartialEq<Instr<Extension>> for Instr<Extension> where
Extension: InstructionSet,
[src]impl<Extension: Eq> Eq for Instr<Extension> where
Extension: InstructionSet,
[src]
Extension: InstructionSet,
impl<Extension> StructuralEq for Instr<Extension> where
Extension: InstructionSet,
[src]
Extension: InstructionSet,
impl<Extension> StructuralPartialEq for Instr<Extension> where
Extension: InstructionSet,
[src]
Extension: InstructionSet,
Auto Trait Implementations
impl<Extension> RefUnwindSafe for Instr<Extension> where
Extension: RefUnwindSafe,
Extension: RefUnwindSafe,
impl<Extension> Send for Instr<Extension> where
Extension: Send,
Extension: Send,
impl<Extension> Sync for Instr<Extension> where
Extension: Sync,
Extension: Sync,
impl<Extension> Unpin for Instr<Extension> where
Extension: Unpin,
Extension: Unpin,
impl<Extension> UnwindSafe for Instr<Extension> where
Extension: UnwindSafe,
Extension: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more