pub trait Ref<'a, T> {
// Required method
fn from_ref(val: &'a T) -> Self;
}
Expand description
A trait for things that are “close enough” to &'a T
.
Required Methods§
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.
Implementations on Foreign Types§
Source§impl<'a, K, V, R: Ref<'a, K>> Ref<'a, (K, V)> for (R, &'a V)
impl<'a, K, V, R: Ref<'a, K>> Ref<'a, (K, V)> for (R, &'a V)
Pull the key out of a key-value pair.