pub trait IntoKeyId {
// Required method
fn into_key_id(self) -> String;
}Expand description
Converts an entity identifier to the text used in a cache key.
Strings are preserved, integers use exact decimal notation, and floats use
JavaScript String(number) spelling (f32 is promoted to f64). Shared
references to these types are also accepted. For other displayable IDs,
pass id.to_string() or implement this trait with the desired spelling.
Required Methods§
Sourcefn into_key_id(self) -> String
fn into_key_id(self) -> String
Consume the identifier and return its canonical text.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".