Struct evmil::evm::AbstractStack
source · pub struct AbstractStack<T: PartialEq> { /* private fields */ }
Implementations§
source§impl<T> AbstractStack<T>where
T: PartialEq + Copy + JoinLattice,
impl<T> AbstractStack<T>where
T: PartialEq + Copy + JoinLattice,
pub fn new(lower: impl Into<Interval<usize>>, upper: Vec<T>) -> Self
pub fn pop(&mut self) -> &mut Self
sourcepub fn min_len(&self) -> usize
pub fn min_len(&self) -> usize
Determine the minimum length of any stack represented by this abstract stack.
sourcepub fn max_len(&self) -> usize
pub fn max_len(&self) -> usize
Determine the maximum length of any stack represented by this abstract stack.
sourcepub fn values<'a>(&'a self) -> &'a [T] ⓘ
pub fn values<'a>(&'a self) -> &'a [T] ⓘ
Access the array of concrete values represented by this stack (i.e. the upper portion of the stack).
sourcepub fn set(self, n: usize, val: T) -> Self
pub fn set(self, n: usize, val: T) -> Self
Set ith
item from the top on this stack. Thus, 0
is the
top of the stack, etc.
sourcepub fn join(self, other: &AbstractStack<T>) -> Self
pub fn join(self, other: &AbstractStack<T>) -> Self
Join two abstract stacks together.
Trait Implementations§
source§impl<T: PartialEq + Copy + JoinLattice> Default for AbstractStack<T>
impl<T: PartialEq + Copy + JoinLattice> Default for AbstractStack<T>
source§impl<T> JoinInto for AbstractStack<T>where
T: PartialEq + Copy + JoinLattice,
impl<T> JoinInto for AbstractStack<T>where
T: PartialEq + Copy + JoinLattice,
source§fn join_into(&mut self, other: &AbstractStack<T>) -> bool
fn join_into(&mut self, other: &AbstractStack<T>) -> bool
Merge an abstract stack into this stack, whilst reporting whether this stack changed or not.
source§impl<T: PartialEq + PartialEq> PartialEq<AbstractStack<T>> for AbstractStack<T>
impl<T: PartialEq + PartialEq> PartialEq<AbstractStack<T>> for AbstractStack<T>
source§fn eq(&self, other: &AbstractStack<T>) -> bool
fn eq(&self, other: &AbstractStack<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.