{"id":15759100,"url":"https://github.com/nwtgck/tuple-map-rust","last_synced_at":"2025-03-31T08:48:45.112Z","repository":{"id":87735924,"uuid":"264905745","full_name":"nwtgck/tuple-map-rust","owner":"nwtgck","description":".map() operation for tuples in Rust","archived":false,"fork":false,"pushed_at":"2020-05-18T10:58:21.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-02-06T13:29:58.833Z","etag":null,"topics":["macro","map","rust","tuple"],"latest_commit_sha":null,"homepage":"","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/nwtgck.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":"2020-05-18T10:29:14.000Z","updated_at":"2020-05-18T10:58:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"68ae4848-7678-4356-8cee-6d44de85b5c0","html_url":"https://github.com/nwtgck/tuple-map-rust","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Ftuple-map-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Ftuple-map-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Ftuple-map-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nwtgck%2Ftuple-map-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nwtgck","download_url":"https://codeload.github.com/nwtgck/tuple-map-rust/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246443527,"owners_count":20778247,"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":["macro","map","rust","tuple"],"created_at":"2024-10-04T10:03:10.160Z","updated_at":"2025-03-31T08:48:45.079Z","avatar_url":"https://github.com/nwtgck.png","language":"Rust","readme":"# tuple-map\n![Rust](https://github.com/nwtgck/tuple-map-rust/workflows/Rust/badge.svg?branch=develop)\n\n.map() operation for tuples in Rust\n\n## Install\n\n```toml\n# Cargo.toml\n\n[dependencies]\ntuple-map = { git = \"https://github.com/nwtgck/tuple-map-rust.git\" }\n```\n\n## Examples\n\nHere are examples.\n\n```rust\nuse tuple_map::tuple_map;\n\nlet a = tuple_map!((10, \"hello\", 1.23), x, {\n    format!(\"{:?}\", x)\n});\nassert_eq!(a, (\"10\".to_string(), \"\\\"hello\\\"\".to_string(), \"1.23\".to_string()));\n```\n\n\n```rust\nuse tuple_map::tuple_map;\n\n\nfn f1(vec: \u0026mut Vec\u003ci32\u003e) -\u003e u32 {\n    vec.push(1);\n    10\n}\n\nfn f2(vec: \u0026mut Vec\u003ci32\u003e) -\u003e \u0026'static str {\n    vec.push(2);\n    \"hello\"\n}\n\nfn f3(vec: \u0026mut Vec\u003ci32\u003e) -\u003e f32 {\n    vec.push(3);\n    1.2\n}\n\nlet mut vec: Vec\u003ci32\u003e = Vec::new();\nlet a = tuple_map!((f1, f2, f3), f, {\n    f(\u0026mut vec)\n});\nassert_eq!(a, (10, \"hello\", 1.2));\nassert_eq!(vec, vec![1, 2, 3]);\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Ftuple-map-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnwtgck%2Ftuple-map-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnwtgck%2Ftuple-map-rust/lists"}