Rsvow
A Rust-like implementation of JavaScript's Promise mechanism.
Overview
rsvow is a lightweight Rust crate that provides an API similar to JavaScript's Promise. It allows you to manage asynchronous or delayed computations with a familiar interface.
For more details, check out the documentation.
Features
- Simple API:
rsvowprovides a simple and easy-to-use API that functions similarly to JavaScript's Promise. - Thread-safe:
rsvowis thread-safe and can be used in multi-threaded environments. - Asynchronous:
rsvowallows you to run code asynchronously and handle the results in a clean and concise way. - Error handling:
rsvowprovides error handling mechanisms that allow you to catch and handle errors in a convenient manner. - Chaining:
rsvowsupports chaining of promises, allowing you to create complex asynchronous workflows with ease.
Installation
Add the following dependency to your Cargo.toml:
[]
= "0.1.0"
Or if you want to use the latest version from the main branch:
[]
= { = "https://github.com/ferranSanchezLlado/rsvow.git" }
Usage
Below is a simple example of using rsvow:
use ;
You can also run code asynchronously:
use ;
use thread;
License
Dual-licensed under MIT or Apache-2.0. See LICENSE for details.