pub unsafe trait Projectable: Copy + 'static { }Expand description
Marker trait for types that can be safely projected from raw account data.
§Safety
The implementor must guarantee that:
- The type is
#[repr(C)](deterministic field ordering). - The type is
Copy(no drop glue, no interior mutability). - Every bit pattern is valid (no padding-dependent invariants).
- No references or pointers (only plain data).
This is the same contract as bytemuck::Pod without the dependency.
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.