pub struct SimpleTrieArray { /* private fields */ }
Expand description

Simple implementation of TrieArray with Vec<usize>.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Gets the token id with a given index.

Builds a TrieArray from sequences of token ids and pointers.

Serializes the data structure into the writer.

Deserializes the data structure from the reader.

Gets the number of bytes to serialize the data structure.

Gets breakdowns of memory usages for components.

Gets the range pointers[pos]..pointers[pos+1].

Finds the position i such that token_id(i) = id and i in range(pos).

Gets the number of tokens stored.

Gets the number of pointers stored.

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

Performs the conversion.

Performs the conversion.

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.