pub type HashMap<K, V, S = FnvBuildHasher> = HashMap<K, V, S>;
Expand description

Reexport of the HashMap from hashbrown with the default hasher set to the fnv hash function.

Trait Implementations

The deserialization of maps assumes their size is a u32.

WARNING: Deserialization only ensures that there are no duplicates. Serializing a HashMap via its Serial instance will not lay out elements in a particular order. As a consequence deserializing, and serializing back is in general not the identity. This could have consequences if the data is hashed, or the byte representation is used in some other way directly. In those cases use a BTreeMap instead.

Attempt to read a structure from a given source, failing if an error occurs during deserialization or reading. Read more

Deserialization for HashMap given a size_len. Keys are not verified to be in any particular order and setting ensure_ordering have no effect.

Attempt to read a structure from a given source and context, failing if an error occurs during deserialization or reading. Read more

The serialization of maps encodes their size as a u32. This should be sufficient for all realistic use cases in smart contracts. They are serialized in no particular order.

Attempt to write the structure into the provided writer, failing if only part of the structure could be written. Read more

Serialization for HashMap given a size_len. Keys are not serialized in any particular order.

Attempt to write the structure into the provided writer, failing if if the length cannot be represented in the provided size_length or only part of the structure could be written. Read more