pub struct Interner<T: Hash + Eq> { /* private fields */ }
Expand description

A hastable based interner that allows

Implementations

Create an Interner with an intial capacity calculated by calling estimate_tokens methods of before and after

Create an Interner with inital capacity capacity.

Remove all interned tokens

Intern token and return a the interned integer

Returns to total number of distinct tokens currently interned.

Erases first_erased_token and any tokens interned afterwards from the interner.

Trait Implementations

Returns the “default value” for a type. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.