std.map.Entry
class pub Entry[K: Equal[ref K] + Hash, V]An entry stored in a Map.
Fields
value
let pub @value: VThe value of the key.
Instance methods
clone
Show source codeHide source code
fn pub clone -> Entry[K, V] {
Entry(
key: @key.clone,
value: @value.clone,
hash: @hash,
distance: @distance,
)
}fn pub clone -> Entry[K, V]
if
K: Equal[ref K] + Hash + Clone[K],
V: Clone[V]Creates a clone of self.
key
Show source codeHide source code
fn pub key -> ref K {
@key
}fn pub key -> ref KReturns an immutable reference to the key.
Keys can never be mutated in place, as this can result in map lookups returning unexpected results.
Implemented traits
Clone
impl Clone[Entry[K, V]] for Entry
if
K: Equal[ref K] + Hash + Clone[K],
V: Clone[V]