pub trait RuntimeKeyPolicy: Send + Sync {
// Required method
fn key_for(&self, cx: &mut Cx, value: &Value) -> Result<Option<RuntimeKey>>;
}Expand description
Maps a language value to a runtime table key.
Returning None means the language forbids that value as a key. For
example, a policy can reject nil, NaN, or any object kind it cannot identify.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".