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
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, Tx>(&self, vm: &Interpreter<S, Tx>) -> (Word, Word)where
Tx: ExecutableTransaction,
pub const fn boundaries<S, Tx>(&self, vm: &Interpreter<S, Tx>) -> (Word, Word)where
Tx: ExecutableTransaction,
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, Tx>(self, vm: &Interpreter<S, Tx>) -> Selfwhere
Tx: ExecutableTransaction,
pub const 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
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 moresourceimpl Debug for MemoryRange
impl Debug for MemoryRange
sourceimpl Default for MemoryRange
impl Default for MemoryRange
sourceimpl<R> From<R> for MemoryRangewhere
R: RangeBounds<Word>,
impl<R> From<R> for MemoryRangewhere
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
sourcefn eq(&self, other: &MemoryRange) -> bool
fn eq(&self, other: &MemoryRange) -> bool
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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