[][src]Struct dynasmrt::VecAssembler

pub struct VecAssembler<R: Relocation> { /* fields omitted */ }

An assembler that assembles into a Vec<u8>, while supporting labels. To support the different types of relocations it requires a base address of the to be assembled code to be specified.

Methods

impl<R: Relocation> VecAssembler<R>[src]

pub fn new(baseaddr: usize) -> VecAssembler<R>[src]

Creates a new VecAssembler, with the specified base address.

pub fn commit(&mut self) -> Result<(), DynasmError>[src]

Resolves any relocations emitted to the assembler before this point. If an impossible relocation was specified before this point, returns them here.

pub fn alter(&mut self) -> UncommittedModifier[src]

Use an UncommittedModifier to alter uncommitted code. This does not allow the user to change labels/relocations.

pub fn finalize(self) -> Result<Vec<u8>, DynasmError>[src]

Finalizes the VecAssembler, returning the resulting Vec<u8> containing all assembled data. this implicitly commits any relocations beforehand and returns an error if required.

Trait Implementations

impl<R: Debug + Relocation> Debug for VecAssembler<R>[src]

impl<R: Relocation> DynasmApi for VecAssembler<R>[src]

impl<R: Relocation> DynasmLabelApi for VecAssembler<R>[src]

type Relocation = R

The relocation info type this assembler uses.

impl<'a, R: Relocation> Extend<&'a u8> for VecAssembler<R>[src]

impl<R: Relocation> Extend<u8> for VecAssembler<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for VecAssembler<R> where
    R: RefUnwindSafe

impl<R> Send for VecAssembler<R> where
    R: Send

impl<R> Sync for VecAssembler<R> where
    R: Sync

impl<R> Unpin for VecAssembler<R> where
    R: Unpin

impl<R> UnwindSafe for VecAssembler<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.