pub trait MapKeyOut {
// Required method
fn as_str(&self) -> &str;
}Expand description
Sealed adapter from a map’s key type to the borrowed &str form.
JSON object keys are always strings, so any map serialized via
ToJson needs its key type to expose a &str view. Implemented
for String, &str, and Cow<'_, str> — the same set the
parse side supports via MapKey.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".