fn search(&self, name: &str) -> Vec<&Record> {
        // We simple filter through the values here and see if there
        // are any matches using the ".contains" method on a string.
        // The search is case-insensitive due to the usage of ".to_lowercase".
        self.inner
            .values()
            .filter(|rec| rec.name.to_lowercase().contains(&name.to_lowercase()))
            .collect()
    }
/// Searches for all records containing the supplied name.
Searches for all records containing the supplied name.
Searches for all records containing the supplied name .
fn search(&self, name: &str) -> Vec<&Record> {
        // We simple filter through the values here and see if there
        // are any matches using the ".contains" method on a string.
        // The search is case-insensitive due to the usage of ".to_lowercase".
        self.inner
            .values()
            .filter(|rec| rec.name.to_lowercase().contains(&name.to_lowercase()))
            .collect()
    }
fn search ( & self , name : & str ) -> Vec < & Record > { // We simple filter through the values here and see if there // are any matches using the ".contains" method on a string. // The search is case-insensitive due to the usage of ".to_lowercase". self . inner . values ( ) . filter ( | rec | rec . name . to_lowercase ( ) . contains ( & name . to_lowercase ( ) ) ) . collect ( ) }
Searches for all records containing the supplied name.
Searches for all records containing the supplied name .
&self
name
&str