Warning: This is an unsafe operation that should be used with extreme caution.The value is not consumed, and using the pointer may lead to undefined behaviorif the value is moved or deallocated.
Parameters:
value: The value to extract a pointer from
Returns a Pointer[Unit] pointing to the value's memory location.
Warning: This is an unsafe operation that should be used with extreme caution.The pointer must point to valid memory of type T, or undefined behavior will occur.
Borrows a pointer from a bytes buffer for the duration of a function call.
The bytes buffer is temporarily converted to a pointer, passed to the function,and then restored. This ensures the buffer remains valid after the operation.
Borrows a pointer from a reference for the duration of a function call.
The reference is temporarily converted to a pointer, passed to the function,and then restored. This ensures the reference remains valid after the operation.
Unsafely borrows a pointer from any value for the duration of a function call.
Warning: This is an unsafe operation. The value is temporarily convertedto a pointer and restored after the function call, but this may lead toundefined behavior if not used carefully.
This function manipulates the internal reference count by converting the valueto a pointer and back twice, effectively decrementing its reference count.
Warning: This is a low-level operation that should be used with caution.
Parameters:
value: The value whose reference count should be decremented