[−][src]Struct dynasmrt::x86::AssemblyModifier
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 offset(&self) -> AssemblyOffset
[src]
fn push(&mut self, value: u8)
[src]
fn push_i8(&mut self, value: i8)
[src]
fn push_i16(&mut self, value: i16)
[src]
fn push_i32(&mut self, value: i32)
[src]
fn push_i64(&mut self, value: i64)
[src]
fn push_u16(&mut self, value: u16)
[src]
fn push_u32(&mut self, value: u32)
[src]
fn push_u64(&mut self, value: u64)
[src]
fn runtime_error(&self, msg: &'static str) -> !
[src]
impl<'a, 'b> DynasmLabelApi for AssemblyModifier<'a, 'b>
[src]
type Relocation = (u8, u8, u8)
fn align(&mut self, alignment: usize)
[src]
fn global_label(&mut self, name: &'static str)
[src]
fn global_reloc(&mut self, name: &'static str, kind: Self::Relocation)
[src]
fn dynamic_label(&mut self, id: DynamicLabel)
[src]
fn dynamic_reloc(&mut self, id: DynamicLabel, kind: Self::Relocation)
[src]
fn local_label(&mut self, name: &'static str)
[src]
fn forward_reloc(&mut self, name: &'static str, kind: Self::Relocation)
[src]
fn backward_reloc(&mut self, name: &'static str, kind: Self::Relocation)
[src]
fn bare_reloc(&mut self, addr: usize, kind: Self::Relocation)
[src]
impl<'a, 'b> Extend<u8> for AssemblyModifier<'a, 'b>
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = u8>,
[src]
T: IntoIterator<Item = u8>,
impl<'a, 'b, 'c> Extend<&'c u8> for AssemblyModifier<'a, 'b>
[src]
fn extend<T>(&mut self, iter: T) where
T: IntoIterator<Item = &'c u8>,
[src]
T: IntoIterator<Item = &'c u8>,
Auto Trait Implementations
impl<'a, 'b> Sync for AssemblyModifier<'a, 'b>
impl<'a, 'b> Send for AssemblyModifier<'a, 'b>
impl<'a, 'b> Unpin for AssemblyModifier<'a, 'b>
impl<'a, 'b> RefUnwindSafe for AssemblyModifier<'a, 'b>
impl<'a, 'b> !UnwindSafe for AssemblyModifier<'a, 'b>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,