pub struct ParsedOpcode {
pub opcode: u8,
pub data: Vec<u8>,
}Expand description
A parsed opcode with its data payload.
Fields§
§opcode: u8The opcode byte value.
data: Vec<u8>The data payload associated with push opcodes (empty for non-push opcodes).
Implementations§
Source§impl ParsedOpcode
impl ParsedOpcode
Sourcepub fn is_disabled(&self) -> bool
pub fn is_disabled(&self) -> bool
Return true if this opcode is disabled (OP_2MUL, OP_2DIV).
Sourcepub fn always_illegal(&self) -> bool
pub fn always_illegal(&self) -> bool
Return true if this opcode is always illegal (OP_VERIF, OP_VERNOTIF).
Sourcepub fn is_conditional(&self) -> bool
pub fn is_conditional(&self) -> bool
Return true if this opcode is a conditional flow control opcode.
Sourcepub fn requires_tx(&self) -> bool
pub fn requires_tx(&self) -> bool
Return true if this opcode requires a transaction context to execute.
Sourcepub fn enforce_minimum_data_push(&self) -> Result<(), InterpreterError>
pub fn enforce_minimum_data_push(&self) -> Result<(), InterpreterError>
Check that push uses minimal encoding.
Sourcepub fn canonical_push(&self) -> bool
pub fn canonical_push(&self) -> bool
Check if this is a canonical push (matches the smallest push opcode).
Trait Implementations§
Source§impl Clone for ParsedOpcode
impl Clone for ParsedOpcode
Source§fn clone(&self) -> ParsedOpcode
fn clone(&self) -> ParsedOpcode
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ParsedOpcode
impl RefUnwindSafe for ParsedOpcode
impl Send for ParsedOpcode
impl Sync for ParsedOpcode
impl Unpin for ParsedOpcode
impl UnsafeUnpin for ParsedOpcode
impl UnwindSafe for ParsedOpcode
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