#[repr(u8)]pub enum Alu {
Add = 32,
Sub = 33,
Mul = 34,
Div = 35,
Mod = 36,
Shl = 37,
Shr = 38,
ShrI = 39,
}
Expand description
Operations for computing arithmetic and logic.
Variants§
Add = 32
0x20
Opcode associated with the Alu::Add operation.
Sub = 33
0x21
Opcode associated with the Alu::Sub operation.
Mul = 34
0x22
Opcode associated with the Alu::Mul operation.
Div = 35
0x23
Opcode associated with the Alu::Div operation.
Mod = 36
0x24
Opcode associated with the Alu::Mod operation.
Shl = 37
0x25
Opcode associated with the Alu::Shl operation.
Shr = 38
0x26
Opcode associated with the Alu::Shr operation.
ShrI = 39
0x27
Opcode associated with the Alu::ShrI operation.
Trait Implementations§
Source§impl From<Alu> for Constraint
impl From<Alu> for Constraint
Source§impl Ord for Alu
impl Ord for Alu
Source§impl ParseOp for Alu
impl ParseOp for Alu
Source§fn parse_op(
&self,
bytes: &mut impl Iterator<Item = u8>,
) -> Result<Self::Op, Self::Error>
fn parse_op( &self, bytes: &mut impl Iterator<Item = u8>, ) -> Result<Self::Op, Self::Error>
Attempt to parse the operation associated with the opcode from the given bytes.
Only consumes the bytes necessary to construct any associated data.
Returns an error in the case that the given bytes
iterator
contains insufficient bytes to parse the op.
Source§type Error = NotEnoughBytesError
type Error = NotEnoughBytesError
Any error that might occur while parsing.
Source§impl PartialOrd for Alu
impl PartialOrd for Alu
impl Copy for Alu
impl Eq for Alu
impl StructuralPartialEq for Alu
Auto Trait Implementations§
impl Freeze for Alu
impl RefUnwindSafe for Alu
impl Send for Alu
impl Sync for Alu
impl Unpin for Alu
impl UnwindSafe for Alu
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