pub trait AsyncConsume {
    type ConsumeError: Error;

    // Required methods
    fn remove<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>
       where Self: 'async_trait;
    fn close<'async_trait>(
        self
    ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>
       where Self: 'async_trait;
}
Expand description

Trait representing a collection that can be closed or removed entirely.

Required Associated Types§

source

type ConsumeError: Error

Error that can occur during a consumption operation.

Required Methods§

source

fn remove<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>where Self: 'async_trait,

Removes all storage associated with this collection.

The records in this collection are completely removed.

source

fn close<'async_trait>( self ) -> Pin<Box<dyn Future<Output = Result<(), Self::ConsumeError>> + 'async_trait>>where Self: 'async_trait,

Closes this collection.

One would need to re-qcquire a handle to this collection from the storage in-order to access the records ot this collection again.

Implementors§