has_impl 0.1.0

Check if trait is implemented for type in compile time
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 3.71 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 471.58 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Frago9876543210/has_impl
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Frago9876543210

has_impl

Build Status Latest Version Documentation

Check if trait is implemented for type at compile time

Example

use has_impl::*;

trait Foo {}

impl Foo for i32 {}

fn main() {
	assert_eq!(has_impl!(i32: Foo), true);
}

Installing

[dependencies]
has_impl = "0.1"