rustc_data_structures

Module vec_cache

Source
Expand description

VecCache maintains a mapping from K -> (V, I) pairing. K and I must be roughly u32-sized, and V must be Copy.

VecCache supports efficient concurrent put/get across the key space, with write-once semantics (i.e., a given key can only be put once). Subsequent puts will panic.

This is currently used for query caching.

Structsยง

  • Slot ๐Ÿ”’
  • SlotIndex ๐Ÿ”’
    This uniquely identifies a single Slot<V> entry in the buckets map, and provides accessors for either getting the value or putting a value.

Constantsยง