{"id":67747,"library":"collect-mac","title":"Collect Mac","description":"Provides the `collect!` macro to easily construct arbitrary collections like Vec, String, and HashMap with single allocation where possible.","status":"active","version":"0.1.0","language":"rust","source_language":null,"source_url":"https://github.com/DanielKeep/rust-collect-mac","tags":["macro","collection","allocation","utility"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\ncollect-mac = \"0.1.0\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add collect-mac","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"collect","correct":"use collect_mac::collect;"}],"quickstart":{"code":"use collect_mac::collect;\n\nfn main() {\n    let map = collect! {\n        HashMap<String, i32> =>\n            \"a\" => 1,\n            \"b\" => 2,\n    };\n    assert_eq!(map[\"a\"], 1);\n}","lang":"rust","description":"Constructs a HashMap using the collect! macro."},"warnings":[],"env_vars":null,"search_vec":"'alloc':19,24 'arbitrari':10 'collect':1,5,11,23 'construct':9 'easili':8 'hashmap':16 'like':12 'mac':2 'macro':6,22 'possibl':21 'provid':3 'singl':18 'string':14 'util':25 'vec':13","created_at":"2026-06-17T17:41:04.431634+00:00","updated_at":"2026-06-17T17:41:04.431634+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/DanielKeep/rust-collect-mac","github":"https://github.com/DanielKeep/rust-collect-mac","docs":"https://docs.rs/collect-mac/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}