Skip to main content

InOrderPruningPolicy

Trait InOrderPruningPolicy 

Source
pub trait InOrderPruningPolicy<K, V, S> {
    // Required methods
    fn is_match(&self, key: &K, value: &V, stats: &S) -> bool;
    fn should_explore_left(
        &self,
        left: (&K, &V, &S),
        current: (&K, &V, &S),
    ) -> bool;
    fn should_explore_right(
        &self,
        right: (&K, &V, &S),
        current: (&K, &V, &S),
    ) -> bool;
}
Expand description

A policy trait that separates structural pruning rules from the tree architecture.

Required Methods§

Source

fn is_match(&self, key: &K, value: &V, stats: &S) -> bool

Evaluates if the current node satisfies the lookup constraints.

Source

fn should_explore_left(&self, left: (&K, &V, &S), current: (&K, &V, &S)) -> bool

Determines if the left child branch should be explored or pruned.

Source

fn should_explore_right( &self, right: (&K, &V, &S), current: (&K, &V, &S), ) -> bool

Determines if the right child branch should be explored or pruned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T: Ord, KBound, V> InOrderPruningPolicy<Interval<T>, V, T> for IntervalOverlapPolicy<T, KBound>
where KBound: Borrow<T>,

Available on crate feature interval-tree only.