async-move

Crates.ioasync-move
lib.rsasync-move
version0.0.1
created_at2025-01-18 04:58:28.038446+00
updated_at2025-01-18 04:58:28.038446+00
descriptionA Rust library providing macros to simplify the creation of asynchronous closures with external state captured by move. Useful for structuring asynchronous code with ease and clarity.
homepage
repositoryhttps://github.com/ltpp-universe/async-move
max_upload_size
id1521356
size16,921
尤雨东 (eastspire)

documentation

README

async-move

Official Documentation

A Rust library providing macros to simplify the creation of asynchronous closures with external state captured by move. Useful for structuring asynchronous code with ease and clarity.

Installation

To install async-move run cmd:

cargo add async-move

Usage

use async_move::*;
let string: String = String::from("test");
let number: i32 = 1;
let func = async_func!(string, number, |data| {
    let tmp_string: String = String::from("test");
    assert_eq!(string, tmp_string);
    assert_eq!(data, 1);
    assert_eq!(number, 1);
});
func(1).await;

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Contact

For any inquiries, please reach out to the author at ltpp-universe root@ltpp.vip.

Commit count: 0

cargo fmt