Skip to main content

Module types

Module types 

Source
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, and StorageKey implementations for single-word primitives.
sealed 🔒
Private module to seal the Packable trait.
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§

HandlerCache 🔒
Cache for computed handlers with stable references.
LayoutCtx
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§

FromWord
Trait for primitive types that fit into a single EVM storage slot.
Handler
Abstracts reading, writing, and deleting values for Storable types.
Packable
Trait for types that can be packed into EVM storage slots.
Storable
High-level storage operations for storable types.
StorableType
Helper trait to access storage layout information without requiring const generic parameter.
StorageKey
Trait for types that can be used as storage mapping keys.