pub trait TreeProperties {
type Key: BitString + Clone;
type Value: Default;
type LeafValue: Clone + Default;
type LeafValueComparer: LeafValueComparer<Self::LeafValue>;
const EMPTY: bool;
const LEAF_EMPTY: bool;
const IGNORE_LEAFS: bool;
}
Expand description
Define Tree behavior
Required Associated Constants§
sourceconst EMPTY: bool
const EMPTY: bool
Whether value is insignificant (inner nodes can be removed)
When true Value
should be ()
.
sourceconst LEAF_EMPTY: bool
const LEAF_EMPTY: bool
Whether leaf value is insignificant (leafs won’t cloned down a path to insert a new leaf - new leaf gets ignored if a parent leaf is present).
Most operations won’t touch the set of covered bitstrings by leaf nodes unless that is their explicit goal.
When true LeafValue
should be ()
.
sourceconst IGNORE_LEAFS: bool
const IGNORE_LEAFS: bool
Whether to completely ignore leafs and the bitstrings they cover.
Use this if you only care about the inner Value
s.
If set LEAF_EMPTY
must be set too.
Required Associated Types§
sourcetype LeafValueComparer: LeafValueComparer<Self::LeafValue>
type LeafValueComparer: LeafValueComparer<Self::LeafValue>
Used to compare leaf values to allow combining of leafs. (Only used when LEAF_EMPTY=false);
Object Safety§
This trait is not object safe.