Skip to main content

InstSink

Trait InstSink 

Source
pub trait InstSink {
    // Required methods
    fn arch(&self) -> Arch;
    fn emit_inst(&mut self, inst: &Inst) -> Result<(), AsmError>;
    fn bind_label(&mut self, label: Label) -> Result<(), AsmError>;
}
Expand description

Sink that consumes replayed nodes — implemented by each architecture’s Assembler.

Required Methods§

Source

fn arch(&self) -> Arch

Target architecture accepted by this sink.

Source

fn emit_inst(&mut self, inst: &Inst) -> Result<(), AsmError>

Emits one recorded instruction.

Source

fn bind_label(&mut self, label: Label) -> Result<(), AsmError>

Binds a label at the current position.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl InstSink for asmkit::aarch64::assembler::Assembler<'_>

Source§

impl InstSink for asmkit::riscv::assembler::Assembler<'_>

Source§

impl InstSink for asmkit::x86::assembler::Assembler<'_>