3.0.ipv8.dht.trie
Attributes
Classes
Module Contents
- 3.0.ipv8.dht.trie.NullType
- 3.0.ipv8.dht.trie.Null
- 3.0.ipv8.dht.trie.ValueType
- class 3.0.ipv8.dht.trie.Node
Bases:
Generic[ValueType]This class represents a node within a prefix tree.
- class 3.0.ipv8.dht.trie.Trie(alphabet: str)
Bases:
Generic[ValueType]This class represents a prefix tree.
- alphabet
- root
- itervalues() collections.abc.Iterator[ValueType]
Iterate over all stored values.
- longest_prefix_item(key: str, default: tuple[str, ValueType] | NullType = Null) tuple[str, ValueType]
Get longest matching prefix, for the given key, and its value.
Raises a KeyError if no node is found at all.
- longest_prefix(key: str, default: str | NullType = Null) str
Get longest matching prefix, for the given key.
Raises a KeyError if no node is found at all.