[][src]Struct dynasmrt::components::RelocRegistry

pub struct RelocRegistry<R: Relocation> { /* fields omitted */ }

A registry of relocations and the respective labels they point towards.

Implementations

impl<R: Relocation> RelocRegistry<R>[src]

pub fn new() -> RelocRegistry<R>[src]

Create a new, empty relocation registry.

pub fn add_global(&mut self, name: &'static str, patchloc: PatchLoc<R>)[src]

Add a new patch targetting the global label name.

pub fn add_dynamic(&mut self, id: DynamicLabel, patchloc: PatchLoc<R>)[src]

Add a new patch targetting the dynamic label id.

pub fn add_local(&mut self, name: &'static str, patchloc: PatchLoc<R>)[src]

Add a new patch targetting the next local label name. As any relocation targetting a previous local label can be immediately resolved these should not be recorded.

pub fn take_locals_named<'a>(
    &'a mut self,
    name: &'static str
) -> impl Iterator<Item = PatchLoc<R>> + 'a
[src]

Return an iterator through all defined relocations targetting local label name. These relocations are removed from the registry.

pub fn take_globals<'a>(
    &'a mut self
) -> impl Iterator<Item = (PatchLoc<R>, &'static str)> + 'a
[src]

Return an iterator through all defined relocations targeting global labels and the labels they target. These relocations are removed from the registry.

pub fn take_dynamics<'a>(
    &'a mut self
) -> impl Iterator<Item = (PatchLoc<R>, DynamicLabel)> + 'a
[src]

Return an iterator through all defined relocations targeting dynamic labels and the labels they target. These relocations are removed from the registry.

pub fn take_locals<'a>(
    &'a mut self
) -> impl Iterator<Item = (PatchLoc<R>, &'static str)> + 'a
[src]

Return an iterator through all defined relocations targeting local labels and the labels they target. These relocations are removed from the registry.

Trait Implementations

impl<R: Debug + Relocation> Debug for RelocRegistry<R>[src]

impl<R: Default + Relocation> Default for RelocRegistry<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for RelocRegistry<R> where
    R: RefUnwindSafe

impl<R> Send for RelocRegistry<R> where
    R: Send

impl<R> Sync for RelocRegistry<R> where
    R: Sync

impl<R> Unpin for RelocRegistry<R> where
    R: Unpin

impl<R> UnwindSafe for RelocRegistry<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.