pub struct Patch { /* private fields */ }
Expand description
A section patch. Patches are bytes (or groups of bytes) whose computation was deferred to the linker.
Implementations§
Source§impl Patch
impl Patch
Sourcepub fn source(&self) -> (u32, u32)
pub fn source(&self) -> (u32, u32)
Where the patch was defined. That is, the file stack node ID, and the line number.
Sourcepub fn offset(&self) -> u32
pub fn offset(&self) -> u32
The offset within the section’s data where the patch will be written.
Sourcepub fn patch_type(&self) -> PatchType
pub fn patch_type(&self) -> PatchType
The patch’s type, which notably determines its size.
Sourcepub fn pc_section_id(&self) -> u32
pub fn pc_section_id(&self) -> u32
The ID of the expression’s PC section. See pc_offset
for more info.
Sourcepub fn pc_offset(&self) -> u32
pub fn pc_offset(&self) -> u32
The expression’s PC offset.
This is separate from the offset, because PC (@
) may not point to the
byte being written, and, in the case of LOAD
blocks, may be in a different section
entirely!
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Patch
impl RefUnwindSafe for Patch
impl Send for Patch
impl Sync for Patch
impl Unpin for Patch
impl UnwindSafe for Patch
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