[][src]Trait lib::Query

pub trait Query<T> {
    fn is_match(&self, t: &T) -> bool;

    fn matching_elements<'a>(
        &self,
        a: impl IntoIterator<Item = &'a T>
    ) -> Vec<&'a T> { ... } }

A Query matches against elements of some kind,

Required methods

fn is_match(&self, t: &T) -> bool

returns true if query is a match.

Loading content...

Provided methods

fn matching_elements<'a>(
    &self,
    a: impl IntoIterator<Item = &'a T>
) -> Vec<&'a T>

collects a vector of all elements that match the query.

Loading content...

Implementors

impl<F: Fn(&T) -> bool, T> Query<T> for F[src]

fn matching_elements<'a>(
    &self,
    a: impl IntoIterator<Item = &'a T>
) -> Vec<&'a T>
[src]

Loading content...