It would be nice to `await` builders directly. There's a nice explanation of this pattern here - https://blog.yoshuawuyts.com/async-finalizers/ it will allow us to rewrite this- ```rust let index = Index::init(root, download) .build() .await?; ``` like this- ```rust let index = Index::init(root, download) .await?; ``` There are two options for doing this 1. implement `Future` for the builders. This isn't too hard, but it's not that clean, and makes the code look a little unapproachable. 2. implement `IntoFuture` for the builders. This relies on an unmerged nightly feature, and has been stuck in limbo for a while - https://github.com/rust-lang/rust/pull/68811
It would be nice to
awaitbuilders directly.There's a nice explanation of this pattern here - https://blog.yoshuawuyts.com/async-finalizers/
it will allow us to rewrite this-
like this-
There are two options for doing this
Futurefor the builders. This isn't too hard, but it's not that clean, and makes the code look a little unapproachable.IntoFuturefor the builders. This relies on an unmerged nightly feature, and has been stuck in limbo for a while - Re-land "add IntoFuture trait and support for await" rust-lang/rust#68811