pub unsafe auto trait PSafe { }
Expand description

It marks the implementing type to be free of pointers to the volatile heap, and persistence safe.

Also, every type that allows interior mutability is not safe in persistence terms, because there might be no log of the value. Atomic types are persistence safe, even though they provide interior mutability.

Limitation

Function pointers are not completely prevented. Due to Rust’s limitation on declaring generic pointers to functions without exact number of arguments, we manually limit all pointers to functions with up to 32 arguments. Function pointers with a number of arguments beyond 32 are inevitably allowed.

Implementations on Foreign Types

UnsafeCell is marked as PSafe because it exposes interior mutability without taking a log, which is unsafe from persistence perspective.

Implementors

The allocator does not need to implement PSafe

Safe to be stored in persistent memory

Auto implementors