[][src]Struct dynasmrt::common::UncommittedModifier

pub struct UncommittedModifier<'a> { /* fields omitted */ }

This struct is a wrapper around an Assembler normally created using the Assembler.alter_uncommitted method. It allows the user to edit parts of the assembling buffer that cannot be determined easily or efficiently in advance. Due to limitations of the label resolution algorithms, this assembler does not allow labels to be used.

Methods

impl<'a> UncommittedModifier<'a>
[src]

pub fn new(
    buffer: &mut Vec<u8>,
    base_offset: AssemblyOffset
) -> UncommittedModifier
[src]

create a new uncommittedmodifier

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> DynasmApi for UncommittedModifier<'a>
[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> Extend<u8> for UncommittedModifier<'a>
[src]

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

Auto Trait Implementations

impl<'a> Send for UncommittedModifier<'a>

impl<'a> Sync for UncommittedModifier<'a>

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.