Type Alias RetrievedValues
pub type RetrievedValues<K, I> = IndexMap<K, I>;
Expand description
A data structure that holds a set of values of a generic type I
, indexed by a key of type K
.
This type is typically returned by functions that operate on multiple objects, such as fetching multiple objects
from a server using FetchMany
or parsing a proof that contains multiple objects
using FromProof
.
Each key in this data structure corresponds to an existing value of generic type I
. It differs from
RetrievedObjects
in that it does not contain Option<I>
, but only I
, so it cannot be interpreted as a
proof of absence.
This data structure preserves the order of object insertion. However, the actual order of objects depends on the
order of objects returned by Dash Drive, which is not always guaranteed to be correct.
You can sort the objects by key if you need a specific order; see IndexMap::sort_keys
and similar methods.
§Generic Type Parameters
K
: The type of the keys in the map.I
: The type of the integer values in the map.
Aliased Type§
struct RetrievedValues<K, I> { /* private fields */ }