pub enum MemoryAddress {
Direct(usize),
Relative(usize),
}
Expand description
Represents an address in the VM’s memory. Supports both direct and relative addressing.
Variants§
Direct(usize)
Specifies an exact index in the VM’s memory
Relative(usize)
Specifies an index relative to the stack pointer.
It is resolved as the current stack pointer plus the offset stored here.
Implementations§
Source§impl MemoryAddress
impl MemoryAddress
Trait Implementations§
Source§impl Clone for MemoryAddress
impl Clone for MemoryAddress
Source§fn clone(&self) -> MemoryAddress
fn clone(&self) -> MemoryAddress
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MemoryAddress
impl Debug for MemoryAddress
Source§impl<'de> Deserialize<'de> for MemoryAddress
impl<'de> Deserialize<'de> for MemoryAddress
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for MemoryAddress
impl Hash for MemoryAddress
Source§impl Ord for MemoryAddress
impl Ord for MemoryAddress
Source§fn cmp(&self, other: &MemoryAddress) -> Ordering
fn cmp(&self, other: &MemoryAddress) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for MemoryAddress
impl PartialEq for MemoryAddress
Source§impl PartialOrd for MemoryAddress
impl PartialOrd for MemoryAddress
Source§impl Serialize for MemoryAddress
impl Serialize for MemoryAddress
impl Copy for MemoryAddress
impl Eq for MemoryAddress
impl StructuralPartialEq for MemoryAddress
Auto Trait Implementations§
impl Freeze for MemoryAddress
impl RefUnwindSafe for MemoryAddress
impl Send for MemoryAddress
impl Sync for MemoryAddress
impl Unpin for MemoryAddress
impl UnwindSafe for MemoryAddress
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more