Trait dynasmrt::DynasmApi [−][src]
pub trait DynasmApi: Extend<u8> + for<'a> Extend<&'a u8> { fn offset(&self) -> AssemblyOffset; fn push(&mut self, byte: u8); fn push_i8(&mut self, value: i8) { ... } fn push_i16(&mut self, value: i16) { ... } fn push_i32(&mut self, value: i32) { ... } fn push_i64(&mut self, value: i64) { ... } fn push_u16(&mut self, value: u16) { ... } fn push_u32(&mut self, value: u32) { ... } fn push_u64(&mut self, value: u64) { ... } fn runtime_error(&self, msg: &'static str) -> ! { ... } }
This trait represents the interface that must be implemented to allow the dynasm preprocessor to assemble into a datastructure.
Required Methods
fn offset(&self) -> AssemblyOffset
Report the current offset into the assembling target
fn push(&mut self, byte: u8)
Push a byte into the assembling target
Provided Methods
fn push_i8(&mut self, value: i8)
Push a signed byte into the assembling target
fn push_i16(&mut self, value: i16)
Push a signed word into the assembling target
fn push_i32(&mut self, value: i32)
Push a signed doubleword into the assembling target
fn push_i64(&mut self, value: i64)
Push a signed quadword into the assembling target
fn push_u16(&mut self, value: u16)
Push an usigned word into the assembling target
fn push_u32(&mut self, value: u32)
Push an usigned doubleword into the assembling target
fn push_u64(&mut self, value: u64)
Push an usigned quadword into the assembling target
fn runtime_error(&self, msg: &'static str) -> !
This function is called in when a runtime error has to be generated. It panics.
Implementations on Foreign Types
impl DynasmApi for Vec<u8>
[src]
impl DynasmApi for Vec<u8>
A basic implementation of DynasmApi onto a simple Vec
fn offset(&self) -> AssemblyOffset
[src]
fn offset(&self) -> AssemblyOffset
fn push(&mut self, byte: u8)
[src]
fn push(&mut self, byte: u8)
fn push_i8(&mut self, value: i8)
[src]
fn push_i8(&mut self, value: i8)
fn push_i16(&mut self, value: i16)
[src]
fn push_i16(&mut self, value: i16)
fn push_i32(&mut self, value: i32)
[src]
fn push_i32(&mut self, value: i32)
fn push_i64(&mut self, value: i64)
[src]
fn push_i64(&mut self, value: i64)
fn push_u16(&mut self, value: u16)
[src]
fn push_u16(&mut self, value: u16)
fn push_u32(&mut self, value: u32)
[src]
fn push_u32(&mut self, value: u32)
fn push_u64(&mut self, value: u64)
[src]
fn push_u64(&mut self, value: u64)
fn runtime_error(&self, msg: &'static str) -> !
[src]
fn runtime_error(&self, msg: &'static str) -> !
Implementors
impl<'a> DynasmApi for UncommittedModifier<'a>
impl DynasmApi for dynasmrt::x64::Assembler
impl<'a, 'b> DynasmApi for dynasmrt::x64::AssemblyModifier<'a, 'b>
impl DynasmApi for dynasmrt::x86::Assembler
impl<'a, 'b> DynasmApi for dynasmrt::x86::AssemblyModifier<'a, 'b>