{"id":15762397,"url":"https://github.com/williamvenner/turbonone","last_synced_at":"2025-10-27T08:09:54.632Z","repository":{"id":57670787,"uuid":"353504608","full_name":"WilliamVenner/turbonone","owner":"WilliamVenner","description":"Tiny macro for calling functions with generic Option\u003cT\u003e arguments","archived":false,"fork":false,"pushed_at":"2021-04-03T21:02:50.000Z","size":13,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-03T15:09:15.634Z","etag":null,"topics":["generic","generics","macro","no-std","nostd","option","proc-macro","turbofish"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/turbonone","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/WilliamVenner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-31T22:18:19.000Z","updated_at":"2024-08-16T14:29:56.000Z","dependencies_parsed_at":"2022-09-26T20:41:14.646Z","dependency_job_id":null,"html_url":"https://github.com/WilliamVenner/turbonone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WilliamVenner/turbonone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fturbonone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fturbonone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fturbonone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fturbonone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WilliamVenner","download_url":"https://codeload.github.com/WilliamVenner/turbonone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WilliamVenner%2Fturbonone/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281235297,"owners_count":26466177,"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","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["generic","generics","macro","no-std","nostd","option","proc-macro","turbofish"],"created_at":"2024-10-04T11:09:00.736Z","updated_at":"2025-10-27T08:09:54.591Z","avatar_url":"https://github.com/WilliamVenner.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![crates.io](https://meritbadge.herokuapp.com/turbonone)](https://crates.io/crates/turbonone)\n[![docs.rs](https://docs.rs/turbonone/badge.svg)](https://docs.rs/turbonone/)\n[![license](https://img.shields.io/crates/l/turbonone)](https://github.com/WilliamVenner/turbonone/blob/master/LICENSE)\n\n# turbonone (no_std)\n\nTiny macro for calling functions with generic `Option\u003cT\u003e` arguments.\n\n## Usage\n\nAdd to your [Cargo.toml](https://doc.rust-lang.org/cargo/reference/manifest.html) file:\n\n```toml\n[dependencies]\nturbonone = \"0.*\"\n```\n\n## The Problem\n\n```rust\nfn my_function\u003cT\u003e(arg: Option\u003cT\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nfn my_box_function\u003cT\u003e(arg: Option\u003cBox\u003cT\u003e\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nfn my_complex_function\u003cT\u003e(arg: Option\u003cArc\u003cBox\u003cT\u003e\u003e\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nmy_function(None); // cannot infer type for type parameter `T` declared on the associated function `my_function`\nmy_function(Some(\"An argument\")); // Works!\n\nmy_box_function(None); // cannot infer type for type parameter `T` declared on the associated function `my_box_function`\nmy_box_function(Some(Box::new(\"An argument\"))); // Works!\n\nmy_complex_function(None); // cannot infer type for type parameter `T` declared on the associated function `my_complex_function`\nmy_complex_function(Some(Arc::new(Box::new(\"An argument\")))); // Works!\n```\n\n## The Solution\n\n```rust\n#[macro_use] extern crate turbonone;\n\nfn my_function\u003cT\u003e(arg: Option\u003cT\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nfn my_box_function\u003cT\u003e(arg: Option\u003cBox\u003cT\u003e\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nfn my_complex_function\u003cT\u003e(arg: Option\u003cArc\u003cBox\u003cT\u003e\u003e\u003e) -\u003e \u0026'static str {\n    \"Works!\"\n}\n\nmy_function(turbonone!()); // Works!\nmy_function(Some(\"An argument\")); // Works!\n\nmy_box_function(turbonone!(Box)); // Works!\nmy_box_function(turbonone!(Box\u003c()\u003e)); // Works!\nmy_box_function(Some(Box::new(\"An argument\"))); // Works!\n\nmy_complex_function(turbonone!(Arc\u003cBox\u003c()\u003e\u003e)); // Works!\nmy_complex_function(Some(Arc::new(Box::new(\"An argument\")))); // Works!\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamvenner%2Fturbonone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilliamvenner%2Fturbonone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilliamvenner%2Fturbonone/lists"}