Acknowledgement

Trait Acknowledgement 

Source
pub trait Acknowledgement:
    Clone
    + Send
    + Sync
    + Debug
    + 'static {
    type Waiter: Future<Output = Result<(), Self::Error>> + Send + Sync + Unpin + 'static;
    type Error: Debug + Send + Sync + 'static;

    // Required methods
    fn handle() -> (Self, Self::Waiter);
    fn acknowledge(self);
}
Expand description

A mechanism for acknowledging the completion of a task.

Required Associated Types§

Source

type Waiter: Future<Output = Result<(), Self::Error>> + Send + Sync + Unpin + 'static

Future resolved once the acknowledgement is handled.

Source

type Error: Debug + Send + Sync + 'static

Error produced if the acknowledgement is not handled.

Required Methods§

Source

fn handle() -> (Self, Self::Waiter)

Create a new acknowledgement handle paired with the waiter.

Source

fn acknowledge(self)

Fulfill the acknowledgement.

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§