logo
pub struct Interner { /* private fields */ }
Expand description

The string interner for Boa.

Implementations

Creates a new Interner.

Creates a new Interner with the specified capacity.

Returns the number of strings interned by the interner.

Returns true if the Interner contains no interned strings.

Returns the symbol for the given string if any.

Can be used to query if a string has already been interned without interning.

Interns the given string.

Returns a symbol for resolution into the original string.

Panics

If the interner already interns the maximum number of strings possible by the chosen symbol type.

Interns the given 'static string.

Returns a symbol for resolution into the original string.

Note

This is more efficient than Interner::get_or_intern, since it avoids storing string inside the Interner.

Panics

If the interner already interns the maximum number of strings possible by the chosen symbol type.

Returns the string for the given symbol if any.

Returns the string for the given symbol.

Panics

If the interner cannot resolve the given symbol.

Trait Implementations

Formats the value using the given formatter. Read more
Returns the “default value” for a type. 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.