compile_type_eq

Crates.iocompile_type_eq
lib.rscompile_type_eq
version0.1.1
sourcesrc
created_at2020-12-25 22:15:16.882882
updated_at2020-12-25 23:22:39.08003
descriptionCompile-time type equality checking
homepage
repository
max_upload_size
id327284
size6,310
Dmytro Polunin (p0lunin)

documentation

https://docs.rs/compile_type_eq/

README

compile-type-eq

This crate help you check type equality at compile time.

Example of usage:

use compile_type_eq::*;

assert_types_eq::<i32, i32>();
assert_types_not_eq::<i32, u32, _>();

This will fail:

use compile_type_eq::*;

assert_types_eq::<i32, u32>();
assert_types_not_eq::<i32, i32, _>();

For more complicated examples see examples folder

Commit count: 0

cargo fmt