pub trait IterableStorageMapExtended<K: FullEncode, V: FullCodec>: StorageMap<K, V> {
type Iterator: Iterator<Item = (K, V)>;
fn iter(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator;
fn drain(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator;
}
👎Deprecated since 0.4.1: iterator module’s functionality is now available in substrate’s frame-support
Expand description
A strongly-typed map in storage whose keys and values can be iterated over.
Required Associated Types§
Required Methods§
sourcefn iter(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
fn iter(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
👎Deprecated since 0.4.1: iterator module’s functionality is now available in substrate’s frame-support
Enumerate all elements in the map in no particular order. If you alter the map while doing this, you’ll get undefined results.
sourcefn drain(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
fn drain(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
👎Deprecated since 0.4.1: iterator module’s functionality is now available in substrate’s frame-support
Remove all elements from the map and iterate through them in no particular order. If you add elements to the map while doing this, you’ll get undefined results.