Skip to content

Various extention traits for providing asynchronous higher-order functions

License

Notifications You must be signed in to change notification settings

kawaemon/async-hofs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
);

About

Various extention traits for providing asynchronous higher-order functions

Resources

License

Stars

Watchers

Forks

Languages