Struct sputnikvm::PCMut

source ·
pub struct PCMut<'a, P: Patch> { /* private fields */ }
Expand description

Represents a mutable program counter in EVM.

Implementations

Get the code bytearray.

Get the current program counter position.

Get the current opcode position. Should only be used when debugging.

Returns true if the position is a valid jump destination. If not, returns false.

Check whether the PC is ended. Next read on this PC would result in PCError::PCOverflow.

Peek the next opcode.

Peek the next instruction.

Create a new program counter from the given code.

Jump to a position in the code. The destination must be valid to jump.

Read the next instruction and step the program counter.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.