{"id":18846829,"url":"https://github.com/srijs/rust-tokio-retry","last_synced_at":"2025-04-12T21:25:30.541Z","repository":{"id":54161728,"uuid":"83969944","full_name":"srijs/rust-tokio-retry","owner":"srijs","description":"Extensible, asynchronous retry behaviours for futures/tokio","archived":false,"fork":false,"pushed_at":"2023-08-14T14:37:38.000Z","size":60,"stargazers_count":132,"open_issues_count":10,"forks_count":28,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-04T01:08:26.353Z","etag":null,"topics":["retry","rust","tokio"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tokio-retry","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srijs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-05T12:56:37.000Z","updated_at":"2025-03-28T06:22:28.000Z","dependencies_parsed_at":"2024-06-18T20:01:01.687Z","dependency_job_id":"714668b2-c8e7-4685-848a-f37491438dae","html_url":"https://github.com/srijs/rust-tokio-retry","commit_stats":{"total_commits":73,"total_committers":6,"mean_commits":"12.166666666666666","dds":0.1095890410958904,"last_synced_commit":"88eab611f8721e08ab8792b2acf2c0af8ccb645a"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijs%2Frust-tokio-retry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijs%2Frust-tokio-retry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijs%2Frust-tokio-retry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srijs%2Frust-tokio-retry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srijs","download_url":"https://codeload.github.com/srijs/rust-tokio-retry/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248633299,"owners_count":21136851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["retry","rust","tokio"],"created_at":"2024-11-08T03:04:05.730Z","updated_at":"2025-04-12T21:25:30.519Z","avatar_url":"https://github.com/srijs.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# tokio-retry\n\nExtensible, asynchronous retry behaviours for the ecosystem of [tokio](https://tokio.rs/) libraries.\n\n[![Build Status](https://travis-ci.org/srijs/rust-tokio-retry.svg?branch=master)](https://travis-ci.org/srijs/rust-tokio-retry)\n[![crates](http://meritbadge.herokuapp.com/tokio-retry)](https://crates.io/crates/tokio-retry)\n[![dependency status](https://deps.rs/repo/github/srijs/rust-tokio-retry/status.svg)](https://deps.rs/repo/github/srijs/rust-tokio-retry)\n\n\n[Documentation](https://docs.rs/tokio-retry)\n\n## Installation\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\ntokio-retry = \"0.3\"\n```\n\n## Examples\n\n```rust\nuse tokio_retry::Retry;\nuse tokio_retry::strategy::{ExponentialBackoff, jitter};\n\nasync fn action() -\u003e Result\u003cu64, ()\u003e {\n    // do some real-world stuff here...\n    Err(())\n}\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), ()\u003e {\n    let retry_strategy = ExponentialBackoff::from_millis(10)\n        .map(jitter) // add jitter to delays\n        .take(3);    // limit to 3 retries\n\n    let result = Retry::spawn(retry_strategy, action).await?;\n\n    Ok(())\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrijs%2Frust-tokio-retry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrijs%2Frust-tokio-retry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrijs%2Frust-tokio-retry/lists"}