Trait LegacyBytecode

pub trait LegacyBytecode {
    // Required methods
    fn bytecode_len(&self) -> usize;
    fn bytecode_slice(&self) -> &[u8] ;
}
Expand description

Trait needed for legacy bytecode.

Used in bytecode::opcode::CODECOPY and bytecode::opcode::CODESIZE opcodes.

Required Methods§

fn bytecode_len(&self) -> usize

Returns current bytecode original length. Used in bytecode::opcode::CODESIZE opcode.

fn bytecode_slice(&self) -> &[u8]

Returns current bytecode original slice. Used in bytecode::opcode::CODECOPY opcode.

Implementors§