{"id":17944911,"url":"https://github.com/sewer56/derive-enum-all-values","last_synced_at":"2026-04-07T06:31:43.492Z","repository":{"id":196404129,"uuid":"696053893","full_name":"Sewer56/derive-enum-all-values","owner":"Sewer56","description":"A procedural derive macro which exposes a method named `all_values` that returns all defined values as a compile-time static.","archived":false,"fork":false,"pushed_at":"2025-06-19T19:26:26.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-21T02:50:47.571Z","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/Sewer56.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":"CONTRIBUTING.MD","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,"zenodo":null}},"created_at":"2023-09-25T01:33:28.000Z","updated_at":"2025-06-19T19:26:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"c4be6b9f-7d1a-44e2-84a9-4cf206442066","html_url":"https://github.com/Sewer56/derive-enum-all-values","commit_stats":null,"previous_names":["sewer56/derive-enum-all-values"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Sewer56/derive-enum-all-values","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2Fderive-enum-all-values","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2Fderive-enum-all-values/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2Fderive-enum-all-values/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2Fderive-enum-all-values/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sewer56","download_url":"https://codeload.github.com/Sewer56/derive-enum-all-values/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sewer56%2Fderive-enum-all-values/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31503381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-29T06:05:41.153Z","updated_at":"2026-04-07T06:31:43.487Z","avatar_url":"https://github.com/Sewer56.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# derive-enum-all-values\n\n[![Crates.io](https://img.shields.io/crates/v/derive-enum-all-values.svg)](https://crates.io/crates/derive-enum-all-values)\n[![Docs.rs](https://docs.rs/derive-enum-all-values/badge.svg)](https://docs.rs/derive-enum-all-values)\n[![CI](https://github.com/Sewer56/derive-enum-all-values/actions/workflows/rust.yml/badge.svg)](https://github.com/Sewer56/derive-enum-all-values/actions)\n\n## About\n\nA procedural derive macro which exposes a method named `all_values` that returns all defined values as a compile-time static.\n\n## Usage\n\nAdd `derive-enum-all-values` to your `Cargo.toml`:\n\n```toml\n[dependencies]\nderive-enum-all-values = \"0.1.0\"\n```\n\nAnd then derive `AllValues` for your enum:\n\n```rust\nuse derive_enum_all_values::AllValues;\n\n#[derive(AllValues)]\nenum MyEnum {\n    Variant1,\n    Variant2,\n    // ... other variants ...\n}\n\nfn main() {\n    for variant in MyEnum::all_values() {\n        println!(\"{:?}\", variant);\n    }\n}\n```\n\nThis macro generates the following code:\n\n```rust\nimpl MyEnum {\n    pub const fn all_values() -\u003e \u0026'static [MyEnum] {\n        \u0026[MyEnum::Variant1, MyEnum::Variant2]\n    }\n}\n```\n\nA static, compile time known array containing every enum value.\n\n## Development\n\nHow to develop this project.\n\n***Clone this Repository:***\n```bash\n# When cloning, make sure symlinks are enabled\ngit clone -c core.symlinks=true https://github.com/Sewer56/derive-enum-all-values.git\n```\n\n***Install Rust:***\n- Install the [Rust Toolchain.][rust-toolchain]***Setup IDE***\n- This repository is fully with VSCode. [Guidance below](#visual-studio-code-integration).\n\n### Visual Studio Code Integration\n\n`Code`/`VSCode` is the de-facto Rust development environment.  \n\nThe following extensions are required:  \n- [rust-analyzer][rust-analyzer] for Rust support.  \n- [coverage-gutters][coverage-gutters] for Coverage support.  \n- [CodeLLDB][codelldb] for debugging.  \n- [crates](https://marketplace.visualstudio.com/items?itemName=serayuzgur.crates) easier dependency management.  \n\nThe VSCode configuration in Reloaded projects (`.vscode`) contain the following:  \n- Run Rust linter `clippy` on Save.  \n- Run code format `rustfmt` on Save.  \n- Tasks for common operations (generate documentation, active CI/CD etc.).  \n\nThese configurations are in the `.vscode` folder; and the tasks can be ran via `Ctrl+Shift+P -\u003e Run Task`.  \n\n## File Layout\n\nThe following is the expected file layout for your project:\n\n```\n.vscode/\nsrc/\nCargo.toml\n```\n\nThe `src` folder should contains all source code for your project.  \n`Cargo.toml` should be in the root of the project.  \n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.MD) for guidance on how to contribute to this project.  \n\n## License\n\nLicensed under [MIT](./LICENSE).  \n\n[codelldb]: https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb\n[coverage-gutters]: https://marketplace.visualstudio.com/items?itemName=ryanluker.vscode-coverage-gutters\n[rust-analyzer]: https://marketplace.visualstudio.com/items?itemName=rust-lang.rust-analyzer\n[rust-toolchain]: https://www.rust-lang.org/tools/install\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsewer56%2Fderive-enum-all-values","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsewer56%2Fderive-enum-all-values","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsewer56%2Fderive-enum-all-values/lists"}