Function relocate_member_mut

Source
pub fn relocate_member_mut<THIS, T>(
    this: &mut THIS,
    se_ae_offset: isize,
    vr_offset: isize,
) -> Result<&mut T, RelocationError>
Expand description

Relocates a member based on the runtime state, returning a pointer to the new location.

§Safety

This function requires that the caller ensure the provided pointer this is valid, meaning it should point to a valid memory location. The se_ae_offset and vr_offset must be safe offsets for the given pointer type.

§Errors

This function may return an error if the module’s runtime is not available or if any error occurs while fetching the runtime state. Specifically, it calls ModuleState::map_active, which could result in an error.