[][src]Struct dynasmrt::x64::AssemblyModifier

pub struct AssemblyModifier<'a: 'b, 'b> { /* fields omitted */ }

This struct is a wrapper around an Assembler normally created using the Assembler.alter method. Instead of writing to a temporary assembling buffer, this struct assembles directly into an executable buffer. The goto method can be used to set the assembling offset in the ExecutableBuffer of the assembler (this offset is initialized to 0) after which the data at this location can be overwritten by assembling into this struct.

Methods

impl<'a, 'b> AssemblyModifier<'a, 'b>
[src]

pub fn goto(&mut self, offset: AssemblyOffset)
[src]

Sets the current modification offset to the given value

pub fn check(&mut self, offset: AssemblyOffset) -> Result<(), DynasmError>
[src]

Checks that the current modification offset is not larger than the specified offset.

pub fn check_exact(&mut self, offset: AssemblyOffset) -> Result<(), DynasmError>
[src]

Checks that the current modification offset is exactly the specified offset.

Trait Implementations

impl<'a, 'b> DynasmApi for AssemblyModifier<'a, 'b>
[src]

fn push_i8(&mut self, value: i8)
[src]

Push a signed byte into the assembling target

fn push_i16(&mut self, value: i16)
[src]

Push a signed word into the assembling target

fn push_i32(&mut self, value: i32)
[src]

Push a signed doubleword into the assembling target

fn push_i64(&mut self, value: i64)
[src]

Push a signed quadword into the assembling target

fn push_u16(&mut self, value: u16)
[src]

Push an usigned word into the assembling target

fn push_u32(&mut self, value: u32)
[src]

Push an usigned doubleword into the assembling target

fn push_u64(&mut self, value: u64)
[src]

Push an usigned quadword into the assembling target

fn runtime_error(&self, msg: &'static str) -> !
[src]

This function is called in when a runtime error has to be generated. It panics.

impl<'a, 'b> DynasmLabelApi for AssemblyModifier<'a, 'b>
[src]

type Relocation = (u8, u8)

impl<'a, 'b> Extend<u8> for AssemblyModifier<'a, 'b>
[src]

impl<'a, 'b, 'c> Extend<&'c u8> for AssemblyModifier<'a, 'b>
[src]

Auto Trait Implementations

impl<'a, 'b> Send for AssemblyModifier<'a, 'b>

impl<'a, 'b> Sync for AssemblyModifier<'a, 'b>

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

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

The type returned in the event of a conversion error.