Function stakker_async_await::ret_to_future [−][src]
pub fn ret_to_future<T>(core: &mut Core) -> (impl Future<Output = T>, Ret<T>)
Create a push-style Ret
→ Future
pipe, that drops the
task on failure
This returns a future which will resolve to a value only once a
value is provided to the returned stakker::Ret
instance. If
the stakker::Ret
instance is dropped (for example if the actor
holding it fails), then if that future is awaited then the task
will also be dropped, which means that the task will be stopped
abruptly at the current await
. To handle stakker::Ret
being
dropped, see ret_to_future_result
.