async_monad

Crates.ioasync_monad
lib.rsasync_monad
version0.2.0
sourcesrc
created_at2023-12-02 13:34:10.272777
updated_at2024-01-01 10:58:59.987048
descriptionAsynchronous monad for rust
homepage
repositoryhttps://github.com/Embers-of-the-Fire/async-monad/
max_upload_size
id1056117
size53,150
Embers-of-the-Fire (Embers-of-the-Fire)

documentation

README

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.

Commit count: 0

cargo fmt