pub enum Token {
PushData(Vec<u8>),
Op(Opcode),
}Expand description
A parsed script element — either an opcode instruction or pushed data.
This is the output of the tokenizer and the input to the execution engine.
PushData carries the raw bytes from any of the four push-data encodings.
Op wraps a fieldless Opcode variant.
Variants§
PushData(Vec<u8>)
Data pushed onto the stack by a push-data instruction. Covers: direct push (0x01-0x4b), OP_PUSHDATA1, OP_PUSHDATA2, OP_PUSHDATA4.
Op(Opcode)
An opcode instruction (any non-push operation).
Trait Implementations§
impl Eq for Token
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
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