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

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

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.

Methods

impl<S: BitString + Clone, V> RadixMap<S, V>
[src]

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

impl<S: Clone + BitString, V: Clone> Clone for RadixMap<S, V>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<S: BitString + Debug, V: Debug> Debug for RadixMap<S, V>
[src]

Formats the value using the given formatter.

impl<S: BitString, V> Default for RadixMap<S, V>
[src]

Returns the "default value" for a type. Read more