track_raw_ptr_mut

Function track_raw_ptr_mut 

Source
pub fn track_raw_ptr_mut<T: ?Sized>(
    var_name: &str,
    var_id: usize,
    ptr_type: &str,
    location: &str,
    ptr: *mut T,
) -> *mut T
Expand description

Track mutable raw pointer creation.

Records a RawPtrCreated event. Use this when creating a *mut T pointer.

§Arguments

  • var_name - Name for the pointer variable
  • var_id - Unique identifier
  • ptr_type - Type description (e.g., “*mut i32”)
  • location - Source location
  • ptr - The raw pointer (returned unchanged)

§Returns

The input pointer, unchanged.

§Safety

This function is safe to call, but the pointer it tracks may be unsafe to dereference.