Need help designing a safe Handle API for a C void pointer

Apart from the optimizer ruining things, in Rust there's a contract that if your function is marked as safe, it's must be impossible to misuse it for unsafe things even if you give your API to an infinite number of monkeys with keyboards.

3 Likes