[][src]Module cmp_wrap::strict

The strict option will not let you compare different types even if they're mapped (keyed) to comparable Key types.

Please notice that you have to use the same function signature for all of the strict Cmp types, which means you'll have to build them using reference to the same closure if you chose to create CmpByKey yourselves and not use the context.

Structs

CmpByKey

The main structure of this crate. Lets you define a "key function" over any structure, which will change the way the value is being compared. Very useful when you need to enter your data to different data structures (such as max heaps, sorted trees and so on), with different comparision criteria.

KeyCmpContext

Used to easily wrap multiple values with the same key function.