pub struct HashIndexing<T, D>{ /* private fields */ }
Expand description
HashMap-backed table indexing.
Trait Implementations§
Source§impl<T, D> Debug for HashIndexing<T, D>
impl<T, D> Debug for HashIndexing<T, D>
Source§impl<T, D> Default for HashIndexing<T, D>
impl<T, D> Default for HashIndexing<T, D>
Source§impl<T, D> Indexing for HashIndexing<T, D>
impl<T, D> Indexing for HashIndexing<T, D>
Source§fn from_table(table: Table<T, D>) -> Self
fn from_table(table: Table<T, D>) -> Self
Returns a new indexing method that has already indexed the contents of
table
.Source§fn table(&self) -> &Table<Self::Data, Self::Id>
fn table(&self) -> &Table<Self::Data, Self::Id>
Returns a read-only view of the underlying table.
Source§fn to_table(self) -> Table<Self::Data, Self::Id>
fn to_table(self) -> Table<Self::Data, Self::Id>
Extracts the underlying table from the index, discarding all pointers
into the table.
Source§fn get<'s>(&'s self, data: &T) -> Option<&'s Symbol<T, D>>
fn get<'s>(&'s self, data: &T) -> Option<&'s Symbol<T, D>>
Looks up
data
in the index. Returns Some(&symbol)
if a symbol is
present, else None
.Source§fn get_or_insert<'s>(&'s mut self, data: T) -> Insertion<&'s Symbol<T, D>>
fn get_or_insert<'s>(&'s mut self, data: T) -> Insertion<&'s Symbol<T, D>>
Looks up
data
in the index, inserting it into the index and table
if
it isn’t present. Returns the resulting &Symbol<T>
wrapped in an
Insertion
that indicates whether a new table entry had to be created.Auto Trait Implementations§
impl<T, D> Freeze for HashIndexing<T, D>where
D: Freeze,
impl<T, D> RefUnwindSafe for HashIndexing<T, D>where
D: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, D> Send for HashIndexing<T, D>where
T: Send,
impl<T, D> Sync for HashIndexing<T, D>where
T: Sync,
impl<T, D> Unpin for HashIndexing<T, D>where
D: Unpin,
impl<T, D> UnwindSafe for HashIndexing<T, D>
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