pub trait Query<T> {
// Required method
fn is_match(&self, t: &T) -> bool;
// Provided method
fn matching_elements<'a>(
&self,
a: impl IntoIterator<Item = &'a T>,
) -> Vec<&'a T> { ... }
}
Expand description
A Query matches against elements of some kind,
Required Methods§
Provided Methods§
Sourcefn matching_elements<'a>(
&self,
a: impl IntoIterator<Item = &'a T>,
) -> Vec<&'a T>
fn matching_elements<'a>( &self, a: impl IntoIterator<Item = &'a T>, ) -> Vec<&'a T>
collects a vector of all elements that match the query.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.