pub trait InternValue {
type Key: Eq + Hash + Debug + Clone;
// Required method
fn into_key(&self) -> Self::Key;
// Provided method
fn with_key<F: FnOnce(&Self::Key) -> T, T>(&self, f: F) -> T { ... }
}
Expand description
Trait implemented for the “value” that is being interned.
Required Associated Types§
Required Methods§
Provided 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: InternValue + Eq + Hash + Debug + Clone, B: InternValue + Eq + Hash + Debug + Clone> InternValue for (A, B)
impl<A: InternValue + Eq + Hash + Debug + Clone, B: InternValue + Eq + Hash + Debug + Clone> InternValue for (A, B)
Implementors§
Source§impl<V: InternValueTrivial> InternValue for V
Implement InternValue
trivially, that is without actually mapping at all.
impl<V: InternValueTrivial> InternValue for V
Implement InternValue
trivially, that is without actually mapping at all.