pub trait EventKey:
Hash
+ PartialEq
+ Eq
+ Clone
+ Send
+ 'static { }
Expand description
Types that can be used as event identifiers
Example using an enum:
ⓘ
#[derive(Debug, Hash, PartialEq, Eq, Clone)]
enum MyEvents {
EventA,
EventB,
}
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.