pub struct Documents<'a, T: Typesense> { /* private fields */ }Implementations§
Source§impl<'a, T: Typesense> Documents<'a, T>
impl<'a, T: Typesense> Documents<'a, T>
pub async fn create(&self, document: &T) -> Result<T::Partial, Error>
pub async fn retrieve(&self, id: &str) -> Result<T, Error>
pub async fn upsert(&self, document: &T) -> Result<T::Partial, Error>
pub async fn update( &self, id: &str, document: &T::Partial, ) -> Result<T::Partial, Error>
pub async fn delete(&self, id: &str) -> Result<T, Error>
pub fn batch_create( &'a self, documents: &'a [T::Partial], ) -> DocumentBatchAction<'a, T, impl 'a + Future<Output = Result<(), Error>>>
pub fn batch_upsert( &'a self, documents: &'a [T::Partial], ) -> DocumentBatchAction<'a, T, impl 'a + Future<Output = Result<(), Error>>>
pub fn batch_update( &'a self, documents: &'a [T::Partial], ) -> DocumentBatchAction<'a, T, impl 'a + Future<Output = Result<(), Error>>>
pub fn batch_emplace( &'a self, documents: &'a [T::Partial], ) -> DocumentBatchAction<'a, T, impl 'a + Future<Output = Result<(), Error>>>
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Documents<'a, T>
impl<'a, T> !RefUnwindSafe for Documents<'a, T>
impl<'a, T> Send for Documents<'a, T>where
T: Send,
impl<'a, T> Sync for Documents<'a, T>where
T: Sync,
impl<'a, T> Unpin for Documents<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for Documents<'a, T>
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