Struct sc2::observer::EventAck [−][src]
pub struct EventAck { /* fields omitted */ }Notify the coordinator that we are done with this event.
This is simply a wrapper around a oneshot to simplify the acknowledgement. It mainly exists because of the generics for oneshot errors, but adds some clarity for its purpose.
Methods
impl EventAck[src]
impl EventAckpub fn wrap(tx: Sender<()>) -> Self[src]
pub fn wrap(tx: Sender<()>) -> SelfWrap the underlying oneshot for an EventAck
There may be external use-cases for creating EventAcks such as dispatching an event to a number of subscribers and then waiting until they are done using it by joining all of the oneshot receivers.
pub fn done(
self
) -> impl MyFuture<Result<()>> + 'static[src]
pub fn done(
self
) -> impl MyFuture<Result<()>> + 'staticSend a signal indicating that the user is done handling this event.