Function glib::subclass::types::offset_ptr_by_bytes
source · fn offset_ptr_by_bytes<T, U>(ptr: *const T, offset: isize) -> *const U
Expand description
Offset ptr
by offset
bytes and cast the result to *const U
.
The result must be a correctly aligned pointer to a valid value of type U
.
§Panics:
This function panics if debug assertions are enabled if adding offset
causes ptr
to
overflow or if the resulting pointer is not correctly aligned.