actix::fut::future

Function wrap_future

Source
pub fn wrap_future<F, A>(f: F) -> FutureWrap<F, A>
where F: Future, A: Actor,
Expand description

Converts normal future into ActorFuture, allowing its processing to use the actor’s state.

See the documentation for ActorFuture for a practical example involving both wrap_future and ActorFuture