pub trait StorableType {
const LAYOUT: Layout;
const SLOTS: usize = _;
const BYTES: usize = _;
const IS_PACKABLE: bool = _;
}Expand description
Helper trait to access storage layout information without requiring const generic parameter.
This trait exists to allow the derive macro to query the layout and size of field types during layout computation, before the slot count is known.
Required Associated Constants§
Provided Associated Constants§
Sourceconst IS_PACKABLE: bool = _
const IS_PACKABLE: bool = _
Whether this type can be packed with adjacent fields.
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.