pub struct Dict<V: Copy, H: StrHash = MojoAHashStrHash, KC: TryInto<usize> + From<u8> + From<u16> + TryFrom<u32> + TryFrom<usize> + Copy + PartialEq = u32, KO: TryFrom<usize> + Copy + TryInto<usize> = u32, const DESTRUCTIVE: bool = true, const CACHING_HASHES: bool = true> { /* private fields */ }Expand description
Open-addressing dictionary with linear probing and 1-based slot_to_index like your Mojo Dict.
- V: Copy (to mirror Copyable & Movable)
- H: BuildHasher/StrHash (default aHash RandomState)
- KC: key-count integer (u32 default)
- KO: key-offset integer for KeysContainer (u32 default)
Implementations§
Source§impl<V: Copy, H: StrHash + Default, KC: TryInto<usize> + From<u8> + From<u16> + TryFrom<u32> + TryFrom<usize> + Copy + PartialEq, KO: TryFrom<usize> + Copy + TryInto<usize>, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
impl<V: Copy, H: StrHash + Default, KC: TryInto<usize> + From<u8> + From<u16> + TryFrom<u32> + TryFrom<usize> + Copy + PartialEq, KO: TryFrom<usize> + Copy + TryInto<usize>, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
Auto Trait Implementations§
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Freeze for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>where
H: Freeze,
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> RefUnwindSafe for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Send for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Sync for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> Unpin for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> UnsafeUnpin for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>where
H: UnsafeUnpin,
impl<V, H, KC, KO, const DESTRUCTIVE: bool, const CACHING_HASHES: bool> UnwindSafe for Dict<V, H, KC, KO, DESTRUCTIVE, CACHING_HASHES>
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