pub trait StringStoreKey:
Clone
+ Ord
+ Send
+ 'static {
// Required methods
fn serialize_key(&self) -> String;
fn deserialize_key(key: &str) -> Option<Self>;
}Expand description
Indicates, that a key can be serialized as a String.
Some Store implementations need to internally store keys
as a String.
These implementations need to restrict their key type to StringStoreKey.
§Caution
In the case of StringStoreKey, it is important that the String representation of the key
has the same ordering as the actual keys.
This is relevant for OrderedStores.
Required Methods§
fn serialize_key(&self) -> String
fn deserialize_key(key: &str) -> Option<Self>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".