pub struct AsyncLsmManager { /* private fields */ }Expand description
Non-blocking LSM manager with WAL
Implementations§
Source§impl AsyncLsmManager
impl AsyncLsmManager
Sourcepub fn insert(&self, key: VectorKey, vector: Vec<f32>) -> Result<(), LsmError>
pub fn insert(&self, key: VectorKey, vector: Vec<f32>) -> Result<(), LsmError>
Insert a vector (with WAL durability)
Sourcepub fn insert_batch(
&self,
items: Vec<(VectorKey, Vec<f32>)>,
) -> Result<(), LsmError>
pub fn insert_batch( &self, items: Vec<(VectorKey, Vec<f32>)>, ) -> Result<(), LsmError>
Insert batch (optimized path)
Sourcepub fn seal_async(&self) -> Result<u64, LsmError>
pub fn seal_async(&self) -> Result<u64, LsmError>
Non-blocking seal - returns immediately
Sourcepub fn seal_blocking(&self) -> Result<Arc<SealedSegment>, LsmError>
pub fn seal_blocking(&self) -> Result<Arc<SealedSegment>, LsmError>
Blocking seal - waits for completion
Sourcepub fn search(&self, query: &[f32], k: usize) -> Vec<(VectorKey, f32)>
pub fn search(&self, query: &[f32], k: usize) -> Vec<(VectorKey, f32)>
Search across all segments
Sourcepub fn stats(&self) -> LsmManagerStats
pub fn stats(&self) -> LsmManagerStats
Get statistics
Trait Implementations§
Source§impl Drop for AsyncLsmManager
impl Drop for AsyncLsmManager
Auto Trait Implementations§
impl !Freeze for AsyncLsmManager
impl RefUnwindSafe for AsyncLsmManager
impl Send for AsyncLsmManager
impl Sync for AsyncLsmManager
impl Unpin for AsyncLsmManager
impl UnsafeUnpin for AsyncLsmManager
impl UnwindSafe for AsyncLsmManager
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more