pub struct BTreeIndex { /* private fields */ }
Expand description
B-tree index implementation
Implementations§
Source§impl BTreeIndex
impl BTreeIndex
pub fn new(name: String, config: &IndexConfig) -> Self
Trait Implementations§
Source§impl Index for BTreeIndex
impl Index for BTreeIndex
Source§fn index_type(&self) -> IndexType
fn index_type(&self) -> IndexType
Get the index type
Source§fn insert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
value: &'life1 str,
document_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn insert<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
value: &'life1 str,
document_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Insert a value with associated document ID
Source§fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
value: &'life1 str,
document_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn remove<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
value: &'life1 str,
document_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Remove a value-document association
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get document IDs for a value
Source§fn values<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn values<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all values in the index
Source§fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IndexStats, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IndexStats, IndexError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get index statistics
Auto Trait Implementations§
impl Freeze for BTreeIndex
impl RefUnwindSafe for BTreeIndex
impl Send for BTreeIndex
impl Sync for BTreeIndex
impl Unpin for BTreeIndex
impl UnwindSafe for BTreeIndex
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.