Skip to main content

from_async

Function from_async 

Source
pub fn from_async<A, E, R, F, Fut>(f: F) -> Effect<A, E, R>
where A: Send + 'static, E: Send + 'static, R: Send + Sync + 'static, F: FnOnce() -> Fut + Send + 'static, Fut: Future<Output = Result<A, E>> + Send + 'static,
Expand description

A real async step. f runs on first poll; the future must be Send + 'static (it may not borrow the environment; use Effect::from_ctx for that).