Struct fuel_vm::interpreter::MemoryRange
source · pub struct MemoryRange { /* private fields */ }
Expand description
Memory range representation for the VM.
start
is inclusive, and end
is exclusive.
Implementations§
source§impl MemoryRange
impl MemoryRange
sourcepub const fn new(address: Word, size: Word) -> Self
pub const fn new(address: Word, size: Word) -> Self
Create a new memory range represented as [address, address + size[
.
sourcepub fn boundaries(&self, registers: &OwnershipRegisters) -> (Word, Word)
pub fn boundaries(&self, registers: &OwnershipRegisters) -> (Word, Word)
Return the boundaries of the slice with exclusive end [a, b[
Remap the unbound boundaries to stack or heap when applicable.
sourcepub fn to_heap<S, Tx>(self, vm: &Interpreter<S, Tx>) -> Selfwhere
Tx: ExecutableTransaction,
pub fn to_heap<S, Tx>(self, vm: &Interpreter<S, Tx>) -> Selfwhere Tx: ExecutableTransaction,
Return an owned memory slice with a relative address to the heap space
defined in r[$hp]
Trait Implementations§
source§impl Clone for MemoryRange
impl Clone for MemoryRange
source§fn clone(&self) -> MemoryRange
fn clone(&self) -> MemoryRange
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 MemoryRange
impl Debug for MemoryRange
source§impl Default for MemoryRange
impl Default for MemoryRange
source§impl<R> From<R> for MemoryRangewhere
R: RangeBounds<Word>,
impl<R> From<R> for MemoryRangewhere R: RangeBounds<Word>,
source§fn from(range: R) -> MemoryRange
fn from(range: R) -> MemoryRange
Converts to this type from the input type.
source§impl Hash for MemoryRange
impl Hash for MemoryRange
source§impl PartialEq<MemoryRange> for MemoryRange
impl PartialEq<MemoryRange> for MemoryRange
source§fn eq(&self, other: &MemoryRange) -> bool
fn eq(&self, other: &MemoryRange) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MemoryRange
impl StructuralEq for MemoryRange
Auto Trait Implementations§
impl RefUnwindSafe for MemoryRange
impl Send for MemoryRange
impl Sync for MemoryRange
impl Unpin for MemoryRange
impl UnwindSafe for MemoryRange
Blanket Implementations§
source§impl<T> AnyDebug for Twhere
T: Any + Debug,
impl<T> AnyDebug for Twhere T: Any + Debug,
source§fn as_any_ref(&self) -> &(dyn Any + 'static)
fn as_any_ref(&self) -> &(dyn Any + 'static)
Returns a reference to the underlying type as
Any
.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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more