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
sourceimpl 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 const fn boundaries<S>(&self, vm: &Interpreter<S>) -> (Word, Word)
pub const fn boundaries<S>(&self, vm: &Interpreter<S>) -> (Word, Word)
Return the boundaries of the slice with exclusive end [a, b[
Remap the unbound boundaries to stack or heap when applicable.
sourcepub const fn to_heap<S>(self, vm: &Interpreter<S>) -> Self
pub const fn to_heap<S>(self, vm: &Interpreter<S>) -> Self
Return an owned memory slice with a relative address to the heap space
defined in r[$hp]
Trait Implementations
sourceimpl Clone for MemoryRange
impl Clone for MemoryRange
sourcefn clone(&self) -> MemoryRange
fn clone(&self) -> MemoryRange
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MemoryRange
impl Debug for MemoryRange
sourceimpl Default for MemoryRange
impl Default for MemoryRange
sourceimpl<R> From<R> for MemoryRange where
R: RangeBounds<Word>,
impl<R> From<R> for MemoryRange where
R: RangeBounds<Word>,
sourcefn from(range: R) -> MemoryRange
fn from(range: R) -> MemoryRange
Converts to this type from the input type.
sourceimpl Hash for MemoryRange
impl Hash for MemoryRange
sourceimpl PartialEq<MemoryRange> for MemoryRange
impl PartialEq<MemoryRange> for MemoryRange
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more