{"id":16376700,"url":"https://github.com/wiktor-k/unimpl","last_synced_at":"2026-04-07T05:30:18.604Z","repository":{"id":182934298,"uuid":"655657650","full_name":"wiktor-k/unimpl","owner":"wiktor-k","description":"Better `unimplemented!` macro for function definitions.","archived":false,"fork":false,"pushed_at":"2023-06-20T15:58:33.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T03:07:57.081Z","etag":null,"topics":["macros","rust","testing"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/unimpl","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wiktor-k.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-06-19T10:33:30.000Z","updated_at":"2023-06-19T11:36:08.000Z","dependencies_parsed_at":"2023-07-22T06:51:40.272Z","dependency_job_id":null,"html_url":"https://github.com/wiktor-k/unimpl","commit_stats":null,"previous_names":["wiktor-k/unimpl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiktor-k%2Funimpl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiktor-k%2Funimpl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiktor-k%2Funimpl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wiktor-k%2Funimpl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wiktor-k","download_url":"https://codeload.github.com/wiktor-k/unimpl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239970661,"owners_count":19727010,"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":["macros","rust","testing"],"created_at":"2024-10-11T03:25:47.351Z","updated_at":"2026-04-07T05:30:18.534Z","avatar_url":"https://github.com/wiktor-k.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `#[unimpl]`\n\n[![CI](https://github.com/wiktor-k/unimpl/actions/workflows/ci.yml/badge.svg)](https://github.com/wiktor-k/unimpl/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/unimpl)](https://crates.io/crates/unimpl)\n\nBetter `unimplemented!` macro for function definitions.\n\nThis macro helps you iterate faster on your codebase giving you more\naccurate feedback on which functions were called during tests. It's\nmost useful during development.\n\nWithout `unimpl` the exact reason needs to be specified explicitly\notherwise the error message is too generic:\n\n```rust\nuse panic_message::panic_message;\n\nfn func(a: u32) -\u003e u32 {\n    unimplemented!();\n}\n\nlet error = std::panic::catch_unwind(|| {\n    func(42);\n}).unwrap_err();\n\n// in a bigger codebase it's not clear which function was called\nassert_eq!(panic_message(\u0026error), \"not implemented\");\n```\n\nWith `unimpl` the function name is automatically attached to the error\nmessage and the function body can be completely omitted:\n\n```rust\nuse unimpl::unimpl;\nuse panic_message::panic_message;\n\n#[unimpl]\npub fn func(a: u32) -\u003e u32; // function body is autogenerated\n\nlet error = std::panic::catch_unwind(|| {\n    func(42);\n}).unwrap_err();\n\n// function name is automatically appended\nassert_eq!(panic_message(\u0026error), \"not implemented: func\");\n```\n\nThe macro can also be used inside `impl` blocks:\n\n```rust\nuse unimpl::unimpl;\nuse panic_message::panic_message;\n\nstruct X;\n\nimpl X {\n    /// This is a func.\n    #[unimpl]\n    pub fn func(a: u32) -\u003e u32;\n}\n\nlet error = std::panic::catch_unwind(|| {\n    X::func(42);\n}).unwrap_err();\n\nassert_eq!(panic_message(\u0026error), \"not implemented: func\");\n```\n\n## License\n\nThis project is licensed under either of:\n\n  - [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0),\n  - [MIT license](https://opensource.org/licenses/MIT).\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in this crate by you, as defined in the\nApache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiktor-k%2Funimpl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwiktor-k%2Funimpl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwiktor-k%2Funimpl/lists"}