Skip to main content

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 close.

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 must account for every input path in either succeeded or failed; BatchDeleter rejects a result that drops or invents paths.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§