StoragePathEntry
Computes storage paths for accessing Map
entries.The storage path combines the variable's base path with the key's hash to create a unique identifier for the storage slot. This path can then be used for subsequent read or write operations, or advanced further by chaining the entry
method. # Examples
use starknet::ContractAddress;
use starknet::storage::{Map, StoragePathEntry};
[storage]
struct Storage {
balances: Map<ContractAddress, u256>,
}
// Get the storage path for the balance of a specific address
let balance_path = self.balances.entry(address);
Fully qualified path: core::starknet::storage::map::StoragePathEntry
pub trait StoragePathEntry<C>
Trait functions
entry
Fully qualified path: core::starknet::storage::map::StoragePathEntry::entry
fn entry(self: C, key: Self::Key) -> StoragePath<Self::Value>
Trait types
Key
Fully qualified path: core::starknet::storage::map::StoragePathEntry::Key
type Key;
Value
Fully qualified path: core::starknet::storage::map::StoragePathEntry::Value
type Value;