pub struct IndexManager { /* private fields */ }Implementations§
Source§impl IndexManager
impl IndexManager
pub fn new() -> Self
pub fn add_index(&mut self, definition: IndexDefinition)
pub fn get_indexed_fields(&self, entity: &str) -> Option<&Vec<String>>
pub fn update_indexes( &self, batch: &mut BatchWriter, entity: &Entity, old_entity: Option<&Entity>, )
pub fn remove_indexes(&self, batch: &mut BatchWriter, entity: &Entity)
Sourcepub fn lookup_by_field(
&self,
storage: &Storage,
entity: &str,
field: &str,
value: &[u8],
) -> Result<Vec<String>>
pub fn lookup_by_field( &self, storage: &Storage, entity: &str, field: &str, value: &[u8], ) -> Result<Vec<String>>
§Errors
Returns an error if the storage prefix scan fails.
pub fn is_field_indexed(&self, entity: &str, field: &str) -> bool
Sourcepub fn persist_index(
&self,
batch: &mut BatchWriter,
definition: &IndexDefinition,
) -> Result<()>
pub fn persist_index( &self, batch: &mut BatchWriter, definition: &IndexDefinition, ) -> Result<()>
§Errors
Returns an error if serialization fails.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexManager
impl RefUnwindSafe for IndexManager
impl Send for IndexManager
impl Sync for IndexManager
impl Unpin for IndexManager
impl UnsafeUnpin for IndexManager
impl UnwindSafe for IndexManager
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