Expand description
Storable type system for EVM storage.
Defines the core traits (StorableType, Storable, FromWord, Packable)
and types (Slot, Mapping, Set, vec::VecHandler, array::ArrayHandler) that
enable type-safe access to EVM storage slots with automatic packing.
Re-exports§
pub use set::Set;pub use set::SetHandler;pub use slot::*;pub use mapping::*;
Modules§
- array
- Fixed-size array handler for the storage traits.
- bytes_
like - Bytes-like (
Bytes,String) implementation for the storage traits. - mapping
- Type-safe wrapper for EVM storage mappings (hash-based key-value storage).
- primitives 🔒
StorableType,FromWord, andStorageKeyimplementations for single-word primitives.- sealed 🔒
- Private module to seal the
Packabletrait. - set
- OpenZeppelin’s EnumerableSet implementation for EVM storage using Rust primitives. https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/structs/EnumerableSet.sol
- slot 🔒
- vec
- Dynamic array (
Vec<T>) implementation for the storage traits.
Structs§
- Handler
Cache 🔒 - Cache for computed handlers with stable references.
- Layout
Ctx - Describes the context in which a storable value is being loaded or stored.
Enums§
- Layout
- Describes how a type is laid out in EVM storage.
Traits§
- From
Word - Trait for primitive types that fit into a single EVM storage slot.
- Handler
- Abstracts reading, writing, and deleting values for
Storabletypes. - Packable
- Trait for types that can be packed into EVM storage slots.
- Storable
- High-level storage operations for storable types.
- Storable
Type - Helper trait to access storage layout information without requiring const generic parameter.
- Storage
Key - Trait for types that can be used as storage mapping keys.