Crates.io | retryable |
lib.rs | retryable |
version | 0.1.1 |
source | src |
created_at | 2021-09-29 22:09:37.057345 |
updated_at | 2021-09-29 22:39:28.987036 |
description | Automatic function retry macro |
homepage | |
repository | https://github.com/BrokenSt0rm/retryable |
max_upload_size | |
id | 458406 |
size | 2,497 |
Retryable is a simple macro to let your rust function automatically retries after a certain amount of time. The main objective of this macro is to be non-intrusive: your code should not worry about retrying a fallible function.
Retryable is currently high unstable and experimental, use it at your own risk.
#[retryable(max_attempts = 5, sleep_seconds = 2)]
pub async fn fallible_function(
param: String,
) -> Result<String, Error> {
// Fallible code
}
Retryable currently has some limitations/bugs and it can't be used by or with:
move
keyword in function bodyIf you encounter additional bugs feel free to fill an issue.
Contributions are always welcome! If you find a bug or want to add a feature, please feel free to open a PR.