Delete

Trait Delete 

Source
pub trait Delete:
    Unpin
    + Send
    + Sync {
    // Required methods
    fn delete<'a>(
        &'a mut self,
        path: &'a str,
        args: OpDelete,
    ) -> impl Future<Output = Result<()>> + MaybeSend + 'a;
    fn close(&mut self) -> impl Future<Output = Result<()>> + MaybeSend;
}
Expand description

The Delete trait defines interfaces for performing deletion operations.

Required Methods§

Source

fn delete<'a>( &'a mut self, path: &'a str, args: OpDelete, ) -> impl Future<Output = Result<()>> + MaybeSend + 'a

Requests deletion of a resource at the specified path with optional arguments

§Parameters
  • path: The path of the resource to delete
  • args: Additional arguments for the delete operation
§Returns
  • Ok(()): The deletion request has been successfully queued (does not guarantee actual deletion)
  • Err(err): An error occurred and the deletion request was not queued
§Notes

This method just queues the delete request. The actual deletion will be performed when close is called.

Source

fn close(&mut self) -> impl Future<Output = Result<()>> + MaybeSend

Close the deleter and ensure all queued deletions are executed.

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.

Implementations on Foreign Types§

Source§

impl Delete for ()

Source§

async fn delete(&mut self, _: &str, _: OpDelete) -> Result<()>

Source§

async fn close(&mut self) -> Result<()>

Source§

impl<T: DeleteDyn + ?Sized> Delete for Box<T>

Source§

fn delete<'a>( &'a mut self, path: &'a str, args: OpDelete, ) -> impl Future<Output = Result<()>> + MaybeSend + 'a

Source§

async fn close(&mut self) -> Result<()>

Implementors§