Module konst::polymorphism[][src]

This is supported on crate feature cmp only.

Machinery for making the comparison macros work with both standard and user-defined types.

To make those macros work with both std and non-std types, they must implement ConstCmpMarker to describe whether they’re from std or not.

Structs

CmpWrapper

A wrapper type for std types, which defines const_eq and const_cmp methods for them.

IsAConstCmpMarker

Hack used to automatically wrap standard library types inside CmpWrapper, while leaving user defined types unwrapped.

IsArrayKind

Marker type for arrays and slices, used as the Kind associated type in ConstCmpMarker.

IsNotStdKind

Marker type for non-standard library types, used as the Kind associated type in ConstCmpMarker.

IsStdKind

Marker type for the remaining standard library types, used as the Kind associated type in ConstCmpMarker.

Traits

ConstCmpMarker

Marker trait for types that implement the const comparison methods.