{"id":17336569,"url":"https://github.com/restioson/catty","last_synced_at":"2025-04-14T17:31:02.323Z","repository":{"id":47164763,"uuid":"294363864","full_name":"Restioson/catty","owner":"Restioson","description":"Send and await a value asynchronously","archived":false,"fork":false,"pushed_at":"2023-09-28T09:52:48.000Z","size":20,"stargazers_count":8,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-01T05:51:34.292Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Restioson.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}},"created_at":"2020-09-10T09:27:00.000Z","updated_at":"2024-10-06T14:00:07.000Z","dependencies_parsed_at":"2022-09-12T04:01:10.401Z","dependency_job_id":null,"html_url":"https://github.com/Restioson/catty","commit_stats":{"total_commits":13,"total_committers":1,"mean_commits":13.0,"dds":0.0,"last_synced_commit":"99c8c35fcb612fd5f1b8b77a2d5ccfa270f02b07"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2Fcatty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2Fcatty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2Fcatty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Restioson%2Fcatty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Restioson","download_url":"https://codeload.github.com/Restioson/catty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223639403,"owners_count":17177816,"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":[],"created_at":"2024-10-15T15:31:29.204Z","updated_at":"2024-11-08T06:03:31.663Z","avatar_url":"https://github.com/Restioson.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# catty\n\n![a picture of a slingshot](catty.svg)\n\nSend a value synchronously and asynchronously wait for it. Catty is faster, simpler, and more lightweight than\n[`futures::oneshot`](https://docs.rs/futures/0.3.5/futures/channel/oneshot/index.html), which is *slightly* more flexible.\n\n## Example\n\n```rust\nlet (tx, rx) = catty::oneshot();\ntx.send(\"Hello!\");\nassert_eq!(rx.await, Ok(\"Hello!\"));\n```\n\n## Benchmarks\n\nTo run the benchmarks with Criterion, simply do `cargo bench`. On my machine, the results are as follows:\n\n```\ncreate-futures          time:   [70.934 ns 70.979 ns 71.045 ns]\ncreate-catty            time:   [32.549 ns 32.594 ns 32.650 ns]\noneshot-futures         time:   [146.45 ns 146.76 ns 147.09 ns]\noneshot-catty           time:   [98.497 ns 99.065 ns 99.686 ns]\nsend-futures            time:   [80.163 ns 80.384 ns 80.680 ns]\nsend-catty              time:   [39.064 ns 39.206 ns 39.354 ns]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestioson%2Fcatty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frestioson%2Fcatty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frestioson%2Fcatty/lists"}