Struct juicebox_asm::Label
source · pub struct Label { /* private fields */ }
Expand description
A label which is used as target for jump instructions.
use juicebox_asm::{Asm, Label, Reg64};
use juicebox_asm::insn::{Mov, Jmp};
let mut lbl = Label::new();
let mut asm = Asm::new();
// Skip the mov instruction.
asm.jmp(&mut lbl);
asm.mov(Reg64::rax, Reg64::rax);
asm.bind(&mut lbl);
Panics
Panics if the label is dropped while not yet bound, or having unresolved relocations. This is mainly a safety-guard to detect wrong usage.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Label
impl Send for Label
impl Sync for Label
impl Unpin for Label
impl UnwindSafe for Label
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