Function stakker_async_await::ret_to_future_result[][src]

pub fn ret_to_future_result<T>(
    core: &mut Core
) -> (impl Future<Output = Result<T, ActorFail>>, Ret<T>)

Create a push-style RetFuture pipe, that passes through failure

This returns a future which will resolve to a value only once a value is provided to the returned stakker::Ret instance, or if the stakker::Ret is dropped. If the stakker::Ret instance is dropped (for example if the actor holding it fails), then Err(ActorFail) is passed, otherwise Ok(v). If you want the whole task to terminate abruptly if the stakker::Ret is dropped and that value is awaited, then see ret_to_future.