Struct qptrie::Trie [] [src]

pub struct Trie<TK: PartialEq + AsRef<[u8]>, TV> { /* fields omitted */ }

A qp-trie.

Methods

impl<TK: PartialEq + AsRef<[u8]>, TV> Trie<TK, TV>
[src]

Creates a new, empty qp-trie.

Refuses to insert nodes that would make the trie height greater than max_height.

Returns true if the trie is empty.

Inserts a new node with the key key.

Returns the value associated with the key key, or None if the key is not present in the trie.

Returns a mutable value associated with the key key, or None if the key is not present in the trie.

Removes the node associated with the key key.

Returns true if the key was found, or false if the operation was a no-op.

Creates a new iterator over all the nodes whose key includes prefix as a prefix.

Trait Implementations

impl<TK: Clone + PartialEq + AsRef<[u8]>, TV: Clone> Clone for Trie<TK, TV>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<TK: Debug + PartialEq + AsRef<[u8]>, TV: Debug> Debug for Trie<TK, TV>
[src]

Formats the value using the given formatter.

impl<TK: PartialEq + AsRef<[u8]>, TV> Default for Trie<TK, TV>
[src]

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