[−][src]Trait orml_utilities::iterator::IterableStorageDoubleMapExtended
A strongly-typed map in storage whose keys and values can be iterated over.
Associated Types
type PrefixIterator: Iterator<Item = (K2, V)>
The type that iterates over all (key2, value)
.
type Iterator: Iterator<Item = (K1, K2, V)>
The type that iterates over all (key1, key2, value)
.
Required methods
fn iter_prefix(
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
Enumerate all elements in the map with first key k1
in no particular
order. If you add or remove values whose first key is k1
to the map
while doing this, you'll get undefined results.
fn drain_prefix(
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
Remove all elements from the map with first key k1
and iterate through
them in no particular order. If you add elements with first key k1
to
the map while doing this, you'll get undefined results.
fn iter(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
Enumerate all elements in the map in no particular order. If you add or remove values to the map while doing this, you'll get undefined results.
fn drain(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
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.
Implementors
impl<K1: FullCodec, K2: FullCodec, V: FullCodec, G: StorageDoubleMapT<K1, K2, V>> IterableStorageDoubleMapExtended<K1, K2, V> for G where
G::Hasher1: ReversibleStorageHasher,
G::Hasher2: ReversibleStorageHasher,
[src]
G::Hasher1: ReversibleStorageHasher,
G::Hasher2: ReversibleStorageHasher,
type PrefixIterator = MapIteratorShim<(K2, V)>
type Iterator = MapIteratorShim<(K1, K2, V)>
fn iter_prefix(
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
[src]
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
fn drain_prefix(
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
[src]
k1: impl EncodeLike<K1>,
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::PrefixIterator
fn iter(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
fn drain(
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator
[src]
max_iterations: Option<u32>,
start_key: Option<Vec<u8>>
) -> Self::Iterator