write_to_ptr

Function write_to_ptr 

Source
pub fn write_to_ptr<T>(ptr: *mut u8, offset: usize, value: T)
where T: Copy,
Expand description

Write a value of type T to a raw pointer at the specified offset.

§Arguments

  • ptr - Raw pointer to the memory region.
  • offset - Offset in bytes from the start of the memory region.
  • value - The value to write.

§Type Parameters

  • T - The type of value to write, which must be Copy.