pub unsafe trait Persistable: Sized { }
Available on crate feature
unstable
only.Expand description
Marker trait for types that can be safely used in #[ram(persistent)]
.
§Safety
- The type must be inhabited
- The type must be valid for any bit pattern of its backing memory in case a reset occurs during a write or a reset interrupts the zero initialization on first boot.
- Structs must contain only
Persistable
fields and padding
§Stability
This API is marked as unstable and is only available when the unstable
crate feature is enabled. This comes with no stability guarantees, and could be changed
or removed at any time.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.