Expand description
wrapper around UniqueMap that remembers which values were asked for in get
Implementations
sourceimpl<K: TName, V> RememberingUniqueMap<K, V>
 
impl<K: TName, V> RememberingUniqueMap<K, V>
pub fn new() -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn add(&mut self, key: K, value: V) -> Result<(), (K, K::Loc)>
pub fn key_gotten(&self, key: &K) -> bool
pub fn contains_key(&self, key: &K) -> bool
pub fn contains_key_(&self, key_: &K::Key) -> bool
pub fn get(&mut self, key: &K) -> Option<&V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn get_loc(&mut self, key: &K) -> Option<&K::Loc>
pub fn remove(&mut self, key: &K) -> Option<V>
pub fn map<V2, F>(self, f: F) -> RememberingUniqueMap<K, V2> where
    F: FnMut(K, V) -> V2, 
pub fn ref_map<V2, F>(&self, f: F) -> RememberingUniqueMap<K, V2> where
    F: FnMut(K, &V) -> V2, 
pub fn union_with<F>(&self, other: &Self, f: F) -> Self where
    V: Clone,
    F: FnMut(&K, &V, &V) -> V, 
pub fn iter(&self) -> Iter<'_, K, V>ⓘNotable traits for Iter<'a, K, V>impl<'a, K: TName, V> Iterator for Iter<'a, K, V>    type Item = (K::Loc, &'a K::Key, &'a V);
pub fn iter_mut(&mut self) -> IterMut<'_, K, V>ⓘNotable traits for IterMut<'a, K, V>impl<'a, K: TName, V> Iterator for IterMut<'a, K, V>    type Item = (K::Loc, &'a K::Key, &'a mut V);
pub fn maybe_from_opt_iter(
    iter: impl Iterator<Item = Option<(K, V)>>
) -> Option<Result<RememberingUniqueMap<K, V>, (K::Key, K::Loc, K::Loc)>>
pub fn maybe_from_iter(
    iter: impl Iterator<Item = (K, V)>
) -> Result<RememberingUniqueMap<K, V>, (K::Key, K::Loc, K::Loc)>
pub fn into_inner(self) -> UniqueMap<K, V>
pub fn remember(self) -> BTreeSet<K>
Trait Implementations
sourceimpl<K: Clone + TName + Ord, V: Clone> Clone for RememberingUniqueMap<K, V>
 
impl<K: Clone + TName + Ord, V: Clone> Clone for RememberingUniqueMap<K, V>
sourcefn clone(&self) -> RememberingUniqueMap<K, V>
 
fn clone(&self) -> RememberingUniqueMap<K, V>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl<K: TName + Debug, V: Debug> Debug for RememberingUniqueMap<K, V> where
    K::Key: Debug,
    K::Loc: Debug, 
 
impl<K: TName + Debug, V: Debug> Debug for RememberingUniqueMap<K, V> where
    K::Key: Debug,
    K::Loc: Debug, 
sourceimpl<K: TName, V> IntoIterator for RememberingUniqueMap<K, V>
 
impl<K: TName, V> IntoIterator for RememberingUniqueMap<K, V>
sourceimpl<'a, K: TName, V> IntoIterator for &'a RememberingUniqueMap<K, V>
 
impl<'a, K: TName, V> IntoIterator for &'a RememberingUniqueMap<K, V>
sourceimpl<'a, K: TName, V> IntoIterator for &'a mut RememberingUniqueMap<K, V>
 
impl<'a, K: TName, V> IntoIterator for &'a mut RememberingUniqueMap<K, V>
sourceimpl<K: TName, V: PartialEq> PartialEq<RememberingUniqueMap<K, V>> for RememberingUniqueMap<K, V>
 
impl<K: TName, V: PartialEq> PartialEq<RememberingUniqueMap<K, V>> for RememberingUniqueMap<K, V>
impl<K: TName, V: Eq> Eq for RememberingUniqueMap<K, V>
Auto Trait Implementations
impl<K, V> RefUnwindSafe for RememberingUniqueMap<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe,
    <K as TName>::Key: RefUnwindSafe,
    <K as TName>::Loc: RefUnwindSafe, 
impl<K, V> Send for RememberingUniqueMap<K, V> where
    K: Send,
    V: Send,
    <K as TName>::Key: Send,
    <K as TName>::Loc: Send, 
impl<K, V> Sync for RememberingUniqueMap<K, V> where
    K: Sync,
    V: Sync,
    <K as TName>::Key: Sync,
    <K as TName>::Loc: Sync, 
impl<K, V> Unpin for RememberingUniqueMap<K, V>
impl<K, V> UnwindSafe for RememberingUniqueMap<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe,
    <K as TName>::Key: RefUnwindSafe,
    <K as TName>::Loc: RefUnwindSafe, 
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
 
impl<Q, K> Equivalent<K> for Q where
    Q: Eq + ?Sized,
    K: Borrow<Q> + ?Sized, 
sourcefn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
Compare self to key and return true if they are equal.
sourceimpl<T> ToOwned for T where
    T: Clone, 
 
impl<T> ToOwned for T where
    T: Clone, 
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
 
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more