Trait rustc_typeck::util::common::MemoizationMap   
                   
                       [−]
                   
               [src]
pub trait MemoizationMap {
    type Key: Clone;
    type Value: Clone;
    fn memoize<OP>(&self, key: Self::Key, op: OP) -> Self::Value where OP: FnOnce() -> Self::Value;
}Unstable (
            rustc_private)Associated Types
Required Methods
fn memoize<OP>(&self, key: Self::Key, op: OP) -> Self::Value where OP: FnOnce() -> Self::Value
Unstable (
rustc_private)If key is present in the map, return the valuee,
otherwise invoke op and store the value in the map.
NB: if the receiver is a DepTrackingMap, special care is
needed in the op to ensure that the correct edges are
added into the dep graph. See the DepTrackingMap impl for
more details!
Implementors
impl<M> MemoizationMap for RefCell<DepTrackingMap<M>> where M: DepTrackingMapConfigimpl<K, V, S> MemoizationMap for RefCell<HashMap<K, V, S>> where K: Hash + Eq + Clone, S: BuildHasher, V: Clone