pub fn update(&self, operation: CollectionUpdateOperations, wait: bool) -> CollectionResult<UpdateResult> {
        let operation_id = self.wal.lock().write(&operation)?;

        let upd = self.updater.clone();
        let sndr = self.update_sender.clone();
        let update_future = async move {
            let res = upd.update(operation_id, operation);
            sndr.send(UpdateSignal::Operation(operation_id))?;
            res
        };

        let update_handler = self.runtime_handle.spawn(update_future);

        if !wait {
            return Ok(UpdateResult { operation_id, status: UpdateStatus::Acknowledged });
        }

        let _res: usize = self.runtime_handle.block_on(update_handler)??;
        Ok(UpdateResult { operation_id, status: UpdateStatus::Completed })
    }
/// Imply interior mutability.
/// Performs update operation on this collection asynchronously.
/// Explicitly waits for result to be updated.
Imply interior mutability.
Performs update operation on this collection asynchronously.
Explicitly waits for result to be updated.
Imply interior mutability . Performs update operation on this collection asynchronously . Explicitly waits for result to be updated .
pub fn update(&self, operation: CollectionUpdateOperations, wait: bool) -> CollectionResult<UpdateResult> {
        let operation_id = self.wal.lock().write(&operation)?;
        let upd = self.updater.clone();
        let sndr = self.update_sender.clone();
        let update_future = async move {
            let res = upd.update(operation_id, operation);
            sndr.send(UpdateSignal::Operation(operation_id))?;
            res
        };
        let update_handler = self.runtime_handle.spawn(update_future);
        if !wait {
            return Ok(UpdateResult { operation_id, status: UpdateStatus::Acknowledged });
        }
        let _res: usize = self.runtime_handle.block_on(update_handler)??;
        Ok(UpdateResult { operation_id, status: UpdateStatus::Completed })
    }
pub fn update ( & self , operation : CollectionUpdateOperations , wait : bool ) -> CollectionResult < UpdateResult > { let operation_id = self . wal . lock ( ) . write ( & operation ) ? ; let upd = self . updater . clone ( ) ; let sndr = self . update_sender . clone ( ) ; let update_future = async move { let res = upd . update ( operation_id , operation ) ; sndr . send ( UpdateSignal :: Operation ( operation_id ) ) ? ; res } ; let update_handler = self . runtime_handle . spawn ( update_future ) ; if ! wait { return Ok ( UpdateResult { operation_id , status : UpdateStatus :: Acknowledged } ) ; } let _res : usize = self . runtime_handle . block_on ( update_handler ) ? ? ; Ok ( UpdateResult { operation_id , status : UpdateStatus :: Completed } ) }
Imply interior mutability.
Imply interior mutability .
&self
operation
CollectionUpdateOperations
wait
bool
&self
operation
CollectionUpdateOperations
wait
bool