[][src]Trait radix_trie::TrieCommon

pub trait TrieCommon<'a, K: 'a, V: 'a>: ContainsTrieNode<'a, K, V> where
    K: TrieKey,
    Self: Sized
{ fn len(self) -> usize;
fn children(self) -> Children<'a, K, V>

Notable traits for Children<'a, K, V>

impl<'a, K, V> Iterator for Children<'a, K, V> type Item = SubTrie<'a, K, V>;
; fn key(self) -> Option<&'a K> { ... }
fn value(self) -> Option<&'a V> { ... }
fn is_empty(self) -> bool { ... }
fn is_leaf(self) -> bool { ... }
fn iter(self) -> Iter<'a, K, V>

Notable traits for Iter<'a, K, V>

impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);
{ ... }
fn keys(self) -> Keys<'a, K, V>

Notable traits for Keys<'a, K, V>

impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;
{ ... }
fn values(self) -> Values<'a, K, V>

Notable traits for Values<'a, K, V>

impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;
{ ... }
fn prefix(self) -> &'a Nibblet { ... } }

Common functionality available for tries and subtries.

Required methods

fn len(self) -> usize

Number of key/value pairs stored in this trie.

fn children(self) -> Children<'a, K, V>

Notable traits for Children<'a, K, V>

impl<'a, K, V> Iterator for Children<'a, K, V> type Item = SubTrie<'a, K, V>;

Return an iterator over the child subtries of this node.

Loading content...

Provided methods

fn key(self) -> Option<&'a K>

Get the key stored at this node, if any.

fn value(self) -> Option<&'a V>

Get the value stored at this node, if any.

fn is_empty(self) -> bool

Determine if the Trie contains 0 key-value pairs.

fn is_leaf(self) -> bool

Determine if the trie is a leaf node (has no children).

fn iter(self) -> Iter<'a, K, V>

Notable traits for Iter<'a, K, V>

impl<'a, K, V> Iterator for Iter<'a, K, V> type Item = (&'a K, &'a V);

Return an iterator over the keys and values of the Trie.

fn keys(self) -> Keys<'a, K, V>

Notable traits for Keys<'a, K, V>

impl<'a, K, V> Iterator for Keys<'a, K, V> type Item = &'a K;

Return an iterator over the keys of the Trie.

fn values(self) -> Values<'a, K, V>

Notable traits for Values<'a, K, V>

impl<'a, K, V> Iterator for Values<'a, K, V> type Item = &'a V;

Return an iterator over the values of the Trie.

fn prefix(self) -> &'a Nibblet

Get the prefix of this node.

Loading content...

Implementors

impl<'a, K: 'a, V: 'a> TrieCommon<'a, K, V> for &'a Trie<K, V> where
    K: TrieKey
[src]

impl<'a, K: 'a, V: 'a> TrieCommon<'a, K, V> for SubTrieMut<'a, K, V> where
    K: TrieKey
[src]

fn len(self) -> usize[src]

Computes from scratch.

impl<'a: 'b, 'b, K: 'a, V: 'a> TrieCommon<'a, K, V> for &'b SubTrie<'a, K, V> where
    K: TrieKey
[src]

impl<'a: 'b, 'b, K: 'a, V: 'a> TrieCommon<'b, K, V> for &'b SubTrieMut<'a, K, V> where
    K: TrieKey
[src]

Loading content...