Trait opendal::raw::oio::BatchDelete

source ·
pub trait BatchDelete: Send + Sync + Unpin + 'static {
    // Required methods
    fn delete_once(
        &self,
        path: String,
        args: OpDelete,
    ) -> impl Future<Output = Result<()>> + MaybeSend;
    fn delete_batch(
        &self,
        batch: Vec<(String, OpDelete)>,
    ) -> impl Future<Output = Result<BatchDeleteResult>> + MaybeSend;
}
Expand description

BatchDelete is used to implement oio::Delete based on batch delete operation.

OneShotDeleter will perform delete operation while calling flush.

Required Methods§

source

fn delete_once( &self, path: String, args: OpDelete, ) -> impl Future<Output = Result<()>> + MaybeSend

delete_once delete one path at once.

Implementations should make sure that the data is deleted correctly at once.

BatchDeleter may call this method while there are only one path to delete.

source

fn delete_batch( &self, batch: Vec<(String, OpDelete)>, ) -> impl Future<Output = Result<BatchDeleteResult>> + MaybeSend

delete_batch delete multiple paths at once.

  • Implementations should make sure that the length of batch equals to the return result’s length.
  • Implementations should return error no path is deleted.

Object Safety§

This trait is not object safe.

Implementors§