Module xtra::scoped_task

source ·
Expand description

This module contains a way to scope a future to the lifetime of an actor, stopping it before it completes if the actor it is associated with stops too.

Structs§

  • A task that is scoped to the lifecycle of an actor. This means that when the associated actor stops, the task will stop too. This future will either complete when the inner future completes, or when the actor is dropped, whichever comes first. If the inner future completes successfully, Some(result) will be returned, else None will be returned if the actor is stopped before it could be polled to completion.

Functions§