Skip to content

Eveeifyeve/async_move_trait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

async_move_trait

An Async move trait macro that transforms the function into impl Future.

This crate provides the #[async_move_trait] procedural macro attribute, which transforms a function return type becomes impl Future.

Example

use async_move_trait::async_move_trait;

#[async_move_trait]
fn (r: &i32) -> i32 {
  let capture = *r;

  async move{};
   
  capture
}

The above expands to:

fn (r: &i32) -> impl Future<Output = i32> {
  let capture = *r;

  async move {
    capture
  }
}

About

An Async move trait macro.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published