Struct fuel_vm::prelude::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.