pub trait SimpleKeyedRef: KeyedRef {
// Required method
fn into_ref<'r>(r: Self::KeyRef<'r>) -> &'r Self::Key
where Self: 'r;
}Expand description
Keyed collection where each key reference can be converted into a standard “simple” rust reference.
This trait is particularly useful to avoid having to include where bounds
of the form for<'r> T::KeyRef<'r>: Into<&'r T::Key>, which can
currently lead the compiler to try to prove T: 'static
(see https://github.com/rust-lang/rust/pull/96709#issuecomment-1182403490)
for more details.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".