{"id":34574530,"url":"https://github.com/panicbit/derive_constructor","last_synced_at":"2026-05-29T04:31:20.634Z","repository":{"id":57618069,"uuid":"410617108","full_name":"panicbit/derive_constructor","owner":"panicbit","description":null,"archived":false,"fork":false,"pushed_at":"2021-09-26T17:28:44.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-25T21:14:18.682Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/panicbit.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}},"created_at":"2021-09-26T17:27:17.000Z","updated_at":"2021-09-26T17:28:31.000Z","dependencies_parsed_at":"2022-09-16T00:51:28.121Z","dependency_job_id":null,"html_url":"https://github.com/panicbit/derive_constructor","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/panicbit/derive_constructor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panicbit%2Fderive_constructor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panicbit%2Fderive_constructor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panicbit%2Fderive_constructor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panicbit%2Fderive_constructor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/panicbit","download_url":"https://codeload.github.com/panicbit/derive_constructor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/panicbit%2Fderive_constructor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33637485,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":"2025-12-24T09:48:17.474Z","updated_at":"2026-05-29T04:31:20.607Z","avatar_url":"https://github.com/panicbit.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# derive-constructor\n\nThis crate provides a derive macro `Constructor`, which creates a silly trait that mirrors an enum's constructors. It allows constructing an enum without explicitly naming its type.\nThe generated trait has the same name as the enum but with the suffix `Constructor`.\n\n## Example\n\n```rust\nuse derive_constructor::Constructor;\n\n#[derive(Constructor, Debug)]\nenum Foo {\n    A,\n    B(i32)\n}\n\nfn main() {\n    print_foo(\u003c_\u003e::A);\n    print_foo(\u003c_\u003e::B(42));\n}\n\nfn print_foo(foo: Foo) {\n    println!(\"{:?}\", foo);\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanicbit%2Fderive_constructor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpanicbit%2Fderive_constructor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpanicbit%2Fderive_constructor/lists"}