pub struct OpSpec {
pub opcode: u8,
pub name: String,
pub execute: OpcodeExecutor,
pub modes: HashSet<RunMode>,
pub min_version: u8,
pub cost: u64,
pub size: usize,
pub description: String,
}
Expand description
Opcode specification
Fields§
§opcode: u8
Opcode byte value
name: String
Opcode name
execute: OpcodeExecutor
Execution function
modes: HashSet<RunMode>
Allowed run modes
min_version: u8
Minimum TEAL version required
cost: u64
Execution cost
size: usize
Size in bytes (including immediate values)
description: String
Human-readable description
Implementations§
Source§impl OpSpec
impl OpSpec
Sourcepub fn new(
opcode: u8,
name: impl Into<String>,
execute: OpcodeExecutor,
modes: &[RunMode],
min_version: u8,
cost: u64,
size: usize,
description: impl Into<String>,
) -> Self
pub fn new( opcode: u8, name: impl Into<String>, execute: OpcodeExecutor, modes: &[RunMode], min_version: u8, cost: u64, size: usize, description: impl Into<String>, ) -> Self
Create a new opcode specification
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OpSpec
impl RefUnwindSafe for OpSpec
impl Send for OpSpec
impl Sync for OpSpec
impl Unpin for OpSpec
impl UnwindSafe for OpSpec
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