pub struct Cpu(/* private fields */);Expand description
The registers at a mid hook or block replacement, as SafetyHook saves
them (AnvilCpuContext, 408 bytes). Reading is safe through Deref
(cpu.rcx); writing is regs_mut. Valid only during the
callback.
Implementations§
Source§impl Cpu
impl Cpu
Sourcepub unsafe fn regs_mut(&mut self) -> &mut AnvilCpuContext
pub unsafe fn regs_mut(&mut self) -> &mut AnvilCpuContext
The registers, writable: the game continues with what the callback
leaves in them. In a mid hook a changed rip ends the chain there.
§Safety
The game’s code at the site must work with the values written: a
pointer it dereferences, a stack it returns through. rsp and
reserved must not change.
Trait Implementations§
Auto Trait Implementations§
impl Forget for Cpu
impl Freeze for Cpu
impl Move for Cpu
impl RefUnwindSafe for Cpu
impl Send for Cpu
impl Sync for Cpu
impl Unpin for Cpu
impl UnsafeUnpin for Cpu
impl UnwindSafe for Cpu
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