pub fn search_sorted<C, CMP>(&self, criteria: C, compare: CMP) -> Result<Vec<Record<T>>, Error>
    where
        C: Criteria,
        CMP: FnMut(&Record<T>, &Record<T>) -> Ordering,
    {
        match self.search(criteria) {
            Ok(mut records) => {
                records.sort_by(compare);
                Ok(records)
            }
            Err(err) => Err(err),
        }
    }
/// Perform a search and sort the resulting records based on the comparison.
Perform a search and sort the resulting records based on the comparison.
Perform a search and sort the resulting records based on the comparison .
pub fn search_sorted<C, CMP>(&self, criteria: C, compare: CMP) -> Result<Vec<Record<T>>, Error>
    where
        C: Criteria,
        CMP: FnMut(&Record<T>, &Record<T>) -> Ordering,
    {
        match self.search(criteria) {
            Ok(mut records) => {
                records.sort_by(compare);
                Ok(records)
            }
            Err(err) => Err(err),
        }
    }
pub fn search_sorted < C , CMP > ( & self , criteria : C , compare : CMP ) -> Result < Vec < Record < T > > , Error > where C : Criteria , CMP : FnMut ( & Record < T > , & Record < T > ) -> Ordering , { match self . search ( criteria ) { Ok ( mut records ) => { records . sort_by ( compare ) ; Ok ( records ) } Err ( err ) => Err ( err ) , } }
Perform a search and sort the resulting records based on the comparison.
Perform a search and sort the resulting records based on the comparison .
&self
criteria
C
compare
CMP
&self
criteria
C
compare
CMP