Struct dynasmrt::components::LabelRegistry [−][src]
pub struct LabelRegistry { /* fields omitted */ }
Expand description
A registry of labels. Contains all necessessities for keeping track of dynasm labels. This is useful when implementing your own assembler and can also be used to query assemblers for the offsets of labels.
Implementations
Create a new, empty label registry
Create a new dynamic label id
pub fn define_dynamic(
&mut self,
id: DynamicLabel,
offset: AssemblyOffset
) -> Result<(), DynasmError>
pub fn define_dynamic(
&mut self,
id: DynamicLabel,
offset: AssemblyOffset
) -> Result<(), DynasmError>
Define a the dynamic label id
to be located at offset
.
pub fn define_global(
&mut self,
name: &'static str,
offset: AssemblyOffset
) -> Result<(), DynasmError>
pub fn define_global(
&mut self,
name: &'static str,
offset: AssemblyOffset
) -> Result<(), DynasmError>
Define a the global label name
to be located at offset
.
Define a the local label name
to be located at offset
.
Returns the offset at which the dynamic label id
was defined, if one was defined.
Returns the offset at which the global label name
was defined, if one was defined.
Returns the offset at which the last local label named id
was defined, if one was defined.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for LabelRegistry
impl Send for LabelRegistry
impl Sync for LabelRegistry
impl Unpin for LabelRegistry
impl UnwindSafe for LabelRegistry
Blanket Implementations
Mutably borrows from an owned value. Read more