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

A state metadata holding a list of tokens

Implementations

The metadata used for token mutators

Creates a new tokens metadata (old-skool afl name: dictornary)

Add tokens from a slice of Vecs of bytes

Build tokens from files

Parse autodict section

Create a token section from a start and an end pointer Reads from an autotokens section, returning the count of new entries read

Safety

The caller must ensure that the region between token_start and token_stop is a valid region, containing autotokens in the exepcted format.

Creates a new instance from a file

Adds a token to a dictionary, checking it is not a duplicate Returns false if the token was already present and did not get added.

Reads a tokens file, returning the count of new entries read

Returns the amount of tokens in this Tokens instance

Returns if this tokens-instance is empty

Gets the tokens stored in this db

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Performs the += operation. Read more

Convert to a slice

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Deserialize this value from the given Serde deserializer. Read more

Converts to this type from the input type.

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

returns this as Any trait

returns this as mutable Any trait

returns this as boxed Any trait

Serialize this value into the given Serde serializer. 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 Resulting TupleList, of an Prepend::prepend() call, including the prepended entry. Read more

Prepend a value to this tuple, returning a new tuple with prepended value.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

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.