BatchDelete

Trait BatchDelete 

pub trait BatchDelete:
    Send
    + Sync
    + Unpin
    + 'static {
    // Required methods
    fn delete_once(
        &self,
        path: String,
        args: OpDelete,
    ) -> impl Future<Output = Result<(), Error>> + MaybeSend;
    fn delete_batch(
        &self,
        batch: Vec<(String, OpDelete)>,
    ) -> impl Future<Output = Result<BatchDeleteResult, Error>> + 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§

fn delete_once( &self, path: String, args: OpDelete, ) -> impl Future<Output = Result<(), Error>> + 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.

fn delete_batch( &self, batch: Vec<(String, OpDelete)>, ) -> impl Future<Output = Result<BatchDeleteResult, Error>> + 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§