async_monad 0.2.0

Asynchronous monad for rust
Documentation
  • Coverage
  • 13.08%
    14 out of 107 items documented6 out of 98 items with examples
  • Size
  • Source code size: 90.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Embers-of-the-Fire

Async Monad

This library is designed for using monads like core::Result and core::Option in asynchronous control flow.

Wrapped Async Monad

The async_monad::async_wrapped offers the inner-async version of Result and Option. These monads save the Future inside it, which allows you to use them synchronously and wait at one time.

Typically, all operations over them will create a new Future, moving and cloning all associated data, so theperformance will be (somehow much) worse than handle them manually. The rest methods (which are tagged as async) will consume the Future and produce some result.

Asynchronous Standard Monad Operation

The async_monad::async_traits offers the asynchronous version of std apis, which accepts Futures and asynchronous functions.

The utility is hidden behind the async_trait feature, which is enabled by default. Since it uses the feature which went stable since Rustc 1.75, you have to update your rustc through rustup or disable the feature manually.