Skip to main content

ProxyQueryPredicate

Trait ProxyQueryPredicate 

pub trait ProxyQueryPredicate:
    Clone
    + Send
    + Sync
    + 'static {
    // Required method
    fn execute(&self, proxy: &Proxy) -> bool;
}
Available on crate feature proxy only.
Expand description

Trait that is used by the ProxyDB for providing an optional filter predicate to rule out returned results.

Required Methods§

fn execute(&self, proxy: &Proxy) -> bool

Execute the predicate.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

§

impl ProxyQueryPredicate for bool

§

fn execute(&self, _proxy: &Proxy) -> bool

Implementors§

§

impl<F> ProxyQueryPredicate for F
where F: Fn(&Proxy) -> bool + Clone + Send + Sync + 'static,