pub struct BSTHashMap<K, V>(/* private fields */)
where
K: Hash + Eq;
Implementations§
Source§impl<K, V> BSTHashMap<K, V>
impl<K, V> BSTHashMap<K, V>
pub fn new() -> Self
pub fn get(&self, key: &K) -> Option<&V>
pub fn get_mut(&mut self, key: &K) -> Option<&mut V>
pub fn insert(&mut self, key: K, value: V) -> (Iter<'_, (K, V)>, bool)
pub fn clear(&mut self)
pub fn iter_mut(&mut self) -> impl Iterator<Item = &mut (K, V)>
Source§impl<K, V> BSTHashMap<K, V>
impl<K, V> BSTHashMap<K, V>
pub fn iter(&self) -> BSTHashMapIter<'_, K, V> ⓘ
Source§impl<K, V> BSTHashMap<K, V>
impl<K, V> BSTHashMap<K, V>
Sourcepub fn show_memory_layout(&self) -> Result<String>
👎Deprecated: Using this function in a game will result in a SIGV. Cause currently unknown.
pub fn show_memory_layout(&self) -> Result<String>
Show the memory layout of the BSTHashMap
.
§Errors
Failed to write string.
§Examples
use commonlibsse_ng::re::BSTHashMap::BSTHashMap;
let mut map = BSTHashMap::new();
map.insert(42, "hello");
map.insert(17, "world");
map.insert(99, "extra");
map.insert(13, "foo");
print!("{}", map.show_memory_layout().unwrap());
// Output =>
// Memory Layout Visualization:
// Capacity: 8
// Free slots: 4
// ------------------------------------------
// [000] 17 => "world"
// [001] 13 => "foo"
// [002] 42 => "hello" -> 17 => "world"
// [003] EMPTY (Non-occupied)
// [004] EMPTY (Non-occupied)
// [005] 99 => "extra" -> 13 => "foo"
// [006] EMPTY (Non-occupied)
// [007] EMPTY (Non-occupied)
// ------------------------------------------
Trait Implementations§
Source§impl<K, V> Debug for BSTHashMap<K, V>
impl<K, V> Debug for BSTHashMap<K, V>
Auto Trait Implementations§
impl<K, V> Freeze for BSTHashMap<K, V>
impl<K, V> RefUnwindSafe for BSTHashMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
impl<K, V> !Send for BSTHashMap<K, V>
impl<K, V> !Sync for BSTHashMap<K, V>
impl<K, V> Unpin for BSTHashMap<K, V>
impl<K, V> UnwindSafe for BSTHashMap<K, V>where
K: RefUnwindSafe,
V: RefUnwindSafe,
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