Struct dynasmrt::mmap::ExecutableBuffer[][src]

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

A structure holding a buffer of executable memory. It also derefs to a &[u8]. This structure does not allocate when its size is 0.

Implementations

Obtain a pointer into the executable memory from an offset into it. When an offset returned from DynasmLabelApi::offset is used, the resulting pointer will point to the start of the first instruction after the offset call, which can then be jumped or called to divert control flow into the executable buffer. Note that if this buffer is accessed through an Executor, these pointers will only be valid as long as its lock is held. When no locks are held, The assembler is free to relocate the executable buffer when it requires more memory than available.

Create a new executable buffer, backed by a buffer of size size. It will start with an initialized length of 0.

Query the backing size of this executable buffer

Change this executable buffer into a mutable buffer.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

The resulting type after dereferencing.

Dereferences the value.

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.

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.