This commit moves the API from a sync call into async functions using async_trait.
We would like to use async operations on hypercore, and it would be nice to have the underlying storage using async-io when possible.
As discussed on https://github.com/datrs/hypercore/issues/97, we could change the API to use async functions on the 'ram' trait.
Async Trait methods are still unstable, but possible using the 'async-trait' crate through a macro.
This PR moves the API to use async-fns. Tests are passing.
Choose one: a 🙋 feature
Checklist
[x] tests pass
[x] tests and/or benchmarks are included
[x] documentation is changed or added
Context
Semver Changes
major as this is a breaking change and we are above 1.0.0
This commit moves the API from a sync call into async functions using async_trait.
We would like to use async operations on hypercore, and it would be nice to have the underlying storage using async-io when possible. As discussed on https://github.com/datrs/hypercore/issues/97, we could change the API to use async functions on the 'ram' trait.
Async Trait methods are still unstable, but possible using the 'async-trait' crate through a macro.
This PR moves the API to use async-fns. Tests are passing.
Choose one: a 🙋 feature
Checklist
Context
Semver Changes
major as this is a breaking change and we are above 1.0.0