Struct polkavm_assembler::Assembler
source · pub struct Assembler { /* private fields */ }Implementations§
source§impl Assembler
impl Assembler
pub const fn new() -> Self
pub fn set_origin(&mut self, origin: u64)
pub fn current_address(&self) -> u64
pub fn forward_declare_label(&mut self) -> Label
pub fn create_label(&mut self) -> Label
pub fn define_label(&mut self, label: Label) -> &mut Self
pub fn push_with_label<T>(
&mut self,
label: Label,
instruction: Instruction<T>
) -> &mut Selfwhere
T: Display,
pub fn get_label_origin_offset(&self, label: Label) -> Option<isize>
pub fn get_label_origin_offset_or_panic(&self, label: Label) -> isize
pub fn set_label_origin_offset(&mut self, label: Label, offset: isize)
pub fn reserve<const INSTRUCTIONS: usize>(&mut self)
pub fn push<T>(&mut self, instruction: Instruction<T>) -> &mut Selfwhere
T: Display,
pub fn push_raw(&mut self, bytes: &[u8]) -> &mut Self
pub fn finalize(&mut self) -> AssembledCode<'_>
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn code_mut(&mut self) -> &mut [u8]
pub fn spare_capacity(&self) -> usize
pub fn resize(&mut self, size: usize, fill_with: u8)
pub fn reserve_code(&mut self, length: usize)
pub fn reserve_labels(&mut self, length: usize)
pub fn reserve_fixups(&mut self, length: usize)
pub fn clear(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Assembler
impl Send for Assembler
impl Sync for Assembler
impl Unpin for Assembler
impl UnwindSafe for Assembler
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more