[−][src]Function std::future::from_generator
pub fn from_generator<T: Generator<Yield = ()>>(
x: T
) -> impl Future<Output = T::Return>
Wrap a generator in a future.
This function returns a GenFuture
underneath, but hides it in impl Trait
to give
better error messages (impl Future
rather than GenFuture<[closure.....]>
).