pub trait StrLookupHashMap {
type Key: Display;
type StrStore: StaticStrStore;
// Required method
fn hashmap() -> &'static RwLock<HashMap<Self::Key, &'static str>>;
}Expand description
A trait for management of str associated with StringId in a 'static HashMap.
The HashMap is managed by the type. This to be use directly in StringId types.
If you implement the trait StrLookupHashMap for a structure, the trait StrLookup is automatically implemented.
§Usage
Define a struct, implement the trait StrLookupHashMap for it
and use it in your StringId type(s).
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.