Function stakker_async_await::future_pull_result [−][src]
pub fn future_pull_result<T>(
core: &mut Core,
ret: Ret<Ret<T>>
) -> impl Future<Output = Result<T, ActorFail>>
Create a pull-style Ret
→ Future
pipe, that passes
through failure
This returns a future which when polled will send a message to the
provided stakker::Ret
instance in order to request a value.
So it “pulls” the value only on demand. The provided
stakker::Ret
instance is given a stakker::Ret
to use to
send back the value. If the value is not provided, either because
there is nothing left running to handle the stakker::Ret
sent,
or if the provided stakker::Ret
is dropped, then the future
resolves to None
. If a value is passed through then it resolves
to Some(value)
. To ignore None
values and drop the task, see
future_pull_some
.