pub struct GraphIndex<T> { /* private fields */ }Expand description
Graph indexing system for fast queries
Implementations§
Source§impl<T> GraphIndex<T>
impl<T> GraphIndex<T>
Sourcepub fn add_item(
&mut self,
id: String,
item: T,
indexable_fields: &HashMap<String, String>,
)
pub fn add_item( &mut self, id: String, item: T, indexable_fields: &HashMap<String, String>, )
Add an item to the index
Sourcepub fn remove_item(&mut self, id: &str)
pub fn remove_item(&mut self, id: &str)
Remove an item from the index
Sourcepub fn find_by_field(&self, field_name: &str, field_value: &str) -> Vec<&T>
pub fn find_by_field(&self, field_name: &str, field_value: &str) -> Vec<&T>
Find items by field value
Sourcepub fn text_search(&self, query: &str) -> Vec<&T>
pub fn text_search(&self, query: &str) -> Vec<&T>
Text search
Trait Implementations§
Source§impl<T: Clone> Clone for GraphIndex<T>
impl<T: Clone> Clone for GraphIndex<T>
Source§fn clone(&self) -> GraphIndex<T>
fn clone(&self) -> GraphIndex<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<T> Freeze for GraphIndex<T>
impl<T> RefUnwindSafe for GraphIndex<T>where
T: RefUnwindSafe,
impl<T> Send for GraphIndex<T>where
T: Send,
impl<T> Sync for GraphIndex<T>where
T: Sync,
impl<T> Unpin for GraphIndex<T>where
T: Unpin,
impl<T> UnwindSafe for GraphIndex<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more