pub fn search<C>(&self, criteria: C) -> Result<Vec<Record<T>>, Error>
    where
        C: Criteria,
    {
        let results: Vec<Record<T>> = self
            .records
            .iter()
            .filter(|&tr| criteria.apply(tr.1))
            .map(|tr| tr.1.clone())
            .collect();
        Ok(results)
    }
/// Perform a search on the records in a database, based on the given criteria.
Perform a search on the records in a database, based on the given criteria.
Perform a search on the records in a database based on the given criteria .
pub fn search<C>(&self, criteria: C) -> Result<Vec<Record<T>>, Error>
    where
        C: Criteria,
    {
        let results: Vec<Record<T>> = self
            .records
            .iter()
            .filter(|&tr| criteria.apply(tr.1))
            .map(|tr| tr.1.clone())
            .collect();
        Ok(results)
    }
pub fn search < C > ( & self , criteria : C ) -> Result < Vec < Record < T > > , Error > where C : Criteria , { let results : Vec < Record < T > > = self . records . iter ( ) . filter ( | & tr | criteria . apply ( tr . 1 ) ) . map ( | tr | tr . 1 . clone ( ) ) . collect ( ) ; Ok ( results ) }
Perform a search on the records in a database, based on the given criteria.
Perform a search on the records in a database based on the given criteria .
&self
criteria
C
&self
criteria
C