Trait evmil::evm::Stack

source ·
pub trait Stack: Default + PartialEq {
    type Word: Word;

    fn peek(&self, n: usize) -> Self::Word;
    fn len(&self) -> Self::Word;
    fn push(&mut self, item: Self::Word);
    fn pop(&mut self, n: usize);
    fn set(&mut self, n: usize, item: Self::Word);
}
Expand description

Represents an EVM stack of some form. This could a concrete stack (i.e. useful for execution) or an abstract stack (i.e. useful for analysis).

Required Associated Types§

Underlying machine word this stack operates on. In a concrete EVM, this would be w256 or some other concrete implementation.

Required Methods§

Peek nth item from stack (where n==0 is top element).

Determine number of items on stack.

Push an item onto the stack.

Pop an item from the stack.

Set ith item on stack (where n==0 is top element)

Implementors§