Module frame_support::storage
source · Expand description
Stuff to do with the runtime’s storage.
Re-exports
pub use self::transactional::in_storage_layer;
pub use self::transactional::with_storage_layer;
pub use self::transactional::with_transaction;
pub use self::transactional::with_transaction_unchecked;
pub use self::types::StorageEntryMetadataBuilder;
pub use types::Key;
Modules
- Traits, types and structs to support a bounded BTreeMap.
- Traits, types and structs to support a bounded
BTreeSet
. - Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.
- Operation on runtime child storages.
- Operation on runtime storage using hashed keys.
- Some utilities for helping access storage with arbitrary key types.
- Contains the
crate::StorageNoopGuard
for conveniently asserting that no storage mutation has been made by a whole code block. - Provides functionality around the transaction storage.
- Storage types to build abstraction on storage, they implements storage traits such as StorageMap and others.
- Operation on unhashed runtime storage.
- Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.
Structs
- Iterate over a prefix of a child trie and decode raw_key and raw_value into
T
. - Utility type for converting a storage map into a
Get<u32>
impl which returns the maximum key size. - Iterate over a prefix and decode raw_key into
T
. - Iterate or drain over a prefix and decode raw_key and raw_value into
T
.
Enums
- Describes on what should happen with a storage transaction.
Traits
- A strongly-typed double map in storage whose secondary keys and values can be iterated over.
- A strongly-typed map in storage whose keys and values can be iterated over.
- A strongly-typed map with arbitrary number of keys in storage whose keys and values can be iterated over.
- Trait for specialising on removal logic of
PrefixIterator
. - Marker trait that will be implemented for types that support the
storage::append
api. - Marker trait that will be implemented for types that support to decode their length in an efficient way. It is expected that the length is at the beginning of the encoded object and that the length is a
Compact<u32>
. - An implementation of a map with a two keys.
- A strongly-typed map in storage.
- An implementation of a map with an arbitrary number of keys.
- Trait for maps that store all its value after a unique prefix.
- An iterator that streams values directly from storage.
- Marker trait that is implemented for types that support the
storage::append
api with a limit on the number of element. - A trait for working with macro-generated storage values under the substrate storage API.
- Storage double map that is capable of
StorageTryAppend
. - Storage map that is capable of
StorageTryAppend
. - Storage value that is capable of
StorageTryAppend
.
Functions
- Returns the storage prefix for a specific pallet name and storage name.