Skip to main content

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<(), Error>> + MaybeSend + 'a;
    fn close(&mut self) -> impl Future<Output = Result<(), Error>> + MaybeSend;
}
Expand description

The Delete trait defines interfaces for performing deletion operations.

Implementations may execute each request immediately or buffer requests for batch deletion. Callers must always call Delete::close to flush pending work before dropping the deleter.

Required Methods§

Source

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

Request deletion of a resource at the specified path with optional arguments.

A successful return means the deleter has accepted the request. It does not guarantee that all backend work has completed.

Source

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

Flush pending requests and wait until all accepted deletions are complete.

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<(), Error>

Source§

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

Source§

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

Source§

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

Source§

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

Implementors§

§

impl Delete for RouteDeleter

§

impl<D> Delete for Deleter<D>
where D: Delete,

Source§

impl<D> Delete for BatchDeleter<D>
where D: BatchDelete,

Source§

impl<D> Delete for OneShotDeleter<D>
where D: OneShotDelete,