pub trait DynasmApi: Extend<u8> + for<'a> Extend<&'a u8> {
// Required methods
fn offset(&self) -> AssemblyOffset;
fn push(&mut self, byte: u8);
fn align(&mut self, alignment: usize, with: u8);
// Provided methods
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) -> ! { ... }
}
Expand description
This trait represents the interface that must be implemented to allow the dynasm preprocessor to assemble into a datastructure.
Required Methods§
Sourcefn offset(&self) -> AssemblyOffset
fn offset(&self) -> AssemblyOffset
Report the current offset into the assembling target
Provided Methods§
Sourcefn runtime_error(&self, msg: &'static str) -> !
fn runtime_error(&self, msg: &'static str) -> !
This function is called in when a runtime error has to be generated. It panics.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.