Skip to main content

Queryable

Trait Queryable 

Source
pub trait Queryable<T> {
    // Required method
    fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>;
}
Expand description

Trait for types that can be queried.

Implemented for standard collections like Vec, HashMap, HashSet, etc.

Required Methods§

Source

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Returns an iterator over references to items.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl<K, V> Queryable<V> for BTreeMap<K, V>
where K: Ord,

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &V> + '_>

Source§

impl<K, V> Queryable<V> for HashMap<K, V>
where K: Eq + Hash,

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &V> + '_>

Source§

impl<T, E> Queryable<T> for Result<T, E>

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T, const N: usize> Queryable<T> for [T; N]

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for BTreeSet<T>
where T: Ord,

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for HashSet<T>
where T: Eq + Hash,

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for LinkedList<T>

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for Option<T>

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for Vec<T>

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for VecDeque<T>

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Source§

impl<T> Queryable<T> for [T]

Source§

fn query_iter(&self) -> Box<dyn Iterator<Item = &T> + '_>

Implementors§