IndexedHashMap

Struct IndexedHashMap 

Source
pub struct IndexedHashMap<K, V, S = RandomState>
where K: Copy + Hash + Eq, S: BuildHasher,
{ /* private fields */ }
Expand description

This implements a map that can be used with UnionFind.

TODO: add docs of how to use a different hasher

Implementations§

Source§

impl<K, S> IndexedHashMap<K, K, S>
where K: Copy + Hash + Eq, S: BuildHasher,

Source

pub fn new_parent_with_hasher(hasher: S) -> Self

Source§

impl<K, S> IndexedHashMap<K, usize, S>
where K: Copy + Hash + Eq, S: BuildHasher,

Source

pub fn new_rank_with_hasher(hasher: S) -> Self

Trait Implementations§

Source§

impl<K, V> Index<K> for IndexedHashMap<K, V>
where K: Copy + Hash + Eq,

Source§

type Output = V

The returned type after indexing.
Source§

fn index(&self, index: K) -> &Self::Output

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

impl<K, V> IndexMut<K> for IndexedHashMap<K, V>
where K: Copy + Hash + Eq,

Source§

fn index_mut(&mut self, index: K) -> &mut Self::Output

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

Auto Trait Implementations§

§

impl<K, V, S> Freeze for IndexedHashMap<K, V, S>
where S: Freeze,

§

impl<K, V, S> RefUnwindSafe for IndexedHashMap<K, V, S>

§

impl<K, V, S> Send for IndexedHashMap<K, V, S>
where S: Send, K: Send, V: Send,

§

impl<K, V, S> Sync for IndexedHashMap<K, V, S>
where S: Sync, K: Sync, V: Sync,

§

impl<K, V, S> Unpin for IndexedHashMap<K, V, S>
where S: Unpin, K: Unpin, V: Unpin,

§

impl<K, V, S> UnwindSafe for IndexedHashMap<K, V, S>
where K: UnwindSafe, V: UnwindSafe, S: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.