pub type SnapshotMapRef<'a, K, V, L> = SnapshotMap<K, V, &'a mut FxHashMap<K, V>, &'a mut L>;

Aliased Type§

struct SnapshotMapRef<'a, K, V, L> {
    map: &'a mut HashMap<K, V, BuildHasherDefault<FxHasher>>,
    undo_log: &'a mut L,
    _marker: PhantomData<(K, V)>,
}

Fields§

§map: &'a mut HashMap<K, V, BuildHasherDefault<FxHasher>>§undo_log: &'a mut L§_marker: PhantomData<(K, V)>

Implementations§

source§

impl<K, V, M, L> SnapshotMap<K, V, M, L>

source

pub fn with_log<L2>(&mut self, undo_log: L2) -> SnapshotMap<K, V, &mut M, L2>

source§

impl<K, V, M, L> SnapshotMap<K, V, M, L>where K: Hash + Clone + Eq, M: BorrowMut<FxHashMap<K, V>> + Borrow<FxHashMap<K, V>>, L: UndoLogs<UndoLog<K, V>>,

source

pub fn clear(&mut self)

source

pub fn insert(&mut self, key: K, value: V) -> bool

source

pub fn remove(&mut self, key: K) -> bool

source

pub fn get(&self, key: &K) -> Option<&V>

Trait Implementations§

source§

impl<K: Clone, V: Clone, M: Clone, L: Clone> Clone for SnapshotMap<K, V, M, L>

source§

fn clone(&self) -> SnapshotMap<K, V, M, L>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<K, V, M, L> Default for SnapshotMap<K, V, M, L>where M: Default, L: Default,

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'k, K, V, M, L> Index<&'k K> for SnapshotMap<K, V, M, L>where K: Hash + Clone + Eq, M: Borrow<FxHashMap<K, V>>,

§

type Output = V

The returned type after indexing.
source§

fn index(&self, key: &'k K) -> &V

Performs the indexing (container[index]) operation. Read more
source§

impl<K, V, M, L> Rollback<UndoLog<K, V>> for SnapshotMap<K, V, M, L>where K: Eq + Hash, M: Rollback<UndoLog<K, V>>,

source§

fn reverse(&mut self, undo: UndoLog<K, V>)

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 16 bytes