async-hofs

Crates.ioasync-hofs
lib.rsasync-hofs
version0.1.1
sourcesrc
created_at2022-06-24 12:30:32.721569
updated_at2022-06-28 02:17:30.292406
descriptionVarious extention traits for providing asynchronous higher-order functions
homepage
repositoryhttps://github.com/kawaemon/async-hofs
max_upload_size
id612378
size23,562
かわえもん (kawaemon)

documentation

README

async-hofs

Various extention traits for providing asynchronous higher-order functions.

crates.io docs.rs MIT licensed CI Status

// This won't make any name conflicts since all imports inside prelude are anonymous.
use async_hofs::prelude::*;

assert_eq!(
    Some(1).async_map(|x| async move { x + 2 }).await,
    Some(3),
);

type Result = core::result::Result<i32, i32>;

assert_eq!(
    Result::Ok(1).async_and_then(|_| async move { Err(77) }).await,
    Result::Err(77)
);
Commit count: 14

cargo fmt