Struct bitstring_trees::set::RadixSet
[−]
[src]
pub struct RadixSet<S: BitString> { /* fields omitted */ }
RadixSet is a binary tree with path-shortening; leafs mark
prefixes included in the set, inner nodes have no semantic value.
If a prefix is in the set, all strings prefixed by it are also considered part of the set.
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> RadixSet<S>[src]
fn new() -> Self
New (empty) set.
fn insert(&mut self, key: S)
Add a new prefix to the set.
fn root(&self) -> Option<&Node<S>>
Read-only access to the tree.
An empty set doesn't have any nodes (i.e. None).
fn iter(&self) -> Iter<S>
Iterate over all prefixes in the set
fn iter_full(&self) -> IterFull<S>
Iterate over all prefixes and missing prefixes in the set
Trait Implementations
impl<S: Clone + BitString> Clone for RadixSet<S>[src]
fn clone(&self) -> RadixSet<S>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more