pub struct MemPosTracker { /* private fields */ }Expand description
Tracks the position by the value of RDH offsets received in the next() function.
Implementations§
source§impl MemPosTracker
impl MemPosTracker
sourcepub fn next(&mut self, rdh_offset: u64) -> i64
pub fn next(&mut self, rdh_offset: u64) -> i64
Get the relative offset of the next RDH.
The offset is relative to the current RDH, and uses the RDH size as a base. Takes the offset of the next RDH in bytes.
sourcepub fn current_mem_address(&self) -> u64
pub fn current_mem_address(&self) -> u64
Get the memory address of the current RDH
sourcepub fn update_mem_address(&mut self, mem_offset: u64)
pub fn update_mem_address(&mut self, mem_offset: u64)
Update memory address with a byte count
Useful when skipping a payload, but still need to track memory position
Trait Implementations§
source§impl Clone for MemPosTracker
impl Clone for MemPosTracker
source§fn clone(&self) -> MemPosTracker
fn clone(&self) -> MemPosTracker
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for MemPosTracker
impl Debug for MemPosTracker
source§impl Default for MemPosTracker
impl Default for MemPosTracker
impl Copy for MemPosTracker
Auto Trait Implementations§
impl RefUnwindSafe for MemPosTracker
impl Send for MemPosTracker
impl Sync for MemPosTracker
impl Unpin for MemPosTracker
impl UnwindSafe for MemPosTracker
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