Struct

std::collections::hashmap::Entry

source

Re-exported from alloc::collections::hashmap::Entry.

forall K, V.
struct Entry { ... }

One key and value of a bucket's chain, and the next entry in it.

Entry stores only pointers, so it is Copy whatever K and V are; a map with a linear value type, such as HashMap![u32, Marker!], needs no annotation here.

Neither Entry nor HashMap! is exposed, so other modules cannot build or destructure them. The invariant protected is the tie between buckets, bucket_count and the chains hanging off it: a forged HashMap! with a mismatched bucket_count makes the bucket index run past the allocation, and a forged Entry puts arbitrary addresses in front of free_one and destroy_chain.