pub trait AsKey {
// Required method
fn as_key(&self) -> Key;
}Expand description
A value usable as a key: what an #[obs(key)] / #[model(id)] field’s type implements.
Integer keys reserve the top bit (the interned-handle space); a negative cast or a
hash-derived id at or above 1 << 63 is refused in debug builds rather than silently
colliding with an interned handle.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".