pub trait EnumMapGet<K, V> {
// Required methods
fn get(&self, key: K) -> &V;
fn get_mut(&mut self, key: K) -> &mut V;
}Expand description
This is a workaround for clippy index warnings for safe index ops. It also is more convenient in some cases to use these fundtions if you want to make sure something is &mut, or &
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".