{"id":15665960,"url":"https://github.com/upsuper/assert-impl","last_synced_at":"2025-09-23T05:04:47.210Z","repository":{"id":57497609,"uuid":"144214181","full_name":"upsuper/assert-impl","owner":"upsuper","description":"Macro for static assert that types implement a trait or not.","archived":false,"fork":false,"pushed_at":"2018-10-28T21:39:10.000Z","size":5,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T23:06:48.373Z","etag":null,"topics":["rust","rust-macro"],"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/upsuper.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":"2018-08-09T23:43:37.000Z","updated_at":"2024-01-14T22:37:41.000Z","dependencies_parsed_at":"2022-09-03T23:53:07.336Z","dependency_job_id":null,"html_url":"https://github.com/upsuper/assert-impl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Fassert-impl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Fassert-impl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Fassert-impl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/upsuper%2Fassert-impl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/upsuper","download_url":"https://codeload.github.com/upsuper/assert-impl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161904,"owners_count":21057670,"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":["rust","rust-macro"],"created_at":"2024-10-03T13:58:11.014Z","updated_at":"2025-09-23T05:04:42.168Z","avatar_url":"https://github.com/upsuper.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Macro for static assert that types implement a trait or not.\n\nNote: this macro can only be used inside function body due to\nrestriction of Rust.\n\n# Example\n\nAssuming you have the following definitions:\n```rust\nstruct C;\nstruct Java;\nstruct JavaScript;\nstruct Python;\nstruct Rust;\n\ntrait StaticTyping {}\nimpl StaticTyping for C {}\nimpl StaticTyping for Java {}\nimpl StaticTyping for Rust {}\n```\n\nThis should build:\n```rust\nassert_impl!(StaticTyping: C, Java, Rust);\nassert_impl!(StaticTyping: C, Java, Rust, );\nassert_impl!(!StaticTyping: JavaScript, Python);\nassert_impl!(!StaticTyping: JavaScript, Python, );\n```\n\nBut this should fail to build:\n```rust\nassert_impl!(StaticTyping: JavaScript);\nassert_impl!(!StaticTyping: Rust);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsuper%2Fassert-impl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fupsuper%2Fassert-impl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fupsuper%2Fassert-impl/lists"}