pub struct InMemoryStorage<P> { /* private fields */ }Implementations§
Source§impl<P> InMemoryStorage<P>
impl<P> InMemoryStorage<P>
Trait Implementations§
Source§impl<P: Clone + 'static + Send + Sync> VectorStorage for InMemoryStorage<P>
impl<P: Clone + 'static + Send + Sync> VectorStorage for InMemoryStorage<P>
type Payload = P
type Error = Infallible
async fn add(&mut self, id: VectorId, payload: P) -> Result<(), Self::Error>
async fn delete(&mut self, id: VectorId) -> Result<(), Self::Error>
async fn get(&self, id: VectorId) -> Result<Option<Cow<'_, P>>, Self::Error>
async fn clear(&mut self) -> Result<(), Self::Error>
async fn add_batch<IS, PS>( &mut self, ids: IS, payloads: PS, ) -> Result<(), Self::Error>
async fn delete_batch<IS>(&mut self, ids: IS) -> Result<(), Self::Error>where
IS: IntoIterator<Item = VectorId>,
Auto Trait Implementations§
impl<P> Freeze for InMemoryStorage<P>
impl<P> RefUnwindSafe for InMemoryStorage<P>where
P: RefUnwindSafe,
impl<P> Send for InMemoryStorage<P>where
P: Send,
impl<P> Sync for InMemoryStorage<P>where
P: Sync,
impl<P> Unpin for InMemoryStorage<P>where
P: Unpin,
impl<P> UnsafeUnpin for InMemoryStorage<P>
impl<P> UnwindSafe for InMemoryStorage<P>where
P: 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