Add helper method for Python bindings

This commit is contained in:
Dirkjan Ochtman 2021-03-24 10:59:19 +01:00
parent 0ce148db1e
commit f6061044fc
1 changed files with 5 additions and 0 deletions

View File

@ -189,6 +189,11 @@ impl Search {
}
self.result.clear();
}
#[doc(hidden)]
pub fn get(&self, idx: usize) -> Option<&str> {
self.result.get(idx).map(|v| v.as_str())
}
}
impl Default for Search {