Module map_view

Source
Expand description

The MapView implements a map with ordered keys. The MapView implements a map that can be modified.

This reproduces more or less the functionalities of the BTreeMap. There are 3 different variants:

  • The ByteMapView whose keys are the Vec<u8> and the values are a serializable type V. The ordering of the entries is via the lexicographic order of the keys.
  • The MapView whose keys are a serializable type K and the value a serializable type V. The ordering is via the order of the BCS serialized keys.
  • The CustomMapView whose keys are a serializable type K and the value a serializable type V. The ordering is via the order of the custom serialized keys.

Structs§

ByteMapView
A view that supports inserting and removing values indexed by Vec<u8>.
CustomMapView
A map view that uses custom serialization
MapView
A View that has a type for keys. The ordering of the entries is determined by the serialization of the context.

Type Aliases§

HashedByteMapView
Type wrapping ByteMapView while memoizing the hash.
HashedCustomMapView
Type wrapping CustomMapView while memoizing the hash.
HashedMapView
Type wrapping MapView while memoizing the hash.