[][src]Crate compile_type_eq

This crate help you check type equality at compile time.

Usage:

use compile_type_eq::*;

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

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

For more complicated examples see examples folder

Modules

how_it_works

Learn how comparison works.

Structs

TypesEq

Use this struct when you want to check that two types are equal.

Traits

CompileEq

Trait for compile-time equality checking

CompileEqResult

Trait is used to be affirmative that there are no external implementations for CompileEq.

Functions

assert_types_eq

Checks that the types are eq.

assert_types_not_eq

Checks that the types are not eq.