{"id":16795209,"url":"https://github.com/abonander/enum_ns","last_synced_at":"2025-10-05T00:33:53.721Z","repository":{"id":23735023,"uuid":"27108570","full_name":"abonander/enum_ns","owner":"abonander","description":"A Rust compiler plugin that gives enum variants within a module the old namespacing behavior.","archived":false,"fork":false,"pushed_at":"2014-11-25T04:26:19.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-17T19:04:50.774Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abonander.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}},"created_at":"2014-11-25T04:11:25.000Z","updated_at":"2014-11-25T04:26:20.000Z","dependencies_parsed_at":"2022-08-22T03:50:22.181Z","dependency_job_id":null,"html_url":"https://github.com/abonander/enum_ns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abonander/enum_ns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abonander%2Fenum_ns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abonander%2Fenum_ns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abonander%2Fenum_ns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abonander%2Fenum_ns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abonander","download_url":"https://codeload.github.com/abonander/enum_ns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abonander%2Fenum_ns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278395885,"owners_count":25979685,"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-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-10-13T09:15:42.262Z","updated_at":"2025-10-05T00:33:53.683Z","avatar_url":"https://github.com/abonander.png","language":"Rust","readme":"enum_ns\n==========\n\nA Rust compiler plugin that gives enum variants within a module the old namespacing behavior.\n\nSupplies the `#[promote_variants]` attribute that, when applied to a crate or module, will add `use Enum::{Variant1, Variant2, ..};` to the module for each `enum` definition it contains. For forward-compatibility, does not use globs.\n\nApply the `#[promote_variants(export)]` for the equivalent `pub use` of the above.\n\nUsage\n--------\n\nAdd to Cargo.toml:\n```\n[dependencies.enum_ns]\ngit = \"https://github.com/cybergeek94/enum_ns\"\n```\n\nCrate example:\n```rust\n#![feature(phase)]\n#![promote_variants]\n\n#[phase(plugin)] extern crate enum_ns;\n\nenum MyEnum {\n    Variant1,\n    Variant2,\n    Variant3,\n}\n\nfn main() {\n  println!(\"{}, {}, {}\", Variant1, Variant2, Variant3);\n}\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabonander%2Fenum_ns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabonander%2Fenum_ns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabonander%2Fenum_ns/lists"}