Skip to main content

QueryPredicate

Trait QueryPredicate 

Source
pub trait QueryPredicate<T>
where T: Indexable,
{ // Required methods fn matches(&self, value: &T) -> bool; fn could_match(&self, node: &Bounds) -> bool; fn covers_all(&self, node: &Bounds) -> bool; }
Expand description

A predicate accepted by Rtree::query_with.

matches decides leaf values. could_match and covers_all are conservative subtree tests: false from the former prunes a subtree; true from the latter yields it without further predicate calls.

Required Methods§

Source

fn matches(&self, value: &T) -> bool

Whether one indexed value satisfies the predicate.

Source

fn could_match(&self, node: &Bounds) -> bool

Whether a subtree may contain a match.

Source

fn covers_all(&self, node: &Bounds) -> bool

Whether every value in a subtree is guaranteed to match.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<T, F> QueryPredicate<T> for Satisfies<F>
where T: Indexable, F: Fn(&T) -> bool,

Source§

impl<T, Inner> QueryPredicate<T> for NotPredicate<Inner>
where T: Indexable, Inner: QueryPredicate<T>,

Source§

impl<T, Left, Right> QueryPredicate<T> for AndPredicate<Left, Right>
where T: Indexable, Left: QueryPredicate<T>, Right: QueryPredicate<T>,

Source§

impl<T> QueryPredicate<T> for Predicate
where T: Indexable,