Struct evm_runtime::Memory [−][src]
pub struct Memory { /* fields omitted */ }
Expand description
A sequencial memory. It uses Rust’s Vec
for internal
representation.
Implementations
impl Memory
[src]
impl Memory
[src]pub fn effective_len(&self) -> U256
[src]
pub fn effective_len(&self) -> U256
[src]Get the effective length.
pub fn resize_offset(
&mut self,
offset: U256,
len: U256
) -> Result<(), ExitError>
[src]
pub fn resize_offset(
&mut self,
offset: U256,
len: U256
) -> Result<(), ExitError>
[src]Resize the memory, making it cover the memory region of offset..(offset + len)
, with 32 bytes as the step. If the length is zero, this function
does nothing.
pub fn resize_end(&mut self, end: U256) -> Result<(), ExitError>
[src]
pub fn resize_end(&mut self, end: U256) -> Result<(), ExitError>
[src]Resize the memory, making it cover to end
, with 32 bytes as the step.
pub fn get(&self, offset: usize, size: usize) -> Vec<u8, Global>
[src]
pub fn get(&self, offset: usize, size: usize) -> Vec<u8, Global>
[src]Get memory region at given offset.
Panics
Value of size
is considered trusted. If they’re too large,
the program can run out of memory, or it can overflow.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Memory
impl Send for Memory
impl Sync for Memory
impl Unpin for Memory
impl UnwindSafe for Memory
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more