Skip to main content

assert_hashable_key

Function assert_hashable_key 

Source
pub fn assert_hashable_key(key: &RuntimeValue) -> Result<(), String>
Expand description

A Map key must be TRANSITIVELY immutable: a List/Set/Map key (even one buried inside a tuple or struct) is a shared handle whose later mutation would silently corrupt the map, so the insert refuses it outright with a catchable error. Tuples and structs of immutable parts are VALUE keys.