pub struct MapTable<K, M, S> { /* private fields */ }Expand description
A transposition table backed by a hash map, holding up to a fixed number of entries.
Unlike SlotTable, keys never share a slot, so an entry stays until
MapTable::clear. Once the map is full, entries for new keys are dropped, while known
keys are still updated. Keys need Hash, and memory grows with the entries stored.
Available with the hashbrown feature.
§Examples
use game_tree_search::{MapTable, Table};
let mut table = MapTable::<u64, u8, i32>::new(1);
assert!(table.is_empty());
assert_eq!(table.capacity(), 1);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<K, M, S> Forget for MapTable<K, M, S>
impl<K, M, S> Freeze for MapTable<K, M, S>
impl<K, M, S> Move for MapTable<K, M, S>
impl<K, M, S> RefUnwindSafe for MapTable<K, M, S>
impl<K, M, S> Send for MapTable<K, M, S>
impl<K, M, S> Sync for MapTable<K, M, S>
impl<K, M, S> Unpin for MapTable<K, M, S>
impl<K, M, S> UnsafeUnpin for MapTable<K, M, S>
impl<K, M, S> UnwindSafe for MapTable<K, M, S>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more