Struct dynasmrt::components::ManagedRelocs
source · pub struct ManagedRelocs<R: Relocation> { /* private fields */ }
Expand description
A registry of relocations that have been encoded previously, but need to be adjusted when the address of the buffer they reside in changes.
Implementations§
source§impl<R: Relocation> ManagedRelocs<R>
impl<R: Relocation> ManagedRelocs<R>
sourcepub fn append(&mut self, other: &mut ManagedRelocs<R>)
pub fn append(&mut self, other: &mut ManagedRelocs<R>)
Take all items from another registry and add them to this registry
sourcepub fn remove_between(&mut self, start: usize, end: usize)
pub fn remove_between(&mut self, start: usize, end: usize)
Remove all managed relocations whose byte fields start in the range start .. end.
This is useful when implementing an Assembler::alter
API, as any managed relocations
that were overwritten should be removed from the registry, otherwise the replacement code
would be corrupted when managed relocations are updated.
Trait Implementations§
source§impl<R: Debug + Relocation> Debug for ManagedRelocs<R>
impl<R: Debug + Relocation> Debug for ManagedRelocs<R>
source§impl<R: Default + Relocation> Default for ManagedRelocs<R>
impl<R: Default + Relocation> Default for ManagedRelocs<R>
source§fn default() -> ManagedRelocs<R>
fn default() -> ManagedRelocs<R>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<R> Freeze for ManagedRelocs<R>
impl<R> RefUnwindSafe for ManagedRelocs<R>where
R: RefUnwindSafe,
impl<R> Send for ManagedRelocs<R>where
R: Send,
impl<R> Sync for ManagedRelocs<R>where
R: Sync,
impl<R> Unpin for ManagedRelocs<R>
impl<R> UnwindSafe for ManagedRelocs<R>where
R: RefUnwindSafe,
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