{"id":16847818,"url":"https://github.com/stepancheg/ordinal-map","last_synced_at":"2025-04-11T06:35:30.004Z","repository":{"id":245623403,"uuid":"818785130","full_name":"stepancheg/ordinal-map","owner":"stepancheg","description":"Map types to integers","archived":false,"fork":false,"pushed_at":"2024-06-24T01:50:57.000Z","size":89,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T04:28:48.546Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stepancheg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-22T21:28:09.000Z","updated_at":"2024-11-25T12:26:21.000Z","dependencies_parsed_at":"2024-06-23T03:34:10.390Z","dependency_job_id":"ac5428e6-0a8b-463b-89d7-c97760e37e3f","html_url":"https://github.com/stepancheg/ordinal-map","commit_stats":null,"previous_names":["stepancheg/ordinal-map"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepancheg%2Fordinal-map","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepancheg%2Fordinal-map/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepancheg%2Fordinal-map/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepancheg%2Fordinal-map/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stepancheg","download_url":"https://codeload.github.com/stepancheg/ordinal-map/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248357833,"owners_count":21090400,"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-13T13:09:09.592Z","updated_at":"2025-04-11T06:35:29.991Z","avatar_url":"https://github.com/stepancheg.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `Ordinal` types and collections\n\n\u003c!-- cargo-rdme start --\u003e\n\nThe library provides `Ordinal` trait to map types to `usize` values,\nproc-macro to derive `Ordinal` trait for structs and enums,\nand `map` and `set` implementations\nthat use these types as keys efficiently.\n\n## Example\n\n```rust\nuse ordinal_map::map::total::OrdinalTotalMap;\n#[derive(ordinal_map::Ordinal)]\nenum ErrorCategory {\n    Network,\n    Disk,\n    Logic,\n}\n\nfn classify_error(error: \u0026str) -\u003e ErrorCategory {\n    // ...\n}\n\nlet mut error_counts: OrdinalTotalMap\u003cErrorCategory, u64\u003e = OrdinalTotalMap::default();\n\nfor error in \u0026errors {\n    let category = classify_error(error);\n    error_counts[category] += 1;\n}\n```\n\n\u003c!-- cargo-rdme end --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepancheg%2Fordinal-map","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstepancheg%2Fordinal-map","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepancheg%2Fordinal-map/lists"}