pub fn ffindex_get_entry_by_name<'a>(ffindex_db : &'a FFindexDB, key : String) -> Result<&'a FFindexEntry,usize>
{
    match ffindex_db.entries.binary_search_by(|entry| entry.name.cmp(&key))
    {
        Ok(i) => Ok(&ffindex_db.entries[i]),
        Err(i) => Err(i)
    }
}
/// get an index entry by name using binary search
get an index entry by name using binary search
get an index entry by name using binary search
pub fn ffindex_get_entry_by_name<'a>(ffindex_db : &'a FFindexDB, key : String) -> Result<&'a FFindexEntry,usize>
{
    match ffindex_db.entries.binary_search_by(|entry| entry.name.cmp(&key))
    {
        Ok(i) => Ok(&ffindex_db.entries[i]),
        Err(i) => Err(i)
    }
}
pub fn ffindex_get_entry_by_name < ' a > ( ffindex_db : & ' a FFindexDB , key : String ) -> Result < & ' a FFindexEntry , usize > { match ffindex_db . entries . binary_search_by ( | entry | entry . name . cmp ( & key ) ) { Ok ( i ) => Ok ( & ffindex_db . entries [ i ] ) , Err ( i ) => Err ( i ) } }
get an index entry by name using binary search
get an index entry by name using binary search
ffindex_db
&'a FFindexDB
key
String
ffindex_db
&'a FFindexDB
key
String