Struct bitstring_trees::map::RadixMap[][src]

pub struct RadixMap<S: BitString, V> { /* fields omitted */ }
Expand description

RadixMap is a binary tree with path-shortening; leafs mark prefixes mapping to a value, inner nodes have no semantic meaning.

If a prefix maps to a value set, all strings prefixed by it are also considered to map to that value.

If an inner node would have only a single child, the paths to and from it could be shortened - therefor all inner nodes have two children.

Implementations

New (empty) map.

Add a new prefix => value mapping.

As values can’t be compared for equality it cannot merge neighbour prefixes that map to the same value.

Add a new prefix => value mapping. (Partially) overwrites old mappings.

Read-only access to the tree.

An empty map doesn’t have any nodes (i.e. None).

Iterate over all values in the map

Iterate over all values and missing values in the map

Trait Implementations

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

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 resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.