Struct evm_runtime::Memory[][src]

pub struct Memory { /* fields omitted */ }
Expand description

A sequencial memory. It uses Rust’s Vec for internal representation.

Implementations

Create a new memory with the given limit.

Memory limit.

Get the length of the current memory range.

Get the effective length.

Return true if current effective memory range is zero.

Return the full memory.

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.

Resize the memory, making it cover to end, with 32 bytes as the step.

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.

Set memory region at given offset. The offset and value is considered untrusted.

Copy data into the memory, of given len.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.