Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frago9876543210/has_impl
Check if trait is implemented for type in compile time
https://github.com/frago9876543210/has_impl
compile-time implementation macros nostd rust-lang
Last synced: 25 days ago
JSON representation
Check if trait is implemented for type in compile time
- Host: GitHub
- URL: https://github.com/frago9876543210/has_impl
- Owner: Frago9876543210
- License: mit
- Created: 2020-06-04T17:58:56.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-04T18:35:10.000Z (over 4 years ago)
- Last Synced: 2024-04-24T15:23:58.997Z (8 months ago)
- Topics: compile-time, implementation, macros, nostd, rust-lang
- Language: Rust
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
has_impl
========
[![Build Status](https://travis-ci.org/Frago9876543210/has_impl.svg?branch=master)](https://travis-ci.org/Frago9876543210/has_impl)
[![Latest Version](https://img.shields.io/crates/v/has_impl.svg)](https://crates.io/crates/has_impl)
[![Documentation](https://docs.rs/has_impl/badge.svg)](https://docs.rs/has_impl/)Check if trait is implemented for type at compile time
### Example
```rust
use has_impl::*;trait Foo {}
impl Foo for i32 {}
fn main() {
assert_eq!(has_impl!(i32: Foo), true);
}
```### Installing
```toml
[dependencies]
has_impl = "0.1"
```